@rryando/arcs 3.7.0 → 3.9.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 +181 -246
- package/dist/cli/arcs-orchestrate-caveman.d.ts +1 -1
- package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate-caveman.js +1 -1
- 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 +43 -40
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/commands/knowledge.js +64 -5
- package/dist/cli/commands/knowledge.js.map +1 -1
- package/dist/cli/commands/utility.d.ts.map +1 -1
- package/dist/cli/commands/utility.js +12 -0
- package/dist/cli/commands/utility.js.map +1 -1
- package/dist/cli/instructions.d.ts.map +1 -1
- package/dist/cli/instructions.js +0 -3
- package/dist/cli/instructions.js.map +1 -1
- package/dist/cli/md-renderer.d.ts.map +1 -1
- package/dist/cli/md-renderer.js +5 -0
- package/dist/cli/md-renderer.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +8 -12
- package/dist/cli/setup.js.map +1 -1
- package/dist/utils/knowledge-templates.d.ts +51 -0
- package/dist/utils/knowledge-templates.d.ts.map +1 -0
- package/dist/utils/knowledge-templates.js +209 -0
- package/dist/utils/knowledge-templates.js.map +1 -0
- package/opencode/arcs/bundle-runtime.json +15 -7
- package/opencode/arcs/manifest.json +0 -64
- package/opencode/arcs/prompts/arcs-docs.txt +8 -8
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +44 -41
- package/opencode/arcs/prompts/arcs-orchestrate.txt +43 -40
- package/opencode/arcs/prompts/code-reviewer.txt +44 -5
- package/opencode/arcs/prompts/devil-advocate.txt +12 -9
- package/opencode/arcs/prompts/docs-researcher.txt +9 -8
- package/opencode/arcs/prompts/graph-explorer.txt +15 -16
- package/opencode/arcs/prompts/oncall-ops.txt +8 -11
- package/opencode/arcs/prompts/software-engineer.txt +7 -5
- package/opencode/arcs/prompts/tech-architect.txt +55 -20
- package/opencode/arcs/skills/brainstorming/SKILL.md +1 -0
- package/opencode/arcs/skills/brainstorming/spec-document-reviewer-prompt.md +7 -1
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +5 -3
- package/opencode/arcs/skills/deep-pr-review/codegraph-diff.md +3 -5
- package/opencode/arcs/skills/deep-pr-review/review-template.md +1 -1
- package/opencode/arcs/skills/enriching-codegraph-proposals/SKILL.md +1 -1
- package/opencode/arcs/skills/executing-plans/SKILL.md +155 -1
- package/opencode/arcs/skills/{subagent-driven-development → executing-plans}/code-quality-reviewer-prompt.md +4 -1
- package/opencode/arcs/skills/{subagent-driven-development → executing-plans}/implementer-prompt.md +4 -0
- package/opencode/arcs/skills/{subagent-driven-development → executing-plans}/spec-reviewer-prompt.md +6 -0
- package/opencode/arcs/skills/init-project/SKILL.md +21 -19
- package/opencode/arcs/skills/requesting-code-review/SKILL.md +1 -1
- package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +1 -1
- package/opencode/arcs/skills/systematic-debugging/SKILL.md +8 -21
- package/opencode/arcs/skills/test-driven-development/SKILL.md +1 -1
- package/opencode/arcs/skills/writing-knowledge/SKILL.md +74 -0
- package/opencode/arcs/skills/writing-plans/SKILL.md +2 -3
- package/opencode/arcs/skills/writing-plans/plan-document-reviewer-prompt.md +8 -2
- package/package.json +4 -1
- package/scripts/build-opencode-bundle.mjs +10 -37
- package/scripts/deploy-claudecode-bundle.mjs +0 -16
- package/scripts/lint-bundle.mjs +31 -29
- package/skills/explore-dag.md +3 -3
- package/skills/init-project.md +7 -8
- package/skills/orchestrate.md +1 -1
- package/templates/knowledge.md.tmpl +2 -2
- package/dist/utils/graphify-knowledge.d.ts +0 -22
- package/dist/utils/graphify-knowledge.d.ts.map +0 -1
- package/dist/utils/graphify-knowledge.js +0 -47
- package/dist/utils/graphify-knowledge.js.map +0 -1
- package/dist/utils/graphify.d.ts +0 -104
- package/dist/utils/graphify.d.ts.map +0 -1
- package/dist/utils/graphify.js +0 -439
- package/dist/utils/graphify.js.map +0 -1
- package/opencode/arcs/prompts/qa-analyst.txt +0 -86
- package/opencode/arcs/prompts/system-architect.txt +0 -94
- package/opencode/arcs/skills/subagent-driven-development/SKILL.md +0 -185
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: subagent-driven-development
|
|
3
|
-
description: Use when executing implementation plans with independent tasks in the current session
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill: Subagent-Driven Development
|
|
7
|
-
|
|
8
|
-
## When
|
|
9
|
-
|
|
10
|
-
You have an implementation plan with mostly-independent tasks and want to execute them in-session via fresh subagents with two-stage review.
|
|
11
|
-
|
|
12
|
-
**NOT for:**
|
|
13
|
-
- If no subagent dispatch capability is available → use `executing-plans` instead (single-agent sequential)
|
|
14
|
-
- If the work is iterative self-correction without structured plan tasks → use `loop` instead
|
|
15
|
-
|
|
16
|
-
> CLI Primer: `arcs --commands --json` for discovery. Mutating commands run directly — no token.
|
|
17
|
-
|
|
18
|
-
## Flow
|
|
19
|
-
|
|
20
|
-
```mermaid
|
|
21
|
-
flowchart TD
|
|
22
|
-
A[Load plan + extract all tasks] --> B{Diagram .mmd exists?}
|
|
23
|
-
B -->|yes| C[arcs diagram ready → get parallel-safe nodes]
|
|
24
|
-
B -->|no| D[Pick next task sequentially]
|
|
25
|
-
C --> E[Read node metadata: skill, scope, acceptance, verify]
|
|
26
|
-
D --> F[Construct subagent prompt]
|
|
27
|
-
E --> F
|
|
28
|
-
F --> G[Dispatch implementer subagent]
|
|
29
|
-
G --> H{Subagent status?}
|
|
30
|
-
H -->|DONE / DONE_WITH_CONCERNS| I[Dispatch spec-reviewer subagent]
|
|
31
|
-
H -->|NEEDS_CONTEXT| J[Provide context, re-dispatch]
|
|
32
|
-
H -->|BLOCKED| K{Assess blocker}
|
|
33
|
-
J --> G
|
|
34
|
-
K -->|context gap| J
|
|
35
|
-
K -->|needs stronger model| L[Re-dispatch with capable model]
|
|
36
|
-
K -->|task too large| M[Split task, update plan]
|
|
37
|
-
K -->|plan wrong| N[Escalate to human]
|
|
38
|
-
L --> G
|
|
39
|
-
I --> O{Spec compliant?}
|
|
40
|
-
O -->|no| P[Implementer fixes spec gaps] --> I
|
|
41
|
-
O -->|yes| Q[Dispatch code-quality reviewer]
|
|
42
|
-
Q --> R{Quality approved?}
|
|
43
|
-
R -->|no| S[Implementer fixes quality issues] --> Q
|
|
44
|
-
R -->|yes| T[Mark task done]
|
|
45
|
-
T --> U{More tasks?}
|
|
46
|
-
U -->|yes| B
|
|
47
|
-
U -->|no| V[Dispatch devil-advocate PHASE: completion — the single full-project pass]
|
|
48
|
-
V -->|PASS| W[Report completion]
|
|
49
|
-
V -->|BLOCK| X[Re-dispatch scoped fixes per FAILURES] --> V
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**Gate cap:** two consecutive completion BLOCKs → stop and escalate to human; never loop the V→X cycle a third time.
|
|
53
|
-
|
|
54
|
-
**Under the ARCS orchestrator:** the orchestrator's devil-advocate PHASE: execute gate replaces the code-quality reviewer step (the gate runs the scoped VERIFY and the drift check); spec review remains. Running standalone, keep both reviewer stages as drawn.
|
|
55
|
-
|
|
56
|
-
## Retry & Escalation
|
|
57
|
-
|
|
58
|
-
```mermaid
|
|
59
|
-
flowchart TD
|
|
60
|
-
A[Subagent fails] --> B{First attempt?}
|
|
61
|
-
B -->|yes| C[Re-dispatch with more context or stronger model]
|
|
62
|
-
B -->|no| D{Same failure mode?}
|
|
63
|
-
D -->|yes| E[Escalate to human — don't loop]
|
|
64
|
-
D -->|no| C
|
|
65
|
-
C --> F{Success?}
|
|
66
|
-
F -->|yes| G[Continue pipeline]
|
|
67
|
-
F -->|no| D
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Diagram-First Dispatch
|
|
71
|
-
|
|
72
|
-
When the plan has a `.mmd` file:
|
|
73
|
-
|
|
74
|
-
1. `arcs diagram ready <slug> <planId>` → all returned nodes are dispatch-safe in parallel
|
|
75
|
-
2. Use per-node `%%` metadata (`skill`, `scope`, `files`, `acceptance`, `verify`) to construct prompts
|
|
76
|
-
3. After completion: `arcs task transition <slug> <taskId> done --diagramNodeId=T001 --planId=<planId>`
|
|
77
|
-
4. Re-run `diagram ready` to discover newly-unblocked nodes
|
|
78
|
-
5. If node metadata is incomplete, fall back to reading the plan body for that task
|
|
79
|
-
|
|
80
|
-
**Ownership:** Dispatcher owns `.mmd` updates. Implementer subagents MUST NOT edit diagrams.
|
|
81
|
-
|
|
82
|
-
## Sub-Agent Prompt Construction
|
|
83
|
-
|
|
84
|
-
Every implementer subagent prompt MUST include:
|
|
85
|
-
|
|
86
|
-
| Section | Content |
|
|
87
|
-
|---------|---------|
|
|
88
|
-
| **Goal** | Exact task description from plan (full text, not summary) |
|
|
89
|
-
| **Context** | Where this task fits in the plan; what came before |
|
|
90
|
-
| **Scope** | File boundaries — what to touch, what NOT to touch |
|
|
91
|
-
| **Acceptance** | Done criteria copied verbatim from plan/diagram |
|
|
92
|
-
| **Verify** | Exact command to run before claiming done — scoped to the task's files, never the full suite |
|
|
93
|
-
| **Skill** | Which work-mode skill to load (from diagram metadata or inferred) |
|
|
94
|
-
| **Return** | Structured Return envelope (below) — brief prose findings first, JSON block last |
|
|
95
|
-
|
|
96
|
-
Do NOT make the subagent read the plan file. Provide full text in the prompt.
|
|
97
|
-
|
|
98
|
-
## Model Selection
|
|
99
|
-
|
|
100
|
-
| Task complexity | Model tier |
|
|
101
|
-
|----------------|-----------|
|
|
102
|
-
| 1-2 files, clear spec, mechanical | Fast/cheap |
|
|
103
|
-
| Multi-file integration, pattern matching | Standard |
|
|
104
|
-
| Architecture, design, review | Most capable |
|
|
105
|
-
|
|
106
|
-
## Prompt Templates
|
|
107
|
-
|
|
108
|
-
- `./implementer-prompt.md`
|
|
109
|
-
- `./spec-reviewer-prompt.md`
|
|
110
|
-
- `./code-quality-reviewer-prompt.md`
|
|
111
|
-
|
|
112
|
-
## Structured Return
|
|
113
|
-
|
|
114
|
-
All sub-agents MUST return a JSON block as the LAST thing in their message — brief prose findings first, JSON block last, nothing after it:
|
|
115
|
-
|
|
116
|
-
```json
|
|
117
|
-
{
|
|
118
|
-
"status": "DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT",
|
|
119
|
-
"summary": "<1-2 sentences>",
|
|
120
|
-
"payload": { "<role-specific fields per prompt template>": "..." }
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Role payloads: implementer → `filesChanged`/`filesCreated`/`verification{command,result,scopeReason}`/`concerns`/`scopeChanges`; spec reviewer → `compliant`/`issues`; quality reviewer → `approved`/`issues`.
|
|
125
|
-
Orchestrator parses `status` for routing, `payload` for action.
|
|
126
|
-
Mapping to the orchestrator's Standard Return Envelope: DONE→done, DONE_WITH_CONCERNS→done + concerns surfaced, BLOCKED→blocked, NEEDS_CONTEXT→blocked.
|
|
127
|
-
|
|
128
|
-
Include in every dispatch prompt:
|
|
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
|
-
|
|
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
|
-
|
|
135
|
-
## Git State Discipline
|
|
136
|
-
|
|
137
|
-
- Sub-agents MUST NOT run `git stash` — ever, under any circumstance
|
|
138
|
-
- Sub-agents MUST NOT run `git checkout` on shared branches
|
|
139
|
-
- Sub-agents commit their changes atomically (scoped to task files) before reporting back
|
|
140
|
-
- Other agents may be working concurrently — do not assume a clean worktree
|
|
141
|
-
- Use `git diff HEAD -- <your-files>` to verify YOUR changes only — bare `git diff` is unreliable in parallel
|
|
142
|
-
- If you see unexpected changes in files outside your scope: **ignore them** — they belong to another agent
|
|
143
|
-
|
|
144
|
-
## Verification Scoping
|
|
145
|
-
|
|
146
|
-
Sub-agents lint and test **only files they touched**:
|
|
147
|
-
|
|
148
|
-
| Scope | Command | NOT this |
|
|
149
|
-
|-------|---------|----------|
|
|
150
|
-
| Lint | `biome check src/changed.ts` | `biome check .` |
|
|
151
|
-
| Test | `vitest run test/changed.test.ts` | `vitest run` / `npm test` |
|
|
152
|
-
| Type check | `tsc --noEmit` — read-only signal; out-of-scope errors are report-only | fixing type errors outside your scope |
|
|
153
|
-
|
|
154
|
-
Sub-agents NEVER run the full suite — not even for pervasive changes. If a change is pervasive
|
|
155
|
-
(shared types, config, build), record it in `scopeChanges`/`concerns`; the orchestrator defers
|
|
156
|
-
full-project verification to the devil-advocate completion gate. Type errors or test failures in
|
|
157
|
-
files outside your scope are report-only — never fix them; the authoritative project-wide tsc run
|
|
158
|
-
belongs to that gate. Sub-agent must state `scopeReason` in return payload.
|
|
159
|
-
|
|
160
|
-
## Parallelism Rules
|
|
161
|
-
|
|
162
|
-
Parallel implementers are allowed when tasks touch **zero shared files**.
|
|
163
|
-
|
|
164
|
-
1. **Independence check:** Orchestrator verifies no file overlap before dispatch. If overlap → serialize.
|
|
165
|
-
2. **Batch limit:** Maximum 4 concurrent subagents per round. Queue remaining.
|
|
166
|
-
3. **Prompt construction:** Per the Sub-Agent Prompt Construction table above — all rows required.
|
|
167
|
-
4. **Conflict detection:** After fan-out completes, check for conflicting edits before committing.
|
|
168
|
-
5. **Shared context:** Fetch once (e.g., project brief), inject into all subagent prompts — don't make each agent re-fetch.
|
|
169
|
-
|
|
170
|
-
**When to serialize instead:**
|
|
171
|
-
- Tasks share source files (even different functions in same file)
|
|
172
|
-
- Task B's approach depends on Task A's output
|
|
173
|
-
- Both tasks modify test fixtures or shared mocks
|
|
174
|
-
|
|
175
|
-
## Constraints
|
|
176
|
-
|
|
177
|
-
- Fresh subagent per task — never reuse session context
|
|
178
|
-
- Spec review BEFORE code quality review (never reverse)
|
|
179
|
-
- Parallel implementers only when zero file overlap (orchestrator verifies)
|
|
180
|
-
- Never skip re-review after fixes
|
|
181
|
-
- Never ignore BLOCKED/NEEDS_CONTEXT status — something must change
|
|
182
|
-
- Never start on main/master without explicit user consent
|
|
183
|
-
- If reviewer finds issues → implementer fixes → reviewer re-reviews → repeat until approved
|
|
184
|
-
- DONE_WITH_CONCERNS: read concerns before proceeding; address if correctness/scope related
|
|
185
|
-
- Scope changes discovered by subagents: report in summary, dispatcher handles diagram regeneration
|