@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,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-diagram
|
|
3
|
+
description: Use when creating or updating a Mermaid diagram for a ARCS plan — selecting dialect, encoding task status via classDef, managing the standalone .mmd file, and detecting or resolving diagram/metadata drift.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: to-diagram
|
|
7
|
+
|
|
8
|
+
## When
|
|
9
|
+
|
|
10
|
+
Creating, updating, or auditing a Mermaid `.mmd` diagram for a ARCS plan.
|
|
11
|
+
|
|
12
|
+
> Follows ARCS CLI Primer: `arcs --commands --json` for discovery, `--json --lean` on all calls.
|
|
13
|
+
|
|
14
|
+
## Flow
|
|
15
|
+
|
|
16
|
+
```mermaid
|
|
17
|
+
flowchart TD
|
|
18
|
+
classDef decision fill:#f59e0b,color:#fff
|
|
19
|
+
|
|
20
|
+
Start[Plan needs diagram] --> HasDiagram{.mmd exists?}
|
|
21
|
+
HasDiagram -->|No| Create[Create from canonical metadata]
|
|
22
|
+
HasDiagram -->|Yes| Detect[Compare diagram vs metadata]
|
|
23
|
+
Detect --> DriftType{Drift type?}
|
|
24
|
+
DriftType -->|None| Done[No action]
|
|
25
|
+
DriftType -->|Status only| StatusUpdate[Surgical status update]
|
|
26
|
+
DriftType -->|Scope change| Regen[Full regeneration]
|
|
27
|
+
DriftType -->|Mixed| Regen
|
|
28
|
+
Create --> Validate[Validate .mmd syntax]
|
|
29
|
+
StatusUpdate --> Validate
|
|
30
|
+
Regen --> Validate
|
|
31
|
+
Validate --> Write[Write .mmd]
|
|
32
|
+
Write --> Done
|
|
33
|
+
|
|
34
|
+
class HasDiagram,DriftType decision
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Dialect Selection
|
|
38
|
+
|
|
39
|
+
```mermaid
|
|
40
|
+
flowchart TD
|
|
41
|
+
classDef decision fill:#f59e0b,color:#fff
|
|
42
|
+
|
|
43
|
+
Q[What does the plan describe?] --> TaskDeps{Tasks + dependencies?}
|
|
44
|
+
TaskDeps -->|Yes| Flow[flowchart TD + classDef]
|
|
45
|
+
TaskDeps -->|No| States{States + transitions?}
|
|
46
|
+
States -->|Yes| State[stateDiagram-v2]
|
|
47
|
+
States -->|Both| Tiebreak{Implementation plan?}
|
|
48
|
+
Tiebreak -->|Yes| Flow
|
|
49
|
+
Tiebreak -->|No| State
|
|
50
|
+
|
|
51
|
+
class TaskDeps,States,Tiebreak decision
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Status-Only Update
|
|
55
|
+
|
|
56
|
+
```mermaid
|
|
57
|
+
flowchart TD
|
|
58
|
+
Read[Read .mmd] --> Verify{Node/edge count matches metadata?}
|
|
59
|
+
Verify -->|No| Escalate[Escalate to regeneration]
|
|
60
|
+
Verify -->|Yes| UpdateClass[Replace :::oldClass with :::newClass]
|
|
61
|
+
UpdateClass --> UpdateHeader[Recalc plan-level %% comments]
|
|
62
|
+
UpdateHeader --> UpdateMeta[Update per-node %% status lines]
|
|
63
|
+
UpdateMeta --> VerifyByte{Node/edge sets byte-identical?}
|
|
64
|
+
VerifyByte -->|Yes| Write[Write .mmd]
|
|
65
|
+
VerifyByte -->|No| Escalate
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Scope-Change Regeneration
|
|
69
|
+
|
|
70
|
+
```mermaid
|
|
71
|
+
flowchart TD
|
|
72
|
+
ReadMeta[Read canonical metadata] --> MapIDs[Map existing task→node IDs]
|
|
73
|
+
MapIDs --> AssignNew[Assign T### for new tasks]
|
|
74
|
+
AssignNew --> Retire[Retire removed IDs, never reuse]
|
|
75
|
+
Retire --> BuildGraph[Build flowchart TD from deps]
|
|
76
|
+
BuildGraph --> GenNodeMeta[Generate per-node %% blocks]
|
|
77
|
+
GenNodeMeta --> GenHeader[Generate plan-level %% comments]
|
|
78
|
+
GenHeader --> Preview[Preview diff summary]
|
|
79
|
+
Preview --> Write[Write .mmd]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Canonical Source of Truth (Priority Order)
|
|
83
|
+
|
|
84
|
+
1. **Structured task metadata** (ARCS tasks) — always wins
|
|
85
|
+
2. **Plan body checkboxes** (`- [ ]`/`- [x]`) — fallback if no structured tasks
|
|
86
|
+
3. **`%%` comments in .mmd** — cache only, never authoritative
|
|
87
|
+
|
|
88
|
+
Metadata always wins. Diagram is regenerated from metadata on drift, never the reverse.
|
|
89
|
+
|
|
90
|
+
## Drift Types
|
|
91
|
+
|
|
92
|
+
| # | Type | Symptom |
|
|
93
|
+
|---|------|---------|
|
|
94
|
+
| 1 | classDef mismatch | Node has wrong :::class vs metadata status |
|
|
95
|
+
| 2 | Phantom node | Diagram node has no corresponding task |
|
|
96
|
+
| 3 | Missing node | Task exists but no diagram node |
|
|
97
|
+
| 4 | Topology mismatch | Edges don't match dependency metadata |
|
|
98
|
+
| 5 | Stale plan-level comments | %% status/ready/blocked inconsistent |
|
|
99
|
+
| 6 | Incomplete node metadata | Missing %% block or stale fields |
|
|
100
|
+
|
|
101
|
+
**Resolution for all 6:** Regenerate from metadata. Never patch metadata to match diagram.
|
|
102
|
+
|
|
103
|
+
## classDef Conventions
|
|
104
|
+
|
|
105
|
+
Always declare at top of every `flowchart TD`:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
classDef done fill:#22c55e,color:#fff
|
|
109
|
+
classDef inProgress fill:#f59e0b,color:#fff
|
|
110
|
+
classDef blocked fill:#ef4444,color:#fff
|
|
111
|
+
classDef backlog fill:#94a3b8,color:#fff
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Assign via `:::className` suffix. At plan creation, all nodes start `:::backlog`.
|
|
115
|
+
|
|
116
|
+
## Node ID Rules
|
|
117
|
+
|
|
118
|
+
- Format: `T001`, `T002`, ... (zero-padded 3+ digits)
|
|
119
|
+
- If ARCS structured tasks exist, use their canonical IDs
|
|
120
|
+
- IDs are stable — never change on rename/reorder
|
|
121
|
+
- Removed IDs are retired, never reused
|
|
122
|
+
- New tasks get next unused sequential ID
|
|
123
|
+
|
|
124
|
+
## Per-Node Metadata Format
|
|
125
|
+
|
|
126
|
+
Between plan-level header and `flowchart TD` declaration:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
%% node: T003
|
|
130
|
+
%% title: Build order management UI
|
|
131
|
+
%% status: backlog
|
|
132
|
+
%% skill: code-agent
|
|
133
|
+
%% scope: src/components/orders/, src/pages/orders/
|
|
134
|
+
%% files: src/components/orders/OrderList.tsx (optional)
|
|
135
|
+
%% acceptance: Order list renders with pagination
|
|
136
|
+
%% verify: npm test -- --testPathPattern=orders
|
|
137
|
+
%% blocked-by: T002 (optional)
|
|
138
|
+
%% delegate: yes (optional)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Required:** node, title, status, skill, scope, acceptance. **Optional:** files, verify, blocked-by, delegate.
|
|
142
|
+
|
|
143
|
+
## Plan-Level Header Comments
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
%% plan: <plan-id>
|
|
147
|
+
%% status: T001=done, T002=inProgress, T003=backlog
|
|
148
|
+
%% ready: T003 (all deps done)
|
|
149
|
+
%% blocked: T005 (waiting on T003)
|
|
150
|
+
%% next-action: Start T003
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## manage-diagram.mjs Commands
|
|
154
|
+
|
|
155
|
+
| Command | Purpose |
|
|
156
|
+
|---------|---------|
|
|
157
|
+
| `inspect <file>` | Structured JSON of nodes/edges/metadata |
|
|
158
|
+
| `ready <file>` | Compute executable nodes from topology |
|
|
159
|
+
| `validate <file> [--metadata f.json]` | Check integrity (+ drift detection) |
|
|
160
|
+
| `status <file> <nodeId> <status>` | Update single node status atomically |
|
|
161
|
+
| `sort-metadata <file>` | Order metadata blocks by node ID |
|
|
162
|
+
| `regenerate <file> --metadata f.json` | Full regeneration from canonical data |
|
|
163
|
+
|
|
164
|
+
Preferred: `arcs diagram ready <slug> <planId>` for ready detection. Script is fallback for file-level ops.
|
|
165
|
+
|
|
166
|
+
## File Convention
|
|
167
|
+
|
|
168
|
+
- Path: `plans/<plan-id>.diagram.mmd`
|
|
169
|
+
- Pure Mermaid syntax (no markdown fences)
|
|
170
|
+
- First line: `%% plan: <plan-id>`
|
|
171
|
+
- One diagram per plan
|
|
172
|
+
- Plan body references: `> Diagram: plans/<plan-id>.diagram.mmd`
|
|
173
|
+
|
|
174
|
+
## Scalability
|
|
175
|
+
|
|
176
|
+
Plans with 15+ nodes: cluster into `subgraph` blocks by phase. If unreadable, split into sub-plans.
|
|
177
|
+
|
|
178
|
+
## Constraints
|
|
179
|
+
|
|
180
|
+
- **Ownership:** Only orchestrator/coordinator writes .mmd files. Sub-agents read only and report status back
|
|
181
|
+
- **Presentation:** Internal skill — never narrate conventions to user. Show rendered diagram or URL only
|
|
182
|
+
- **Determinism:** Same metadata must produce byte-identical .mmd output (nodes ordered by ID, edges by source→target, fields in fixed order)
|
|
183
|
+
- **Confidence gate:** Self-score ≥80% via confidence-gate skill before writing .mmd files
|
|
184
|
+
- **Validation before write:** unique IDs, valid edges, all 4 classDef present, valid :::class suffixes
|
|
185
|
+
- **Backward compat:** Plans without .mmd remain valid; diagrams without rich metadata upgraded during SYNC
|
|
186
|
+
|
|
187
|
+
## Reference Example
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
%% plan: order-system
|
|
191
|
+
%% status: T001=done, T002=inProgress, T003=backlog, T004=backlog, T005=blocked
|
|
192
|
+
%% ready: T003 (T001 done)
|
|
193
|
+
%% blocked: T005 (waiting on T003 and T004)
|
|
194
|
+
%% next-action: Start T003
|
|
195
|
+
|
|
196
|
+
%% node: T001
|
|
197
|
+
%% title: Design database schema for orders
|
|
198
|
+
%% status: done
|
|
199
|
+
%% skill: quick-dev
|
|
200
|
+
%% scope: db/migrations/
|
|
201
|
+
%% acceptance: Migration runs; orders table has all required columns
|
|
202
|
+
%% verify: npm run db:migrate
|
|
203
|
+
|
|
204
|
+
%% node: T002
|
|
205
|
+
%% title: Build REST API endpoints
|
|
206
|
+
%% status: inProgress
|
|
207
|
+
%% skill: test-driven-development
|
|
208
|
+
%% scope: src/api/orders/
|
|
209
|
+
%% acceptance: CRUD endpoints return correct status codes
|
|
210
|
+
%% verify: npm test -- --testPathPattern=api/orders
|
|
211
|
+
%% blocked-by: T001
|
|
212
|
+
|
|
213
|
+
flowchart TD
|
|
214
|
+
classDef done fill:#22c55e,color:#fff
|
|
215
|
+
classDef inProgress fill:#f59e0b,color:#fff
|
|
216
|
+
classDef blocked fill:#ef4444,color:#fff
|
|
217
|
+
classDef backlog fill:#94a3b8,color:#fff
|
|
218
|
+
|
|
219
|
+
T001[Design database schema]:::done --> T002[Build REST API]:::inProgress
|
|
220
|
+
T001 --> T003[Write integration tests]:::backlog
|
|
221
|
+
T002 --> T004[Build order UI]:::backlog
|
|
222
|
+
T003 --> T005[Deploy to staging]:::blocked
|
|
223
|
+
T004 --> T005
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
%% plan: feature-lifecycle
|
|
228
|
+
stateDiagram-v2
|
|
229
|
+
[*] --> Draft
|
|
230
|
+
Draft --> Spec
|
|
231
|
+
Spec --> Build
|
|
232
|
+
Build --> Review
|
|
233
|
+
Review --> Shipped
|
|
234
|
+
Review --> Build : revisions
|
|
235
|
+
```
|