diff --git a/.archon/workflows/dev-pipeline-diagram.html b/.archon/workflows/dev-pipeline-diagram.html
index 08b0cbf..7c38960 100644
--- a/.archon/workflows/dev-pipeline-diagram.html
+++ b/.archon/workflows/dev-pipeline-diagram.html
@@ -11,14 +11,13 @@
table { border-collapse: collapse; width: 100%; margin: 20px 0; }
th, td { border: 1px solid #30363d; padding: 8px 12px; text-align: left; }
th { background: #161b22; color: #58a6ff; }
- tr:nth-child(even) { background: #161b2211; }
code { background: #161b22; padding: 2px 6px; border-radius: 4px; color: #79c0ff; }
-Dev Pipeline Workflow
-Run with: archon workflow run dev-pipeline "implement issue #N"
+Dev Pipeline Workflow (v2 — split nodes)
+archon workflow run dev-pipeline --from hotfix --branch feat/issue-N-slug "implement issue #N"
flowchart TD
@@ -28,114 +27,96 @@
Dev Pipeline Workflow
PF -->|"exit 0"| R
PF -->|"exit 1"| STOP(["WORKFLOW STOPS"])
- R["1-2. RESEARCH
gh issue view
codegraph queries
nlm CLI / context7"]
+ R["1-2. RESEARCH
gh issue view
codegraph queries (MANDATORY)
nlm CLI / context7"]
R --> P
P["3. PLAN
Read plan_local template
Write plan file"]
- P --> DC
+ P --> I
- subgraph LOOP1 ["dev-cycle — loop node (max 10 iters, 10min idle timeout)"]
- direction TB
- I["4. IMPLEMENT
Execute plan tasks
pytest after each change"]
- I --> RV
+ I["4. IMPLEMENT
Execute plan tasks
pytest after each change"]
+ I --> RV
- RV["5. REVIEW
feature-dev:code-reviewer
codegraph arch-check"]
- RV -->|"issues"| FX["FIX issues"]
- FX --> RV
- RV -->|"0 issues"| CM
+ RV["5. REVIEW
feature-dev:code-reviewer
codegraph arch-check
MANDATORY — separate node"]
+ RV --> CM
- CM["6. COMMIT
feat/fix/...(scope): why
Co-Authored-By"]
- CM --> CR
+ CM["6. COMMIT
feat/fix/...(scope): why
Co-Authored-By"]
+ CM --> CR
- CR["7. CRITIQUE
Check acceptance criteria
codegraph structural verify"]
- CR -->|"FAIL"| I
- end
+ CR["7. CRITIQUE
output_format: JSON
verdict: pass/fail + gaps"]
+ CR -->|"verdict: pass"| FG
+ CR -->|"verdict: fail"| IF
- DC --> LOOP1
- LOOP1 -->|"CYCLE_COMPLETE +
until_bash: pytest=0"| RM
+ IF["7b. IMPLEMENT-FIX
loop max 5 iters
Fix gaps + review + commit"]
+ IF --> FG
+
+ FG["FINAL GATE
bash: pytest + compileall
trigger_rule: one_success"]
+ FG --> RM
RM["8. ROADMAP
Update ROADMAP.md"]
- RM --> PK
+ RM --> RMV
+
+ RMV["8b. ROADMAP VERIFY
loop max 3 — self-heals
Commits if agent forgot"]
+ RMV --> PK
PK["9. PACKAGE
Bump 0.1.X+1
python -m build
twine upload"]
PK --> TC
- subgraph LOOP2 ["test-cycle — loop node (max 10 iters, 10min idle timeout)"]
- direction TB
- T1["Unit tests + compileall"]
- T1 --> T2["Install test (fresh venv)"]
- T2 --> T3["Self-index (dogfood)"]
- T3 --> T4["Leytongo (real-world TS)"]
- T4 --> T5["Arch check"]
- T5 -->|"fail"| TF["Fix + re-package"]
- TF --> T1
- end
-
- TC --> LOOP2
- LOOP2 -->|"TESTS_PASS +
until_bash: pytest=0"| FI
+ TC["10. TEST CYCLE
loop max 10 iters
unit + install + self-index
+ leytongo + arch-check"]
+ TC --> FI
FI["11. FILE ISSUES
gh issue create
for discoveries"]
FI --> PR
- PR["12. CREATE PR
feature to hotfix
+ PyPI version link"]
+ PR["12. CREATE PR
feature to hotfix
Closes #N + issue comment"]
PR --> DONE(["DONE"])
style PF fill:#1a472a,color:#fff,stroke:#2ea043
style STOP fill:#6e1212,color:#fff,stroke:#da3633
style DONE fill:#1a472a,color:#fff,stroke:#2ea043
- style LOOP1 fill:#0d1b2a22,stroke:#1f6feb,stroke-width:2px,color:#c9d1d9
- style LOOP2 fill:#0d1b2a22,stroke:#1f6feb,stroke-width:2px,color:#c9d1d9
+ style RV fill:#1a1a3d,color:#fff,stroke:#8957e5
style CR fill:#3d2200,color:#fff,stroke:#d29922
- style T5 fill:#3d2200,color:#fff,stroke:#d29922
+ style IF fill:#3d2200,color:#fff,stroke:#d29922
+ style FG fill:#1a472a,color:#fff,stroke:#2ea043
+ style RMV fill:#3d2200,color:#fff,stroke:#d29922
style I fill:#1a1a3d,color:#fff,stroke:#8957e5
- style RV fill:#1a1a3d,color:#fff,stroke:#8957e5
style CM fill:#1a1a3d,color:#fff,stroke:#8957e5
-Safety Mechanisms
+Key Improvements (v2)
-
-flowchart LR
- subgraph "Each loop exits when ANY of these fire"
- A["Agent signals
promise COMPLETE"]
- B["until_bash
pytest exit 0"]
- C["max_iterations: 10"]
- D["idle_timeout: 10min"]
- end
- A & B --> AND{"BOTH
required"}
- AND --> EXIT["Loop exits"]
- C --> EXIT
- D --> EXIT
-
- style AND fill:#3d2200,color:#fff,stroke:#d29922
- style EXIT fill:#1a472a,color:#fff,stroke:#2ea043
-
+
+| Issue | v1 (broken) | v2 (fixed) |
+| Code reviewer | Instruction inside loop prompt — agent skipped it | Separate review node — cannot be skipped |
+| Critique | Buried in loop, no structured output | Separate node with output_format JSON — verdict drives routing |
+| ROADMAP commit | Agent edited but didn't commit | roadmap-verify loop self-heals — commits if forgotten |
+| Package paths | Hardcoded to main checkout | $(git rev-parse --show-toplevel) — works in worktrees |
+| Critique fail | Loop re-iterated entire cycle | Conditional implement-fix node with specific gaps |
+
Node Details
-| Step | Node ID | Type | Model | Key Tools |
+| Step | Node ID | Type | Model | Key Feature |
| 0 | preflight | bash | - | docker, pytest, codegraph |
-| 1-2 | research | prompt | opus | gh, codegraph CLI, nlm CLI, context7 |
-| 3 | plan | prompt | opus | Read, Write (plan file) |
-| 4-7 | dev-cycle | loop | workflow default | All tools, code-reviewer agent |
-| 8 | roadmap | prompt | workflow default | Read, Edit |
-| 9 | package | prompt | workflow default | build, twine, curl |
-| 10 | test-cycle | loop | workflow default | pytest, codegraph, pip |
-| 11 | file-issues | prompt | workflow default | gh issue create |
-| 12 | create-pr | prompt | workflow default | gh pr create |
+| 1-2 | research | prompt | opus | MANDATORY codegraph queries |
+| 3 | plan | prompt | opus | Writes plan to repo, not ~/ |
+| 4 | implement | prompt | opus | PostToolUse hooks for validation |
+| 5 | review | prompt | opus | MANDATORY code-reviewer + arch-check |
+| 6 | commit | prompt | sonnet | Fresh context, conventional format |
+| 7 | critique | prompt | opus | output_format: {verdict, gaps} |
+| 7b | implement-fix | loop | inherit | Conditional on verdict==fail, max 5 |
+| - | final-gate | bash | - | Independent test verification |
+| 8 | roadmap | prompt | inherit | MANDATORY edit + commit |
+| 8b | roadmap-verify | loop | inherit | Self-heals if commit missing |
+| 9 | package | prompt | inherit | Dynamic paths, commit on branch |
+| 10 | test-cycle | loop | opus | 5-stage validation, max 10 iters |
+| 11 | file-issues | prompt | sonnet | gh issue create for discoveries |
+| 12 | create-pr | prompt | inherit | Closes #N, issue comment, PR to hotfix |
-How to Run
-archon workflow run dev-pipeline "implement issue #12 — expose queries.md as @mcp.prompt() templates"
-