@nklisch/pi-agile-workflow 0.15.3
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/.claude-plugin/plugin.json +10 -0
- package/.codex-plugin/plugin.json +28 -0
- package/CHANGELOG.md +591 -0
- package/README.md +107 -0
- package/docs/ARCHITECTURE.md +716 -0
- package/docs/MIGRATION.md +419 -0
- package/docs/PRINCIPLES.md +464 -0
- package/docs/ROADMAP.md +95 -0
- package/docs/SPEC.md +855 -0
- package/docs/VISION.md +106 -0
- package/extensions/agile-workflow.test.ts +419 -0
- package/extensions/agile-workflow.ts +467 -0
- package/hooks/hooks.json +52 -0
- package/hooks/scripts/prompt-context.py +628 -0
- package/hooks/scripts/substrate-maintainer.py +359 -0
- package/hooks/scripts/test_prompt_context.py +757 -0
- package/package.json +30 -0
- package/scripts/install-work-view.sh +165 -0
- package/scripts/tests/agent-metadata.test.sh +75 -0
- package/scripts/tests/bump-version.test.sh +552 -0
- package/scripts/tests/channel-parity.test.sh +117 -0
- package/scripts/tests/convert-content-integrity.test.sh +246 -0
- package/scripts/tests/convert-install-routing.test.sh +159 -0
- package/scripts/tests/install-work-view.test.sh +411 -0
- package/scripts/tests/pi-package-metadata.test.sh +119 -0
- package/scripts/tests/work-board-shim.test.sh +239 -0
- package/scripts/tests/work-view-dist-version.test.sh +105 -0
- package/scripts/work-board.sh +64 -0
- package/scripts/work-view.sh +423 -0
- package/skills/autopilot/SKILL.md +330 -0
- package/skills/autopilot/agents/openai.yaml +6 -0
- package/skills/board/SKILL.md +62 -0
- package/skills/board/agents/openai.yaml +6 -0
- package/skills/bold-refactor/SKILL.md +244 -0
- package/skills/bold-refactor/agents/openai.yaml +6 -0
- package/skills/bug-scan/SKILL.md +378 -0
- package/skills/bug-scan/agents/openai.yaml +6 -0
- package/skills/bug-scan/references/async-promises.md +119 -0
- package/skills/bug-scan/references/concurrency-races.md +148 -0
- package/skills/bug-scan/references/data-layer.md +167 -0
- package/skills/bug-scan/references/error-handling.md +197 -0
- package/skills/bug-scan/references/gate-item-template.md +94 -0
- package/skills/bug-scan/references/language-footguns.md +219 -0
- package/skills/bug-scan/references/parked-item-template.md +103 -0
- package/skills/bug-scan/references/report-template.md +115 -0
- package/skills/bug-scan/references/resource-leaks.md +199 -0
- package/skills/bug-scan/references/state-closures.md +148 -0
- package/skills/bug-scan/references/time-numbers.md +158 -0
- package/skills/convert/SKILL.md +1463 -0
- package/skills/convert/agents/openai.yaml +6 -0
- package/skills/convert/references/legacy-overlap-migration.md +179 -0
- package/skills/deep-code-scan/SKILL.md +378 -0
- package/skills/deep-code-scan/agents/openai.yaml +6 -0
- package/skills/deep-code-scan/references/artifact-ledger.md +148 -0
- package/skills/deep-code-scan/references/consolidation.md +91 -0
- package/skills/deep-code-scan/references/decomposition.md +127 -0
- package/skills/deep-code-scan/references/item-templates.md +263 -0
- package/skills/deep-code-scan/references/lane-catalog.md +129 -0
- package/skills/deep-code-scan/references/review-gauntlet.md +108 -0
- package/skills/deep-code-scan/references/scanner-brief.md +152 -0
- package/skills/e2e-test-design/SKILL.md +517 -0
- package/skills/e2e-test-design/references/anti-tautology.md +261 -0
- package/skills/e2e-test-design/references/service-mocks.md +234 -0
- package/skills/e2e-test-design/references/test-taxonomy.md +211 -0
- package/skills/epic-design/SKILL.md +476 -0
- package/skills/epicize/SKILL.md +210 -0
- package/skills/epicize/agents/openai.yaml +6 -0
- package/skills/feature-design/SKILL.md +472 -0
- package/skills/fix/SKILL.md +173 -0
- package/skills/gate-cruft/SKILL.md +258 -0
- package/skills/gate-docs/SKILL.md +278 -0
- package/skills/gate-patterns/SKILL.md +389 -0
- package/skills/gate-refactor/SKILL.md +408 -0
- package/skills/gate-security/SKILL.md +275 -0
- package/skills/gate-tests/SKILL.md +367 -0
- package/skills/groom/SKILL.md +162 -0
- package/skills/groom/agents/openai.yaml +6 -0
- package/skills/ideate/SKILL.md +185 -0
- package/skills/ideate/agents/openai.yaml +6 -0
- package/skills/implement/SKILL.md +288 -0
- package/skills/implement-orchestrator/SKILL.md +604 -0
- package/skills/park/SKILL.md +111 -0
- package/skills/perf-design/SKILL.md +427 -0
- package/skills/perf-scout/SKILL.md +404 -0
- package/skills/perf-scout/agents/openai.yaml +6 -0
- package/skills/perf-scout/references/algorithmic-and-data-structures.md +126 -0
- package/skills/perf-scout/references/approximation-and-precomputation.md +136 -0
- package/skills/perf-scout/references/caching-and-memoization.md +123 -0
- package/skills/perf-scout/references/compiler-runtime-and-language.md +136 -0
- package/skills/perf-scout/references/database-and-storage-internals.md +144 -0
- package/skills/perf-scout/references/distributed-systems.md +150 -0
- package/skills/perf-scout/references/game-engine-and-realtime.md +136 -0
- package/skills/perf-scout/references/gpu-and-accelerators.md +130 -0
- package/skills/perf-scout/references/idea-ranking.md +75 -0
- package/skills/perf-scout/references/io-and-batching.md +135 -0
- package/skills/perf-scout/references/memory-and-data-locality.md +137 -0
- package/skills/perf-scout/references/parallelism-and-vectorization.md +126 -0
- package/skills/perf-scout/references/parked-item-template.md +117 -0
- package/skills/perf-scout/references/peer-review-pass.md +150 -0
- package/skills/perf-scout/references/report-template.md +148 -0
- package/skills/principles/SKILL.md +678 -0
- package/skills/principles/references/models.md +191 -0
- package/skills/principles/references/subagents.md +158 -0
- package/skills/prose-author/SKILL.md +185 -0
- package/skills/refactor-conventions-creator/SKILL.md +359 -0
- package/skills/refactor-conventions-creator/agents/openai.yaml +6 -0
- package/skills/refactor-conventions-creator/references/common-structures.md +91 -0
- package/skills/refactor-conventions-creator/references/common-styles.md +90 -0
- package/skills/refactor-design/SKILL.md +384 -0
- package/skills/release-deploy/SKILL.md +667 -0
- package/skills/release-deploy/agents/openai.yaml +6 -0
- package/skills/research/SKILL.md +166 -0
- package/skills/research/agents/openai.yaml +6 -0
- package/skills/review/SKILL.md +267 -0
- package/skills/review/references/deep-review.md +98 -0
- package/skills/review/references/review-lenses.md +68 -0
- package/skills/review/references/substrate-side-effects.md +161 -0
- package/skills/review/references/target-resolution.md +52 -0
- package/skills/scope/SKILL.md +486 -0
- package/work-view/Cargo.lock +486 -0
- package/work-view/Cargo.toml +9 -0
- package/work-view/crates/cli/.work-view-version +1 -0
- package/work-view/crates/cli/Cargo.toml +18 -0
- package/work-view/crates/cli/src/actionable.rs +500 -0
- package/work-view/crates/cli/src/args.rs +792 -0
- package/work-view/crates/cli/src/board/assets/board.css +855 -0
- package/work-view/crates/cli/src/board/assets/board.js +259 -0
- package/work-view/crates/cli/src/board/assets/card.js +139 -0
- package/work-view/crates/cli/src/board/assets/components.css +290 -0
- package/work-view/crates/cli/src/board/assets/dependency.js +1193 -0
- package/work-view/crates/cli/src/board/assets/detail.js +256 -0
- package/work-view/crates/cli/src/board/assets/filters.js +389 -0
- package/work-view/crates/cli/src/board/assets/index.html +77 -0
- package/work-view/crates/cli/src/board/assets/kanban.js +231 -0
- package/work-view/crates/cli/src/board/assets/markdown.js +260 -0
- package/work-view/crates/cli/src/board/assets/motion.css +131 -0
- package/work-view/crates/cli/src/board/assets/state.js +245 -0
- package/work-view/crates/cli/src/board/assets/table.js +304 -0
- package/work-view/crates/cli/src/board/assets/tokens.css +602 -0
- package/work-view/crates/cli/src/board/assets/views.js +41 -0
- package/work-view/crates/cli/src/board/assets.rs +162 -0
- package/work-view/crates/cli/src/board/feed.rs +204 -0
- package/work-view/crates/cli/src/board/mod.rs +246 -0
- package/work-view/crates/cli/src/board/open.rs +144 -0
- package/work-view/crates/cli/src/board/server.rs +407 -0
- package/work-view/crates/cli/src/main.rs +195 -0
- package/work-view/crates/cli/src/render.rs +354 -0
- package/work-view/crates/cli/src/scope.rs +157 -0
- package/work-view/crates/cli/src/stale.rs +581 -0
- package/work-view/crates/cli/tests/board-js/dependency-table.test.mjs +64 -0
- package/work-view/crates/cli/tests/board-js/expanded-browsing.test.mjs +79 -0
- package/work-view/crates/cli/tests/board-js/harness-smoke.test.mjs +11 -0
- package/work-view/crates/cli/tests/board-js/harness.mjs +437 -0
- package/work-view/crates/cli/tests/board-js/kanban-detail.test.mjs +75 -0
- package/work-view/crates/cli/tests/board-js/markdown-filter.test.mjs +60 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/CONVENTIONS.md +3 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/epics/epic-alpha.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/features/feat-a.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/features/feat-b.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/stories/story-alpha-1.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/active/stories/story-research-1.md +19 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/archive/feat-done.md +16 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/archive/feat-shipped.md +18 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/backlog/idea-backlog.md +7 -0
- package/work-view/crates/cli/tests/fixtures/golden/.work/releases/v1.0/v1.0.md +16 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/CONVENTIONS.md +6 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-dep-done.md +17 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-design-ready.md +17 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/features/feat-impl-ready.md +17 -0
- package/work-view/crates/cli/tests/fixtures/ready-drafting/.work/active/stories/story-review-ready.md +17 -0
- package/work-view/crates/cli/tests/fixtures/with-malformed/.work/CONVENTIONS.md +4 -0
- package/work-view/crates/cli/tests/fixtures/with-malformed/.work/active/epics/malformed-no-closing-fence.md +8 -0
- package/work-view/crates/cli/tests/fixtures/with-malformed/.work/active/features/good-item.md +16 -0
- package/work-view/crates/cli/tests/integration.rs +2833 -0
- package/work-view/crates/core/Cargo.toml +13 -0
- package/work-view/crates/core/src/error.rs +61 -0
- package/work-view/crates/core/src/filter.rs +804 -0
- package/work-view/crates/core/src/graph.rs +324 -0
- package/work-view/crates/core/src/index.rs +590 -0
- package/work-view/crates/core/src/lib.rs +54 -0
- package/work-view/crates/core/src/model.rs +202 -0
- package/work-view/crates/core/src/parse.rs +494 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/CONVENTIONS.md +15 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/epics/epic-core.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/features/feat-parser.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/features/feat-query.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/malformed-no-id.md +15 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/story-parse-unit.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/active/stories/story-security-gate.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/archive/feat-old.md +16 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/archive/feat-parser.md +17 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/backlog/idea-future-board.md +7 -0
- package/work-view/crates/core/tests/fixtures/golden/.work/releases/v1.0/v1.0.md +16 -0
- package/work-view/crates/core/tests/fixtures/precedence/.work/CONVENTIONS.md +10 -0
- package/work-view/crates/core/tests/fixtures/precedence/.work/archive/dup-item.md +18 -0
- package/work-view/crates/core/tests/fixtures/precedence/.work/releases/v2.0/dup-item.md +18 -0
- package/work-view/crates/core/tests/integration.rs +541 -0
- package/work-view/dist/.gitattributes +1 -0
- package/work-view/dist/README.md +42 -0
- package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
- package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
- package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
- package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scope
|
|
3
|
+
description: >
|
|
4
|
+
ALWAYS invoke this skill when the user asks to scope, promote, formalize, cluster, or track new work
|
|
5
|
+
— do not start drafting items inline. Promotes ideas from .work/backlog/ or fresh user requests into
|
|
6
|
+
the active tier as epics, features, or stories with declared dependencies. Use when scoping new
|
|
7
|
+
work, formalizing a new direction, clustering backlog, or promoting an idea into tracking. Triggers
|
|
8
|
+
on "scope this", "scope it", "let's scope", "scope this item", "scope the backlog", "promote this",
|
|
9
|
+
"let's track this", "this should be a feature/epic/story", or any request to formalize a new
|
|
10
|
+
direction. For vision/spec/architecture changes, also rolls foundation docs forward in the same
|
|
11
|
+
stride.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Scope
|
|
15
|
+
|
|
16
|
+
You promote an idea to active substrate work. You decide the right kind (epic /
|
|
17
|
+
feature / story), declare dependencies, and — if scope is large enough to change the
|
|
18
|
+
project's standing context — roll foundation docs forward as part of the same operation.
|
|
19
|
+
|
|
20
|
+
## When to invoke
|
|
21
|
+
|
|
22
|
+
Trigger phrases:
|
|
23
|
+
- "scope this", "promote this to active"
|
|
24
|
+
- "let's track this as a feature"
|
|
25
|
+
- "this needs to be a feature/epic/story"
|
|
26
|
+
- A new direction surfaces and the user wants to formalize it
|
|
27
|
+
- "scope the backlog", "scope all of this", "cluster the backlog",
|
|
28
|
+
"promote the backlog", or `scope <NL filter>` like "scope the auth stuff"
|
|
29
|
+
→ batch / clustering mode (see Invocation modes below)
|
|
30
|
+
|
|
31
|
+
If the user wants to fix a bug, use `/agile-workflow:fix`. If they want to capture
|
|
32
|
+
an idea without acting on it, use `/agile-workflow:park`.
|
|
33
|
+
|
|
34
|
+
## Invocation modes
|
|
35
|
+
|
|
36
|
+
| Invocation | Behavior |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `scope <id>` | Single-idea mode — promote one backlog item at `.work/backlog/<id>.md`. |
|
|
39
|
+
| `scope <free-form idea>` | Single-idea mode — distill the user's fresh idea, then promote. |
|
|
40
|
+
| `scope` (no arg) | **Default → equivalent to `--all`**: batch / clustering mode over all of `.work/backlog/`. |
|
|
41
|
+
| `scope --all` | Explicit batch / clustering mode over all of `.work/backlog/`. |
|
|
42
|
+
| `scope <NL filter>` (e.g. `scope the auth-related stuff`, `scope everything tagged perf`) | Batch / clustering mode over the filtered subset of `.work/backlog/`. The filter is interpreted by the agent as a directive against the backlog, not parsed as a flag. |
|
|
43
|
+
|
|
44
|
+
**Disambiguation.** An arg is treated as a backlog `<id>` only if
|
|
45
|
+
`.work/backlog/<arg>.md` exists. Otherwise: if it reads like a one-paragraph
|
|
46
|
+
fresh idea, treat as single-idea mode; if it reads like a filter directive over
|
|
47
|
+
the backlog (mentions tags, areas, themes, or "everything that..."), treat as
|
|
48
|
+
batch-filter mode. When genuinely ambiguous, prefer batch-filter mode and
|
|
49
|
+
confirm via `structured question tool` before writing — a bigger read costs nothing, but
|
|
50
|
+
a fresh idea misread as a filter wastes user time.
|
|
51
|
+
|
|
52
|
+
## Workflow — batch / clustering mode
|
|
53
|
+
|
|
54
|
+
Use this path for `scope`, `scope --all`, or `scope <NL filter>`. Goal: read the
|
|
55
|
+
targeted backlog, find natural clusters, propose a structure (epics / features /
|
|
56
|
+
stories), confirm with the user once, then promote.
|
|
57
|
+
|
|
58
|
+
### Phase B1: Inventory the backlog
|
|
59
|
+
|
|
60
|
+
Read every targeted backlog file. Targeting:
|
|
61
|
+
- `scope` / `scope --all` → all of `.work/backlog/*.md`
|
|
62
|
+
- `scope <NL filter>` → interpret the filter against each backlog file's body
|
|
63
|
+
and tags; keep matches. Log the interpretation for the run summary.
|
|
64
|
+
|
|
65
|
+
For each item, capture id, brief, tags, and any inline hints (referenced files,
|
|
66
|
+
areas, related ids).
|
|
67
|
+
|
|
68
|
+
If the targeted set is empty, halt with a clear message — suggest a narrower
|
|
69
|
+
filter or `/agile-workflow:park` for fresh ideas.
|
|
70
|
+
|
|
71
|
+
If the targeted set is a single item, fall through to single-idea mode with
|
|
72
|
+
that item.
|
|
73
|
+
|
|
74
|
+
### Phase B2: Light grounding
|
|
75
|
+
|
|
76
|
+
Read `docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`, `.work/CONVENTIONS.md`,
|
|
77
|
+
and `AGENTS.md` / `CLAUDE.md`. One pass, skim — you're orienting, not absorbing every detail.
|
|
78
|
+
You'll re-read selectively for large clusters in Phase B5.
|
|
79
|
+
|
|
80
|
+
### Phase B3: Map code areas (read-first, maybe one exploratory sub-agent)
|
|
81
|
+
|
|
82
|
+
Start locally. Use Glob/`rg --files` to identify likely modules, packages, and
|
|
83
|
+
tests, and Grep/`rg` for terms from the targeted backlog ideas. If the ideas
|
|
84
|
+
clearly touch a small set of known areas, build the area-map yourself and skip
|
|
85
|
+
exploratory fanout.
|
|
86
|
+
|
|
87
|
+
Spawn **one** read-only exploratory sub-agent only when the batch spans unclear
|
|
88
|
+
code areas or you cannot confidently name the natural seams from direct reading.
|
|
89
|
+
Use the host's generic/general-purpose subagent prompted with the explorer
|
|
90
|
+
capsule from `../principles/references/subagents.md`, at medium effort. If no
|
|
91
|
+
generic subagent adapter is available, keep the area-map in the host session.
|
|
92
|
+
Give it:
|
|
93
|
+
- The list of targeted backlog ideas (id + brief, one per line)
|
|
94
|
+
- A one-paragraph summary of the foundation docs from Phase B2
|
|
95
|
+
- The question: "Which areas of the codebase do these ideas touch, and what
|
|
96
|
+
natural seams (modules, packages, bounded contexts) group them?"
|
|
97
|
+
|
|
98
|
+
Expect back an area-map keyed by code seam, with backlog ids attached to each
|
|
99
|
+
seam plus a one-line rationale. Don't recurse — one pass.
|
|
100
|
+
|
|
101
|
+
If the agent's confidence is low for an idea (no clear code touchpoint), note
|
|
102
|
+
it and fall back to text-only clustering for that idea in Phase B4.
|
|
103
|
+
|
|
104
|
+
### Phase B4: Cluster
|
|
105
|
+
|
|
106
|
+
Using the area-map plus the backlog text, group ideas into clusters. Each
|
|
107
|
+
proposed cluster gets a kind, a parent decision, and a one-line rationale.
|
|
108
|
+
|
|
109
|
+
Sizing heuristics (same as single-idea-mode Phase 2, applied per cluster):
|
|
110
|
+
|
|
111
|
+
| Cluster shape | Proposed kind |
|
|
112
|
+
|---|---|
|
|
113
|
+
| 1 item, no architectural shift | story (standalone) |
|
|
114
|
+
| 2-5 cohesive items in one area, deserves a design pass, no foundation-doc impact | feature; backlog items become child stories or design inputs |
|
|
115
|
+
| Multi-feature scope, OR shifts vision / spec / architecture / audience, OR a clear capability arc that wants `epic-design` decomposition | epic |
|
|
116
|
+
|
|
117
|
+
Bias rules:
|
|
118
|
+
- **Lean smaller** — prefer multiple features over one giant epic. But forming
|
|
119
|
+
an epic as a *natural grouping* is fine even without a foundation-doc shift:
|
|
120
|
+
if a set of backlog items clearly belongs under one capability arc, hand it
|
|
121
|
+
to `/agile-workflow:epic-design` rather than pre-flattening it into features
|
|
122
|
+
here.
|
|
123
|
+
- **Don't force-cluster.** Ideas that don't naturally belong with anything else
|
|
124
|
+
are leftovers; handle them in Phase B6.
|
|
125
|
+
- **`[refactor]` tag application.** Only tag a cluster `[refactor]` if it
|
|
126
|
+
passes the black-box test — no observable behavior change for callers of
|
|
127
|
+
the public surface. Pure structural cleanup (dedupe, split, rename,
|
|
128
|
+
dead-code removal) qualifies. "Major rework that keeps the surface" or
|
|
129
|
+
anything that shifts internal semantics does NOT — let those route through
|
|
130
|
+
`feature-design`. Same rule for `[perf]`: pure performance work on an
|
|
131
|
+
existing capability only.
|
|
132
|
+
|
|
133
|
+
### Phase B5: Strategic decisions (per large cluster)
|
|
134
|
+
|
|
135
|
+
For each cluster sized **large** (epic with foundation-doc impact), run the
|
|
136
|
+
single-idea-mode Phase 1.7 logic — derive 2-5 strategic-level ambiguities for
|
|
137
|
+
that cluster (vision / spec / architecture / audience layer) and queue them
|
|
138
|
+
for the Phase B7 confirmation gate.
|
|
139
|
+
|
|
140
|
+
For small / medium clusters and for "natural grouping" epics with no
|
|
141
|
+
foundation-doc impact, skip — strategic ambiguities fall to `epic-design` or
|
|
142
|
+
`feature-design` later.
|
|
143
|
+
|
|
144
|
+
If more than 3 clusters are sized large, defer strategic decisions to the
|
|
145
|
+
design family entirely — don't try to consolidate them into one round.
|
|
146
|
+
|
|
147
|
+
### Phase B6: Prepare leftovers question
|
|
148
|
+
|
|
149
|
+
Identify backlog items that didn't fit any cluster. Queue a multi-select
|
|
150
|
+
question for the Phase B7 gate, offering per leftover:
|
|
151
|
+
- promote as standalone story
|
|
152
|
+
- promote as standalone feature
|
|
153
|
+
- leave in `.work/backlog/` (default)
|
|
154
|
+
|
|
155
|
+
### Phase B7: Confirm with the user (single round-trip)
|
|
156
|
+
|
|
157
|
+
Make **one** `structured question tool` call covering all of the below (the tool accepts
|
|
158
|
+
1-4 questions per call):
|
|
159
|
+
|
|
160
|
+
1. **Cluster structure** — present each cluster (ids included, proposed kind,
|
|
161
|
+
proposed parent, one-line rationale) and accept adjustments. Common NL
|
|
162
|
+
feedback: "merge clusters 2 and 3", "split that cluster", "make X an epic
|
|
163
|
+
instead", "move Y under Z". The "Other" option handles free-form replies.
|
|
164
|
+
2. **Strategic decisions** — one question per large cluster from Phase B5
|
|
165
|
+
(skip if more than 3 large clusters per the Phase B5 rule).
|
|
166
|
+
3. **Leftovers disposition** — the multi-select question prepared in Phase B6.
|
|
167
|
+
|
|
168
|
+
Apply the adjustments and proceed. **One gate is enough** — do not loop on a
|
|
169
|
+
second confirmation round.
|
|
170
|
+
|
|
171
|
+
### Phase B8: Promote each confirmed cluster
|
|
172
|
+
|
|
173
|
+
For each cluster, run the single-idea-mode Phases 3-6 inline:
|
|
174
|
+
|
|
175
|
+
1. **Declare dependencies** — within-cluster (child stories under a feature)
|
|
176
|
+
and cross-cluster (one feature depends on another's output). Use
|
|
177
|
+
`work-view --blocking` for cycle detection.
|
|
178
|
+
2. **Foundation-doc roll-forward** (large clusters only) — full Phase 4 of
|
|
179
|
+
single-idea mode, scoped to that cluster's impact.
|
|
180
|
+
3. **Write item files** — the parent (epic or feature) plus any child files.
|
|
181
|
+
Use `git mv` to move backlog files into the new structure where they map
|
|
182
|
+
1:1; reference the backlog idea in the parent's brief and `git rm` the
|
|
183
|
+
backlog file where it was absorbed without a direct child.
|
|
184
|
+
4. **Commit per cluster** — `scope: <cluster-id> (<kind>, <size>)` with a
|
|
185
|
+
foundation-doc roll-forward note where applicable.
|
|
186
|
+
|
|
187
|
+
Promote leftovers per the Phase B7 decision (one commit per promoted leftover,
|
|
188
|
+
same message format).
|
|
189
|
+
|
|
190
|
+
### Phase B9: Output
|
|
191
|
+
|
|
192
|
+
In conversation:
|
|
193
|
+
- **Filter interpretation** (NL-filter mode only): one-line description of how
|
|
194
|
+
the filter was applied
|
|
195
|
+
- **Clusters promoted**: for each, `<id> (<kind>, <size>)` with member backlog ids
|
|
196
|
+
- **Leftovers**: list with disposition (promoted as standalone story/feature, or
|
|
197
|
+
left in backlog)
|
|
198
|
+
- **Foundation docs rolled forward**: list of files touched (or "none")
|
|
199
|
+
- **Next**: design family picks up drafting features/epics
|
|
200
|
+
(`/agile-workflow:feature-design`, `epic-design`, `refactor-design`,
|
|
201
|
+
`perf-design`, `prose-author` for `[prose]` features, or
|
|
202
|
+
`agentic-research:research-orchestrator` for `[research]` features when that
|
|
203
|
+
plugin is installed — without it the tag is inert and the item routes through
|
|
204
|
+
`feature-design` — based on kind and tags); implementing stories are ready for
|
|
205
|
+
an autopilot goal or `/agile-workflow:implement-orchestrator` (`[research]`
|
|
206
|
+
items run end-to-end through the research-orchestrator, not the implement
|
|
207
|
+
family; prose features implement inline).
|
|
208
|
+
|
|
209
|
+
## Workflow — single-idea mode
|
|
210
|
+
|
|
211
|
+
Use this path for `scope <id>` and `scope <free-form idea>`. The phases below
|
|
212
|
+
also serve as the per-cluster engine for batch mode Phase B8.
|
|
213
|
+
|
|
214
|
+
### Phase 1: Source the idea
|
|
215
|
+
|
|
216
|
+
The input is one of:
|
|
217
|
+
- A backlog item: `.work/backlog/<id>.md` exists. Read its body.
|
|
218
|
+
- A fresh request: the user is describing the idea directly. Distill it to a clear
|
|
219
|
+
one-paragraph statement.
|
|
220
|
+
|
|
221
|
+
### Phase 1.5: Explore the idea (large-scope only)
|
|
222
|
+
|
|
223
|
+
For small or medium scope, skip this phase — go to Phase 1.7.
|
|
224
|
+
|
|
225
|
+
For large scope (something that may change vision/spec/architecture), have a
|
|
226
|
+
short freeform conversation before sizing. Cover:
|
|
227
|
+
|
|
228
|
+
- **What** — what does this add? What's the user-facing behavior or new
|
|
229
|
+
capability?
|
|
230
|
+
- **Why** — what problem does it solve? What's the motivation?
|
|
231
|
+
- **Where** — where does it fit in the existing architecture? What does it
|
|
232
|
+
touch?
|
|
233
|
+
- **Scale** — focused addition or significant new direction?
|
|
234
|
+
- **Dependencies** — external APIs, libraries, or internal features required?
|
|
235
|
+
- **Constraints** — performance, compatibility, security considerations?
|
|
236
|
+
|
|
237
|
+
Push for specificity. "Handle errors well" becomes "invalid input returns a 400
|
|
238
|
+
with a structured error body." When you can articulate the addition clearly,
|
|
239
|
+
summarize and ask: "Did I get this right?"
|
|
240
|
+
|
|
241
|
+
Then proceed to Phase 1.7.
|
|
242
|
+
|
|
243
|
+
### Phase 1.7: Surface strategic-level design ambiguities
|
|
244
|
+
|
|
245
|
+
Before sizing or writing the item, derive specific, concrete strategic
|
|
246
|
+
questions about *this* idea — directional choices at the vision / spec /
|
|
247
|
+
architecture / audience layer. These are the calls that, if locked in now,
|
|
248
|
+
will set the frame for the whole epic and any foundation-doc roll-forward.
|
|
249
|
+
The questions must come from the actual idea; examples of the *shape* only:
|
|
250
|
+
|
|
251
|
+
- "Is this aimed at our existing users or a new audience segment?"
|
|
252
|
+
- "Should this live as a new bounded context, or extend the existing
|
|
253
|
+
domain model?"
|
|
254
|
+
- "Is real-time sync a v1 requirement, or is eventual-consistency
|
|
255
|
+
acceptable?"
|
|
256
|
+
- "Do we expose this externally (public API surface) or keep it
|
|
257
|
+
internal-only for now?"
|
|
258
|
+
- "Does this displace an existing capability, or sit alongside it?"
|
|
259
|
+
|
|
260
|
+
These sit a layer *above* `epic-design` Phase 4.7 and `feature-design`
|
|
261
|
+
Phase 4.5 — those resolve epic- and feature-internal direction. Phase 1.7
|
|
262
|
+
resolves the framing that determines what the epic even *is*. Skip anything
|
|
263
|
+
the foundation docs or the user's prompt already pin. Skip anything that is
|
|
264
|
+
safely an epic-design or feature-design call (decomposition, boundaries,
|
|
265
|
+
interfaces).
|
|
266
|
+
|
|
267
|
+
Aim for 2-5 questions. Zero is fine if the user's brief and foundation docs
|
|
268
|
+
already pin every strategic choice. For small (story) and medium (feature)
|
|
269
|
+
scope, the bar is higher — only ask if a strategic ambiguity genuinely
|
|
270
|
+
affects framing; otherwise skip directly to Phase 2.
|
|
271
|
+
|
|
272
|
+
Use `structured question tool` to ask. Capture answers in the item body under a
|
|
273
|
+
`## Strategic decisions` section so the downstream design family inherits
|
|
274
|
+
the locked-in direction:
|
|
275
|
+
|
|
276
|
+
```markdown
|
|
277
|
+
## Strategic decisions
|
|
278
|
+
- **<question>**: <choice> — <one-line rationale>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
For large scope, the answers here directly inform the foundation-doc
|
|
282
|
+
roll-forward in Phase 4.
|
|
283
|
+
|
|
284
|
+
### Phase 1.8: UI surface alignment (runs when ux-ui-design is installed)
|
|
285
|
+
|
|
286
|
+
Per the tier rule in `ux-ui-principles` (mock at the highest tier where it
|
|
287
|
+
can land), scope-tier locks the design system and any clear cross-feature
|
|
288
|
+
journey before the item is written.
|
|
289
|
+
|
|
290
|
+
- **Large scope + UI (epic-shaped)** →
|
|
291
|
+
1. If `.mockups/design-system/tokens.css` does NOT exist, invoke
|
|
292
|
+
`/ux-ui-design:palette` during the Phase 4 roll-forward.
|
|
293
|
+
2. If the idea spans a multi-screen journey that's already clear (signup,
|
|
294
|
+
onboarding, checkout, recovery), invoke `/ux-ui-design:flows
|
|
295
|
+
<flow-name>`. Reference the path under `## Strategic decisions` so
|
|
296
|
+
`epic-design` Phase 4.6 inherits it.
|
|
297
|
+
|
|
298
|
+
Screen-level mocks belong to `epic-design` once the decomposition exists.
|
|
299
|
+
|
|
300
|
+
- **Medium scope (feature) + UI surface that's net-new or novel** → tag the
|
|
301
|
+
feature `[ui]` and note the surface in the body. Mocking happens at
|
|
302
|
+
whichever tier picks it up next — `epic-design` if there's an epic parent,
|
|
303
|
+
`feature-design` otherwise.
|
|
304
|
+
|
|
305
|
+
- **Small scope or no UI** → skip.
|
|
306
|
+
|
|
307
|
+
Skip this phase if `ux-ui-design` is not installed.
|
|
308
|
+
|
|
309
|
+
Then proceed to Phase 2.
|
|
310
|
+
|
|
311
|
+
### Phase 2: Size the scope
|
|
312
|
+
|
|
313
|
+
Three sizes determine what gets created and whether foundation docs roll forward.
|
|
314
|
+
|
|
315
|
+
| Size | Signals | Outputs |
|
|
316
|
+
|---|---|---|
|
|
317
|
+
| **Small (story)** | Single-session work, no architectural change, fits in one feature's scope | One story file at `.work/active/stories/<id>.md`, `stage: implementing` (often skips drafting) |
|
|
318
|
+
| **Medium (feature)** | Spans multiple files, deserves a design pass, may have child stories, no foundation-doc impact | One feature file at `.work/active/features/<id>.md`, `stage: drafting` |
|
|
319
|
+
| **Large (epic + foundation roll)** | Changes the project's vision, spec, architecture, or audience; spans multiple features; introduces a new capability area | Epic at `.work/active/epics/<id>.md` plus updates to `docs/VISION.md`, `docs/SPEC.md`, and/or `docs/ARCHITECTURE.md` per the rolling-foundation principle |
|
|
320
|
+
|
|
321
|
+
**Size check** — ask yourself:
|
|
322
|
+
- Does this contradict or extend a current foundation-doc assertion? → at least medium, possibly large
|
|
323
|
+
- Will it introduce a new contract, new boundary, or new architectural component? → large
|
|
324
|
+
- Is it one cohesive change in one area? → small or medium
|
|
325
|
+
|
|
326
|
+
If unclear, lean smaller — easier to upgrade a story to a feature than to unwind a
|
|
327
|
+
premature epic.
|
|
328
|
+
|
|
329
|
+
### Phase 3: Declare dependencies
|
|
330
|
+
|
|
331
|
+
Ask the user (or surface from context): what items, if any, must be at `stage: done`
|
|
332
|
+
before this can start?
|
|
333
|
+
|
|
334
|
+
- For a backlog item the user mentions as a prerequisite: add to `depends_on`
|
|
335
|
+
- For a related in-flight feature in the same area: consider adding to `depends_on`
|
|
336
|
+
if the new work's design assumes the in-flight feature's output
|
|
337
|
+
|
|
338
|
+
**Cycle check**: if `<id>` is the new item and `<dep>` is a candidate dependency,
|
|
339
|
+
verify that `<dep>` does not transitively depend on `<id>`. Run:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
.work/bin/work-view --blocking <id> --paths
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
If `<dep>` is in that output, adding `<dep>` to `<id>`'s `depends_on` would create a
|
|
346
|
+
cycle. Report it and ask the user to resolve.
|
|
347
|
+
|
|
348
|
+
### Phase 4: Foundation-doc roll-forward (large scope only)
|
|
349
|
+
|
|
350
|
+
When the scope is large, first do an **impact assessment** along four axes:
|
|
351
|
+
|
|
352
|
+
1. **Architecture impact** — does the current architecture support this, or
|
|
353
|
+
does it need to evolve? New layers, boundaries, integration points?
|
|
354
|
+
2. **Spec impact** — new technical constraints, interfaces, non-functional
|
|
355
|
+
requirements?
|
|
356
|
+
3. **Vision impact** — does the project's purpose or audience change, or just
|
|
357
|
+
capabilities?
|
|
358
|
+
4. **Principles impact** — does this new direction force a new substrate or
|
|
359
|
+
code-design principle, or fit existing ones?
|
|
360
|
+
|
|
361
|
+
Run `/agile-workflow:research` first if the expansion uses unfamiliar
|
|
362
|
+
technology and you don't yet have research docs for it.
|
|
363
|
+
|
|
364
|
+
Then identify which foundation docs need updating:
|
|
365
|
+
|
|
366
|
+
- **VISION.md** — if scope changes audience, success criteria, or the project's purpose
|
|
367
|
+
- **SPEC.md** — if scope introduces a new technical constraint, interface, or
|
|
368
|
+
non-functional requirement
|
|
369
|
+
- **ARCHITECTURE.md** — if scope adds a component, changes a boundary, or alters data flow
|
|
370
|
+
- **PRINCIPLES.md** — only when a genuinely new principle emerges (rare)
|
|
371
|
+
|
|
372
|
+
For each affected doc:
|
|
373
|
+
1. Read the current version in full
|
|
374
|
+
2. Edit the relevant sections to reflect the **current or intended future
|
|
375
|
+
state** — extend, replace, restructure as needed
|
|
376
|
+
3. **Do NOT add "previously" notes, "in v1.x", or migration prose.** Git carries
|
|
377
|
+
history; the doc carries truth (rolling-foundation principle)
|
|
378
|
+
|
|
379
|
+
**Design-system lock-in (UI-bearing large scope only).** If Phase 1.8 flagged
|
|
380
|
+
palette or a flow, invoke `/ux-ui-design:palette` and/or
|
|
381
|
+
`/ux-ui-design:flows <flow-name>` here. The locked mocks ship in the same
|
|
382
|
+
roll-forward commit and are inherited by `epic-design` Phase 4.6.
|
|
383
|
+
|
|
384
|
+
### Phase 5: Write the item file
|
|
385
|
+
|
|
386
|
+
Per the SPEC.md frontmatter contract. Required fields for an item in active.
|
|
387
|
+
|
|
388
|
+
**Before applying `[refactor]` as a tag**, apply the black-box test: would any
|
|
389
|
+
observable behavior of the public surface change for a caller? If yes, do NOT
|
|
390
|
+
tag `[refactor]` — let the item route to `feature-design` instead. `[refactor]`
|
|
391
|
+
is reserved for pure structural change (extract helpers, split god files,
|
|
392
|
+
rename for clarity, remove dead code, inline a one-call abstraction). "Major
|
|
393
|
+
rework that keeps the API shape" still fails the test if internal semantics
|
|
394
|
+
shift. The same rule applies to `[perf]` — apply only if the work is purely
|
|
395
|
+
about throughput / latency / memory of an existing capability, not adding new
|
|
396
|
+
capability that happens to be fast.
|
|
397
|
+
|
|
398
|
+
```yaml
|
|
399
|
+
---
|
|
400
|
+
id: <slug>
|
|
401
|
+
kind: epic|feature|story
|
|
402
|
+
stage: drafting # or implementing for stories
|
|
403
|
+
tags: [<tag>, ...]
|
|
404
|
+
parent: <slug>|null
|
|
405
|
+
depends_on: [<slug>, ...]
|
|
406
|
+
release_binding: null
|
|
407
|
+
gate_origin: null
|
|
408
|
+
created: YYYY-MM-DD
|
|
409
|
+
updated: YYYY-MM-DD
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
# <name>
|
|
413
|
+
|
|
414
|
+
## Brief
|
|
415
|
+
<one to three paragraphs describing what this is and why it exists>
|
|
416
|
+
|
|
417
|
+
<!-- Subsequent sections (Design, Implementation Notes, etc.) accumulate as
|
|
418
|
+
work progresses. -->
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
If sourcing from `.work/backlog/<id>.md`, use `git mv` to move it:
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
git mv .work/backlog/<old-id>.md .work/active/<kind>s/<new-id>.md
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Then edit the moved file to add full frontmatter and brief.
|
|
428
|
+
|
|
429
|
+
If a fresh request, just create the file directly with `Write`.
|
|
430
|
+
|
|
431
|
+
### Phase 6: Commit
|
|
432
|
+
|
|
433
|
+
```bash
|
|
434
|
+
git add .work/active/<kind>s/<id>.md docs/VISION.md docs/SPEC.md docs/ARCHITECTURE.md # whichever exist + were changed
|
|
435
|
+
git commit -m "scope: <id> (<kind>, <size>)"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
If foundation docs rolled forward, the commit message should note it:
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
scope: <id> (epic) + foundation roll-forward
|
|
442
|
+
|
|
443
|
+
Rolled forward: SPEC.md (added multi-tenancy section), ARCHITECTURE.md (added tenant boundary).
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
## Output (single-idea mode)
|
|
447
|
+
|
|
448
|
+
(Batch mode has its own output in Phase B9.)
|
|
449
|
+
|
|
450
|
+
In conversation:
|
|
451
|
+
- **Scoped**: `<id>` as `<kind>` at `stage: <stage>`
|
|
452
|
+
- **Parent**: `<parent-id>` (or "none — top-level")
|
|
453
|
+
- **Depends on**: `[<id>, ...]` (or "no dependencies")
|
|
454
|
+
- **Foundation docs rolled forward**: list of files touched (or "none")
|
|
455
|
+
- **Next**: for features at `drafting`, the design family will pick this up
|
|
456
|
+
(`/agile-workflow:feature-design`, `refactor-design`, `perf-design`,
|
|
457
|
+
`prose-author` for `[prose]` features, or
|
|
458
|
+
`agentic-research:research-orchestrator` for `[research]` features (when that
|
|
459
|
+
plugin is installed; otherwise the tag is inert), based on
|
|
460
|
+
tags); for epics at `drafting`, `/agile-workflow:epic-design` decomposes
|
|
461
|
+
into child features.
|
|
462
|
+
|
|
463
|
+
## Guardrails
|
|
464
|
+
|
|
465
|
+
- Foundation docs roll forward IN PLACE — never add "previously" or "originally"
|
|
466
|
+
prose. Git is the audit trail.
|
|
467
|
+
- Cycle detection is mandatory for `depends_on`. Use `work-view --blocking` before
|
|
468
|
+
writing.
|
|
469
|
+
- Do NOT pre-populate stages beyond what the size mapping specifies. Don't set a
|
|
470
|
+
feature to `implementing` at scope time — `design` does that when it advances.
|
|
471
|
+
- Do NOT pre-bind to a release. `release_binding` stays `null` until
|
|
472
|
+
`/agile-workflow:release-deploy` runs.
|
|
473
|
+
- If sizing is genuinely unclear after Phase 2, ask the user via structured question tool
|
|
474
|
+
rather than guessing.
|
|
475
|
+
- **Batch mode: one confirmation gate, not many.** Phase B7 is a single
|
|
476
|
+
`structured question tool` call (up to 4 questions). Apply NL adjustments from the
|
|
477
|
+
user's reply and proceed — do not loop on a second confirmation round.
|
|
478
|
+
- **Batch mode: read-first in Phase B3.** Use direct mapping when the backlog
|
|
479
|
+
ideas touch obvious areas. If an agent is needed, use one medium-breadth
|
|
480
|
+
Explore pass over the backlog list, not three; don't fan out per cluster.
|
|
481
|
+
- **Batch mode: leftovers default to staying in backlog.** Forcing leftovers
|
|
482
|
+
into a "miscellaneous" feature dilutes the clustering signal.
|
|
483
|
+
- **Batch mode: lean smaller, but accept natural-grouping epics.** Prefer
|
|
484
|
+
multiple features over one giant epic; form an epic when there's a real
|
|
485
|
+
capability arc that wants `epic-design` decomposition, not just to bundle
|
|
486
|
+
loosely related items.
|