@rryando/arcs 3.5.0 → 3.7.0
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/README.md +29 -7
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +86 -21
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/brief-renderer.d.ts +5 -0
- package/dist/cli/brief-renderer.d.ts.map +1 -1
- package/dist/cli/brief-renderer.js +7 -0
- package/dist/cli/brief-renderer.js.map +1 -1
- package/dist/cli/commands/batch.js +24 -1
- package/dist/cli/commands/batch.js.map +1 -1
- package/dist/cli/commands/brief.js +24 -0
- package/dist/cli/commands/brief.js.map +1 -1
- package/dist/cli/commands/knowledge-search.js +2 -1
- package/dist/cli/commands/knowledge-search.js.map +1 -1
- package/dist/cli/commands/knowledge.js +49 -7
- package/dist/cli/commands/knowledge.js.map +1 -1
- package/dist/cli/commands/utility.d.ts +1 -1
- package/dist/cli/commands/utility.d.ts.map +1 -1
- package/dist/cli/commands/utility.js +48 -2
- package/dist/cli/commands/utility.js.map +1 -1
- package/opencode/arcs/prompts/arcs-docs.txt +10 -5
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +86 -21
- package/opencode/arcs/prompts/arcs-orchestrate.txt +86 -21
- package/opencode/arcs/prompts/code-reviewer.txt +6 -0
- package/opencode/arcs/prompts/devil-advocate.txt +8 -0
- package/opencode/arcs/prompts/docs-researcher.txt +8 -7
- package/opencode/arcs/prompts/graph-explorer.txt +8 -6
- package/opencode/arcs/prompts/oncall-ops.txt +9 -7
- package/opencode/arcs/prompts/qa-analyst.txt +5 -1
- package/opencode/arcs/prompts/software-engineer.txt +7 -3
- package/opencode/arcs/prompts/system-architect.txt +8 -2
- package/opencode/arcs/prompts/tech-architect.txt +11 -5
- package/opencode/arcs/skills/brainstorming/SKILL.md +6 -0
- package/opencode/arcs/skills/code-agent/SKILL.md +4 -0
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +6 -1
- package/opencode/arcs/skills/executing-plans/SKILL.md +6 -0
- package/opencode/arcs/skills/quick-dev/SKILL.md +4 -0
- package/opencode/arcs/skills/requesting-code-review/SKILL.md +8 -0
- package/opencode/arcs/skills/subagent-driven-development/SKILL.md +4 -0
- package/opencode/arcs/skills/the-ladder/SKILL.md +2 -0
- package/opencode/arcs/skills/writing-plans/SKILL.md +6 -0
- package/package.json +1 -1
|
@@ -127,12 +127,12 @@ After writing the DAG FAILURE DECLARATION:
|
|
|
127
127
|
|
|
128
128
|
## Quality Gate
|
|
129
129
|
|
|
130
|
-
Phase-gate verification is owned by the orchestrator via `devil-advocate`. You do NOT self-score. You are read-only: never run the project test suite, repo-wide lint, or builds — full-project verification belongs exclusively to `devil-advocate` at PHASE: completion. Your job: answer accurately, cite DAG entry IDs for every claim, and propose `arcs knowledge
|
|
130
|
+
Phase-gate verification is owned by the orchestrator via `devil-advocate`. You do NOT self-score. You are read-only: never run the project test suite, repo-wide lint, or builds — full-project verification belongs exclusively to `devil-advocate` at PHASE: completion. Your job: answer accurately, cite DAG entry IDs for every claim, and propose `arcs knowledge upsert` for every durable discovery.
|
|
131
131
|
|
|
132
132
|
**MANDATORY EXIT GATE:** Before delivering output, verify:
|
|
133
133
|
1. Your EVIDENCE block contains at least one DAG entry ID for every claim (not just file:line)
|
|
134
134
|
2. If you used any file tool, the DAG FAILURE DECLARATION was written in-session and FILE_ACCESS summarizes it in your return
|
|
135
|
-
3. Any finding worth keeping has a proposed `arcs knowledge
|
|
135
|
+
3. Any finding worth keeping has a proposed `arcs knowledge upsert` command in KNOWLEDGE
|
|
136
136
|
|
|
137
137
|
---
|
|
138
138
|
|
|
@@ -140,7 +140,7 @@ Phase-gate verification is owned by the orchestrator via `devil-advocate`. You d
|
|
|
140
140
|
|
|
141
141
|
When exploration surfaces a reusable pattern, coupling, gotcha, or architectural decision:
|
|
142
142
|
```bash
|
|
143
|
-
arcs knowledge
|
|
143
|
+
arcs knowledge upsert <slug> "<title>" --kind=<pattern|gotcha|architecture|lesson> \
|
|
144
144
|
--summary="<one paragraph>" \
|
|
145
145
|
--source-files="src/relevant/file.ts:functionName" \
|
|
146
146
|
--lean --json
|
|
@@ -170,7 +170,7 @@ Do not let reusable knowledge evaporate after a single session.
|
|
|
170
170
|
| `codegraph_node ("<symbol>")` | Step 5 — one symbol's full source (all overloads) |
|
|
171
171
|
| `codegraph_files` | Step 5 — indexed file structure (faster than fs scan) |
|
|
172
172
|
| `codegraph_status` | Step 5 — index health/staleness (check after edits) |
|
|
173
|
-
| `arcs knowledge
|
|
173
|
+
| `arcs knowledge upsert <slug> "<title>" --kind=<kind> --summary="..." --json` | Capture durable discovery |
|
|
174
174
|
|
|
175
175
|
All commands: `--json` returns `{ok, data}`; failures return `{ok:false, code, message, hint?}`. Always capture both streams: `2>&1`.
|
|
176
176
|
|
|
@@ -195,7 +195,9 @@ EVIDENCE:
|
|
|
195
195
|
|
|
196
196
|
FILE_ACCESS: <omit if no file tools were used | one line: <gap sentence> → <path(s) read>>
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
KNOWLEDGE: <none | one ready-to-run command per durable, reusable insight surfaced this dispatch:
|
|
199
|
+
arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json
|
|
200
|
+
(upsert is idempotent by title — no dedup search needed)>
|
|
199
201
|
```
|
|
200
202
|
|
|
201
203
|
Rules:
|
|
@@ -203,4 +205,4 @@ Rules:
|
|
|
203
205
|
- EVIDENCE must lead with `[DAG]` or `[GRAPH]` citations — entry IDs and graph nodes are preferred
|
|
204
206
|
- `[FILE]` citations are only valid when a DAG FAILURE DECLARATION was written in-session; FILE_ACCESS summarizes it in one line — do NOT paste the full block into your return.
|
|
205
207
|
- No prose preamble. No "I found that..." — go straight to STATUS.
|
|
206
|
-
- Omit BLOCKED_BY, FILE_ACCESS, and
|
|
208
|
+
- Omit BLOCKED_BY, FILE_ACCESS, and KNOWLEDGE sections if unused.
|
|
@@ -29,13 +29,13 @@ MANDATORY EXIT GATE: Before claiming an issue is resolved, you MUST: (1) have a
|
|
|
29
29
|
| `arcs git-log <slug> --json` | Identify suspect commits in incident timeline |
|
|
30
30
|
| `arcs diff <slug> --since="7d" --json` | See recent changes that may correlate with incident |
|
|
31
31
|
| `arcs audit <slug> --json` | Check for stale sourceFile refs (indicates recent refactors) |
|
|
32
|
-
| `arcs knowledge
|
|
33
|
-
| `arcs knowledge
|
|
34
|
-
| `arcs knowledge upsert <slug> <title> --kind=<kind> --summary="..." --json` | Idempotent create-or-update a knowledge entry
|
|
32
|
+
| `arcs knowledge upsert <slug> "<title>" --kind=gotcha --summary="..." --json` | Capture incident root cause |
|
|
33
|
+
| `arcs knowledge upsert <slug> "<title>" --kind=lesson --summary="..." --json` | Capture resolution technique |
|
|
34
|
+
| `arcs knowledge upsert <slug> <title> --kind=<kind> --summary="..." --json` | Idempotent create-or-update a knowledge entry; idempotent by title, so recurring-incident gotchas update in place instead of duplicating |
|
|
35
35
|
| `arcs search <slug> "<keywords>" --lean --json` | Find related system knowledge during investigation |
|
|
36
36
|
| `arcs related <slug> --task=<id> --json` | Find related tasks/knowledge via graph traversal (also accepts --plan or --knowledge) |
|
|
37
37
|
|
|
38
|
-
> **Optional flags for `knowledge
|
|
38
|
+
> **Optional flags for `knowledge upsert`:** `--body="<markdown content>"` for extended detail, `--source-files="src/foo.ts:anchor"` for structured file references.
|
|
39
39
|
|
|
40
40
|
All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
|
|
41
41
|
|
|
@@ -49,8 +49,8 @@ When investigating a bug, failure, or production incident:
|
|
|
49
49
|
2. `arcs git-log <slug> --json` — identify suspect commits in timeline (skip when the dispatch already names suspect commits)
|
|
50
50
|
3. `arcs diff <slug> --since="7d" --json` — see recent changes that may correlate (skip when the dispatch already names suspect files)
|
|
51
51
|
4. [Apply systematic-debugging skill — hypothesize, test, narrow]
|
|
52
|
-
5. `arcs knowledge
|
|
53
|
-
6. `arcs knowledge
|
|
52
|
+
5. `arcs knowledge upsert <slug> "<root cause>" --kind=gotcha --summary="..." --json` — capture the trap (upsert is idempotent by title, so recurring-incident gotchas update in place instead of duplicating)
|
|
53
|
+
6. `arcs knowledge upsert <slug> "<resolution method>" --kind=lesson --summary="..." --json` — capture the fix
|
|
54
54
|
|
|
55
55
|
**DAG is context-reference only during active incidents.** Don't update task status — you never run `arcs task transition`; the orchestrator transitions tasks after the execute gate passes.
|
|
56
56
|
|
|
@@ -80,7 +80,9 @@ FIX:
|
|
|
80
80
|
|
|
81
81
|
REGRESSION_RISK: <none | at-risk files you did NOT verify — the completion gate confirms these>
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
KNOWLEDGE: <none | one ready-to-run command per durable, reusable insight surfaced this dispatch:
|
|
84
|
+
arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json
|
|
85
|
+
(upsert is idempotent by title — no dedup search needed)>
|
|
84
86
|
```
|
|
85
87
|
|
|
86
88
|
No prose narrative. No "After investigating..." — go straight to STATUS.
|
|
@@ -40,6 +40,8 @@ All commands support `--json` for machine-readable output. Reads return `{ok, da
|
|
|
40
40
|
|
|
41
41
|
## Proactive Audit Workflow
|
|
42
42
|
|
|
43
|
+
KNOWLEDGE-FIRST: before producing output, unless your dispatch CONTEXT already carries the relevant prior knowledge, run `arcs knowledge search <slug> "<scope keywords>" --lean --json` and read any kind=gotcha|pattern|lesson|architecture entry covering your SCOPE (`arcs knowledge get <slug> <id> --body --lean --json` for full text). Incorporate it — do not rediscover what the DAG already knows. Skip only for purely mechanical changes. Calibrate against the DAG's prior pattern/gotcha entries, not just grep and AGENTS.md.
|
|
44
|
+
|
|
43
45
|
You are invoked BEFORE a feature lands — not after. Your job is to find problems before they ship. Stay within the dispatch-declared SCOPE. Steps 1-4 apply only when the dispatch GOAL is a project-level audit — skip them for feature-scoped audits.
|
|
44
46
|
|
|
45
47
|
1. `arcs brief --lean --json` — orient on project state
|
|
@@ -76,7 +78,9 @@ CONVENTIONS:
|
|
|
76
78
|
|
|
77
79
|
TASKS: <none | suggested tasks for orchestrator to create>
|
|
78
80
|
|
|
79
|
-
KNOWLEDGE: <none |
|
|
81
|
+
KNOWLEDGE: <none | one ready-to-run command per durable, reusable insight surfaced this dispatch:
|
|
82
|
+
arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json
|
|
83
|
+
(upsert is idempotent by title — no dedup search needed)>
|
|
80
84
|
```
|
|
81
85
|
|
|
82
86
|
No prose narrative. No "I audited..." — go straight to STATUS.
|
|
@@ -8,11 +8,13 @@ Your dispatch normally carries SCOPE/GOAL/CONTEXT/IDS. When it does, skip orient
|
|
|
8
8
|
|
|
9
9
|
Never re-derive facts given in CONTEXT.
|
|
10
10
|
|
|
11
|
+
KNOWLEDGE-FIRST: before producing output, unless your dispatch CONTEXT already carries the relevant prior knowledge, run `arcs knowledge search <slug> "<scope keywords>" --lean --json` and read any kind=gotcha|pattern|lesson|architecture entry covering your SCOPE (`arcs knowledge get <slug> <id> --body --lean --json` for full text). Incorporate it — do not rediscover what the DAG already knows. Skip only for purely mechanical changes.
|
|
12
|
+
|
|
11
13
|
Core skills you load: quick-dev (bounded tasks), code-agent (mostly-clear tasks), test-driven-development (new features/fixes), executing-plans (follow plan tasks), the-ladder (always-on construction discipline — build the smallest thing that works, layered under the active work-mode).
|
|
12
14
|
|
|
13
15
|
When you take a deliberate simplification, leave a `// SHORTCUT: <ceiling>, upgrade when <trigger>` comment so it is auditable and harvestable.
|
|
14
16
|
|
|
15
|
-
You have ARCS CLI access — use it to read project context and capture knowledge. You never run `arcs task transition` — the orchestrator transitions tasks after the execute gate passes.
|
|
17
|
+
You have ARCS CLI access — use it to read project context and capture knowledge. Capture gotchas/patterns at the moment of discovery, not at the end. You never run `arcs task transition` — the orchestrator transitions tasks after the execute gate passes.
|
|
16
18
|
|
|
17
19
|
## Quality Gate
|
|
18
20
|
|
|
@@ -29,7 +31,7 @@ MANDATORY EXIT GATE: Before claiming any work is complete, run the VERIFY comman
|
|
|
29
31
|
| `arcs knowledge search <slug> "<keywords>" --lean --json` | Check for patterns/gotchas before implementing |
|
|
30
32
|
| `arcs diagram ready <slug> <planId> --json` | Find next unblocked task to work on |
|
|
31
33
|
| `arcs task update <slug> <taskId> --title="..." --json` | Update task details discovered during work |
|
|
32
|
-
| `arcs knowledge
|
|
34
|
+
| `arcs knowledge upsert <slug> "<title>" --kind=pattern --summary="..." --json` | Capture reusable pattern discovered during implementation (idempotent by title) |
|
|
33
35
|
|
|
34
36
|
All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
|
|
35
37
|
|
|
@@ -49,7 +51,9 @@ BLOCKED_BY: <only when blocked/partial — evidence; includes failures observed
|
|
|
49
51
|
|
|
50
52
|
SCOPE_CHANGE: <none | tasks added/removed/deps changed — orchestrator handles diagram>
|
|
51
53
|
|
|
52
|
-
KNOWLEDGE: <none |
|
|
54
|
+
KNOWLEDGE: <none | one ready-to-run command per durable, reusable insight surfaced this dispatch:
|
|
55
|
+
arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json
|
|
56
|
+
(upsert is idempotent by title — no dedup search needed)>
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
No prose narrative. No "I implemented..." — go straight to STATUS.
|
|
@@ -7,6 +7,8 @@ Your dispatch normally carries SCOPE/CONTEXT/IDS with pre-derived facts. When it
|
|
|
7
7
|
2. Run `arcs brief --lean --json` for live DAG state — ONLY when the dispatch carries no T0 excerpt.
|
|
8
8
|
3. Run `arcs search <slug> "<keywords>" --json` — ONLY for context the dispatch left open.
|
|
9
9
|
|
|
10
|
+
KNOWLEDGE-FIRST: before producing output, unless your dispatch CONTEXT already carries the relevant prior knowledge, run `arcs knowledge search <slug> "<scope keywords>" --lean --json` and read any kind=architecture|decision|gotcha|pattern|lesson entry covering your SCOPE (`arcs knowledge get <slug> <id> --body --lean --json` for full text). Incorporate it — do not rediscover what the DAG already knows. Skip only for purely mechanical changes.
|
|
11
|
+
|
|
10
12
|
Core skills you load: brainstorming (design exploration with dual-mode ARCS integration), writing-plans (implementation plans), to-diagram (visual execution maps).
|
|
11
13
|
|
|
12
14
|
You have ARCS CLI access — use it to read project context across multiple projects, check dependency graphs, create plans, and capture architectural decisions as knowledge entries (kind: architecture).
|
|
@@ -30,7 +32,7 @@ MANDATORY EXIT GATE: Before finalizing any design, verify: (1) dependency direct
|
|
|
30
32
|
| `arcs graph inspect <slug> --json` | Analyze coupling density and fan-in/fan-out |
|
|
31
33
|
| `arcs related <slug> --plan=<planId> --json` | Find graph-linked entities across projects |
|
|
32
34
|
| `arcs plan create <slug> "..." --summary="..." --status=planned --json` | Propose multi-step structural change |
|
|
33
|
-
| `arcs knowledge
|
|
35
|
+
| `arcs knowledge upsert <slug> "<title>" --kind=architecture --summary="..." --json` | Record architectural decision or observation (idempotent by title) |
|
|
34
36
|
| `arcs search <slug> "<keywords>" --lean --json` | Find existing plans/knowledge before proposing new |
|
|
35
37
|
|
|
36
38
|
All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
|
|
@@ -71,7 +73,11 @@ BOUNDARIES:
|
|
|
71
73
|
RISKS:
|
|
72
74
|
- <risk with severity and mitigation>
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
KNOWLEDGE: <none | one ready-to-run command per durable, reusable insight surfaced this dispatch:
|
|
77
|
+
arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json
|
|
78
|
+
(upsert is idempotent by title — no dedup search needed)>
|
|
79
|
+
|
|
80
|
+
ARTIFACTS: (non-knowledge artifacts only — plans, diagrams, dependency edges)
|
|
75
81
|
- executed: <arcs command run + resulting entry/plan id>
|
|
76
82
|
- proposed: <ready-to-run arcs command for the orchestrator to execute verbatim>
|
|
77
83
|
```
|
|
@@ -11,6 +11,8 @@ Your dispatch normally carries SCOPE/CONTEXT/IDS with pre-derived facts. When it
|
|
|
11
11
|
2. Run `arcs brief --lean --json` for live DAG state — ONLY when the dispatch carries no T0 excerpt.
|
|
12
12
|
3. Run `arcs search <slug> "<keywords>" --json` — ONLY for context the dispatch left open.
|
|
13
13
|
|
|
14
|
+
KNOWLEDGE-FIRST: before producing output, unless your dispatch CONTEXT already carries the relevant prior knowledge, run `arcs knowledge search <slug> "<scope keywords>" --lean --json` and read any kind=architecture|decision|gotcha|pattern|lesson entry covering your SCOPE (`arcs knowledge get <slug> <id> --body --lean --json` for full text). Incorporate it — do not rediscover what the DAG already knows. Skip only for purely mechanical changes.
|
|
15
|
+
|
|
14
16
|
Core skills you load: brainstorming (design exploration), writing-plans (structured plans from analysis findings).
|
|
15
17
|
|
|
16
18
|
You have ARCS CLI access — use it to read project context, check existing architectural knowledge entries, and capture findings as durable knowledge entries (kind: architecture or lesson).
|
|
@@ -31,8 +33,8 @@ MANDATORY EXIT GATE: Before delivering analysis, confirm: (1) all relevant modul
|
|
|
31
33
|
| `arcs related <slug> --knowledge=<id> --json` | Trace dependency chains between entities |
|
|
32
34
|
| `arcs audit <slug> --json` | Check structural health (stale refs, orphan entities) |
|
|
33
35
|
| `arcs knowledge get <slug> <id> --body --json` | Read full knowledge entry for deep analysis |
|
|
34
|
-
| `arcs knowledge search <slug> "<keywords>" --lean --json` | Find prior
|
|
35
|
-
| `arcs knowledge
|
|
36
|
+
| `arcs knowledge search <slug> "<keywords>" --lean --json` | Find prior kind=architecture\|decision findings before analyzing |
|
|
37
|
+
| `arcs knowledge upsert <slug> "<title>" --kind=architecture --summary="..." --json` | Record analysis finding (idempotent by title) |
|
|
36
38
|
| `arcs diff <slug> --since="7d" --json` | See what changed since last sync (scope recent changes) |
|
|
37
39
|
|
|
38
40
|
All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
|
|
@@ -47,9 +49,9 @@ When dispatched for structural analysis:
|
|
|
47
49
|
2. `arcs graph inspect <slug> --json` — get coupling density, fan-in/fan-out metrics
|
|
48
50
|
3. `arcs related <slug> --knowledge=<id> --json` — trace dependency chains from the subject
|
|
49
51
|
4. `arcs audit <slug> --json` — check for structural health issues
|
|
50
|
-
5. `arcs knowledge search <slug> "<area>" --lean --json` — find prior findings
|
|
52
|
+
5. `arcs knowledge search <slug> "<area>" --lean --json` — find prior kind=architecture|decision findings before analyzing
|
|
51
53
|
6. Analyze: apply 6-dimension framework (module boundaries, dependency direction, API cohesion, coupling, layering, evolution fitness)
|
|
52
|
-
7. `arcs knowledge
|
|
54
|
+
7. `arcs knowledge upsert <slug> "<finding>" --kind=architecture --summary="..." --json` — record findings (idempotent by title)
|
|
53
55
|
|
|
54
56
|
Output: severity-ranked findings with evidence (file paths, metrics, dependency chains).
|
|
55
57
|
|
|
@@ -73,7 +75,11 @@ RECOMMENDATIONS:
|
|
|
73
75
|
RISKS:
|
|
74
76
|
- <risk if recommendation is NOT followed>
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
KNOWLEDGE: <none | one ready-to-run command per durable, reusable insight surfaced this dispatch:
|
|
79
|
+
arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json
|
|
80
|
+
(upsert is idempotent by title — no dedup search needed)>
|
|
81
|
+
|
|
82
|
+
ARTIFACTS: (non-knowledge artifacts only — plans, diagrams)
|
|
77
83
|
- executed: <arcs command run + resulting entry id>
|
|
78
84
|
- proposed: <ready-to-run arcs command for the orchestrator to execute verbatim>
|
|
79
85
|
```
|
|
@@ -41,6 +41,10 @@ flowchart TD
|
|
|
41
41
|
K --> L[Invoke writing-plans skill]
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
## Prior Decisions Check
|
|
45
|
+
|
|
46
|
+
Before challenging, read what's already settled so you don't relitigate or contradict a prior call: `arcs knowledge search <slug> "<topic-keywords>" --lean --json` filtering for `kind=decision` and `kind=architecture`. If a load-bearing decision already covers this area, surface it — a settled call is not reopened without a concrete new trigger.
|
|
47
|
+
|
|
44
48
|
## Challenge Protocol
|
|
45
49
|
|
|
46
50
|
Before designing anything, interrogate the request:
|
|
@@ -124,6 +128,8 @@ arcs plan create <slug> --title="YYYY-MM-DD <topic> Design" --summary="..." --st
|
|
|
124
128
|
|
|
125
129
|
When creating tasks from the plan, wire execution order with `--dependsOn=dep-task-id-1,dep-task-id-2`. The `dependsOn` graph determines what `arcs next` returns — priority is a tiebreaker within the same topological level.
|
|
126
130
|
|
|
131
|
+
After the design lands, capture the reasoning that the plan body alone will lose — this is the richest, most-skipped knowledge in the whole workflow. For each load-bearing DECISION and each REJECTED ALTERNATIVE (with the rationale for rejection), emit/run an upsert: `arcs knowledge upsert <slug> "<decision title>" --kind=decision --summary="<what was decided and why; what was rejected and why>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json`. Upsert is idempotent by title, so no dedup search is needed. (When the orchestrator drives this skill, emit the upsert command for it to run; standalone with bash, run it directly.)
|
|
132
|
+
|
|
127
133
|
After storage: _"Spec saved to plan `<planId>`. Review it. Push back if anything's wrong."_
|
|
128
134
|
|
|
129
135
|
## Visual Companion
|
|
@@ -42,6 +42,10 @@ Look for:
|
|
|
42
42
|
|
|
43
43
|
If relevant entries exist, incorporate their guidance. Don't rediscover what's already known.
|
|
44
44
|
|
|
45
|
+
## Capture Exit: Record What You Resolved
|
|
46
|
+
|
|
47
|
+
Phase 0 is read-only; close the loop on the way out. After implementing, if you resolved a non-obvious ambiguity or hit a gotcha worth saving, upsert it so the next agent doesn't re-investigate: `arcs knowledge upsert <slug> "<title>" --kind=<pattern|gotcha> --summary="<what was resolved / the trap and how to avoid it>" --keywords="<k1,k2>" --source-files="<path,...>" --json`. Skip when the work was mechanical and surfaced nothing non-obvious. Upsert is idempotent by title.
|
|
48
|
+
|
|
45
49
|
## Behaviour
|
|
46
50
|
|
|
47
51
|
- Apply `the-ladder` during implementation — reach for stdlib / native / an installed dep before new code, and leave `// SHORTCUT:` markers for deliberate simplifications
|
|
@@ -45,7 +45,7 @@ flowchart TD
|
|
|
45
45
|
S -->|don't post| END1[Show report only]
|
|
46
46
|
S -->|post| T[gh api: review + inline comments]
|
|
47
47
|
T --> U{Recurring pattern surfaced?}
|
|
48
|
-
U -->|yes
|
|
48
|
+
U -->|yes| V[Propose arcs knowledge upsert in report — ARCS-write opt-in to apply]
|
|
49
49
|
U -->|no| END2[Done]
|
|
50
50
|
V --> END2
|
|
51
51
|
```
|
|
@@ -180,6 +180,10 @@ gh api POST /repos/{owner}/{repo}/pulls/{number}/reviews \
|
|
|
180
180
|
| 4 (summary only) | `gh pr review <number> --comment --body "..."` — **one call, no `comments[]`** |
|
|
181
181
|
| 5 (don't post) | No `gh` writes |
|
|
182
182
|
|
|
183
|
+
## Knowledge Proposals (standard report output)
|
|
184
|
+
|
|
185
|
+
A recurring finding — the same class of bug, the same convention violation, a trap seen more than once across the diff — is durable knowledge, not just a one-off comment. Make proposing it a standard part of the report, not an afterthought: for each recurring finding, include a proposed `arcs knowledge upsert <slug> "<title>" --kind=<pattern|gotcha> --summary="<the recurring issue and the fix convention>" --keywords="<k1,k2>" --source-files="<path,...>" --json` in the report. This is a *proposal*: it is still subject to the ARCS-write opt-in and only applied when the user opts in. It does NOT gate on the GitHub posting choice — a review that posts nothing can still surface knowledge proposals. Upsert is idempotent by title.
|
|
186
|
+
|
|
183
187
|
## Report Structure
|
|
184
188
|
|
|
185
189
|
```
|
|
@@ -189,6 +193,7 @@ gh api POST /repos/{owner}/{repo}/pulls/{number}/reviews \
|
|
|
189
193
|
## Rubric Selection (which dimensions activated, why)
|
|
190
194
|
## Findings (grouped by severity)
|
|
191
195
|
## Cleared Dimensions (with evidence)
|
|
196
|
+
## Knowledge Proposals (recurring findings → proposed arcs knowledge upsert, ARCS-write opt-in)
|
|
192
197
|
## Architectural / Performance Handoffs (if any)
|
|
193
198
|
## Posting Plan (mode chosen → exact comments to be posted)
|
|
194
199
|
## Confidence & Gaps
|
|
@@ -57,6 +57,8 @@ When plan has `.diagram.mmd`:
|
|
|
57
57
|
|
|
58
58
|
**Verify scope rule:** Run ONLY the current task's `verify` command, scoped to that task's `files`. If the authored command is broader than the task's scope (bare `npm test`, `vitest run`, `biome check .`), narrow it to the touched files first (e.g. `npm test -- test/orders.test.ts`). Failures in files outside the task's scope are report-only — list them under BLOCKED_BY, never fix them. Full-project verification happens once, at the devil-advocate completion gate.
|
|
59
59
|
|
|
60
|
+
**Directed gotcha read before each task:** Before executing a task, search the DAG for known traps in its area so you don't walk into one the plan didn't anticipate: `arcs knowledge search <slug> "<task-keywords>" --lean --json`, filtering for `kind=gotcha`. Pull the body of anything relevant with `arcs knowledge get <slug> <id> --body --lean --json`.
|
|
61
|
+
|
|
60
62
|
## Sub-Agent Context
|
|
61
63
|
|
|
62
64
|
Fetch once, then paste the relevant output into each dispatch's CONTEXT — don't make sub-agents re-fetch:
|
|
@@ -79,6 +81,10 @@ Sub-agents MUST NOT edit `.mmd` files — orchestrator owns diagram updates.
|
|
|
79
81
|
|
|
80
82
|
Ask for clarification rather than guessing. Don't force through blockers.
|
|
81
83
|
|
|
84
|
+
## Capturing Execution Discoveries
|
|
85
|
+
|
|
86
|
+
When execution surfaces something the plan didn't know — a plan-vs-reality delta, a gotcha hit mid-task, a convention the plan got wrong — capture it so the "new knowledge entries" sync trigger below actually fires: `arcs knowledge upsert <slug> "<title>" --kind=<gotcha|lesson> --summary="<what reality diverged from the plan / the trap hit>" --keywords="<k1,k2>" --source-files="<path,...>" --json`. Skip when execution matched the plan exactly. Upsert is idempotent by title.
|
|
87
|
+
|
|
82
88
|
## Auto-Sync Triggers
|
|
83
89
|
|
|
84
90
|
Post-execution DAG sync fires automatically when:
|
|
@@ -29,6 +29,10 @@ arcs knowledge search <slug> "<keywords>" --lean --json
|
|
|
29
29
|
|
|
30
30
|
Check for patterns, gotchas, and lessons before implementing. Skip only if the change is purely mechanical (rename, config nudge).
|
|
31
31
|
|
|
32
|
+
## Capture Exit (lightweight)
|
|
33
|
+
|
|
34
|
+
If a "bounded" change surfaced a non-obvious gotcha along the way, capture it before finishing: `arcs knowledge upsert <slug> "<title>" --kind=gotcha --summary="<the trap in 1-2 sentences>" --keywords="<k1,k2>" --source-files="<path,...>" --json`. Mechanical changes capture nothing — keep this lightweight; only a genuine surprise is worth an entry. Upsert is idempotent by title.
|
|
35
|
+
|
|
32
36
|
## Behaviour
|
|
33
37
|
|
|
34
38
|
0. Apply `the-ladder` before writing code — climb the rungs (stdlib / native platform / installed dep before new code) and mark deliberate simplifications with `// SHORTCUT:` comments
|
|
@@ -32,6 +32,10 @@ flowchart TD
|
|
|
32
32
|
- `{BASE_SHA}` / `{HEAD_SHA}` — commit range
|
|
33
33
|
- `{PROJECT_CONVENTIONS}` — CLAUDE.md / linter configs / style guides (gather once per session, reuse across dispatches)
|
|
34
34
|
|
|
35
|
+
## Feed DAG Conventions to the Reviewer
|
|
36
|
+
|
|
37
|
+
When gathering conventions, also pull what the DAG already knows so the reviewer checks against settled patterns, not just static config: `arcs knowledge search <slug> "<changed-area keywords>" --lean --json`, filtering for `kind=pattern` and `kind=gotcha`. Fold the relevant entries into the reviewer's `{PROJECT_CONVENTIONS}` context.
|
|
38
|
+
|
|
35
39
|
## When to Request
|
|
36
40
|
|
|
37
41
|
**Mandatory:** after major features, before merge to main.
|
|
@@ -49,3 +53,7 @@ flowchart TD
|
|
|
49
53
|
See template at: `requesting-code-review/code-reviewer.md`
|
|
50
54
|
|
|
51
55
|
Reviewer returns the unified envelope: STATUS → VERDICT (approve | request-changes | comment-only) → FINDINGS by severity (CRITICAL/HIGH/MEDIUM/LOW) with 📍 file:line anchors.
|
|
56
|
+
|
|
57
|
+
## Capture Recurring Findings
|
|
58
|
+
|
|
59
|
+
When a finding recurs — the same class of issue flagged more than once, or a convention the codebase keeps violating — propose it as durable knowledge so future reviews and implementers inherit it: `arcs knowledge upsert <slug> "<title>" --kind=<pattern|gotcha> --summary="<the recurring issue and the fix convention>" --keywords="<k1,k2>" --source-files="<path,...>" --json`. Upsert is idempotent by title.
|
|
@@ -128,6 +128,10 @@ Mapping to the orchestrator's Standard Return Envelope: DONE→done, DONE_WITH_C
|
|
|
128
128
|
Include in every dispatch prompt:
|
|
129
129
|
> "Return format: brief prose findings first, then the JSON envelope (status + typed payload) from your role's prompt template as the LAST thing in your message — nothing after it."
|
|
130
130
|
|
|
131
|
+
## Knowledge Capture at Fan-In
|
|
132
|
+
|
|
133
|
+
The `concerns`, `scopeChanges`, and `DONE_WITH_CONCERNS` payloads already collected from each subagent are near-free durable signal — don't discard them. At fan-in, route the durable items (a non-obvious trap hit, a convention that had to be discovered, a plan-vs-reality delta) into the DAG: `arcs knowledge upsert <slug> "<title>" --kind=<gotcha|pattern> --summary="<1-2 sentences>" --keywords="<k1,k2>" --source-files="<path,...>" --json`. Skip purely mechanical or task-local notes; capture only what the next agent would otherwise re-investigate. Upsert is idempotent by title.
|
|
134
|
+
|
|
131
135
|
## Git State Discipline
|
|
132
136
|
|
|
133
137
|
- Sub-agents MUST NOT run `git stash` — ever, under any circumstance
|
|
@@ -47,6 +47,8 @@ Mark every deliberate simplification inline so it reads as intent, not ignorance
|
|
|
47
47
|
|
|
48
48
|
The comment names the known ceiling AND the trigger to revisit. Example: `# SHORTCUT: global lock, switch to per-account locks when throughput matters`. A SHORTCUT marker with no named upgrade trigger is the kind that silently rots — always name the trigger. (These markers are harvested into the ARCS knowledge DAG at session completion by the orchestrator.)
|
|
49
49
|
|
|
50
|
+
When a SHORTCUT's ceiling is durable and non-obvious — a real trap the next person could step into, not just a local stub — don't rely on the orchestrator harvest alone: also capture it directly with `arcs knowledge upsert <slug> "<ceiling title>" --kind=gotcha --summary="<the ceiling and its upgrade trigger>" --keywords="<k1,k2>" --source-files="<path,...>" --json`. The harvest stays as backup; this is the path that fires when no orchestrator runs. Upsert is idempotent by title — skip the dedup search.
|
|
51
|
+
|
|
50
52
|
## Boundaries
|
|
51
53
|
|
|
52
54
|
This skill governs WHAT you build (minimal), not correctness or how you talk. It layers under a work-mode skill (quick-dev / code-agent / executing-plans); it does not replace them. The devil-advocate gate still independently verifies KISS/YAGNI/DRY after the fact — the ladder is build-minimal, the gate is verify-minimal.
|
|
@@ -57,6 +57,10 @@ sourceFiles: [{path: "...", anchor: "..."}]
|
|
|
57
57
|
---end---
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
## Prior Patterns Check
|
|
61
|
+
|
|
62
|
+
Before mapping structure, read what the DAG already knows so the plan follows established shape: `arcs knowledge search <slug> "<feature-keywords>" --lean --json`, filtering for `kind=pattern` and `kind=architecture`. Reuse known conventions rather than inventing parallel ones.
|
|
63
|
+
|
|
60
64
|
## File Structure
|
|
61
65
|
|
|
62
66
|
Before defining tasks, map which files will be created/modified:
|
|
@@ -163,6 +167,8 @@ flowchart TD
|
|
|
163
167
|
arcs plan create <slug> --title="YYYY-MM-DD <feature> Implementation Plan" --summary="..." --status=planned --keywords="implementation-plan" --body="<markdown>" --json
|
|
164
168
|
```
|
|
165
169
|
|
|
170
|
+
Then extract the plan's "why this structure" rationale into a durable entry — don't let the architecture reasoning stay sealed inside the plan body: `arcs knowledge upsert <slug> "<feature> architecture rationale" --kind=architecture --summary="<why the structure is shaped this way; key trade-offs>" --keywords="<k1,k2>" --source-files="<path[:anchor],...>" --json`. Use `--kind=decision` instead when the entry is really a single settled call rather than a structural shape. Upsert is idempotent by title.
|
|
171
|
+
|
|
166
172
|
## Execution Handoff
|
|
167
173
|
|
|
168
174
|
> "Plan complete and saved via `arcs plan get <slug> <planId>` in project `<slug>`. Ready to execute?"
|
package/package.json
CHANGED