semantu-agents 1.2.2 → 1.3.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 CHANGED
@@ -81,7 +81,7 @@ Print a markdown or JSON index of docs that use YAML frontmatter.
81
81
 
82
82
  ```bash
83
83
  npx semantu-agents docs
84
- npx semantu-agents docs ideas
84
+ npx semantu-agents docs backlog
85
85
  npx semantu-agents docs architecture
86
86
  npx semantu-agents docs --all
87
87
  npx semantu-agents docs --format markdown
@@ -92,7 +92,7 @@ Supported scopes:
92
92
 
93
93
  - `root` (default) -> `docs/*.md`
94
94
  - `architecture` -> `docs/architecture/*.md`
95
- - `ideas` -> `docs/ideas/*.md`
95
+ - `backlog` -> `docs/backlog/*.md`
96
96
  - `plans` -> `docs/plans/*.md`
97
97
  - `reports` -> `docs/reports/*.md`
98
98
 
@@ -126,4 +126,5 @@ Both are merged into the same flat `.claude/skills/` directory at sync time.
126
126
  | `implementation` | Execute tasks phase-by-phase with commits and validation |
127
127
  | `review` | Review work against intent, readiness, and gaps; triage iterate vs defer |
128
128
  | `wrapup` | Cleanup, changesets, and PR preparation |
129
+ | `todo` | Capture user-deferred follow-up work in `docs/backlog` |
129
130
  | `automatic` | Run the full workflow without manual mode transitions |
package/cli.mjs CHANGED
@@ -15,7 +15,7 @@ const skillsRepo = 'git@github.com:Semantu/agents.git';
15
15
  const DOC_FOLDERS = {
16
16
  root: 'docs',
17
17
  architecture: path.join('docs', 'architecture'),
18
- ideas: path.join('docs', 'ideas'),
18
+ backlog: path.join('docs', 'backlog'),
19
19
  plans: path.join('docs', 'plans'),
20
20
  reports: path.join('docs', 'reports'),
21
21
  };
@@ -91,6 +91,7 @@ function installPostMergeHook(repoDir) {
91
91
  const hooksDir = path.join(repoDir, '.git', 'hooks');
92
92
  const hookPath = path.join(hooksDir, 'post-merge');
93
93
  const hook = `#!/bin/sh
94
+ [ "$SEMANTU_AGENTS_SKIP_HOOK_SYNC" = "1" ] && exit 0
94
95
  cd "$(git rev-parse --show-toplevel)" && node cli.mjs sync
95
96
  `;
96
97
 
@@ -133,7 +134,10 @@ function updateDevCheckout() {
133
134
 
134
135
  run('git fetch origin main', {cwd: srcDir});
135
136
  run('git switch main', {cwd: srcDir});
136
- run('git pull --ff-only origin main', {cwd: srcDir});
137
+ run('git pull --ff-only origin main', {
138
+ cwd: srcDir,
139
+ env: {...process.env, SEMANTU_AGENTS_SKIP_HOOK_SYNC: '1'},
140
+ });
137
141
  syncFromSource(srcDir, '~/.agents-src');
138
142
 
139
143
  if (currentBranch && currentBranch !== 'main') {
@@ -208,7 +212,7 @@ function setupProject() {
208
212
  console.log('Updated .gitignore');
209
213
  }
210
214
 
211
- for (const dir of ['docs/ideas', 'docs/plans', 'docs/reports']) {
215
+ for (const dir of ['docs/backlog', 'docs/plans', 'docs/reports']) {
212
216
  const fullPath = path.join(projectRoot, dir);
213
217
  if (!existsSync(fullPath)) {
214
218
  mkdirSync(fullPath, {recursive: true});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantu-agents",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Reusable Claude Code skills and hooks for Semantu projects",
5
5
  "type": "module",
6
6
  "bin": "cli.mjs",
@@ -27,11 +27,11 @@ Then pause.
27
27
 
28
28
  1. Execute each mode in sequence using the same requirements and artifact rules as the corresponding individual mode skills.
29
29
  2. Keep momentum: do not stop between internal mode transitions unless blocked by missing mandatory input, hard failures, or safety constraints.
30
- 3. **Ideation in automatic mode** follows the exact same flow as the interactive ideation skill (discover decision points, walk through each one, record decisions), but the agent emulates user responses instead of waiting for input. Apply this priority framework when choosing between approaches:
30
+ 3. **Ideation in automatic mode** follows the exact same flow as the interactive ideation skill (create the active plan doc, discover open items, explore planning blockers, record accepted decisions), but the agent emulates user responses instead of waiting for input. Apply this priority framework when choosing between approaches:
31
31
  1. **Long-term maintainability** — simplicity, elegance, least complexity
32
32
  2. **Scalability** — handles growth without redesign
33
33
  3. **Performance** — fastest/most efficient option
34
- For each decision, show the reasoning and chosen option in chat, then record it in the ideation doc just as in interactive mode.
34
+ For each decision, show the reasoning and chosen option in chat, then record it in the active plan doc just as in interactive mode.
35
35
  4. **Progress indicators**: When walking through decisions or gaps, always show position — e.g. "Decision 2 of 5" — so the user can gauge progress when reviewing.
36
36
  5. After ideation is complete, continue immediately into plan mode, then tasks mode, then implementation mode, then review mode.
37
37
  6. Pause after review and ask the user to choose exactly one:
@@ -45,16 +45,19 @@ Never transition to the next mode until the current mode's required on-disk arti
45
45
  Before leaving each mode, enforce all checks below:
46
46
 
47
47
  1. Ideation -> Plan gate:
48
- - A concrete ideation doc exists/was updated in `docs/ideas/<nnn>-<topic>.md`.
49
- - The doc contains alternatives, tradeoffs, and a clearly selected route.
48
+ - A concrete active plan doc exists/was updated in `docs/plans/<nnn>-<topic>.md`.
49
+ - The plan doc has `status: Ideation`.
50
+ - The doc contains planning blockers, accepted decisions, and a clearly selected route.
50
51
 
51
52
  2. Plan -> Tasks gate:
52
53
  - A plan doc exists/was updated in `docs/plans/<nnn>-<topic>.md`.
54
+ - The plan doc has `status: Plan`.
53
55
  - The plan includes architecture decisions, expected file changes, pitfalls, and explicit contracts.
54
56
  - The plan is focused on the chosen route (not a list of all routes).
55
57
 
56
58
  3. Tasks -> Implementation gate:
57
59
  - The same plan doc includes phased tasks.
60
+ - The plan doc has `status: Tasks`.
58
61
  - Every phase has explicit validation criteria.
59
62
  - Dependency graph / parallelization notes are present.
60
63
 
@@ -62,6 +65,7 @@ Before leaving each mode, enforce all checks below:
62
65
  - Implementation work is executed phase by phase against the tasked plan.
63
66
  - Validation for each completed phase is run and recorded.
64
67
  - The plan doc is updated after each completed phase before moving on.
68
+ - The plan doc has `status: Implementation`.
65
69
 
66
70
  If any gate check fails, stop and fix the missing artifact first. Do not implement code before the tasks gate is satisfied.
67
71
 
@@ -69,8 +73,8 @@ If any gate check fails, stop and fix the missing artifact first. Do not impleme
69
73
 
70
74
  Use the same artifact contract as the normal workflow:
71
75
 
72
- - `ideation`: create/update `docs/ideas/<nnn>-<topic>.md`
73
- - `plan`: create/update `docs/plans/<nnn>-<topic>.md`
76
+ - `ideation`: create/update the active `docs/plans/<nnn>-<topic>.md`
77
+ - `plan`: update the same active plan doc
74
78
  - `tasks`: update the active plan doc with phases/tasks/validation
75
79
  - `implementation`: execute phases and update the active plan doc after completed phases
76
80
  - `review`: emit findings in chat, then update plan doc with review section and iteration content
@@ -82,7 +86,7 @@ Follow numbering and conversion rules from workflow mode.
82
86
  If the user chooses `iterate` after review:
83
87
 
84
88
  1. Ask the user which review-identified gaps to address now and which to defer.
85
- 2. **All iteration work stays in the active plan document.** Do not create new ideation docs for iteration gaps.
89
+ 2. **All iteration work stays in the active plan document.** Do not create additional plan docs for iteration gaps.
86
90
  3. Append the following sections to the plan doc:
87
91
 
88
92
  ```markdown
@@ -108,7 +112,7 @@ If the user chooses `iterate` after review:
108
112
  ...
109
113
  ```
110
114
 
111
- 4. Walk through ideation for **all selected gaps first** (one by one, emulating user responses with the same priority framework), then condense into a plan, then break into phases/tasks, then implement all phases.
115
+ 4. Walk through ideation for **all selected gaps first** (in chat batches where possible, emulating user responses with the same priority framework), then condense into a plan, then break into phases/tasks, then implement all phases.
112
116
  5. After implementation, run review again. Pause and ask:
113
117
  - `wrapup`
114
118
  - `iterate`
@@ -11,24 +11,25 @@ Provide a reusable deep-dive format for `explore <topic>` in any mode, including
11
11
 
12
12
  ## Entry gate
13
13
 
14
- Run this skill when the user explicitly says `explore <topic>` (or clearly asks to explore a topic in this format).
14
+ Run this skill when the user explicitly says `explore <topic>`, clearly asks to explore a topic in this format, or another active skill delegates decision exploration.
15
15
 
16
16
  ## Steps
17
17
 
18
18
  1. Confirm scope only if the topic is ambiguous; otherwise proceed directly.
19
19
  2. Decompose the topic into decision candidates and unknowns.
20
- 3. For each decision, classify as `must decide now` or `can defer`.
21
- 4. For each `must decide now` decision, give concise context and assumptions, then provide exactly 3 viable approaches (A-C).
20
+ 3. Prioritize planning blockers first when called from ideation or review iteration.
21
+ 4. For each decision, give concise context and assumptions, then provide exactly 3 viable approaches (A-C).
22
22
  5. For each approach, list pros, cons, and risks.
23
23
  6. Recommend one approach (A/B/C) with a one-line rationale.
24
24
  7. If there are multiple decisions, present them in batches of 3 by default (use fewer only when fewer remain or when the user asks for a different batch size). Start with `Decision x-y of N`, and end with `Recap: 1A 2C 3B`; ask for agreement or edits.
25
25
  8. Iterate until consent; no feedback on a decision counts as acceptance after an explicit agreement prompt.
26
- 9. Recurse only for nested decisions classified as `must decide now`; defer the rest. Default max depth is 2 unless the user asks for deeper drilldown.
26
+ 9. Recurse only for nested decisions that block planning. Default max depth is 2 unless the user asks for deeper drilldown.
27
27
  10. After consent, ask whether to continue the current mode or switch modes.
28
28
 
29
29
  ## Guardrails
30
30
 
31
31
  - Do not force a mode switch by default; this skill can run inside any active mode.
32
32
  - Do not create ideation/plan artifacts unless the active mode requires them or the user asks.
33
+ - When called from ideation, explore in chat first and let ideation persist only accepted decisions.
33
34
  - Keep outputs structured and concise; avoid repeating unchanged context.
34
- - Do not recurse indefinitely; respect the depth cap and defer non-blocking items.
35
+ - Do not recurse indefinitely; respect the depth cap and keep non-blocking items as open context.
@@ -16,26 +16,47 @@ Run this mode when the user explicitly chooses ideation, or when workflow routes
16
16
  ## Steps
17
17
 
18
18
  1. Read relevant code, tests, and docs first.
19
- 2. Create/update `docs/ideas/<nnn>-<topic>.md`.
20
- - For new ideation docs, `<nnn>` MUST be the next available 3-digit prefix in `docs/ideas`.
21
- - Every new ideation doc MUST start with YAML frontmatter containing at least a summary key.
22
- 3. Discover impacted repo/package test surfaces:
19
+ 2. Create/update the active plan doc in `docs/plans/<nnn>-<topic>.md` with `status: Ideation`.
20
+ - For new plan docs, `<nnn>` MUST be the next available 3-digit prefix in `docs/plans`.
21
+ - Every new plan doc MUST start with YAML frontmatter containing at least `summary` and `status: Ideation`.
22
+ - If starting from `docs/backlog/<nnn>-<topic>.md`, copy relevant context into the plan and add a source backlog reference in frontmatter or the opening section.
23
+ 3. Discover relevant architecture context:
24
+ - Run `npx semantu-agents docs architecture` to list architecture docs and summaries.
25
+ - Read the docs relevant to the current scope before proposing approaches.
26
+ - Record applicable constraints and architecture unknowns/gaps in the active plan doc.
27
+ 4. Discover impacted repo/package test surfaces:
23
28
  - Locate changed package roots (root repo and/or `packages/<name>` roots as applicable).
24
29
  - For each impacted package, identify quick test commands (target total runtime 1-2 minutes), full/slow test commands, and where each was found (`package.json` scripts first, README fallback).
25
30
  - Record unknowns/gaps when no reliable quick regression command exists.
26
- 4. Build a decision map: list major decisions, unknowns, and research gaps.
27
- 5. Classify each item as `must decide now` (blocks planning) or `can defer`.
28
- 6. Use the `explore` skill for each `must decide now` decision/topic.
29
- 7. Record accepted choices, deferred unknowns, and discovered test surfaces in the ideation doc.
30
- 8. Continue until blocking decisions reach consent; then ask whether to switch to `plan` mode.
31
+ 5. Build an open-item map: list decisions, gaps, assumptions, architecture questions, research needs, unclear requirements, impact questions, and implementation risks.
32
+ 6. Mark which open items block planning.
33
+ 7. Immediately use the `explore` skill on the highest-priority planning blockers in batches of 3. Do not ask where to start unless priority is genuinely ambiguous.
34
+ 8. Use chat as the primary place for A/B/C decision exploration. Keep the active plan doc lightweight until choices are accepted.
35
+ 9. After each accepted batch, record the chosen option, rationale, relevant context, and brief rejected-alternative summary in the active plan doc.
36
+ 10. Continue until planning blockers reach consent; then ask whether to switch to `plan` mode.
37
+
38
+ ## Open-item examples
39
+
40
+ Use these examples as discovery prompts, not a checklist. Surface only open items that are relevant to the current scope and important enough to affect the plan:
41
+ - Unknown implementation details or code paths that need research.
42
+ - Effects on other packages, APIs, data flows, runtime behavior, or developer workflows.
43
+ - Architecture constraints, violations, extensions, or documentation updates.
44
+ - Public API, naming, ownership, storage, auth, deployment, or package-boundary decisions.
45
+ - Migration, backwards compatibility, release, or rollout questions.
46
+ - Testing gaps, missing quick regression checks, or slow-suite risks.
47
+ - Performance, security, reliability, error handling, or observability concerns.
48
+ - UX/product scope ambiguities when they affect technical design.
31
49
 
32
50
  ## Guardrails
33
51
 
34
52
  - Do not write implementation code in this mode.
35
53
  - Do not convert ideation into a plan unless the user explicitly requests it.
54
+ - Do not write full A/B/C analysis into the active plan doc before user consent; explore in chat first.
55
+ - Do not decide that work is out of scope yourself. If a follow-up seems outside the current scope, propose deferring it; only create a backlog item with the `todo` skill after the user explicitly agrees.
36
56
 
37
57
  ## Exit criteria
38
58
 
39
- - Blocking decisions and deferred unknowns are documented.
59
+ - Planning blockers, architecture context, and accepted decisions are documented.
40
60
  - User feedback has narrowed choices.
61
+ - The active plan doc has `status: Ideation` and is committed unless the repo ignores `docs/`.
41
62
  - User has explicitly confirmed whether to switch to plan mode or stay in ideation mode.
@@ -12,13 +12,14 @@ Run only after explicit user confirmation to enter implementation mode, with an
12
12
  ## Steps
13
13
 
14
14
  1. Confirm the approved plan exists on disk at `docs/plans/<nnn>-<topic>.md`. Tool-native plan mode alone is not sufficient.
15
- 2. If this plan stems from an ideation doc, remove the originating ideation doc in `docs/ideas` when implementation begins.
15
+ 2. Set or update the active plan frontmatter status to `Implementation`.
16
16
  3. Implement one planned phase at a time.
17
- 4. Run the phase validation criteria and record results, including the quick regression gate for impacted packages (target total runtime 1-2 minutes).
18
- 5. After a phase is completed, update `docs/plans/<nnn>-<topic>.md` to reflect completed work and mark phase status. This update is mandatory before moving to the next phase.
19
- 6. Create one commit per phase, including code changes and the phase-completion plan update in the same commit.
20
- 7. Continue to next phase without pausing only if there are no deviations and no major problems.
21
- 8. If any deviation/blocker/major risk appears, pause and report.
17
+ 4. Before completing a phase, compare changed behavior/API/contracts against the plan's Architecture compliance section.
18
+ 5. Run the phase validation criteria and record results, including the quick regression gate for impacted packages (target total runtime 1-2 minutes).
19
+ 6. After a phase is completed, update `docs/plans/<nnn>-<topic>.md` to reflect completed work and mark phase status. This update is mandatory before moving to the next phase.
20
+ 7. Create one commit per phase, including code changes and the phase-completion plan update in the same commit.
21
+ 8. Continue to next phase without pausing only if there are no deviations and no major problems.
22
+ 9. If any deviation/blocker/major risk appears, pause and report.
22
23
 
23
24
  Full/slow test suites may be deferred until review by default. Run deferred suites earlier only if the user requests it.
24
25
 
@@ -46,10 +47,11 @@ When the plan marks phases as parallelizable, use the Task tool (or any availabl
46
47
 
47
48
  ## Guardrails
48
49
 
49
- - If the originating ideation doc is ambiguous, pause and ask the user which ideation file to remove.
50
50
  - Do not skip plan updates between completed phases.
51
51
  - Do not switch to review/wrapup implicitly; ask the user to explicitly confirm the next mode.
52
52
  - Do not mark a phase complete if its quick regression gate fails.
53
+ - Do not silently diverge from architecture docs or the plan's Architecture compliance section; pause and report deviations.
54
+ - Do not decide that work is out of scope yourself. If a follow-up seems outside the current scope, propose deferring it; only create a backlog item with the `todo` skill after the user explicitly agrees.
53
55
 
54
56
  ## Exit criteria
55
57
 
@@ -11,11 +11,12 @@ Run only when the user explicitly confirms plan mode (for example: converting id
11
11
 
12
12
  ## Steps
13
13
 
14
- 1. Create/update `docs/plans/<nnn>-<topic>.md`. This on-disk plan file is mandatory.
15
- - When creating a new plan doc (including ideation -> plan conversion), `<nnn>` MUST be the next available 3-digit prefix in `docs/plans`.
16
- - Every new plan doc MUST start with YAML frontmatter containing at least a summary key.
14
+ 1. Update the active plan doc in `docs/plans/<nnn>-<topic>.md` and set frontmatter `status: Plan`. This on-disk plan file is mandatory.
15
+ - Create a new plan doc only when plan mode starts without an existing active plan.
16
+ - When creating a new plan doc, `<nnn>` MUST be the next available 3-digit prefix in `docs/plans`.
17
+ - Every new plan doc MUST start with YAML frontmatter containing at least `summary` and `status: Plan`.
17
18
  2. Focus on chosen route(s), not all explored options.
18
- 3. **Carry forward all decided features and details from the ideation doc.** Every feature, API surface, design detail, and example that was explored and not explicitly rejected must appear in the plan. No idea can be silently dropped. If unsure whether something was tentatively discussed or firmly decided, ask the user for clarification rather than omitting it.
19
+ 3. **Carry forward all accepted ideation decisions already captured in the active plan doc.** Every feature, API surface, design detail, and example that was accepted and not explicitly rejected must appear in the plan. No accepted idea can be silently dropped. If unsure whether something was tentatively discussed or firmly decided, ask the user for clarification rather than omitting it.
19
20
  4. Include:
20
21
  - Main architecture decisions
21
22
  - Files expected to change
@@ -23,6 +24,11 @@ Run only when the user explicitly confirms plan mode (for example: converting id
23
24
  - Potential pitfalls
24
25
  - Remaining unclear areas/decisions
25
26
  - **Inter-component contracts**: When the architecture has separable parts (layers, modules, packages), make the contracts between them explicit — type definitions, function signatures, shared data structures. These contracts enable parallel implementation in tasks mode.
27
+ - **Architecture compliance**:
28
+ - relevant `docs/architecture` files discovered with `npx semantu-agents docs architecture`
29
+ - applicable constraints from those docs
30
+ - how the chosen design follows them
31
+ - any approved architecture change, extension, or unresolved gap
26
32
  - **Test strategy**:
27
33
  - impacted repo/package list
28
34
  - quick regression gate commands (target total runtime 1-2 minutes) to run after each phase
@@ -37,10 +43,14 @@ Run only when the user explicitly confirms plan mode (for example: converting id
37
43
  - Do not add task breakdown in this mode.
38
44
  - Do not start implementation.
39
45
  - Do not rely on tool-native planning state alone; all plan content MUST be persisted to `docs/plans/<nnn>-<topic>.md`.
40
- - Do not remove the ideation doc in this mode.
46
+ - Do not create a second plan doc for the same task/thread.
47
+ - Do not approve a plan without naming the relevant architecture docs, or explicitly stating that none were found.
48
+ - Do not decide that work is out of scope yourself. If a follow-up seems outside the current scope, propose deferring it; only create a backlog item with the `todo` skill after the user explicitly agrees.
41
49
 
42
50
  ## Exit criteria
43
51
 
44
52
  - Plan clearly reflects chosen decisions.
53
+ - Relevant architecture docs are named and the plan explains compliance or approved deviations.
45
54
  - Risks and open questions are explicit.
55
+ - The active plan doc has `status: Plan` and is committed unless the repo ignores `docs/`.
46
56
  - User has explicitly approved the plan and explicitly confirmed whether to switch to tasks mode or remain in plan mode.
@@ -11,12 +11,18 @@ Run only when the user explicitly confirms review mode.
11
11
 
12
12
  ## Review focus
13
13
 
14
- 1. Compare current implementation against the original intent and agreed plan.
15
- 2. Assess whether the result is ready for others to use.
16
- 3. Identify what is still missing to make this work more complete.
17
- 4. Identify gaps or risks in the current implementation.
18
- 5. Identify likely future work required for fuller completeness.
19
- 6. Re-run deferred full/slow test suites for all impacted repos/packages from the plan's test strategy, and report pass/fail with any skipped checks and reasons.
14
+ 1. Set or update the active plan frontmatter status to `Review`.
15
+ 2. Compare current implementation against the original intent and agreed plan.
16
+ 3. Assess whether the result is ready for others to use.
17
+ 4. Identify what is still missing to make this work more complete.
18
+ 5. Identify gaps or risks in the current implementation.
19
+ 6. Identify likely future work required for fuller completeness.
20
+ 7. Re-run deferred full/slow test suites for all impacted repos/packages from the plan's test strategy, and report pass/fail with any skipped checks and reasons.
21
+ 8. Audit architecture compliance:
22
+ - Run `npx semantu-agents docs architecture`.
23
+ - Re-read the architecture docs cited by the plan.
24
+ - Compare changed code, behavior, APIs, and contracts against those docs.
25
+ - Report architecture violations, missing architecture updates, or explicitly state that no architecture issues were found.
20
26
 
21
27
  ## Parallel review via subagents
22
28
 
@@ -42,13 +48,13 @@ For gaps the user wants to **address now** (iterate):
42
48
  - All iteration work stays in the active plan document (see Iteration structure below).
43
49
 
44
50
  For gaps the user wants to **defer**:
45
- - Create ideation docs in `docs/ideas/` to capture what's known so far:
51
+ - Create backlog docs in `docs/backlog/` using the `todo` skill to capture what's known so far:
46
52
  - The problem/need (e.g. "currently we can only do X, but we want Y")
47
- - Any approaches, ideas, or open questions that surfaced during review
53
+ - Existing context and open questions that surfaced during review
48
54
  - Do NOT expand beyond what was discovered — just write up the current state
49
- - Group related deferred items into one ideation doc
50
- - Create separate ideation docs only for very different, large deferred tasks
51
- - Assign the next available 3-digit prefix in `docs/ideas` for each new doc
55
+ - Group related deferred items into one backlog doc
56
+ - Create separate backlog docs only for very different, large deferred tasks
57
+ - Assign the next available 3-digit prefix in `docs/backlog` for each new doc
52
58
 
53
59
  ## Iteration structure
54
60
 
@@ -78,10 +84,10 @@ When the user chooses to iterate on gaps, append to the **active plan document**
78
84
  ```
79
85
 
80
86
  The ideation within this section follows the same rules as the ideation skill:
81
- - Walk through each gap one by one with the user
82
- - For each gap: present context, 2–3 approaches, pros/cons, recommended path
83
- - Wait for user input before moving to the next gap
84
- - Record decisions as they're made
87
+ - Build an open-item map for selected gaps.
88
+ - Immediately use `explore` on the highest-priority planning blockers in chat, in batches of 3 where possible.
89
+ - Record accepted decisions only after consent.
90
+ - Keep the active plan document lightweight until decisions are accepted.
85
91
 
86
92
  **Ideate all selected gaps first**, then condense into a plan section, then break into phases/tasks. Do not run the full cycle per individual gap.
87
93
 
@@ -104,13 +110,17 @@ The ideation within this section follows the same rules as the ideation skill:
104
110
  - For newly uncovered work, always go through ideation first — never skip straight to tasks or implementation.
105
111
  - If the user's response involves clarifying approach or scope, treat this as still in the clarification loop — ask follow-ups for any remaining ambiguity.
106
112
  - Do not claim review completion without test evidence for impacted packages (or explicit user-approved skips).
113
+ - Do not claim review completion without architecture compliance findings.
114
+ - Do not decide that work is out of scope yourself. Only create backlog items after the user explicitly agrees to defer them.
107
115
 
108
116
  ## Exit criteria
109
117
 
110
118
  - Gaps are triaged with explicit user decisions (now vs defer).
111
119
  - If iterating: ideation for all selected gaps is recorded in the plan doc, and user has confirmed next step.
112
- - If deferring: ideation docs were created for deferred gaps.
120
+ - If deferring: backlog docs were created for user-deferred gaps.
113
121
  - Deferred full/slow test suites for impacted packages were executed and reported, or explicitly skipped with user approval.
122
+ - Architecture compliance was checked against the plan's cited architecture docs and reported.
123
+ - The active plan doc has `status: Review` and is committed unless the repo ignores `docs/`.
114
124
  - User has explicitly confirmed whether to:
115
125
  - **Iterate** — proceed to plan the ideated gaps (manually via plan mode, or via automatic mode for plan → tasks → implementation → review)
116
126
  - **Wrapup** — no more work needed, move to wrapup mode
@@ -11,7 +11,7 @@ Run only when the user explicitly confirms tasks mode.
11
11
 
12
12
  ## Steps
13
13
 
14
- 1. Update the active plan doc in `docs/plans/<nnn>-<topic>.md`. Task breakdown MUST be persisted in this same on-disk plan file.
14
+ 1. Update the active plan doc in `docs/plans/<nnn>-<topic>.md` and set frontmatter `status: Tasks`. Task breakdown MUST be persisted in this same on-disk plan file.
15
15
  2. Define implementation phases.
16
16
  3. Define concrete tasks under each phase.
17
17
  4. Add explicit validation criteria per phase (for example: unit tests, integration tests, build/typecheck commands, targeted runtime checks).
@@ -64,10 +64,12 @@ The validation specifications serve as the phase's acceptance criteria: a phase
64
64
  ## Guardrails
65
65
 
66
66
  - Do not start implementation unless user explicitly requests implementation mode.
67
+ - Do not create a second plan doc for the same task/thread.
67
68
 
68
69
  ## Exit criteria
69
70
 
70
71
  - Every phase has tasks and validation criteria.
71
72
  - Dependency graph and parallel opportunities are explicit.
72
73
  - Stubs needed for parallel execution are noted.
74
+ - The active plan doc has `status: Tasks` and is committed unless the repo ignores `docs/`.
73
75
  - User has explicitly confirmed whether to switch to implementation mode or remain in tasks mode.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: todo
3
+ description: Capture user-deferred follow-up work as a lightweight backlog document with context and first open questions.
4
+ ---
5
+
6
+ # Instructions
7
+
8
+ ## Objective
9
+
10
+ Create a concise backlog item for future work without derailing the active plan.
11
+
12
+ ## Entry gate
13
+
14
+ Run this skill only when the user explicitly asks to create a todo/backlog item or explicitly agrees to defer work for later.
15
+
16
+ ## Steps
17
+
18
+ 1. Create `docs/backlog/<nnn>-<topic>.md`.
19
+ - `<nnn>` MUST be the next available 3-digit prefix in `docs/backlog`.
20
+ - The document MUST start with YAML frontmatter containing at least `summary`.
21
+ 2. Include:
22
+ - Main task/problem statement.
23
+ - Relevant context known so far.
24
+ - Source plan/report link when applicable.
25
+ - Relevant files, docs, architecture constraints, or package names.
26
+ - First open questions that should be explored next.
27
+ 3. Keep it lightweight; do not perform full ideation or planning inside the backlog doc.
28
+ 4. Report the created backlog path to the user.
29
+
30
+ ## Guardrails
31
+
32
+ - Do not decide scope yourself. Only create a backlog item after explicit user deferral/approval.
33
+ - Do not create a plan, tasks, or implementation work in this skill.
34
+ - Do not duplicate large chat transcripts; capture only reusable context.
@@ -14,6 +14,7 @@ description: Enforce the explicit mode cadence (ideation -> plan -> tasks -> imp
14
14
  - If the user says `explore <topic>`, run the `explore` skill immediately, even when already inside another mode.
15
15
  - `explore` is a deep-dive formatting shortcut, not a mode switch by itself.
16
16
  - After finishing an `explore` pass, ask whether to continue the current mode or switch modes.
17
+ - If the user explicitly defers work or asks to capture a future task, use the `todo` skill to create a `docs/backlog` item.
17
18
 
18
19
  ## Mode selection at task start
19
20
 
@@ -43,34 +44,40 @@ Meta mode:
43
44
  Only switch to the next sequential mode with explicit user confirmation. When completing any mode, the agent must ask: `Shall we switch to {name of next mode}?`.
44
45
  Never skip a mode unless explicitly told to.
45
46
  If user seems to suggest skipping a mode but is not explicitly saying which mode to use, then the agent must ask the user `Do you want to continue with {name of next mode} or continue straight to {user suggested mode}?`
46
- When review identifies remaining work, the agent iterates: `review -> ideation (for all gaps) -> plan -> tasks -> implementation -> review`. Iteration work stays in the active plan document — no new ideation docs for iterate gaps. Every switch still requires explicit user confirmation.
47
- When review defers work for future scope, the agent creates ideation docs in `docs/ideas/` capturing what's known so far.
47
+ When review identifies remaining work, the agent iterates: `review -> ideation (for all gaps) -> plan -> tasks -> implementation -> review`. Iteration work stays in the active plan document. Every switch still requires explicit user confirmation.
48
+ When the user explicitly defers work for future scope, the agent creates backlog docs in `docs/backlog/` using the `todo` skill.
48
49
  Requests related to PR preparation/publishing are an explicit exception and should route directly to `wrapup` mode.
49
50
  These transition gates apply to standard modes. `automatic` mode is an explicit exception and manages internal transitions autonomously until its review pause point.
50
51
 
51
52
  ## Required artifacts by mode
52
53
 
53
- - `ideation`: update/create `docs/ideas/<nnn>-<topic>.md`
54
- - `plan`: update/create `docs/plans/<nnn>-<topic>.md`
55
- - `tasks`: update the same plan doc with phased tasks and validation criteria
56
- - `implementation`: update the plan doc after every completed phase; remove the originating ideation doc once implementation starts
57
- - `review`: emit findings in chat first; after user decisions, update plan with now-work tasks and/or create ideation docs for deferred future work
58
- - `wrapup`: convert plan into a final report doc in `docs/reports`, then remove the plan doc after report approval
54
+ - `backlog`: optional source/follow-up docs in `docs/backlog/<nnn>-<topic>.md`
55
+ - `ideation`: create/update one active plan doc in `docs/plans/<nnn>-<topic>.md` with `status: Ideation`
56
+ - `plan`: update the same active plan doc with `status: Plan`
57
+ - `tasks`: update the same active plan doc with `status: Tasks`
58
+ - `implementation`: update the same active plan doc after every completed phase with `status: Implementation`
59
+ - `review`: update the same active plan doc with `status: Review`; emit findings in chat first
60
+ - `wrapup`: convert the active plan into `docs/reports/<nnn>-<topic>.md`, remove the plan doc, and remove the consumed source backlog doc if any
59
61
 
60
62
  ## Frontmatter requirements for docs
61
63
 
62
- - Any new doc created under `docs/ideas`, `docs/plans`, `docs/reports`, or `docs/architecture` MUST start with YAML frontmatter.
64
+ - Any new doc created under `docs/backlog`, `docs/plans`, `docs/reports`, or `docs/architecture` MUST start with YAML frontmatter.
63
65
  - Minimum required frontmatter for new docs:
64
66
  ```yaml
65
67
  ---
66
68
  summary: One or two lines describing the document.
67
69
  ---
68
70
  ```
71
+ - Active plan docs MUST also include `status: Ideation|Plan|Tasks|Implementation|Review`.
69
72
 
70
73
  ## Global constraints
71
74
 
72
75
  - Tool-native plan modes do NOT replace the on-disk plan file requirement.
76
+ - One task/thread uses one active plan doc from ideation through review. Do not create additional plan docs for the same thread.
77
+ - Update the active plan doc `status` frontmatter when entering each mode.
78
+ - Before switching from ideation, plan, tasks, or review, commit the final active plan state unless the repo ignores `docs/`.
73
79
  - After each completed implementation phase, the on-disk plan file MUST be updated before moving to the next phase.
80
+ - Each implementation phase MUST be committed with code changes and the updated plan together.
74
81
  - Mode changes are never implicit; every mode switch requires explicit user confirmation.
75
- - Numbering rule: when creating a new doc in `docs/ideas`, `docs/plans`, or `docs/reports`, `<nnn>` MUST be the next available 3-digit prefix in the destination folder.
76
- - Conversion rule: when converting/moving docs across folders (for example `ideas -> plans` or `plans -> reports`), do not reuse the old prefix; assign the next available prefix in the destination folder and update references accordingly.
82
+ - Numbering rule: when creating a new doc in `docs/backlog`, `docs/plans`, or `docs/reports`, `<nnn>` MUST be the next available 3-digit prefix in the destination folder.
83
+ - Conversion rule: when converting/moving docs across folders (for example `plans -> reports`), do not reuse the old prefix; assign the next available prefix in the destination folder and update references accordingly.
@@ -33,16 +33,17 @@ Also treat any user request to prepare/open/update a PR, or draft PR title/body/
33
33
  - When converting from a plan, rewrite the `summary` so it reflects the completed result and report scope, not the earlier proposed plan.
34
34
  - Update any references to the report path after conversion.
35
35
  7. **Report quality** — see the dedicated section below. The report is a condensed but comprehensive record of everything that was done. It is NOT a brief summary.
36
- 8. **Remove the plan doc** `docs/plans/<nnn>-<topic>.md` after the report is written. Do not wait until after the PR — the plan must be gone before the final commit.
36
+ 8. **Remove the plan doc** `docs/plans/<nnn>-<topic>.md` after the report is written. If the plan frontmatter or opening section references a consumed source backlog doc, remove that `docs/backlog/<nnn>-<topic>.md` doc too. Do not wait until after the PR — cleanup must happen before the final commit.
37
37
 
38
38
  ### PR preparation
39
39
 
40
40
  9. Verify documentation coverage for what changed.
41
- 10. Run a PR-readiness checklist and identify anything missing (for example: docs updates, tests/validation evidence, plan/report consistency, release notes).
42
- 11. If anything is missing, notify the user with a concrete checklist and ask whether to add/fix the missing items now.
43
- 12. Changeset handling — see the dedicated section below.
44
- 13. Draft a PR title and PR message/body summarizing changes, validation, and follow-up notes.
45
- 14. **Final commit**: all cleanup (comments, dead code removal, plan deletion, report) must be committed before creating the PR.
41
+ 10. Update architecture docs when approved work changed architecture, contracts, storage, naming, auth, infrastructure, package boundaries, or other architecture-covered behavior. Do not ask for permission again when the change was already approved in the plan/review; make the doc update and report exactly what changed.
42
+ 11. Run a PR-readiness checklist and identify anything missing (for example: architecture docs, tests/validation evidence, plan/report consistency, release notes).
43
+ 12. If anything is missing, notify the user with a concrete checklist and ask whether to add/fix the missing items now.
44
+ 13. Changeset handling — see the dedicated section below.
45
+ 14. Draft a PR title and PR message/body summarizing changes, validation, architecture doc updates, and follow-up notes.
46
+ 15. **Final commit**: all cleanup (comments, dead code removal, plan deletion, report) must be committed before creating the PR.
46
47
 
47
48
  ## Report quality
48
49
 
@@ -56,8 +57,9 @@ The report replaces the plan as the permanent record. Any agent working on code
56
57
  - Conversion/mapping rules (e.g., IR node → algebra node mapping tables)
57
58
  - All resolved gaps, bugs, and edge cases with their chosen approach
58
59
  - Test coverage summary (which test files, what they cover, total counts)
60
+ - Architecture docs updated, with exact files and rationale
59
61
  - Known limitations and remaining test gaps
60
- - Deferred work with pointers to ideation docs
62
+ - Deferred work with pointers to backlog docs
61
63
  - Links to relevant documentation files (e.g., `documentation/sparql-algebra.md`)
62
64
  - PR reference (number and URL) when a PR was created during this scope
63
65
  - Anything that affects future work or that future agents need to know
@@ -93,6 +95,7 @@ A changeset is only skippable when the scope is purely internal (docs, CI config
93
95
  - All changed code reviewed for readability, with comments added where needed.
94
96
  - Dead code removed.
95
97
  - Plan doc removed (`docs/plans/<nnn>-<topic>.md`).
98
+ - Consumed source backlog doc removed when applicable (`docs/backlog/<nnn>-<topic>.md`).
96
99
  - Final report at `docs/reports/<nnn>-<topic>.md`.
97
100
  - Changeset file in `.changeset/` (when applicable).
98
101
 
@@ -100,8 +103,10 @@ A changeset is only skippable when the scope is purely internal (docs, CI config
100
103
 
101
104
  - Code review pass is complete (readability, comments, dead code).
102
105
  - Plan doc has been removed.
106
+ - Consumed source backlog doc has been removed when applicable.
103
107
  - Final report is written.
104
108
  - Cleanup and documentation checks are complete.
109
+ - Approved architecture doc updates are complete and explicitly reported.
105
110
  - PR readiness gaps (if any) were surfaced to the user and a decision was collected.
106
111
  - Changeset requirement is resolved (prepared, or explicitly skipped for docs-only/no-code-change scope).
107
112
  - PR title and message are ready.