@inharness-ai/claude4spec 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/c4s-brief-implementer/SKILL.md +120 -53
- package/CHANGELOG.md +20 -0
- package/dist/bin/c4s/commands/agent.d.ts +18 -0
- package/dist/bin/c4s/commands/agent.js +102 -0
- package/dist/bin/c4s/commands/agent.js.map +1 -0
- package/dist/bin/c4s/commands/ask.d.ts +9 -8
- package/dist/bin/c4s/commands/ask.js +23 -31
- package/dist/bin/c4s/commands/ask.js.map +1 -1
- package/dist/bin/c4s/commands/catalog.d.ts +1 -1
- package/dist/bin/c4s/commands/catalog.js +2 -2
- package/dist/bin/c4s/commands/catalog.js.map +1 -1
- package/dist/bin/c4s/commands/describe.d.ts +1 -1
- package/dist/bin/c4s/commands/describe.js +2 -2
- package/dist/bin/c4s/commands/describe.js.map +1 -1
- package/dist/bin/c4s/commands/detail.d.ts +1 -1
- package/dist/bin/c4s/commands/detail.js +2 -2
- package/dist/bin/c4s/commands/detail.js.map +1 -1
- package/dist/bin/c4s/commands/element-list.d.ts +1 -1
- package/dist/bin/c4s/commands/element-list.js +2 -2
- package/dist/bin/c4s/commands/element-list.js.map +1 -1
- package/dist/bin/c4s/commands/find-references.js +1 -1
- package/dist/bin/c4s/commands/find-references.js.map +1 -1
- package/dist/bin/c4s/commands/inline-mention.d.ts +1 -1
- package/dist/bin/c4s/commands/inline-mention.js +2 -2
- package/dist/bin/c4s/commands/inline-mention.js.map +1 -1
- package/dist/bin/c4s/commands/list-slugs.d.ts +1 -1
- package/dist/bin/c4s/commands/list-slugs.js +2 -2
- package/dist/bin/c4s/commands/list-slugs.js.map +1 -1
- package/dist/bin/c4s/commands/list-tags.d.ts +1 -1
- package/dist/bin/c4s/commands/list-tags.js +2 -2
- package/dist/bin/c4s/commands/list-tags.js.map +1 -1
- package/dist/bin/c4s/commands/plugins.d.ts +9 -0
- package/dist/bin/c4s/commands/plugins.js +81 -0
- package/dist/bin/c4s/commands/plugins.js.map +1 -0
- package/dist/bin/c4s/commands/resolve.d.ts +1 -1
- package/dist/bin/c4s/commands/resolve.js +2 -2
- package/dist/bin/c4s/commands/resolve.js.map +1 -1
- package/dist/bin/c4s/commands/single-element.d.ts +1 -1
- package/dist/bin/c4s/commands/single-element.js +2 -2
- package/dist/bin/c4s/commands/single-element.js.map +1 -1
- package/dist/bin/c4s/commands/tagged-list-mixed.d.ts +1 -1
- package/dist/bin/c4s/commands/tagged-list-mixed.js +2 -2
- package/dist/bin/c4s/commands/tagged-list-mixed.js.map +1 -1
- package/dist/bin/c4s/commands/tagged-list.d.ts +1 -1
- package/dist/bin/c4s/commands/tagged-list.js +2 -2
- package/dist/bin/c4s/commands/tagged-list.js.map +1 -1
- package/dist/bin/c4s/context.d.ts +3 -3
- package/dist/bin/c4s/context.js +7 -4
- package/dist/bin/c4s/context.js.map +1 -1
- package/dist/bin/c4s/errors.d.ts +1 -1
- package/dist/bin/c4s/errors.js.map +1 -1
- package/dist/bin/c4s-mcp.js +6 -2
- package/dist/bin/c4s-mcp.js.map +1 -1
- package/dist/bin/c4s.js +19 -4
- package/dist/bin/c4s.js.map +1 -1
- package/dist/bin/gitignore.js +7 -11
- package/dist/bin/gitignore.js.map +1 -1
- package/dist/client/assets/{arc-Coa9fbDO.js → arc-C9oTB3b1.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-VJZcRMEN.js → architectureDiagram-3BPJPVTR-Bno5ViqK.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-C7dU2lW1.js → blockDiagram-GPEHLZMM-CJYBoeWQ.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-CG_BBm_5.js → c4Diagram-AAUBKEIU-DaaqWE6s.js} +1 -1
- package/dist/client/assets/channel-Cei_E79M.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-BnS95YpK.js → chunk-2J33WTMH-P_I0OPMy.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-COr8w3X3.js → chunk-4BX2VUAB-CCySMlh5.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-CxrIbZhB.js → chunk-55IACEB6-CEUyqKGF.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-DRchPPRe.js → chunk-727SXJPM-CoTSYOVz.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-_SfN7mED.js → chunk-AQP2D5EJ-DB0nMxPr.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-p2tIiP1D.js → chunk-FMBD7UC4-PG3m6-_a.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-B1mbl2hP.js → chunk-ND2GUHAM-CBNk6IaV.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-DBUpeqvS.js → chunk-QZHKN3VN-CLFa0WvN.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DUe_fAto.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DUe_fAto.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BBsY5aKD.js → cose-bilkent-S5V4N54A-BDwDDxHN.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-b-vu4RC9.js → dagre-BM42HDAG-DR-1e8N5.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-j-DW9qSf.js → diagram-2AECGRRQ-C-tHgBWt.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-DHX_WYWQ.js → diagram-5GNKFQAL-uLmoKaJL.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-DxdQok_M.js → diagram-KO2AKTUF-8Fd-xuOy.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-BbTIX5c1.js → diagram-LMA3HP47-C1gniWsn.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-BQ9ODAlH.js → diagram-OG6HWLK6-BMWjZbeC.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-6lwAL1y9.js → erDiagram-TEJ5UH35-CIUO8hrR.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-ioSHb5-t.js → flowDiagram-I6XJVG4X-Ccw5YEf3.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-CXFQp9Nj.js → ganttDiagram-6RSMTGT7-BAvlf8cY.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-C1pVD_NQ.js → gitGraphDiagram-PVQCEYII-ChCkdYar.js} +1 -1
- package/dist/client/assets/{index-JaAxQJXh.js → index-BotCWOKC.js} +1 -1
- package/dist/client/assets/index-CtdzGyqj.js +805 -0
- package/dist/client/assets/{index-hz5T_W2e.js → index-DtpKHGD1.js} +1 -1
- package/dist/client/assets/{infoDiagram-5YYISTIA-C2Guev-g.js → infoDiagram-5YYISTIA-CZMGwNyB.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-D3v8VBb2.js → ishikawaDiagram-YF4QCWOH-CubjZGk6.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-DX1AW_Ap.js → journeyDiagram-JHISSGLW-DzwOyVzB.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-CzXThvq2.js → kanban-definition-UN3LZRKU-CXznoTY9.js} +1 -1
- package/dist/client/assets/{linear-CVw4gl5i.js → linear-EDwTFRrU.js} +1 -1
- package/dist/client/assets/{mermaid.core-C29eoXRj.js → mermaid.core-Lae2097R.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-DEEGVQVA.js → mindmap-definition-RKZ34NQL-DFjIW41g.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-Dme-VM6m.js → pieDiagram-4H26LBE5-CZDLR1jd.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-CURFNo24.js → quadrantDiagram-W4KKPZXB-CTGDzbqp.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-DxMZWXME.js → requirementDiagram-4Y6WPE33-CeH0NbMv.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BW64D4_P.js → sankeyDiagram-5OEKKPKP-B6ZTjurV.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-BATRPm8Q.js → sequenceDiagram-3UESZ5HK-DcTRztVx.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-pgHVMnO3.js → stateDiagram-AJRCARHV-nUgRVZSA.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-D9pJuQbI.js +1 -0
- package/dist/client/assets/{timeline-definition-PNZ67QCA-qBxJZPWd.js → timeline-definition-PNZ67QCA-CXm5n4rV.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-BZJK9hqJ.js → vennDiagram-CIIHVFJN-EmNJBYNd.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-BobtgEXg.js → wardley-L42UT6IY-MLrlp8H-.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-DuWfX_-P.js → wardleyDiagram-YWT4CUSO-5QoES25n.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-DCw1iURo.js → xychartDiagram-2RQKCTM6-CbDEQbY0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/core/agent/run-agent.d.ts +61 -0
- package/dist/core/agent/run-agent.js +212 -0
- package/dist/core/agent/run-agent.js.map +1 -0
- package/dist/core/ask/run-ask.d.ts +1 -1
- package/dist/core/ask/run-ask.js +14 -5
- package/dist/core/ask/run-ask.js.map +1 -1
- package/dist/core/workspace/resolve.d.ts +2 -0
- package/dist/core/workspace/resolve.js +2 -1
- package/dist/core/workspace/resolve.js.map +1 -1
- package/dist/plugin-types/ambient.d.ts +30 -0
- package/dist/plugin-types/plugin-runtime.d.ts +172 -0
- package/dist/plugin-types/ui.d.ts +154 -0
- package/dist/server/config.d.ts +12 -0
- package/dist/server/config.js +26 -0
- package/dist/server/config.js.map +1 -1
- package/dist/server/core/plugin-host/__fixtures__/plugins.d.ts +14 -0
- package/dist/server/core/plugin-host/__fixtures__/plugins.js +56 -0
- package/dist/server/core/plugin-host/__fixtures__/plugins.js.map +1 -0
- package/dist/server/core/plugin-host/base-packages.d.ts +14 -0
- package/dist/server/core/plugin-host/base-packages.js +26 -0
- package/dist/server/core/plugin-host/base-packages.js.map +1 -0
- package/dist/server/core/plugin-host/cache-bust.d.ts +10 -0
- package/dist/server/core/plugin-host/cache-bust.js +21 -0
- package/dist/server/core/plugin-host/cache-bust.js.map +1 -0
- package/dist/server/core/plugin-host/cli-engine.d.ts +7 -2
- package/dist/server/core/plugin-host/cli-engine.js +11 -3
- package/dist/server/core/plugin-host/cli-engine.js.map +1 -1
- package/dist/server/core/plugin-host/cli-plugins.d.ts +23 -0
- package/dist/server/core/plugin-host/cli-plugins.js +49 -0
- package/dist/server/core/plugin-host/cli-plugins.js.map +1 -0
- package/dist/server/core/plugin-host/cross-cutting.d.ts +41 -4
- package/dist/server/core/plugin-host/cross-cutting.js +52 -4
- package/dist/server/core/plugin-host/cross-cutting.js.map +1 -1
- package/dist/server/core/plugin-host/frontend-assets.d.ts +100 -0
- package/dist/server/core/plugin-host/frontend-assets.js +262 -0
- package/dist/server/core/plugin-host/frontend-assets.js.map +1 -0
- package/dist/server/core/plugin-host/frontend-manifest.d.ts +33 -0
- package/dist/server/core/plugin-host/frontend-manifest.js +60 -0
- package/dist/server/core/plugin-host/frontend-manifest.js.map +1 -0
- package/dist/server/core/plugin-host/loader.d.ts +107 -0
- package/dist/server/core/plugin-host/loader.js +196 -0
- package/dist/server/core/plugin-host/loader.js.map +1 -0
- package/dist/server/core/plugin-host/manifest-adapter.d.ts +30 -0
- package/dist/server/core/plugin-host/manifest-adapter.js +119 -0
- package/dist/server/core/plugin-host/manifest-adapter.js.map +1 -0
- package/dist/server/core/plugin-host/overlay-loader.d.ts +60 -0
- package/dist/server/core/plugin-host/overlay-loader.js +243 -0
- package/dist/server/core/plugin-host/overlay-loader.js.map +1 -0
- package/dist/server/core/plugin-host/plugin-watcher.d.ts +41 -0
- package/dist/server/core/plugin-host/plugin-watcher.js +95 -0
- package/dist/server/core/plugin-host/plugin-watcher.js.map +1 -0
- package/dist/server/core/plugin-host/project-host.d.ts +8 -2
- package/dist/server/core/plugin-host/project-host.js +56 -6
- package/dist/server/core/plugin-host/project-host.js.map +1 -1
- package/dist/server/core/plugin-host/registry.d.ts +26 -2
- package/dist/server/core/plugin-host/registry.js +107 -2
- package/dist/server/core/plugin-host/registry.js.map +1 -1
- package/dist/server/core/plugin-host/runtime-shims.d.ts +26 -0
- package/dist/server/core/plugin-host/runtime-shims.js +96 -0
- package/dist/server/core/plugin-host/runtime-shims.js.map +1 -0
- package/dist/server/core/plugin-host/types.d.ts +105 -3
- package/dist/server/db/migrations/042_chat_thread_drop_context_type_check.sql +61 -0
- package/dist/server/external-skills/brief-implementer-template.d.ts +1 -1
- package/dist/server/external-skills/brief-implementer-template.js +5 -2
- package/dist/server/external-skills/brief-implementer-template.js.map +1 -1
- package/dist/server/external-skills/spec-reader-template.d.ts +1 -1
- package/dist/server/external-skills/spec-reader-template.js +14 -0
- package/dist/server/external-skills/spec-reader-template.js.map +1 -1
- package/dist/server/index.js +82 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/mcp/c4s-tools.d.ts +6 -1
- package/dist/server/mcp/c4s-tools.js +18 -13
- package/dist/server/mcp/c4s-tools.js.map +1 -1
- package/dist/server/plugin-runtime/index.d.ts +17 -0
- package/dist/server/plugin-runtime/index.js +16 -0
- package/dist/server/plugin-runtime/index.js.map +1 -0
- package/dist/server/plugin-runtime/ui.d.ts +15 -0
- package/dist/server/plugin-runtime/ui.js +15 -0
- package/dist/server/plugin-runtime/ui.js.map +1 -0
- package/dist/server/routes/agent-turn.d.ts +8 -1
- package/dist/server/routes/agent-turn.js +67 -39
- package/dist/server/routes/agent-turn.js.map +1 -1
- package/dist/server/routes/config.d.ts +8 -0
- package/dist/server/routes/config.js +41 -3
- package/dist/server/routes/config.js.map +1 -1
- package/dist/server/routes/plugins.d.ts +43 -0
- package/dist/server/routes/plugins.js +93 -0
- package/dist/server/routes/plugins.js.map +1 -0
- package/dist/server/routes/threads.js +21 -3
- package/dist/server/routes/threads.js.map +1 -1
- package/dist/server/serialization/registerAll.d.ts +4 -0
- package/dist/server/serialization/registerAll.js +4 -2
- package/dist/server/serialization/registerAll.js.map +1 -1
- package/dist/server/services/chat-context.d.ts +34 -0
- package/dist/server/services/chat-context.js +58 -15
- package/dist/server/services/chat-context.js.map +1 -1
- package/dist/server/services/chat.d.ts +6 -0
- package/dist/server/services/chat.js +18 -2
- package/dist/server/services/chat.js.map +1 -1
- package/dist/server/services/entity-writer.d.ts +2 -3
- package/dist/server/services/entity-writer.js.map +1 -1
- package/dist/server/services/skill-registry.d.ts +31 -2
- package/dist/server/services/skill-registry.js +73 -1
- package/dist/server/services/skill-registry.js.map +1 -1
- package/dist/server/workspace/context-cache.d.ts +9 -0
- package/dist/server/workspace/context-cache.js +14 -0
- package/dist/server/workspace/context-cache.js.map +1 -1
- package/dist/server/workspace/project-context.d.ts +3 -0
- package/dist/server/workspace/project-context.js +106 -4
- package/dist/server/workspace/project-context.js.map +1 -1
- package/dist/server/workspace/registry.d.ts +28 -1
- package/dist/server/workspace/registry.js +57 -1
- package/dist/server/workspace/registry.js.map +1 -1
- package/dist/server/workspace/types.d.ts +15 -0
- package/dist/shared/entities.d.ts +4 -1
- package/dist/shared/entities.js.map +1 -1
- package/dist/shared/plugin-host/frontend-manifest.d.ts +56 -0
- package/dist/shared/plugin-host/frontend-manifest.js +89 -0
- package/dist/shared/plugin-host/frontend-manifest.js.map +1 -0
- package/dist/shared/plugin-host/host-api.d.ts +60 -0
- package/dist/shared/plugin-host/host-api.js +67 -0
- package/dist/shared/plugin-host/host-api.js.map +1 -0
- package/dist/shared/plugin-host/manifest.d.ts +194 -0
- package/dist/shared/plugin-host/manifest.js +52 -0
- package/dist/shared/plugin-host/manifest.js.map +1 -0
- package/dist/shared/plugin-host/ui-kit-surface.d.ts +22 -0
- package/dist/shared/plugin-host/ui-kit-surface.js +25 -0
- package/dist/shared/plugin-host/ui-kit-surface.js.map +1 -0
- package/dist/shared/types.d.ts +5 -0
- package/package.json +18 -3
- package/dist/client/assets/channel-D5gzBvo7.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CT-amIxa.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CT-amIxa.js +0 -1
- package/dist/client/assets/index-DyAnw7YN.js +0 -798
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-szm_LIuD.js +0 -1
|
@@ -10,10 +10,10 @@ This skill describes how to implement a release brief in **your code repository*
|
|
|
10
10
|
`.claude4spec/briefs/` that captures everything you need to ship the change:
|
|
11
11
|
entity snapshots, section diffs, narrative, acceptance criteria.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
Briefs are self-contained, so you do **not** need the `c4s` CLI installed, and
|
|
14
|
+
you do **not** read the main specification or query the entity database. If a
|
|
15
|
+
brief references something you cannot find in its body, treat that as drift and
|
|
16
|
+
file a patch (step 6).
|
|
17
17
|
|
|
18
18
|
## Workflow
|
|
19
19
|
|
|
@@ -25,9 +25,9 @@ cat .claude4spec/briefs/<slug>.md
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
If `.claude4spec/` is not in your current directory, walk up the directory tree
|
|
28
|
-
until you find it (
|
|
28
|
+
until you find it (like git finds `.git/`).
|
|
29
29
|
|
|
30
|
-
### 2. Read the brief
|
|
30
|
+
### 2. Read the brief
|
|
31
31
|
|
|
32
32
|
Every brief has YAML frontmatter:
|
|
33
33
|
|
|
@@ -41,54 +41,105 @@ implemented: false
|
|
|
41
41
|
---
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
The body
|
|
45
|
-
|
|
46
|
-
specification.**
|
|
44
|
+
The body has everything you need — entity snapshots, section diffs, narrative,
|
|
45
|
+
and acceptance criteria.
|
|
47
46
|
|
|
48
|
-
If the brief is unclear
|
|
49
|
-
|
|
47
|
+
If the brief is unclear (missing detail, ambiguous wording, a decision you'd
|
|
48
|
+
otherwise guess), you have two paths:
|
|
50
49
|
|
|
51
|
-
**Synchronous (preferred when available).** Ask the
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
**
|
|
55
|
-
w katalogu głównym repo — zawsze wskazuj ją flagą `--project`; NIE rób `cd` do
|
|
56
|
-
tego katalogu, bo `c4s` zgłosi `PROJECT_NOT_FOUND`.**
|
|
50
|
+
**Synchronous (preferred when available).** Ask the spec agent and continue once
|
|
51
|
+
you have an answer. The CLAUDE 4 SPEC spec lives at `.claude/skills/specyfikacja`
|
|
52
|
+
(a symlink), not at the repo root — always point to it with `--project`; do
|
|
53
|
+
**not** `cd` into it, or `c4s` reports `PROJECT_NOT_FOUND`.
|
|
57
54
|
|
|
58
55
|
```bash
|
|
59
|
-
c4s ask "Brief
|
|
56
|
+
c4s ask "Brief doesn't specify X — is it A or B?" --ct brief --brief <brief-slug>.md --project .claude/skills/specyfikacja
|
|
60
57
|
```
|
|
61
58
|
|
|
62
59
|
Continue the same thread with `c4s ask "..." --thread <threadId>` (the
|
|
63
|
-
`threadId` is printed with the answer). This
|
|
64
|
-
|
|
60
|
+
`threadId` is printed with the answer). This requires `c4s` installed *and* a
|
|
61
|
+
running `npx claude4spec` server; skip it when either is unavailable.
|
|
65
62
|
|
|
66
63
|
**Asynchronous (always available).** If you cannot ask synchronously, proceed
|
|
67
|
-
with your best judgement and file a patch afterwards (step
|
|
68
|
-
|
|
64
|
+
with your best judgement and file a patch afterwards (step 6) so the spec-author
|
|
65
|
+
can fold the clarification into the next brief.
|
|
66
|
+
|
|
67
|
+
### 3. Isolate work (worktree + fresh branch)
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
Never implement a brief on top of your current checkout. Branch from a **fresh
|
|
70
|
+
`main`** and work in a dedicated git worktree under **`./.worktrees/<brief-slug>`**
|
|
71
|
+
(that directory is git-ignored, so the nested checkout never shows up in the
|
|
72
|
+
main repo's `git status`):
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
```bash
|
|
75
|
+
git fetch origin
|
|
76
|
+
git worktree add .worktrees/<brief-slug> -b brief/<brief-slug> origin/main
|
|
77
|
+
cd .worktrees/<brief-slug>
|
|
78
|
+
```
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
- Branch name `brief/<brief-slug>` mirrors the repo's `feat/…` convention.
|
|
81
|
+
- If `origin` is not configured, branch from local `main`: `git checkout main &&
|
|
82
|
+
git pull`, then `git worktree add .worktrees/<brief-slug> -b brief/<brief-slug> main`.
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
**Copy the spec into the worktree.** The smoke test (step 5) runs the dev server
|
|
85
|
+
against the CLAUDE 4 SPEC spec, but `.claude/skills/specyfikacja` is a **symlink**
|
|
86
|
+
to a *separate* repo and is git-ignored — a fresh worktree checkout doesn't contain
|
|
87
|
+
it at all. Pointing the dev server at the real symlinked dir also risks **mutating
|
|
88
|
+
the canonical docs/db**. So make a disposable copy inside the worktree, dereferencing
|
|
89
|
+
the symlink:
|
|
80
90
|
|
|
81
|
-
```
|
|
82
|
-
|
|
91
|
+
```bash
|
|
92
|
+
# -L follows the symlink so the worktree gets REAL files, not a dangling relative
|
|
93
|
+
# link (a verbatim copy would point outside the worktree and break). The dest path
|
|
94
|
+
# is git-ignored, so the copy stays out of `git status` and `git worktree remove`
|
|
95
|
+
# discards it together with the worktree.
|
|
96
|
+
mkdir -p .claude/skills
|
|
97
|
+
cp -RL ../../.claude/skills/specyfikacja .claude/skills/specyfikacja
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- `../../` from the worktree root (`.worktrees/<brief-slug>`) reaches the main repo
|
|
101
|
+
root, where the live symlink lives.
|
|
102
|
+
- If the source symlink is absent (no private spec repo checked out locally), skip
|
|
103
|
+
this copy and the synchronous smoke test, and rely on unit tests — same as the
|
|
104
|
+
"skip when unavailable" rule for `c4s ask` in step 2.
|
|
105
|
+
|
|
106
|
+
### 4. Implement
|
|
107
|
+
|
|
108
|
+
Standard code flow: read existing code, plan, edit, test. Stay focused on what
|
|
109
|
+
the brief specifies. Commit your work on the `brief/<brief-slug>` branch.
|
|
110
|
+
|
|
111
|
+
### 5. Smoke-test locally
|
|
112
|
+
|
|
113
|
+
Before opening the PR, launch the app and exercise the change — don't hand off on
|
|
114
|
+
green unit tests alone.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Run the CLI via `npx tsx` (NOT `npm run dev:sandbox`, which uses `tsx watch`).
|
|
118
|
+
# In a worktree whose node_modules symlinks OUTSIDE the worktree, `tsx watch`
|
|
119
|
+
# follows the symlink, sees Vite's .vite-temp/*.timestamp churn, and restarts in
|
|
120
|
+
# an infinite loop. Plain `npx tsx` (no watch) avoids it.
|
|
121
|
+
npx tsx src/bin/claude4spec.ts --mode dev --cwd .claude/skills/specyfikacja --pages . --port 5555
|
|
83
122
|
```
|
|
84
123
|
|
|
85
|
-
|
|
124
|
+
- `--cwd .claude/skills/specyfikacja` points at the **worktree's local copy** made
|
|
125
|
+
in step 3 — *not* the symlinked source. So a crash or db write during the smoke
|
|
126
|
+
test can never damage the real specification.
|
|
127
|
+
- **Port 5555 is our test convention.** If it's taken (`EADDRINUSE`), increment —
|
|
128
|
+
`--port 5556`, `5557`, … — until one is free.
|
|
129
|
+
- Open the printed URL, verify the brief's behaviour, then stop the server
|
|
130
|
+
(Ctrl-C). If the smoke test reveals drift, file a patch (step 6).
|
|
131
|
+
|
|
132
|
+
### 6. Feedback loop (patches)
|
|
133
|
+
|
|
134
|
+
When the brief diverges from reality — a missing detail, an incorrect assumption,
|
|
135
|
+
an edge case not covered, or anything else the spec-author should know — write a
|
|
136
|
+
patch file `.claude4spec/patches/<brief-slug>-<short-desc>.md`:
|
|
86
137
|
|
|
87
138
|
```markdown
|
|
88
139
|
---
|
|
89
140
|
type: patch
|
|
90
141
|
brief: v0-1-16-to-v0-1-17.md # path relative to briefs/
|
|
91
|
-
patch_kind: drift
|
|
142
|
+
patch_kind: drift
|
|
92
143
|
created_at: 2026-05-11T17:32:00Z
|
|
93
144
|
created_by: claude-code # or "cursor", "aider", ...
|
|
94
145
|
---
|
|
@@ -104,40 +155,56 @@ created_by: claude-code # or "cursor", "aider", ...
|
|
|
104
155
|
…what the spec-author should consider in a follow-up brief or entity edits…
|
|
105
156
|
```
|
|
106
157
|
|
|
107
|
-
|
|
158
|
+
`patch_kind` values:
|
|
108
159
|
|
|
109
160
|
- `drift` — the brief described behavior X, but the codebase already does Y.
|
|
110
161
|
- `missing` — the brief is silent on a detail you had to decide yourself.
|
|
111
162
|
- `incorrect` — the brief is factually wrong about existing code.
|
|
112
163
|
- `clarification` — the brief is ambiguous; you guessed but it should be made
|
|
113
|
-
explicit
|
|
164
|
+
explicit next time.
|
|
114
165
|
|
|
115
|
-
|
|
116
|
-
|
|
166
|
+
Create `.claude4spec/patches/` lazily — only when you file your first patch
|
|
167
|
+
(`mkdir -p .claude4spec/patches`). The claude4spec server does NOT create it.
|
|
117
168
|
|
|
118
|
-
###
|
|
169
|
+
### 7. Open a draft PR and STOP
|
|
119
170
|
|
|
120
|
-
|
|
121
|
-
merged to main / accepted by the user — flip the brief's frontmatter to
|
|
122
|
-
`implemented: true`:
|
|
171
|
+
Push the branch and open a **draft** PR against `main`, then hand off:
|
|
123
172
|
|
|
124
173
|
```bash
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
174
|
+
git push -u origin brief/<brief-slug>
|
|
175
|
+
gh pr create --draft --base main \
|
|
176
|
+
--title "<brief-slug>: <short title>" \
|
|
177
|
+
--body "Implements brief .claude4spec/briefs/<brief-slug>.md
|
|
178
|
+
|
|
179
|
+
<one-paragraph summary of what changed + how it was tested>"
|
|
128
180
|
```
|
|
129
181
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
182
|
+
**Do NOT run `gh pr merge`.** Review and merge are the human's call. Stop here and
|
|
183
|
+
report the PR URL.
|
|
184
|
+
|
|
185
|
+
### 8. Mark brief as implemented
|
|
186
|
+
|
|
187
|
+
`implemented: true` is a **declaration**, set ONLY after the draft PR is reviewed
|
|
188
|
+
and merged to main (or otherwise accepted) — never at PR-open time, never
|
|
189
|
+
proactively, and a later revert on main does NOT roll it back. When implementation
|
|
190
|
+
is genuinely done (code merged, tests green), flip the frontmatter:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Option A — Edit tool: change `implemented: false` → `implemented: true`.
|
|
194
|
+
# Option B — yq (idempotent; adds the field to legacy briefs that lack it):
|
|
195
|
+
yq -i '.implemented = true' .claude4spec/briefs/<brief-slug>.md
|
|
196
|
+
```
|
|
133
197
|
|
|
134
|
-
###
|
|
198
|
+
### 9. Hand-off
|
|
135
199
|
|
|
136
|
-
The spec-author reads patches manually (`ls .claude4spec/patches/`, `cat`)
|
|
137
|
-
|
|
138
|
-
|
|
200
|
+
The spec-author reads patches manually (`ls .claude4spec/patches/`, `cat`) and
|
|
201
|
+
folds them into the next brief or entity edits. There is no UI listing in this
|
|
202
|
+
release — patches are raw markdown.
|
|
139
203
|
|
|
140
204
|
## Notes
|
|
141
205
|
|
|
142
|
-
This
|
|
143
|
-
|
|
206
|
+
This is a **base skill** generated by claude4spec, customized for this project.
|
|
207
|
+
The base copy covers reading briefs and asking the c4s agent questions; this copy
|
|
208
|
+
under `.claude/skills/` additionally pins our git/PR flow (worktree → fresh branch
|
|
209
|
+
→ draft PR → stop). It is **yours to edit** — nothing overwrites it. (The
|
|
210
|
+
`.claude4spec/skills/` copy *is* refreshed on server start; this one is not.)
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.23] - 2026-06-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Scoped plugin frontends 404'd → missing sidebar entry.** The frontend-manifest built asset URLs with a raw package name, so a scoped plugin (`@scope/pkg`) produced `/api/plugins/@scope/pkg/frontend.js` — an extra path segment the `/api/plugins/:name/:asset` route never matched. The preinstalled database-table plugin (`@inharness-ai/c4s-plugin-simple-database-tables`) loaded on the backend but its sidebar link vanished. The name is now percent-encoded into a single path segment (the route already decodes it).
|
|
12
|
+
|
|
13
|
+
## [1.0.22] - 2026-06-27
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Published Host API types.** The CLI package now ships TypeScript declarations under type-only subpaths `@inharness-ai/claude4spec/plugin-runtime` and `@inharness-ai/claude4spec/plugin-runtime/ui`, plus an ambient binding (`@inharness-ai/claude4spec/plugin-runtime/ambient`) so a single reference types both the `@c4s/plugin-runtime` value specifier and all type names. Plugin authors reference the host's published types directly instead of vendoring a `c4s-runtime.d.ts` copy. `hostApiVersion` is unchanged — this is additive DX infrastructure. (brief 0.1.85→0.1.86)
|
|
17
|
+
- **Host UI Kit** (`@c4s/plugin-runtime/ui`, M34/L12) — a presentational component catalog delivered to plugins through the import-map shim: four `stable` core components (`EntityListHeader`, `DetailPanelShell`, `FieldRow`, `FieldGrid`) whose prop contracts are part of the versioned surface, plus experimental list/action/form components and a token bridge.
|
|
18
|
+
- **M33 plugin system (phase 3)** — the database-table entity now ships as the preinstalled `@inharness-ai/c4s-plugin-simple-database-tables` plugin; workspace-tier plugin frontend serving behind a trust gate; a plugin page-routing contract; per-plugin Settings and editor-command hot-reload.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- The preinstalled database-table plugin was referenced under a non-existent unscoped name; corrected to the published scoped `@inharness-ai/c4s-plugin-simple-database-tables` so a registry install resolves.
|
|
22
|
+
- Workspace plugin frontend was dropped when the install name differed from the package's `package.json` name.
|
|
23
|
+
|
|
8
24
|
## [1.0.21] - 2026-06-22
|
|
9
25
|
|
|
10
26
|
### Added
|
|
@@ -246,3 +262,7 @@ Initial public release.
|
|
|
246
262
|
[1.0.4]: https://github.com/InHarness/claude4spec/compare/v1.0.3...v1.0.4
|
|
247
263
|
[1.0.3]: https://github.com/InHarness/claude4spec/compare/v1.0.2...v1.0.3
|
|
248
264
|
[1.0.2]: https://github.com/InHarness/claude4spec/compare/v1.0.1...v1.0.2
|
|
265
|
+
|
|
266
|
+
[1.0.22]: https://github.com/InHarness/claude4spec/compare/v1.0.21...v1.0.22
|
|
267
|
+
|
|
268
|
+
[1.0.23]: https://github.com/InHarness/claude4spec/compare/v1.0.22...v1.0.23
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ParsedArgs } from '../args.js';
|
|
2
|
+
/**
|
|
3
|
+
* `c4s agent` — generic synchronous agent turn over any thread context (M11).
|
|
4
|
+
*
|
|
5
|
+
* The verbose, developer-facing surface: defaults to `output: 'full'`, so it
|
|
6
|
+
* prints every message of the turn (assistant text + reasoning + tool rows)
|
|
7
|
+
* before the final answer. Cienki wrapper nad `runAgent(...)`; warstwa CLI to
|
|
8
|
+
* parsowanie flag, mapowanie kodow bledow na `CliError`, formatowanie outputu.
|
|
9
|
+
*
|
|
10
|
+
* c4s agent "<msg>" --ct chat
|
|
11
|
+
* c4s agent "<msg>" --ct ask # read-only peer consult
|
|
12
|
+
* c4s agent "<msg>" --ct brief --brief <path>
|
|
13
|
+
* c4s agent "<msg>" --thread <id> # continue (—ct not needed)
|
|
14
|
+
*
|
|
15
|
+
* The terse peer-consult shorthand lives in `ask.ts` (hardcodes --ct=ask,
|
|
16
|
+
* output: 'final').
|
|
17
|
+
*/
|
|
18
|
+
export declare function runAgentCmd(args: ParsedArgs): Promise<void>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { optionalString } from '../args.js';
|
|
2
|
+
import { CliError } from '../errors.js';
|
|
3
|
+
import { AgentError, runAgent, } from '../../../core/agent/run-agent.js';
|
|
4
|
+
/**
|
|
5
|
+
* `c4s agent` — generic synchronous agent turn over any thread context (M11).
|
|
6
|
+
*
|
|
7
|
+
* The verbose, developer-facing surface: defaults to `output: 'full'`, so it
|
|
8
|
+
* prints every message of the turn (assistant text + reasoning + tool rows)
|
|
9
|
+
* before the final answer. Cienki wrapper nad `runAgent(...)`; warstwa CLI to
|
|
10
|
+
* parsowanie flag, mapowanie kodow bledow na `CliError`, formatowanie outputu.
|
|
11
|
+
*
|
|
12
|
+
* c4s agent "<msg>" --ct chat
|
|
13
|
+
* c4s agent "<msg>" --ct ask # read-only peer consult
|
|
14
|
+
* c4s agent "<msg>" --ct brief --brief <path>
|
|
15
|
+
* c4s agent "<msg>" --thread <id> # continue (—ct not needed)
|
|
16
|
+
*
|
|
17
|
+
* The terse peer-consult shorthand lives in `ask.ts` (hardcodes --ct=ask,
|
|
18
|
+
* output: 'final').
|
|
19
|
+
*/
|
|
20
|
+
export async function runAgentCmd(args) {
|
|
21
|
+
const message = args.positional[0];
|
|
22
|
+
if (!message || !message.trim()) {
|
|
23
|
+
throw new CliError('INVALID_ARGS', 'message is required: c4s agent "<msg>" --ct chat');
|
|
24
|
+
}
|
|
25
|
+
const threadId = optionalString(args, 'thread');
|
|
26
|
+
const ct = optionalString(args, 'ct');
|
|
27
|
+
const briefPath = optionalString(args, 'brief');
|
|
28
|
+
const server = optionalString(args, 'server');
|
|
29
|
+
const project = args.project;
|
|
30
|
+
const workspace = args.workspace;
|
|
31
|
+
if (project && server) {
|
|
32
|
+
process.stderr.write('warning: both --project and --server given; --server wins, --project ignored\n');
|
|
33
|
+
}
|
|
34
|
+
if (!threadId) {
|
|
35
|
+
// Early CLI-level validation (livelier hints); runAgent re-validates at the
|
|
36
|
+
// library layer.
|
|
37
|
+
if (ct !== 'chat' && ct !== 'brief' && ct !== 'patch' && ct !== 'ask') {
|
|
38
|
+
throw new CliError('INVALID_ARGS', '--ct must be chat|brief|patch|ask (or pass --thread <id> to continue a thread)');
|
|
39
|
+
}
|
|
40
|
+
if (ct === 'patch') {
|
|
41
|
+
throw new CliError('INVALID_ARGS', 'c4s agent cannot create a patch thread; pass --thread <id> to continue one');
|
|
42
|
+
}
|
|
43
|
+
if (ct === 'brief' && !briefPath) {
|
|
44
|
+
throw new CliError('INVALID_ARGS', '--ct brief requires --brief <path>');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
let result;
|
|
48
|
+
try {
|
|
49
|
+
result = await runAgent({
|
|
50
|
+
message,
|
|
51
|
+
project,
|
|
52
|
+
workspace,
|
|
53
|
+
server,
|
|
54
|
+
contextType: ct,
|
|
55
|
+
threadId,
|
|
56
|
+
briefPath,
|
|
57
|
+
output: 'full',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
if (err instanceof AgentError) {
|
|
62
|
+
throw new CliError(err.code, err.message, err.hint);
|
|
63
|
+
}
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
66
|
+
// --- output --------------------------------------------------------------
|
|
67
|
+
if (args.format === 'text') {
|
|
68
|
+
// Verbose: every message of the turn (text + reasoning + tool rows), then
|
|
69
|
+
// the final answer; threadId hint on stderr.
|
|
70
|
+
for (const m of result.messages ?? []) {
|
|
71
|
+
process.stdout.write(formatMessage(m) + '\n');
|
|
72
|
+
}
|
|
73
|
+
process.stdout.write('\n' + result.answer + '\n');
|
|
74
|
+
process.stderr.write(`thread: ${result.threadId} (continue: c4s agent "..." --thread ${result.threadId})\n`);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
process.stdout.write(JSON.stringify({ threadId: result.threadId, answer: result.answer, messages: result.messages ?? [] }, null, 2) + '\n');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/** Render one turn message for the verbose text output. */
|
|
81
|
+
function formatMessage(m) {
|
|
82
|
+
const label = m.toolName ? `${m.role}/${m.toolName}` : m.role;
|
|
83
|
+
const prefix = m.subagentTaskId ? `[${label} · sub]` : `[${label}]`;
|
|
84
|
+
return `${prefix} ${extractText(m.content)}`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Reasoning + some tool rows persist `content` as `JSON.stringify({ text, ... })`.
|
|
88
|
+
* Unwrap the `text` field for display; fall back to the raw string otherwise.
|
|
89
|
+
*/
|
|
90
|
+
function extractText(content) {
|
|
91
|
+
try {
|
|
92
|
+
const parsed = JSON.parse(content);
|
|
93
|
+
if (parsed && typeof parsed === 'object' && typeof parsed.text === 'string') {
|
|
94
|
+
return parsed.thinking ? `(reasoning) ${parsed.text}` : parsed.text;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
/* not JSON — raw content below */
|
|
99
|
+
}
|
|
100
|
+
return content;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAqB,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,QAAQ,GAGT,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAgB;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,QAAQ,CAAC,cAAc,EAAE,kDAAkD,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC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,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,OAAe;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5E,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QACtE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,kCAAkC;IACpC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { ParsedArgs } from '../args.js';
|
|
2
2
|
/**
|
|
3
|
-
* `c4s ask` —
|
|
3
|
+
* `c4s ask` — read-only peer-consult shorthand (M11 / 0.1.79).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* (
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Narrowed alias of `c4s agent`: hardcodes `contextType='ask'` and
|
|
6
|
+
* `output: 'final'` (terse `{ threadId, answer }`). It is the canonical
|
|
7
|
+
* peer-consult shorthand and the CLI twin of the MCP `ask` tool — the peer
|
|
8
|
+
* answers read-only, never mutating its own spec. `--ct` / `--brief` are
|
|
9
|
+
* rejected (use `c4s agent` for other contexts).
|
|
9
10
|
*
|
|
10
|
-
* c4s ask "<msg>"
|
|
11
|
-
* c4s ask "<msg>" --
|
|
12
|
-
* c4s ask "<msg>" --thread <id>
|
|
11
|
+
* c4s ask "<msg>" # consult the peer for the cwd's project
|
|
12
|
+
* c4s ask "<msg>" --project <p> # consult a specific peer
|
|
13
|
+
* c4s ask "<msg>" --thread <id> # continue an existing ask thread
|
|
13
14
|
*/
|
|
14
15
|
export declare function runAsk_cli(args: ParsedArgs): Promise<void>;
|
|
15
16
|
export { runAsk_cli as runAsk };
|
|
@@ -1,61 +1,53 @@
|
|
|
1
1
|
import { optionalString } from '../args.js';
|
|
2
2
|
import { CliError } from '../errors.js';
|
|
3
|
-
import {
|
|
3
|
+
import { AgentError, runAgent } from '../../../core/agent/run-agent.js';
|
|
4
4
|
/**
|
|
5
|
-
* `c4s ask` —
|
|
5
|
+
* `c4s ask` — read-only peer-consult shorthand (M11 / 0.1.79).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* (
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Narrowed alias of `c4s agent`: hardcodes `contextType='ask'` and
|
|
8
|
+
* `output: 'final'` (terse `{ threadId, answer }`). It is the canonical
|
|
9
|
+
* peer-consult shorthand and the CLI twin of the MCP `ask` tool — the peer
|
|
10
|
+
* answers read-only, never mutating its own spec. `--ct` / `--brief` are
|
|
11
|
+
* rejected (use `c4s agent` for other contexts).
|
|
11
12
|
*
|
|
12
|
-
* c4s ask "<msg>"
|
|
13
|
-
* c4s ask "<msg>" --
|
|
14
|
-
* c4s ask "<msg>" --thread <id>
|
|
13
|
+
* c4s ask "<msg>" # consult the peer for the cwd's project
|
|
14
|
+
* c4s ask "<msg>" --project <p> # consult a specific peer
|
|
15
|
+
* c4s ask "<msg>" --thread <id> # continue an existing ask thread
|
|
15
16
|
*/
|
|
16
17
|
export async function runAsk_cli(args) {
|
|
17
18
|
const message = args.positional[0];
|
|
18
19
|
if (!message || !message.trim()) {
|
|
19
|
-
throw new CliError('INVALID_ARGS', 'message is required: c4s ask "<msg>"
|
|
20
|
+
throw new CliError('INVALID_ARGS', 'message is required: c4s ask "<msg>"');
|
|
21
|
+
}
|
|
22
|
+
// `ask` is locked to the read-only ask context — these flags belong to
|
|
23
|
+
// `c4s agent`, not the shorthand.
|
|
24
|
+
if (optionalString(args, 'ct') !== undefined) {
|
|
25
|
+
throw new CliError('INVALID_ARGS', '`c4s ask` is always --ct=ask; use `c4s agent` to pick a context');
|
|
26
|
+
}
|
|
27
|
+
if (optionalString(args, 'brief') !== undefined) {
|
|
28
|
+
throw new CliError('INVALID_ARGS', '`c4s ask` does not take --brief; use `c4s agent --ct brief`');
|
|
20
29
|
}
|
|
21
30
|
const threadId = optionalString(args, 'thread');
|
|
22
|
-
const ct = optionalString(args, 'ct');
|
|
23
|
-
const briefPath = optionalString(args, 'brief');
|
|
24
31
|
const server = optionalString(args, 'server');
|
|
25
32
|
const project = args.project;
|
|
26
33
|
const workspace = args.workspace;
|
|
27
34
|
if (project && server) {
|
|
28
|
-
// Mutex `project` vs `server` — gdy oba podane, `server` wygrywa; CLI
|
|
29
|
-
// dopisuje warning na stderr (dla MCP analogicznie, ale przez tool_result).
|
|
30
35
|
process.stderr.write('warning: both --project and --server given; --server wins, --project ignored\n');
|
|
31
36
|
}
|
|
32
|
-
if (!threadId) {
|
|
33
|
-
// Wczesna walidacja flag CLI (drobne komunikaty user-facing); runAsk
|
|
34
|
-
// robi to samo na poziomie biblioteki, ale tutaj dajemy zywsze hinty.
|
|
35
|
-
if (ct !== 'chat' && ct !== 'brief' && ct !== 'patch') {
|
|
36
|
-
throw new CliError('INVALID_ARGS', '--ct must be chat|brief|patch (or pass --thread <id> to continue a thread)');
|
|
37
|
-
}
|
|
38
|
-
if (ct === 'patch') {
|
|
39
|
-
throw new CliError('INVALID_ARGS', 'c4s ask cannot create a patch thread; pass --thread <id> to continue one');
|
|
40
|
-
}
|
|
41
|
-
if (ct === 'brief' && !briefPath) {
|
|
42
|
-
throw new CliError('INVALID_ARGS', '--ct brief requires --brief <path>');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
37
|
let result;
|
|
46
38
|
try {
|
|
47
|
-
result = await
|
|
39
|
+
result = await runAgent({
|
|
48
40
|
message,
|
|
49
41
|
project,
|
|
50
42
|
workspace,
|
|
51
43
|
server,
|
|
52
|
-
contextType:
|
|
44
|
+
contextType: 'ask',
|
|
53
45
|
threadId,
|
|
54
|
-
|
|
46
|
+
output: 'final',
|
|
55
47
|
});
|
|
56
48
|
}
|
|
57
49
|
catch (err) {
|
|
58
|
-
if (err instanceof
|
|
50
|
+
if (err instanceof AgentError) {
|
|
59
51
|
throw new CliError(err.code, err.message, err.hint);
|
|
60
52
|
}
|
|
61
53
|
throw err;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/ask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAqB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ask.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/ask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAqB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAgB;IAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,QAAQ,CAAC,cAAc,EAAE,sCAAsC,CAAC,CAAC;IAC7E,CAAC;IAED,uEAAuE;IACvE,kCAAkC;IAClC,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC7C,MAAM,IAAI,QAAQ,CAAC,cAAc,EAAE,iEAAiE,CAAC,CAAC;IACxG,CAAC;IACD,IAAI,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;QAChD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AC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7G,CAAC;AACH,CAAC;AAED,uEAAuE;AACvE,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ParsedArgs } from '../args.js';
|
|
2
|
-
export declare function runCatalog(args: ParsedArgs): void
|
|
2
|
+
export declare function runCatalog(args: ParsedArgs): Promise<void>;
|
|
@@ -3,8 +3,8 @@ import path from 'node:path';
|
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { createContext } from '../context.js';
|
|
5
5
|
import { writeOutput } from '../output.js';
|
|
6
|
-
export function runCatalog(args) {
|
|
7
|
-
const ctx = createContext(args);
|
|
6
|
+
export async function runCatalog(args) {
|
|
7
|
+
const ctx = await createContext(args);
|
|
8
8
|
try {
|
|
9
9
|
const catalog = ctx.registry.catalog(ctx.reader);
|
|
10
10
|
writeOutput({ ...catalog, claude4spec: readPackageVersion() }, args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,UAAU,CAAC,IAAgB;
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI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BACjF,IAAI,GAAG,CAAC,OAAO;oBAAE,OAAO,GAAG,CAAC,OAAO,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,YAAY;IACd,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type ParsedArgs } from '../args.js';
|
|
2
|
-
export declare function runDescribe(args: ParsedArgs): void
|
|
2
|
+
export declare function runDescribe(args: ParsedArgs): Promise<void>;
|
|
@@ -3,11 +3,11 @@ import { createContext } from '../context.js';
|
|
|
3
3
|
import { CliError } from '../errors.js';
|
|
4
4
|
import { writeOutput } from '../output.js';
|
|
5
5
|
import { normalizeEntityType, normalizeViewKind } from '../type-validation.js';
|
|
6
|
-
export function runDescribe(args) {
|
|
6
|
+
export async function runDescribe(args) {
|
|
7
7
|
const type = normalizeEntityType(requireString(args, 'type'));
|
|
8
8
|
const viewFlag = optionalString(args, 'view');
|
|
9
9
|
const view = viewFlag ? normalizeViewKind(viewFlag) : undefined;
|
|
10
|
-
const ctx = createContext(args);
|
|
10
|
+
const ctx = await createContext(args);
|
|
11
11
|
try {
|
|
12
12
|
const result = ctx.registry.describe(type, view, ctx.db);
|
|
13
13
|
if (!result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAmB,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,MAAM,UAAU,WAAW,CAAC,IAAgB;
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAmB,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAgB;IAChD,MAAM,IAAI,GAAG,mBAAmB,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChE,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,QAAQ,CAChB,cAAc,EACd,gBAAgB,IAAI,iBAAiB,EACrC,gDAAgD,CACjD,CAAC;QACJ,CAAC;QACD,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;YAAS,CAAC;QACT,GAAG,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ParsedArgs } from '../args.js';
|
|
2
|
-
export declare function runDetail(args: ParsedArgs): void
|
|
2
|
+
export declare function runDetail(args: ParsedArgs): Promise<void>;
|
|
@@ -4,10 +4,10 @@ import { CliError } from '../errors.js';
|
|
|
4
4
|
import { writeOutput } from '../output.js';
|
|
5
5
|
import { normalizeEntityType } from '../type-validation.js';
|
|
6
6
|
import { withMeta } from './_meta.js';
|
|
7
|
-
export function runDetail(args) {
|
|
7
|
+
export async function runDetail(args) {
|
|
8
8
|
const type = normalizeEntityType(requireString(args, 'type'));
|
|
9
9
|
const slug = requireString(args, 'slug');
|
|
10
|
-
const ctx = createContext(args);
|
|
10
|
+
const ctx = await createContext(args);
|
|
11
11
|
try {
|
|
12
12
|
const entity = ctx.reader.getEntity(type, slug);
|
|
13
13
|
if (!entity)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detail.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,SAAS,CAAC,IAAgB;
|
|
1
|
+
{"version":3,"file":"detail.js","sourceRoot":"","sources":["../../../../src/bin/c4s/commands/detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAgB;IAC9C,MAAM,IAAI,GAAG,mBAAmB,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,QAAQ,CAAC,kBAAkB,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAChF,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;YAAS,CAAC;QACT,GAAG,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ParsedArgs } from '../args.js';
|
|
2
|
-
export declare function runElementList(args: ParsedArgs): void
|
|
2
|
+
export declare function runElementList(args: ParsedArgs): Promise<void>;
|