Merge pull request 'docs(plan): add sequence diagram to outline' (#248) from docs/plan-outline-sequence-diagram into main

Reviewed-on: #248
This commit was merged in pull request #248.
This commit is contained in:
Defame1297 committed 2026-11-29 10:39:36 +00:00
commit b98340d432
1 file changed
+76
+76
View File
@@ -77,6 +77,82 @@ The flow is a loop, not a straight line. The named loop-backs are:
After two loops on the same point, the plugin asks whether to park the idea instead of
circling.
### Sequence diagram
```mermaid
sequenceDiagram
autonumber
actor U as User
participant P as plan (orchestrator)
participant R as Repo<br/>(AGENTS.md, ADRs, VISION, code)
participant W as Web / docs
participant T as Tracker (Gitea)
%% Step 0 — Entry
alt existing ticket
U->>P: ticket #N
P->>T: read issue
else new idea
U->>P: free text
else via /next
U->>P: /next [metric]
P->>T: rank open issues
P-->>U: ranked list
U->>P: pick one
end
%% Step 1 — Gate
P->>T: duplicate open issue/PR? already done?
P->>R: contradicts an ADR? outside VISION scope?
opt any gate hit
P-->>U: stop, with reason
end
%% Steps 2–6 — the discovery loop
loop until agreed (after 2 loops on one point, offer to park)
opt intent unclear
P->>U: grilling questions (step 2)
U-->>P: answers
end
P-->>U: recommended track + reason
par Research (step 3), scoped to track
P->>R: practices, patterns, conventions
and
P->>W: tools, docs, standards, examples
end
P->>R: deep validation: feasible, fits repo now? (step 4)
alt doesn't fit
P-->>U: back to grilling, or stop
else fits
P-->>U: plan: options, impact, results, track (step 5)
alt user agrees and confirms track (step 6)
U->>P: agree + track
else disagreement
U->>P: back to grilling or research
end
end
end
%% Step 7 — Record decisions
P->>T: open docs PR (AGENTS.md, GLOSSARY, ADRs)
%% Steps 8–9 — Spec and breakdown
loop until breakdown shows no spec gap
opt track = spec + tickets
P->>T: write/update spec issue, link docs PR (step 8)
end
P-->>U: proposed ticket breakdown (step 9)
end
%% Step 10 — Approval and filing
U->>P: one approval for the whole batch
P->>T: file tickets
P->>T: set Status/Ready for Agent<br/>(only tickets with acceptance criteria)
P-->>U: links to spec, tickets, docs PR
```
## What ships today
- `.apm/prompts/next.prompt.md`: the `/next` command. It ranks open issues by a metric, lets the