@rryando/arcs 3.0.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 +448 -0
- package/dist/cli/arcs-orchestrate-caveman.d.ts +16 -0
- package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -0
- package/dist/cli/arcs-orchestrate-caveman.js +109 -0
- package/dist/cli/arcs-orchestrate-caveman.js.map +1 -0
- package/dist/cli/arcs-orchestrate.d.ts +2 -0
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -0
- package/dist/cli/arcs-orchestrate.js +431 -0
- package/dist/cli/arcs-orchestrate.js.map +1 -0
- package/dist/cli/arg-parser.d.ts +20 -0
- package/dist/cli/arg-parser.d.ts.map +1 -0
- package/dist/cli/arg-parser.js +216 -0
- package/dist/cli/arg-parser.js.map +1 -0
- package/dist/cli/brief-renderer.d.ts +32 -0
- package/dist/cli/brief-renderer.d.ts.map +1 -0
- package/dist/cli/brief-renderer.js +67 -0
- package/dist/cli/brief-renderer.js.map +1 -0
- package/dist/cli/bundle-installer.d.ts +77 -0
- package/dist/cli/bundle-installer.d.ts.map +1 -0
- package/dist/cli/bundle-installer.js +328 -0
- package/dist/cli/bundle-installer.js.map +1 -0
- package/dist/cli/command-registry.d.ts +52 -0
- package/dist/cli/command-registry.d.ts.map +1 -0
- package/dist/cli/command-registry.js +68 -0
- package/dist/cli/command-registry.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +2 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +307 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/brief.d.ts +2 -0
- package/dist/cli/commands/brief.d.ts.map +1 -0
- package/dist/cli/commands/brief.js +146 -0
- package/dist/cli/commands/brief.js.map +1 -0
- package/dist/cli/commands/bundle.d.ts +2 -0
- package/dist/cli/commands/bundle.d.ts.map +1 -0
- package/dist/cli/commands/bundle.js +90 -0
- package/dist/cli/commands/bundle.js.map +1 -0
- package/dist/cli/commands/dependency.d.ts +2 -0
- package/dist/cli/commands/dependency.d.ts.map +1 -0
- package/dist/cli/commands/dependency.js +260 -0
- package/dist/cli/commands/dependency.js.map +1 -0
- package/dist/cli/commands/diagnostics.d.ts +2 -0
- package/dist/cli/commands/diagnostics.d.ts.map +1 -0
- package/dist/cli/commands/diagnostics.js +91 -0
- package/dist/cli/commands/diagnostics.js.map +1 -0
- package/dist/cli/commands/diagram.d.ts +2 -0
- package/dist/cli/commands/diagram.d.ts.map +1 -0
- package/dist/cli/commands/diagram.js +305 -0
- package/dist/cli/commands/diagram.js.map +1 -0
- package/dist/cli/commands/done.d.ts +2 -0
- package/dist/cli/commands/done.d.ts.map +1 -0
- package/dist/cli/commands/done.js +140 -0
- package/dist/cli/commands/done.js.map +1 -0
- package/dist/cli/commands/graph.d.ts +2 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/graph.js +105 -0
- package/dist/cli/commands/graph.js.map +1 -0
- package/dist/cli/commands/index.d.ts +21 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +22 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/knowledge-search.d.ts +2 -0
- package/dist/cli/commands/knowledge-search.d.ts.map +1 -0
- package/dist/cli/commands/knowledge-search.js +43 -0
- package/dist/cli/commands/knowledge-search.js.map +1 -0
- package/dist/cli/commands/knowledge.d.ts +2 -0
- package/dist/cli/commands/knowledge.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.js +416 -0
- package/dist/cli/commands/knowledge.js.map +1 -0
- package/dist/cli/commands/loop.d.ts +2 -0
- package/dist/cli/commands/loop.d.ts.map +1 -0
- package/dist/cli/commands/loop.js +192 -0
- package/dist/cli/commands/loop.js.map +1 -0
- package/dist/cli/commands/maintenance.d.ts +2 -0
- package/dist/cli/commands/maintenance.d.ts.map +1 -0
- package/dist/cli/commands/maintenance.js +231 -0
- package/dist/cli/commands/maintenance.js.map +1 -0
- package/dist/cli/commands/next.d.ts +2 -0
- package/dist/cli/commands/next.d.ts.map +1 -0
- package/dist/cli/commands/next.js +116 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +2 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +340 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/project-updates.d.ts +2 -0
- package/dist/cli/commands/project-updates.d.ts.map +1 -0
- package/dist/cli/commands/project-updates.js +243 -0
- package/dist/cli/commands/project-updates.js.map +1 -0
- package/dist/cli/commands/project.d.ts +2 -0
- package/dist/cli/commands/project.d.ts.map +1 -0
- package/dist/cli/commands/project.js +362 -0
- package/dist/cli/commands/project.js.map +1 -0
- package/dist/cli/commands/remember.d.ts +2 -0
- package/dist/cli/commands/remember.d.ts.map +1 -0
- package/dist/cli/commands/remember.js +70 -0
- package/dist/cli/commands/remember.js.map +1 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +104 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/task.d.ts +6 -0
- package/dist/cli/commands/task.d.ts.map +1 -0
- package/dist/cli/commands/task.js +361 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/utility.d.ts +9 -0
- package/dist/cli/commands/utility.d.ts.map +1 -0
- package/dist/cli/commands/utility.js +302 -0
- package/dist/cli/commands/utility.js.map +1 -0
- package/dist/cli/config.d.ts +42 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +134 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/dag-commands.d.ts +7 -0
- package/dist/cli/dag-commands.d.ts.map +1 -0
- package/dist/cli/dag-commands.js +152 -0
- package/dist/cli/dag-commands.js.map +1 -0
- package/dist/cli/diagram-renderer.d.ts +26 -0
- package/dist/cli/diagram-renderer.d.ts.map +1 -0
- package/dist/cli/diagram-renderer.js +118 -0
- package/dist/cli/diagram-renderer.js.map +1 -0
- package/dist/cli/help-generator.d.ts +21 -0
- package/dist/cli/help-generator.d.ts.map +1 -0
- package/dist/cli/help-generator.js +100 -0
- package/dist/cli/help-generator.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +95 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/instructions.d.ts +53 -0
- package/dist/cli/instructions.d.ts.map +1 -0
- package/dist/cli/instructions.js +219 -0
- package/dist/cli/instructions.js.map +1 -0
- package/dist/cli/lean-output.d.ts +15 -0
- package/dist/cli/lean-output.d.ts.map +1 -0
- package/dist/cli/lean-output.js +66 -0
- package/dist/cli/lean-output.js.map +1 -0
- package/dist/cli/md-renderer.d.ts +6 -0
- package/dist/cli/md-renderer.d.ts.map +1 -0
- package/dist/cli/md-renderer.js +396 -0
- package/dist/cli/md-renderer.js.map +1 -0
- package/dist/cli/output-envelope.d.ts +15 -0
- package/dist/cli/output-envelope.d.ts.map +1 -0
- package/dist/cli/output-envelope.js +61 -0
- package/dist/cli/output-envelope.js.map +1 -0
- package/dist/cli/setup.d.ts +11 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +415 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/status-dashboard.d.ts +5 -0
- package/dist/cli/status-dashboard.d.ts.map +1 -0
- package/dist/cli/status-dashboard.js +248 -0
- package/dist/cli/status-dashboard.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/retrieval/bm25.d.ts +23 -0
- package/dist/retrieval/bm25.d.ts.map +1 -0
- package/dist/retrieval/bm25.js +92 -0
- package/dist/retrieval/bm25.js.map +1 -0
- package/dist/retrieval/cross-project-search.d.ts +30 -0
- package/dist/retrieval/cross-project-search.d.ts.map +1 -0
- package/dist/retrieval/cross-project-search.js +109 -0
- package/dist/retrieval/cross-project-search.js.map +1 -0
- package/dist/retrieval/graph-builder.d.ts +6 -0
- package/dist/retrieval/graph-builder.d.ts.map +1 -0
- package/dist/retrieval/graph-builder.js +196 -0
- package/dist/retrieval/graph-builder.js.map +1 -0
- package/dist/retrieval/graph-cache.d.ts +15 -0
- package/dist/retrieval/graph-cache.d.ts.map +1 -0
- package/dist/retrieval/graph-cache.js +66 -0
- package/dist/retrieval/graph-cache.js.map +1 -0
- package/dist/retrieval/graph-invalidate.d.ts +18 -0
- package/dist/retrieval/graph-invalidate.d.ts.map +1 -0
- package/dist/retrieval/graph-invalidate.js +23 -0
- package/dist/retrieval/graph-invalidate.js.map +1 -0
- package/dist/retrieval/graph-retrieval.d.ts +24 -0
- package/dist/retrieval/graph-retrieval.d.ts.map +1 -0
- package/dist/retrieval/graph-retrieval.js +165 -0
- package/dist/retrieval/graph-retrieval.js.map +1 -0
- package/dist/retrieval/graph-traverse.d.ts +3 -0
- package/dist/retrieval/graph-traverse.d.ts.map +1 -0
- package/dist/retrieval/graph-traverse.js +53 -0
- package/dist/retrieval/graph-traverse.js.map +1 -0
- package/dist/retrieval/graph-types.d.ts +37 -0
- package/dist/retrieval/graph-types.d.ts.map +1 -0
- package/dist/retrieval/graph-types.js +12 -0
- package/dist/retrieval/graph-types.js.map +1 -0
- package/dist/retrieval/index-builder.d.ts +21 -0
- package/dist/retrieval/index-builder.d.ts.map +1 -0
- package/dist/retrieval/index-builder.js +94 -0
- package/dist/retrieval/index-builder.js.map +1 -0
- package/dist/retrieval/knowledge-selection.d.ts +7 -0
- package/dist/retrieval/knowledge-selection.d.ts.map +1 -0
- package/dist/retrieval/knowledge-selection.js +80 -0
- package/dist/retrieval/knowledge-selection.js.map +1 -0
- package/dist/retrieval/task-scoped.d.ts +23 -0
- package/dist/retrieval/task-scoped.d.ts.map +1 -0
- package/dist/retrieval/task-scoped.js +51 -0
- package/dist/retrieval/task-scoped.js.map +1 -0
- package/dist/utils/content-assembly.d.ts +44 -0
- package/dist/utils/content-assembly.d.ts.map +1 -0
- package/dist/utils/content-assembly.js +101 -0
- package/dist/utils/content-assembly.js.map +1 -0
- package/dist/utils/dag.d.ts +28 -0
- package/dist/utils/dag.d.ts.map +1 -0
- package/dist/utils/dag.js +68 -0
- package/dist/utils/dag.js.map +1 -0
- package/dist/utils/diagram-generator.d.ts +17 -0
- package/dist/utils/diagram-generator.d.ts.map +1 -0
- package/dist/utils/diagram-generator.js +38 -0
- package/dist/utils/diagram-generator.js.map +1 -0
- package/dist/utils/errors.d.ts +40 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +83 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/file-lock.d.ts +13 -0
- package/dist/utils/file-lock.d.ts.map +1 -0
- package/dist/utils/file-lock.js +80 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/git.d.ts +14 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +56 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/graphify-knowledge.d.ts +6 -0
- package/dist/utils/graphify-knowledge.d.ts.map +1 -0
- package/dist/utils/graphify-knowledge.js +60 -0
- package/dist/utils/graphify-knowledge.js.map +1 -0
- package/dist/utils/graphify.d.ts +49 -0
- package/dist/utils/graphify.d.ts.map +1 -0
- package/dist/utils/graphify.js +306 -0
- package/dist/utils/graphify.js.map +1 -0
- package/dist/utils/json-schemas.d.ts +723 -0
- package/dist/utils/json-schemas.d.ts.map +1 -0
- package/dist/utils/json-schemas.js +147 -0
- package/dist/utils/json-schemas.js.map +1 -0
- package/dist/utils/json.d.ts +15 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +39 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/knowledge-store.d.ts +49 -0
- package/dist/utils/knowledge-store.d.ts.map +1 -0
- package/dist/utils/knowledge-store.js +191 -0
- package/dist/utils/knowledge-store.js.map +1 -0
- package/dist/utils/loop-state.d.ts +51 -0
- package/dist/utils/loop-state.d.ts.map +1 -0
- package/dist/utils/loop-state.js +123 -0
- package/dist/utils/loop-state.js.map +1 -0
- package/dist/utils/paths.d.ts +16 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +66 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/plan-store.d.ts +46 -0
- package/dist/utils/plan-store.d.ts.map +1 -0
- package/dist/utils/plan-store.js +184 -0
- package/dist/utils/plan-store.js.map +1 -0
- package/dist/utils/project-documents.d.ts +20 -0
- package/dist/utils/project-documents.d.ts.map +1 -0
- package/dist/utils/project-documents.js +10 -0
- package/dist/utils/project-documents.js.map +1 -0
- package/dist/utils/project-memory.d.ts +16 -0
- package/dist/utils/project-memory.d.ts.map +1 -0
- package/dist/utils/project-memory.js +16 -0
- package/dist/utils/project-memory.js.map +1 -0
- package/dist/utils/project-resolver.d.ts +28 -0
- package/dist/utils/project-resolver.d.ts.map +1 -0
- package/dist/utils/project-resolver.js +119 -0
- package/dist/utils/project-resolver.js.map +1 -0
- package/dist/utils/quick-scan.d.ts +13 -0
- package/dist/utils/quick-scan.d.ts.map +1 -0
- package/dist/utils/quick-scan.js +156 -0
- package/dist/utils/quick-scan.js.map +1 -0
- package/dist/utils/schemas.d.ts +13 -0
- package/dist/utils/schemas.d.ts.map +1 -0
- package/dist/utils/schemas.js +6 -0
- package/dist/utils/schemas.js.map +1 -0
- package/dist/utils/slug.d.ts +10 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/slug.js +18 -0
- package/dist/utils/slug.js.map +1 -0
- package/dist/utils/stdin.d.ts +6 -0
- package/dist/utils/stdin.d.ts.map +1 -0
- package/dist/utils/stdin.js +25 -0
- package/dist/utils/stdin.js.map +1 -0
- package/dist/utils/storage-utils.d.ts +48 -0
- package/dist/utils/storage-utils.d.ts.map +1 -0
- package/dist/utils/storage-utils.js +175 -0
- package/dist/utils/storage-utils.js.map +1 -0
- package/dist/utils/task-store.d.ts +49 -0
- package/dist/utils/task-store.d.ts.map +1 -0
- package/dist/utils/task-store.js +178 -0
- package/dist/utils/task-store.js.map +1 -0
- package/dist/utils/template.d.ts +15 -0
- package/dist/utils/template.d.ts.map +1 -0
- package/dist/utils/template.js +27 -0
- package/dist/utils/template.js.map +1 -0
- package/dist/utils/tool-response.d.ts +37 -0
- package/dist/utils/tool-response.d.ts.map +1 -0
- package/dist/utils/tool-response.js +44 -0
- package/dist/utils/tool-response.js.map +1 -0
- package/dist/utils/workflow-policy.d.ts +50 -0
- package/dist/utils/workflow-policy.d.ts.map +1 -0
- package/dist/utils/workflow-policy.js +111 -0
- package/dist/utils/workflow-policy.js.map +1 -0
- package/dist/utils/workspace-match.d.ts +35 -0
- package/dist/utils/workspace-match.d.ts.map +1 -0
- package/dist/utils/workspace-match.js +58 -0
- package/dist/utils/workspace-match.js.map +1 -0
- package/opencode/arcs/.opencode/plugins/arcs.js +348 -0
- package/opencode/arcs/bundle-runtime.json +68 -0
- package/opencode/arcs/manifest.json +279 -0
- package/opencode/arcs/prompts/arcs-docs.txt +124 -0
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +529 -0
- package/opencode/arcs/prompts/arcs-orchestrate.txt +437 -0
- package/opencode/arcs/prompts/code-reviewer.txt +55 -0
- package/opencode/arcs/prompts/devil-advocate.txt +121 -0
- package/opencode/arcs/prompts/docs-researcher.txt +54 -0
- package/opencode/arcs/prompts/oncall-ops.txt +54 -0
- package/opencode/arcs/prompts/qa-analyst.txt +54 -0
- package/opencode/arcs/prompts/software-engineer.txt +48 -0
- package/opencode/arcs/prompts/system-architect.txt +60 -0
- package/opencode/arcs/prompts/tech-architect.txt +54 -0
- package/opencode/arcs/skills/brainstorming/SKILL.md +144 -0
- package/opencode/arcs/skills/brainstorming/scripts/frame-template.html +214 -0
- package/opencode/arcs/skills/brainstorming/scripts/helper.js +88 -0
- package/opencode/arcs/skills/brainstorming/scripts/server.js +338 -0
- package/opencode/arcs/skills/brainstorming/scripts/start-server.sh +137 -0
- package/opencode/arcs/skills/brainstorming/scripts/stop-server.sh +31 -0
- package/opencode/arcs/skills/brainstorming/spec-document-reviewer-prompt.md +50 -0
- package/opencode/arcs/skills/brainstorming/visual-companion.md +277 -0
- package/opencode/arcs/skills/caveman-commit/SKILL.md +51 -0
- package/opencode/arcs/skills/code-agent/SKILL.md +58 -0
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +191 -0
- package/opencode/arcs/skills/deep-pr-review/graphify-diff.md +102 -0
- package/opencode/arcs/skills/deep-pr-review/review-template.md +69 -0
- package/opencode/arcs/skills/executing-plans/SKILL.md +91 -0
- package/opencode/arcs/skills/init-project/SKILL.md +150 -0
- package/opencode/arcs/skills/quick-dev/SKILL.md +47 -0
- package/opencode/arcs/skills/requesting-code-review/SKILL.md +47 -0
- package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +179 -0
- package/opencode/arcs/skills/subagent-driven-development/SKILL.md +162 -0
- package/opencode/arcs/skills/subagent-driven-development/code-quality-reviewer-prompt.md +53 -0
- package/opencode/arcs/skills/subagent-driven-development/implementer-prompt.md +148 -0
- package/opencode/arcs/skills/subagent-driven-development/spec-reviewer-prompt.md +85 -0
- package/opencode/arcs/skills/systematic-debugging/SKILL.md +174 -0
- package/opencode/arcs/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/opencode/arcs/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/opencode/arcs/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/opencode/arcs/skills/systematic-debugging/find-polluter.sh +63 -0
- package/opencode/arcs/skills/systematic-debugging/phases-reference.md +168 -0
- package/opencode/arcs/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/opencode/arcs/skills/test-driven-development/SKILL.md +72 -0
- package/opencode/arcs/skills/test-driven-development/tdd-rationalizations-and-examples.md +157 -0
- package/opencode/arcs/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/opencode/arcs/skills/to-diagram/SKILL.md +235 -0
- package/opencode/arcs/skills/to-diagram/scripts/manage-diagram.mjs +963 -0
- package/opencode/arcs/skills/writing-plans/SKILL.md +179 -0
- package/opencode/arcs/skills/writing-plans/plan-document-reviewer-prompt.md +52 -0
- package/package.json +60 -0
- package/scripts/arcs-cli.mjs +45 -0
- package/skills/explore-dag.md +57 -0
- package/skills/init-project.md +105 -0
- package/skills/orchestrate.md +94 -0
- package/skills/update-docs.md +72 -0
- package/templates/dependency.md.tmpl +9 -0
- package/templates/knowledge.md.tmpl +15 -0
- package/templates/project-meta.json.tmpl +13 -0
- package/templates/project.md.tmpl +11 -0
- package/templates/task.md.tmpl +9 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writing-plans
|
|
3
|
+
description: Use when you have a spec or requirements for a multi-step task, before touching code
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: writing-plans
|
|
7
|
+
|
|
8
|
+
## When
|
|
9
|
+
|
|
10
|
+
You have a spec or requirements for a multi-step task and need to create a detailed implementation plan before touching code.
|
|
11
|
+
|
|
12
|
+
> CLI Primer: `arcs --commands --json` for discovery. Mutating commands run directly — no token.
|
|
13
|
+
|
|
14
|
+
## Flow
|
|
15
|
+
|
|
16
|
+
```mermaid
|
|
17
|
+
flowchart TD
|
|
18
|
+
A[Detect Mode] --> B{Bash available?}
|
|
19
|
+
B -->|yes| C[Agent-Direct Mode]
|
|
20
|
+
B -->|no| D[Orchestrator Mode]
|
|
21
|
+
C --> E[Scope Check]
|
|
22
|
+
D --> E
|
|
23
|
+
E --> F{Multi-subsystem?}
|
|
24
|
+
F -->|yes| G[Split into separate plans]
|
|
25
|
+
F -->|no| H[Map File Structure]
|
|
26
|
+
H --> I[Define Tasks - bite-sized]
|
|
27
|
+
I --> J[Generate Diagram .mmd]
|
|
28
|
+
J --> K[Review Loop]
|
|
29
|
+
K --> L{Reviewer approves?}
|
|
30
|
+
L -->|issues| M[Fix chunk]
|
|
31
|
+
M --> K
|
|
32
|
+
L -->|approved| N{Last chunk?}
|
|
33
|
+
N -->|no| K
|
|
34
|
+
N -->|yes| O[Store Plan via CLI]
|
|
35
|
+
O --> P[Execution Handoff]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Mode Detection
|
|
39
|
+
|
|
40
|
+
- Bash available (`arcs --commands --json` works) → **agent-direct**: write plan + diagram + tasks via CLI
|
|
41
|
+
- No bash → **orchestrator mode**: return structured artifact:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
---plan-artifact---
|
|
45
|
+
title: <plan title>
|
|
46
|
+
summary: <one-line summary>
|
|
47
|
+
keywords: ["implementation-plan", ...]
|
|
48
|
+
sourceFiles: [{path: "...", anchor: "..."}]
|
|
49
|
+
---body---
|
|
50
|
+
<full plan markdown body>
|
|
51
|
+
---diagram---
|
|
52
|
+
<full .mmd file content>
|
|
53
|
+
---tasks---
|
|
54
|
+
- title: <task 1>
|
|
55
|
+
priority: high|medium|low
|
|
56
|
+
sourceFiles: [{path: "..."}]
|
|
57
|
+
---end---
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## File Structure
|
|
61
|
+
|
|
62
|
+
Before defining tasks, map which files will be created/modified:
|
|
63
|
+
|
|
64
|
+
- One clear responsibility per file. Files that change together live together.
|
|
65
|
+
- Follow existing codebase patterns. Split only when a file has grown unwieldy.
|
|
66
|
+
- This structure informs task decomposition — each task produces self-contained changes.
|
|
67
|
+
|
|
68
|
+
## Bite-Sized Task Granularity
|
|
69
|
+
|
|
70
|
+
Each step is one action (2-5 minutes):
|
|
71
|
+
|
|
72
|
+
````markdown
|
|
73
|
+
### Task N: [Component Name]
|
|
74
|
+
|
|
75
|
+
**Files:**
|
|
76
|
+
- Create: `exact/path/to/file.py`
|
|
77
|
+
- Modify: `exact/path/to/existing.py:123-145`
|
|
78
|
+
- Test: `tests/exact/path/to/test.py`
|
|
79
|
+
|
|
80
|
+
- [ ] **Step 1: Write the failing test**
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
def test_specific_behavior():
|
|
84
|
+
result = function(input)
|
|
85
|
+
assert result == expected
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- [ ] **Step 2: Run test to verify it fails**
|
|
89
|
+
|
|
90
|
+
Run: `pytest tests/path/test.py::test_name -v`
|
|
91
|
+
Expected: FAIL with "function not defined"
|
|
92
|
+
|
|
93
|
+
- [ ] **Step 3: Write minimal implementation**
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
def function(input):
|
|
97
|
+
return expected
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- [ ] **Step 4: Run test to verify it passes**
|
|
101
|
+
|
|
102
|
+
Run: `pytest tests/path/test.py::test_name -v`
|
|
103
|
+
Expected: PASS
|
|
104
|
+
|
|
105
|
+
- [ ] **Step 5: Commit**
|
|
106
|
+
````
|
|
107
|
+
|
|
108
|
+
## Plan Document Header
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
# [Feature Name] Implementation Plan
|
|
112
|
+
|
|
113
|
+
> **For agentic workers:** REQUIRED: Use arcs:subagent-driven-development (if subagents available) or arcs:executing-plans to implement this plan.
|
|
114
|
+
|
|
115
|
+
**Goal:** [One sentence]
|
|
116
|
+
|
|
117
|
+
**Architecture:** [2-3 sentences]
|
|
118
|
+
|
|
119
|
+
**Tech Stack:** [Key technologies]
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
> Diagram: plans/<plan-id>.diagram.mmd
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Diagram Section
|
|
127
|
+
|
|
128
|
+
Diagrams are **agentic execution maps** in separate `.mmd` files — never embedded in plan body. Load `to-diagram` skill for conventions.
|
|
129
|
+
|
|
130
|
+
- File: `plans/<plan-id>.diagram.mmd`
|
|
131
|
+
- Draft the plan in memory or `/tmp` first; persist only after user confirms
|
|
132
|
+
- Node IDs: `T001`, `T002`, ... (stable, never change)
|
|
133
|
+
- If design-phase `.mmd` exists (from brainstorming): EXTEND it, don't regenerate
|
|
134
|
+
- If no prior diagram: generate fresh per `to-diagram` conventions
|
|
135
|
+
|
|
136
|
+
**Required per-node metadata** (in `%%` comment block before `flowchart TD`):
|
|
137
|
+
`node`, `title`, `status`, `skill`, `scope`, `files`, `acceptance`, `verify`, `blocked-by`, `delegate`
|
|
138
|
+
|
|
139
|
+
All nodes start `:::backlog` but metadata must be fully populated at creation time for diagram-first execution.
|
|
140
|
+
|
|
141
|
+
## Plan Review Loop
|
|
142
|
+
|
|
143
|
+
```mermaid
|
|
144
|
+
flowchart TD
|
|
145
|
+
A[Write chunk] --> B[Dispatch reviewer subagent]
|
|
146
|
+
B --> C{Issues found?}
|
|
147
|
+
C -->|yes| D[Fix chunk]
|
|
148
|
+
D --> B
|
|
149
|
+
C -->|no| E{Last chunk?}
|
|
150
|
+
E -->|no| A
|
|
151
|
+
E -->|yes| F[Proceed to storage]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
- Chunk boundaries: `## Chunk N: <name>`, ≤1000 lines each
|
|
155
|
+
- Same agent fixes (preserves context). Max 5 iterations, then surface to human.
|
|
156
|
+
- Reviewer must announce confidence score per `confidence-gate`. Score <80% loops back to "Fix chunk" — never proceed past a sub-threshold review.
|
|
157
|
+
|
|
158
|
+
## Storage
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
arcs plan create <slug> --title="YYYY-MM-DD <feature> Implementation Plan" --summary="..." --status=planned --keywords="implementation-plan" --body="<markdown>" --json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Execution Handoff
|
|
165
|
+
|
|
166
|
+
> "Plan complete and saved to arcs project plan `<planId>` in project `<slug>`. Ready to execute?"
|
|
167
|
+
|
|
168
|
+
- **Subagents available** → REQUIRED: use `arcs:subagent-driven-development`
|
|
169
|
+
- **No subagents** → use `arcs:executing-plans`
|
|
170
|
+
|
|
171
|
+
## Constraints
|
|
172
|
+
|
|
173
|
+
- Exact file paths always — never vague references
|
|
174
|
+
- Complete code in plan (not "add validation")
|
|
175
|
+
- Exact commands with expected output
|
|
176
|
+
- DRY, YAGNI, TDD, frequent commits
|
|
177
|
+
- Announce mode and skill at start
|
|
178
|
+
- Scope check: multi-subsystem → split into separate plans
|
|
179
|
+
- Implementation sub-agents NEVER edit `.mmd` files
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Plan Document Reviewer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching a plan document reviewer subagent.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Verify the plan chunk is complete, matches the spec, and has proper task decomposition.
|
|
6
|
+
|
|
7
|
+
**Dispatch after:** Each plan chunk is written
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Task tool (general-purpose):
|
|
11
|
+
description: "Review plan chunk N"
|
|
12
|
+
prompt: |
|
|
13
|
+
You are a plan document reviewer. Verify this plan chunk is complete and ready for implementation.
|
|
14
|
+
|
|
15
|
+
**Plan chunk to review:** [PLAN_FILE_PATH] - Chunk N only
|
|
16
|
+
**Spec for reference:** [SPEC_FILE_PATH]
|
|
17
|
+
|
|
18
|
+
## What to Check
|
|
19
|
+
|
|
20
|
+
| Category | What to Look For |
|
|
21
|
+
|----------|------------------|
|
|
22
|
+
| Completeness | TODOs, placeholders, incomplete tasks, missing steps |
|
|
23
|
+
| Spec Alignment | Chunk covers relevant spec requirements, no scope creep |
|
|
24
|
+
| Task Decomposition | Tasks atomic, clear boundaries, steps actionable |
|
|
25
|
+
| File Structure | Files have clear single responsibilities, split by responsibility not layer |
|
|
26
|
+
| File Size | Would any new or modified file likely grow large enough to be hard to reason about as a whole? |
|
|
27
|
+
| Task Syntax | Checkbox syntax (`- [ ]`) on steps for tracking |
|
|
28
|
+
| Chunk Size | Each chunk under 1000 lines |
|
|
29
|
+
|
|
30
|
+
## CRITICAL
|
|
31
|
+
|
|
32
|
+
Look especially hard for:
|
|
33
|
+
- Any TODO markers or placeholder text
|
|
34
|
+
- Steps that say "similar to X" without actual content
|
|
35
|
+
- Incomplete task definitions
|
|
36
|
+
- Missing verification steps or expected outputs
|
|
37
|
+
- Files planned to hold multiple responsibilities or likely to grow unwieldy
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
## Plan Review - Chunk N
|
|
42
|
+
|
|
43
|
+
**Status:** Approved | Issues Found
|
|
44
|
+
|
|
45
|
+
**Issues (if any):**
|
|
46
|
+
- [Task X, Step Y]: [specific issue] - [why it matters]
|
|
47
|
+
|
|
48
|
+
**Recommendations (advisory):**
|
|
49
|
+
- [suggestions that don't block approval]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Reviewer returns:** Status, Issues (if any), Recommendations
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rryando/arcs",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "ARCS — DAG-based task orchestration for AI agents. Persistent workflow continuity via graph-structured context.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"arcs": "scripts/arcs-cli.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"templates/",
|
|
13
|
+
"skills/",
|
|
14
|
+
"opencode/"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/rryando/arcs.git"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"arcs",
|
|
25
|
+
"dag",
|
|
26
|
+
"ai-agents",
|
|
27
|
+
"task-orchestration",
|
|
28
|
+
"graph",
|
|
29
|
+
"workflow",
|
|
30
|
+
"cli"
|
|
31
|
+
],
|
|
32
|
+
"author": "rryando",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc",
|
|
36
|
+
"build:opencode-bundle": "npm run build && node scripts/build-opencode-bundle.mjs",
|
|
37
|
+
"prepack": "npm run build:opencode-bundle",
|
|
38
|
+
"start": "node dist/index.js",
|
|
39
|
+
"dev": "tsc --watch",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"postinstall": "npm run build && node scripts/arcs-init.mjs",
|
|
42
|
+
"init": "npm run build && node dist/index.js init",
|
|
43
|
+
"lint": "biome check src/ test/",
|
|
44
|
+
"lint:fix": "biome check --fix src/ test/",
|
|
45
|
+
"format": "biome format --write src/ test/",
|
|
46
|
+
"typecheck": "tsc --noEmit"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@clack/prompts": "^1.1.0",
|
|
50
|
+
"picocolors": "^1.1.1",
|
|
51
|
+
"zod": "^3.24.4"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@biomejs/biome": "^2.4.8",
|
|
55
|
+
"@types/node": "^22.15.3",
|
|
56
|
+
"typescript": "^5.8.3",
|
|
57
|
+
"vite": "^6.4.1",
|
|
58
|
+
"vitest": "^3.2.4"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Standalone CLI entry point for sub-agent consumption.
|
|
4
|
+
// Requires `npm run build` first — imports from dist/.
|
|
5
|
+
// Outputs JSON to stdout, errors to stderr.
|
|
6
|
+
// Exit codes: 0 success, 1 user error, 2 internal error.
|
|
7
|
+
|
|
8
|
+
import { handleCli } from "../dist/cli/index.js";
|
|
9
|
+
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
|
|
12
|
+
if (args.length === 0) {
|
|
13
|
+
if (process.stdin.isTTY) {
|
|
14
|
+
// Human at terminal: show status dashboard
|
|
15
|
+
const { showStatusDashboard } = await import("../dist/cli/status-dashboard.js");
|
|
16
|
+
await showStatusDashboard();
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
process.stderr.write(
|
|
20
|
+
"Usage: arcs <command> [args]\n" +
|
|
21
|
+
"Commands: context, task, plan, knowledge, search, diagram, batch, validate\n" +
|
|
22
|
+
"Run `npm run build` before first use.\n"
|
|
23
|
+
);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (args[0] === "--help" || args[0] === "-h") {
|
|
28
|
+
process.stderr.write(
|
|
29
|
+
"Usage: arcs <command> [args]\n" +
|
|
30
|
+
"Commands: context, task, plan, knowledge, search, diagram, batch, validate\n"
|
|
31
|
+
);
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const handled = await handleCli(args);
|
|
37
|
+
if (!handled) {
|
|
38
|
+
process.stderr.write(`Unknown command: ${args[0]}\n`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
} catch (err) {
|
|
42
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
43
|
+
process.stderr.write(`Error: ${message}\n`);
|
|
44
|
+
process.exit(2);
|
|
45
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explore-dag
|
|
3
|
+
description: Navigate and understand the project DAG
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **Canonical source:** `src/cli/arcs-orchestrate.ts` under `### EXPLORE Workflow`.
|
|
7
|
+
|
|
8
|
+
## When
|
|
9
|
+
|
|
10
|
+
Need to understand project relationships, find context, inspect plan and knowledge indexes, or traverse dependencies.
|
|
11
|
+
|
|
12
|
+
## Flow
|
|
13
|
+
|
|
14
|
+
```mermaid
|
|
15
|
+
flowchart TD
|
|
16
|
+
classDef sub fill:#8b5cf6,color:#fff
|
|
17
|
+
|
|
18
|
+
A[arcs project list → big picture] --> B{Question answered by DAG?}
|
|
19
|
+
B -->|yes| C[Report from DAG data]
|
|
20
|
+
B -->|no| D[Dispatch explore sub-agent]:::sub
|
|
21
|
+
D --> E{Durable discovery?}
|
|
22
|
+
E -->|yes| F[arcs knowledge create]
|
|
23
|
+
E -->|no| C
|
|
24
|
+
F --> C
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CLI Primer
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
arcs <command> --json
|
|
31
|
+
```
|
|
32
|
+
Discovery: `arcs --commands --json`
|
|
33
|
+
|
|
34
|
+
## Key Commands
|
|
35
|
+
|
|
36
|
+
| Operation | Command |
|
|
37
|
+
|-----------|---------|
|
|
38
|
+
| All projects | `arcs project list --json` |
|
|
39
|
+
| Project meta | `arcs project get <slug> --json` |
|
|
40
|
+
| Project doc | `arcs project get <slug> --doc=<doc> --json` |
|
|
41
|
+
| Plan and knowledge indexes | `arcs plan list <slug> --json` / `arcs knowledge list <slug> --json` |
|
|
42
|
+
| Full body | `arcs plan get <slug> <id> --body --json` / `arcs knowledge get <slug> <id> --body --json` |
|
|
43
|
+
| Search | `arcs search <slug> "<query>" --json` |
|
|
44
|
+
|
|
45
|
+
## Traversal Pattern
|
|
46
|
+
|
|
47
|
+
1. `arcs project list --json` → get all projects + `dependsOn[]`
|
|
48
|
+
2. Filter for dependencies of interest
|
|
49
|
+
3. `arcs project get <slug> --json` per dependency for meta/docs
|
|
50
|
+
4. Build dependency chain
|
|
51
|
+
|
|
52
|
+
## Tips
|
|
53
|
+
|
|
54
|
+
- Start with `arcs project list` for the big picture
|
|
55
|
+
- Use `knowledge` docs to quickly understand unfamiliar codebases
|
|
56
|
+
- Check `status` to know if a dependency is still actively maintained
|
|
57
|
+
- Persist durable discoveries via `arcs knowledge create`
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-project
|
|
3
|
+
description: Initialize a new project in the DAG
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **Canonical source:** `src/cli/arcs-orchestrate.ts` under `### INIT Workflow`.
|
|
7
|
+
|
|
8
|
+
## When
|
|
9
|
+
|
|
10
|
+
User wants to track a new project, bootstrap documentation, or connect a repo to the DAG.
|
|
11
|
+
|
|
12
|
+
## Flow
|
|
13
|
+
|
|
14
|
+
```mermaid
|
|
15
|
+
flowchart TD
|
|
16
|
+
classDef sub fill:#8b5cf6,color:#fff
|
|
17
|
+
|
|
18
|
+
A[Gather: name, description, repoUrl?, dependsOn?] --> B[arcs project list → conflict check]
|
|
19
|
+
B --> C[Present summary to user]
|
|
20
|
+
C -->|confirmed| D[arcs project init]
|
|
21
|
+
D --> E[arcs project update-doc × 4]
|
|
22
|
+
E --> F{graphify on PATH?}
|
|
23
|
+
F -->|yes| G[graphify update --force --no-cluster]
|
|
24
|
+
F -->|no| H[Skip graph step, log gap]
|
|
25
|
+
G --> G2[ingestGraph → ≤20 proposals]
|
|
26
|
+
G2 --> G3[graphify query / explain for enrichment]:::sub
|
|
27
|
+
H & G3 --> I[Fan out: system-architect + docs-researcher + tech-architect]:::sub
|
|
28
|
+
I --> J[Collect proposals → dedup → arcs knowledge create × N]
|
|
29
|
+
J --> K[Done]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## CLI Primer
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
arcs <command> --json
|
|
36
|
+
```
|
|
37
|
+
Discovery: `arcs --commands --json`
|
|
38
|
+
|
|
39
|
+
## Constraints
|
|
40
|
+
|
|
41
|
+
- Do NOT read repo to infer name/description — gather from user
|
|
42
|
+
- Verify `dependsOn` targets exist via `arcs project list --json`
|
|
43
|
+
- Init creates empty plans/ and knowledge/ indexes
|
|
44
|
+
- Repo analysis is **fan-out across typed agents**, not a generic "analysis sub-agent" (see Agent Dispatch table below)
|
|
45
|
+
|
|
46
|
+
## Graphify Sub-Flow (DEFAULT: ON when binary present)
|
|
47
|
+
|
|
48
|
+
The orchestrator runs graphify directly during INIT to seed knowledge entries with structural evidence before any sub-agent reads code.
|
|
49
|
+
|
|
50
|
+
1. **Detect:** `detectGraphify()` from `src/utils/graphify.ts`. If unavailable, skip cleanly — never block INIT on graphify.
|
|
51
|
+
2. **Trust the gitignore guarantee:** `runExtraction()` already auto-appends `graphify-out/` to `.gitignore` (`ensureGitignoreEntry`). Don't redundantly check or modify `.gitignore` from agents — running extraction is sufficient.
|
|
52
|
+
3. **Extract (AST-only, no LLM key required):**
|
|
53
|
+
```bash
|
|
54
|
+
graphify update <workspacePath> --force --no-cluster
|
|
55
|
+
```
|
|
56
|
+
Produces `graphify-out/graph.json`.
|
|
57
|
+
4. **Ingest:** call internal `ingestGraph(graphJsonPath, slug)` → up to 20 `KnowledgeProposal` records:
|
|
58
|
+
- 8 god nodes (`kind=module`, top 5% degree, test files filtered)
|
|
59
|
+
- 8 architecture clusters (`kind=architecture`, by community or directory grouping)
|
|
60
|
+
- 5 cross-module couplings (`kind=gotcha`, high-degree links across top-level dirs)
|
|
61
|
+
5. **Enrich** with read-only graph queries (sub-agents may run these):
|
|
62
|
+
- `graphify query "entry points and main commands" --graph graphify-out/graph.json --budget 2000` → seeds for "key files" reference entries
|
|
63
|
+
- `graphify query "core data flow" --graph graphify-out/graph.json --budget 2000` → seeds for "core modules" entries
|
|
64
|
+
- `graphify explain "<godNodeLabel>" --graph graphify-out/graph.json` → plain-language summary for module entry bodies
|
|
65
|
+
- `graphify affected "<critical-symbol>" --graph graphify-out/graph.json --depth 2` → reverse-impact map for high-risk modules
|
|
66
|
+
- `graphify path "<A>" "<B>" --graph graphify-out/graph.json` → shortest dependency path for architecture entries
|
|
67
|
+
6. **Hand to typed agents:** the proposals + query results go to the sub-agents listed in **Agent Dispatch** below; they merge graph evidence with code reading and return finalized knowledge entries.
|
|
68
|
+
7. **Write** the entries directly via `arcs batch --file=ops.json` (one batch invocation for all knowledge entries) or `arcs knowledge create` per entry.
|
|
69
|
+
|
|
70
|
+
If graphify is missing, log "graphify not on PATH; proceeding without graph signal" and skip steps 3–5. Sub-agents still run; they just lack the graph priors.
|
|
71
|
+
|
|
72
|
+
## Content Guidelines
|
|
73
|
+
|
|
74
|
+
| Doc | Format |
|
|
75
|
+
|-----|--------|
|
|
76
|
+
| overview.md | 2-3 sentence summary + goals |
|
|
77
|
+
| tasks.md | `[ ]` backlog / `[/]` in-progress / `[x]` done |
|
|
78
|
+
| dependencies.md | Upstream + downstream sections |
|
|
79
|
+
| knowledge.md | High-level context + pointers to structured entries |
|
|
80
|
+
|
|
81
|
+
## Agent Dispatch (named typed agents — DO NOT default to a generic analysis agent)
|
|
82
|
+
|
|
83
|
+
| Sub-agent | Owns | Knowledge kinds it produces |
|
|
84
|
+
|-----------|------|----------------------------|
|
|
85
|
+
| `system-architect` | Module boundaries, clusters, dependency direction | `architecture`, `module` |
|
|
86
|
+
| `docs-researcher` | Tech stack, third-party libraries, key files, features | `reference`, `feature` |
|
|
87
|
+
| `tech-architect` | Cross-module couplings, structural gotchas, lessons | `gotcha`, `lesson` |
|
|
88
|
+
| `qa-analyst` (optional) | Coding-style + convention scan from existing code | `pattern` |
|
|
89
|
+
|
|
90
|
+
Dispatch in parallel (load `dispatching-parallel-agents`). Each agent receives the relevant `KnowledgeProposal` records from `ingestGraph` plus targeted graphify queries for evidence. Each agent returns finalized proposals (title, kind, summary, keywords, sourceFiles, body) for the orchestrator to write directly via `arcs knowledge create` (or `arcs batch`).
|
|
91
|
+
|
|
92
|
+
## Knowledge Categories for Analysis Sub-Agents
|
|
93
|
+
|
|
94
|
+
| Category | Kind | What to discover | Primary agent |
|
|
95
|
+
|----------|------|------------------|---------------|
|
|
96
|
+
| tech stack | `architecture` | Languages, frameworks, runtimes, build tools, versions | `docs-researcher` |
|
|
97
|
+
| key files | `reference` | Entry points, config files, main modules, purposes | `docs-researcher` (graphify query "entry points") |
|
|
98
|
+
| code patterns | `pattern` | Recurring design patterns, abstractions, error handling | `qa-analyst` or `system-architect` |
|
|
99
|
+
| coding style | `pattern` | Formatting, linting, import ordering, file organization | `qa-analyst` |
|
|
100
|
+
| core modules | `module` | Core modules/shared functions — what, where, interconnections | `system-architect` (god nodes from graphify) |
|
|
101
|
+
| external services | `module` | APIs, databases, message queues the project interacts with | `docs-researcher` |
|
|
102
|
+
| third-party libraries | `reference` | Key dependencies and why they are used | `docs-researcher` |
|
|
103
|
+
| features | `feature` | Major user-facing or system-facing features | `docs-researcher` |
|
|
104
|
+
| cross-module couplings | `gotcha` | Hot edges between modules surfaced by graphify | `tech-architect` (auto from `ingestGraph`) |
|
|
105
|
+
| architecture clusters | `architecture` | Community/directory groupings from graphify | `system-architect` (auto from `ingestGraph`) |
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrate
|
|
3
|
+
description: Classify intent and route work across all ARCS workflows
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **Canonical source:** `src/cli/arcs-orchestrate.ts` (`ORCHESTRATE_PROMPT_TEXT`).
|
|
7
|
+
> This is a condensed summary. TS prompt wins on disagreement.
|
|
8
|
+
|
|
9
|
+
## When
|
|
10
|
+
|
|
11
|
+
User request maps to multiple workflows, needs routing, or chains INIT → BRAINSTORM → EXECUTE.
|
|
12
|
+
|
|
13
|
+
## Flow
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
flowchart TD
|
|
17
|
+
A[User Request] --> B[T0: arcs brief --lean --json]
|
|
18
|
+
B --> C[Classify Intent]
|
|
19
|
+
C -->|new project| INIT[INIT]
|
|
20
|
+
C -->|plan/decompose| BRAINSTORM[BRAINSTORM]
|
|
21
|
+
C -->|do work| EXECUTE[EXECUTE]
|
|
22
|
+
C -->|reconcile| SYNC[SYNC]
|
|
23
|
+
C -->|discover/report| EXPLORE[EXPLORE]
|
|
24
|
+
C -->|compound| MULTI[MULTI]
|
|
25
|
+
INIT & BRAINSTORM & EXECUTE & SYNC & EXPLORE & MULTI --> DONE[Completion: what done + state + next steps]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Context Tiers
|
|
29
|
+
|
|
30
|
+
| Tier | What | Who |
|
|
31
|
+
|------|------|-----|
|
|
32
|
+
| **T0** | `arcs brief --lean --json` — routing surface, focus, next action | Orchestrator |
|
|
33
|
+
| **T1** | Single doc fetch | Sub-agent (default) |
|
|
34
|
+
| **T2** | Index listings | Sub-agent (default) |
|
|
35
|
+
| **T3** | Full body read | Sub-agent always |
|
|
36
|
+
| **T4** | Multi-doc / audit | Sub-agent always |
|
|
37
|
+
|
|
38
|
+
**Cardinal rule:** Orchestrator reads T0 + writes. Sub-agents read everything else.
|
|
39
|
+
|
|
40
|
+
### T0 envelope shape
|
|
41
|
+
|
|
42
|
+
`arcs brief --json` returns a tight ~1 KB envelope:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"slug": "...", "name": "...", "summary": "...",
|
|
47
|
+
"operatingBrief": {
|
|
48
|
+
"currentFocus": "<task or plan title to anchor on>",
|
|
49
|
+
"recommendedSurface": "QUEUE | PLAN | MEMORY",
|
|
50
|
+
"why": "<one-line rationale>",
|
|
51
|
+
"nextAction": "<concrete next step the orchestrator should take>"
|
|
52
|
+
},
|
|
53
|
+
"activePlansCount": N, "activePlanTitles": [...],
|
|
54
|
+
"openTasksCount": N, "topOpenTasks": [{ id, title, status }],
|
|
55
|
+
"topKnowledge": [{ id, title, kind }]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use `recommendedSurface` to pick the routing branch:
|
|
60
|
+
- `QUEUE` → execute the active task (EXECUTE workflow)
|
|
61
|
+
- `PLAN` → decompose or plan work (BRAINSTORM workflow)
|
|
62
|
+
- `MEMORY` → no active work; review knowledge or propose a new plan
|
|
63
|
+
|
|
64
|
+
## CLI Primer
|
|
65
|
+
|
|
66
|
+
All ops: `arcs <group> <action> [args] --json`. Mutating commands run directly — no token:
|
|
67
|
+
```bash
|
|
68
|
+
arcs <command> --json
|
|
69
|
+
```
|
|
70
|
+
Discovery: `arcs --commands --json`
|
|
71
|
+
|
|
72
|
+
## Skill Selection (EXECUTE)
|
|
73
|
+
|
|
74
|
+
| Task shape | Skill |
|
|
75
|
+
|-----------|-------|
|
|
76
|
+
| Fully bounded | `quick-dev` |
|
|
77
|
+
| Mostly clear, 1-2 open questions | `code-agent` |
|
|
78
|
+
| Non-trivial, test-first | `test-driven-development` |
|
|
79
|
+
| Design open | reclassify → BRAINSTORM |
|
|
80
|
+
|
|
81
|
+
## Loop Tools
|
|
82
|
+
|
|
83
|
+
- `arcs loop start <slug> --prompt="..." --max-iterations=50 --json` — self-referential dev loop
|
|
84
|
+
- `arcs loop cancel <slug> --json` — cancel active loop
|
|
85
|
+
- `arcs loop status <slug> --json` — inspect loop state
|
|
86
|
+
|
|
87
|
+
Pair with `loop` skill for iteration discipline.
|
|
88
|
+
|
|
89
|
+
## Completion
|
|
90
|
+
|
|
91
|
+
Every session ends with:
|
|
92
|
+
1. What was done
|
|
93
|
+
2. Current project state
|
|
94
|
+
3. Suggested next steps
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-docs
|
|
3
|
+
description: Update project documents with structured content
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **Canonical source:** `src/cli/arcs-orchestrate.ts` `## Content Guidelines`.
|
|
7
|
+
|
|
8
|
+
## When
|
|
9
|
+
|
|
10
|
+
Codebase analyzed and findings need recording, task statuses changed, dependencies updated, or knowledge needs capturing.
|
|
11
|
+
|
|
12
|
+
## Flow
|
|
13
|
+
|
|
14
|
+
```mermaid
|
|
15
|
+
flowchart TD
|
|
16
|
+
A[Read current doc: arcs project get] --> B[Prepare updated content]
|
|
17
|
+
B --> C[Present summary to user]
|
|
18
|
+
C -->|confirmed| D[arcs project update-doc]
|
|
19
|
+
D --> E[Verify: arcs project get]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## CLI Primer
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
arcs <command> --json
|
|
26
|
+
```
|
|
27
|
+
Discovery: `arcs --commands --json`
|
|
28
|
+
|
|
29
|
+
## Content Guidelines
|
|
30
|
+
|
|
31
|
+
| Doc | Format |
|
|
32
|
+
|-----|--------|
|
|
33
|
+
| overview | 2-3 sentence summary + concrete goals |
|
|
34
|
+
| tasks | `[ ]` backlog / `[/]` in-progress / `[x]` done — execution queue state only |
|
|
35
|
+
| dependencies | Upstream + downstream with notes on *why* |
|
|
36
|
+
| knowledge | Summary landing page → point to structured knowledge entries |
|
|
37
|
+
|
|
38
|
+
## Structured Plans for Feature Work
|
|
39
|
+
|
|
40
|
+
Use structured plans for feature work that spans multiple tasks. Create via:
|
|
41
|
+
```bash
|
|
42
|
+
arcs plan create <slug> "Title" --summary="..." --keywords="implementation-plan" --json
|
|
43
|
+
arcs plan update-body <slug> <planId> --body="..." --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
List existing: `arcs plan list <slug> --json`
|
|
47
|
+
|
|
48
|
+
## Structured Knowledge Entries
|
|
49
|
+
|
|
50
|
+
For durable project memory (lessons, gotchas, patterns, architecture):
|
|
51
|
+
```bash
|
|
52
|
+
arcs knowledge create <slug> "Title" --kind=<kind> --summary="..." --body="..." --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
List existing: `arcs knowledge list <slug> --json`
|
|
56
|
+
|
|
57
|
+
| Section | What to include |
|
|
58
|
+
|---------|----------------|
|
|
59
|
+
| Tech Stack | Languages, frameworks, runtimes, key libraries |
|
|
60
|
+
| Architecture | Module boundaries, service topology, data flow |
|
|
61
|
+
| Patterns | Naming conventions, file organization, coding patterns |
|
|
62
|
+
| Gotchas | Non-obvious behaviors, common pitfalls, workarounds |
|
|
63
|
+
| Key Files | Entry points, config files, main modules |
|
|
64
|
+
|
|
65
|
+
> **Tip**: Summary table in knowledge.md. Deep dives in knowledge entries.
|
|
66
|
+
|
|
67
|
+
## Plan Keyword Conventions
|
|
68
|
+
|
|
69
|
+
| Keywords | Status | Origin |
|
|
70
|
+
|----------|--------|--------|
|
|
71
|
+
| `spec`, `design` | `proposed` | Design specs from brainstorming |
|
|
72
|
+
| `implementation-plan` | `planned` | Step-by-step implementation plans |
|