@softure-ai/skills 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +71 -2
- package/WORKFLOW.md +308 -0
- package/package.json +31 -4
- package/rules/AGENTS.md +78 -0
- package/scripts/install.mjs +151 -0
- package/scripts/uninstall.mjs +49 -0
- package/skills/softure-archive/SKILL.md +100 -0
- package/skills/softure-code-review/SKILL.md +124 -0
- package/skills/softure-frame/SKILL.md +113 -0
- package/skills/softure-impl-review/SKILL.md +150 -0
- package/skills/softure-implement/SKILL.md +141 -0
- package/skills/softure-init/SKILL.md +131 -0
- package/skills/softure-lesson/SKILL.md +99 -0
- package/skills/softure-new/SKILL.md +127 -0
- package/skills/softure-plan/SKILL.md +157 -0
- package/skills/softure-plan/references/progress-format.md +79 -0
- package/skills/softure-plan-review/SKILL.md +152 -0
- package/skills/softure-prd/SKILL.md +132 -0
- package/skills/softure-research/SKILL.md +165 -0
- package/skills/softure-roadmap/SKILL.md +128 -0
- package/skills/softure-rule-review/SKILL.md +121 -0
- package/skills/softure-shape/SKILL.md +128 -0
- package/skills/softure-worktree/SKILL.md +888 -0
- package/skills/softure-worktree/scripts/wt-integration.sh +59 -0
- package/skills/softure-worktree/scripts/wt-open.sh +57 -0
- package/skills/softure-worktree/scripts/wt-roadmap.py +301 -0
- package/skills/softure-worktree/scripts/wt-status.sh +70 -0
- package/skills/softure-worktree/scripts/wt_config.py +109 -0
- package/skills/softure-worktree-manager/SKILL.md +553 -0
- package/skills/softure-worktree-manager/scripts/wm-launch.sh +52 -0
- package/skills/softure-worktree-manager/scripts/wm-report.sh +45 -0
- package/skills/softure-worktree-manager/scripts/wm-resume.sh +132 -0
- package/skills/softure-worktree-manager/scripts/wm-watch.sh +49 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: softure-plan-review
|
|
3
|
+
description: >
|
|
4
|
+
Adversarially review a plan before any code is written: check plan.md against
|
|
5
|
+
change.md, research.md and the real codebase for missing phases, unverifiable criteria,
|
|
6
|
+
unsafe migrations, test gaps, scope creep and ignored lessons. Every finding gets a
|
|
7
|
+
decision; accepted fixes are applied to plan.md. Use after softure-plan, before
|
|
8
|
+
softure-implement. Triggers: "review the plan", "plan review", "/softure-plan-review",
|
|
9
|
+
"check the plan before implementation".
|
|
10
|
+
argument-hint: "<change-id> [--auto]"
|
|
11
|
+
allowed-tools:
|
|
12
|
+
- Read
|
|
13
|
+
- Glob
|
|
14
|
+
- Grep
|
|
15
|
+
- Bash
|
|
16
|
+
- Write
|
|
17
|
+
- Edit
|
|
18
|
+
- Agent
|
|
19
|
+
- AskUserQuestion
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# softure-plan-review: break the plan before it breaks the code
|
|
23
|
+
|
|
24
|
+
A plan fixed now costs minutes. The same flaw found during implementation costs a phase. This
|
|
25
|
+
skill assumes the plan is wrong somewhere and looks for where. It is not a style pass.
|
|
26
|
+
|
|
27
|
+
## Required inputs
|
|
28
|
+
|
|
29
|
+
- `context/changes/<id>/plan.md` and `change.md` with `status: planned`. If the status is not
|
|
30
|
+
`planned`, run `softure-plan` first.
|
|
31
|
+
- `research.md` (and `frame.md` when present), `context/foundation/lessons.md`, and
|
|
32
|
+
`context/workflow.json`.
|
|
33
|
+
|
|
34
|
+
## Procedure
|
|
35
|
+
|
|
36
|
+
1. **Check against reality, not only against the documents.** For every file, function, table
|
|
37
|
+
and command the plan names, verify it exists and behaves as the plan assumes (Glob, Grep,
|
|
38
|
+
Read). A plan built on a misread file is the most common critical defect. For a large plan,
|
|
39
|
+
fan out read-only subagents per phase and give each the plan excerpt plus "find where this
|
|
40
|
+
is wrong".
|
|
41
|
+
|
|
42
|
+
2. **Walk the review lenses.** Each lens gets either findings or the explicit line "no findings".
|
|
43
|
+
- **Coverage:** does finishing all phases achieve change.md Intent? Is any roadmap Unknown or
|
|
44
|
+
research risk left without a phase or a mitigation?
|
|
45
|
+
- **Slicing:** does every phase leave the system green and deployable? Are there horizontal
|
|
46
|
+
layers that only work together at the end?
|
|
47
|
+
- **Verifiability:** can every Done-when criterion be checked by someone else? Flag "works",
|
|
48
|
+
"looks good" and "handles errors" without a measure.
|
|
49
|
+
- **Data and migrations:** migration order, locking on large tables, backfill, rollback or a
|
|
50
|
+
justified forward-only, and a criterion that reads real rows. Check collisions with other
|
|
51
|
+
in-flight changes (`context/changes/*/plan.md` mentioning the same migration folder or tables).
|
|
52
|
+
- **Tests:** is the right discipline chosen (TDD for logic, money, parsing, security, state)?
|
|
53
|
+
Are edge cases named (empty, null, boundaries, concurrency, error paths)? Does an e2e or
|
|
54
|
+
integration test cover the user-visible outcome?
|
|
55
|
+
- **Security:** authorisation on every new entry point, input validation at boundaries, no
|
|
56
|
+
secrets in code, safe error messages.
|
|
57
|
+
- **Scope:** work beyond change.md (creep), or Constraints violated, such as files owned by
|
|
58
|
+
another change.
|
|
59
|
+
- **Reuse:** a generic capability re-implemented although a SOFTURE module covers it
|
|
60
|
+
(WORKFLOW.md §10). Duplication of existing helpers in the codebase.
|
|
61
|
+
- **Lessons:** a lesson in `lessons.md` whose "Applies to" matches and the plan ignores.
|
|
62
|
+
- **Progress format:** matches `softure-plan/references/progress-format.md` one-to-one with
|
|
63
|
+
the phases.
|
|
64
|
+
|
|
65
|
+
3. **Grade every finding.**
|
|
66
|
+
- **CRITICAL:** implementing as written fails the Intent, loses data, opens a security hole,
|
|
67
|
+
or cannot be verified.
|
|
68
|
+
- **WARNING:** likely rework, a fragile step, or a missing test or rollback.
|
|
69
|
+
- **SUGGESTION:** a clear improvement that is cheap now.
|
|
70
|
+
|
|
71
|
+
4. **Decide every finding.** None stays pending.
|
|
72
|
+
- **Fix now:** edit plan.md (phases, steps, criteria, Progress) and describe the edit.
|
|
73
|
+
- **Accept risk:** state the risk, why it is acceptable, and who accepted it.
|
|
74
|
+
- **Defer:** state where it goes (backlog, a follow-up change, a roadmap item).
|
|
75
|
+
|
|
76
|
+
In interactive mode, present CRITICAL and WARNING findings to the user with your recommended
|
|
77
|
+
decision first. Apply SUGGESTIONs you agree with directly.
|
|
78
|
+
|
|
79
|
+
5. **Apply the fixes to plan.md.** Keep `## Progress` consistent. Implementation has not started,
|
|
80
|
+
so items may still be renumbered at this point.
|
|
81
|
+
|
|
82
|
+
6. **Write `reviews/plan-review.md`** using the template below, in the `workflow.json` language.
|
|
83
|
+
|
|
84
|
+
7. **Update `change.md`.** Set `status: plan_reviewed`, but only when no CRITICAL finding remains
|
|
85
|
+
with a decision other than "Fix now (applied)". A CRITICAL finding that cannot be fixed inside
|
|
86
|
+
the plan sends the change back to research: keep `status: planned` and report.
|
|
87
|
+
|
|
88
|
+
8. **Report** counts per severity, the decisions, and the next step.
|
|
89
|
+
|
|
90
|
+
## Output template
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
# Plan review: <change-id>
|
|
94
|
+
|
|
95
|
+
Reviewed: plan.md @ <date>. Verdict: <ready | ready after fixes | back to research>.
|
|
96
|
+
|
|
97
|
+
## Findings
|
|
98
|
+
|
|
99
|
+
### C1 [CRITICAL] <title>
|
|
100
|
+
**Where:** Phase 2, step 3 (plan.md) · `src/x.ts:40`
|
|
101
|
+
**Problem:** <what is wrong, with evidence>
|
|
102
|
+
**Decision:** Fix now — <what changed in plan.md>
|
|
103
|
+
|
|
104
|
+
### W1 [WARNING] <title>
|
|
105
|
+
...
|
|
106
|
+
**Decision:** Accept risk — <why acceptable; accepted by owner|auto>
|
|
107
|
+
|
|
108
|
+
### S1 [SUGGESTION] <title>
|
|
109
|
+
...
|
|
110
|
+
**Decision:** Defer — <where it goes>
|
|
111
|
+
|
|
112
|
+
## Lenses with no findings
|
|
113
|
+
Coverage, Security, ...
|
|
114
|
+
|
|
115
|
+
## Decisions (auto)
|
|
116
|
+
<only in --auto>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Status transitions
|
|
120
|
+
|
|
121
|
+
- `planned` → `plan_reviewed` when nothing CRITICAL remains open.
|
|
122
|
+
- Otherwise `status` stays `planned` and the report says why.
|
|
123
|
+
|
|
124
|
+
## `--auto`
|
|
125
|
+
|
|
126
|
+
- Do not ask. Decide each finding yourself:
|
|
127
|
+
- CRITICAL and WARNING findings with a clear fix → **Fix now**;
|
|
128
|
+
- SUGGESTION → Fix now when it is cheap, otherwise Defer;
|
|
129
|
+
- **Accept risk** only when the fix would contradict change.md Constraints.
|
|
130
|
+
- Record each decision under `## Decisions (auto)`.
|
|
131
|
+
- Escalate when a CRITICAL finding needs an owner decision (scope, business rule, data deletion).
|
|
132
|
+
|
|
133
|
+
## Quality checklist
|
|
134
|
+
|
|
135
|
+
- [ ] Every named file, symbol, table and command was verified in the code.
|
|
136
|
+
- [ ] Every lens is covered, with findings or an explicit "no findings".
|
|
137
|
+
- [ ] Every finding has a severity, evidence, and a decision.
|
|
138
|
+
- [ ] Accepted fixes are actually applied to plan.md, and Progress is still consistent.
|
|
139
|
+
- [ ] No CRITICAL finding is open while the status is `plan_reviewed`.
|
|
140
|
+
|
|
141
|
+
## Anti-patterns
|
|
142
|
+
|
|
143
|
+
- Reviewing prose instead of checking the plan against the code.
|
|
144
|
+
- Leaving findings without decisions ("consider…", "might want to…").
|
|
145
|
+
- Inflating style nits to WARNING, or hiding a real risk as a SUGGESTION.
|
|
146
|
+
- Rewriting the whole plan. Fix the defects and keep the author's structure.
|
|
147
|
+
- Approving a plan whose criteria cannot be checked.
|
|
148
|
+
|
|
149
|
+
## Handoff
|
|
150
|
+
|
|
151
|
+
- Verdict ready: `softure-implement <change-id>`, starting at phase 1.
|
|
152
|
+
- Back to research: `softure-research <change-id>`, focused on the critical finding.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: softure-prd
|
|
3
|
+
description: >
|
|
4
|
+
Write or revise `context/foundation/prd.md` from accepted shape notes: goals and
|
|
5
|
+
non-goals, users, functional requirements with stable IDs (FR-1…), non-functional
|
|
6
|
+
requirements, success metrics, risks and out-of-scope, with a version that is bumped on
|
|
7
|
+
every edit. Use after softure-shape, or when the product direction changes. Triggers:
|
|
8
|
+
"write the PRD", "update the PRD", "turn the shape into requirements",
|
|
9
|
+
"write down the requirements".
|
|
10
|
+
argument-hint: "[--revise] [--auto]"
|
|
11
|
+
allowed-tools:
|
|
12
|
+
- Read
|
|
13
|
+
- Glob
|
|
14
|
+
- Grep
|
|
15
|
+
- Write
|
|
16
|
+
- Edit
|
|
17
|
+
- AskUserQuestion
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# softure-prd: requirements a roadmap can be sliced from
|
|
21
|
+
|
|
22
|
+
## Purpose
|
|
23
|
+
|
|
24
|
+
The PRD is the contract between *why* (shape notes) and *in what order* (roadmap). It says
|
|
25
|
+
what must be true for users, with stable IDs that roadmap items, plans and reviews can cite.
|
|
26
|
+
It does not say how to implement.
|
|
27
|
+
|
|
28
|
+
## Inputs
|
|
29
|
+
|
|
30
|
+
- `context/foundation/shape-notes.md` with `status: accepted`. If it is missing or still a
|
|
31
|
+
draft, stop and point to `softure-shape` (or ask the user to accept the draft).
|
|
32
|
+
- An existing `prd.md` means **revise mode**: keep the IDs, bump `version`, and log the change
|
|
33
|
+
(see Versioning).
|
|
34
|
+
- For brownfield work, read the code paths the shape notes mention, so that requirements are
|
|
35
|
+
stated relative to what exists.
|
|
36
|
+
|
|
37
|
+
## Procedure
|
|
38
|
+
|
|
39
|
+
1. **Extract.** From the shape notes, list the candidate goals, users, capabilities and
|
|
40
|
+
constraints. Mark anything the notes do not support as an open question. Do not fill gaps
|
|
41
|
+
by invention.
|
|
42
|
+
2. **Resolve open questions**, one per message, each with a recommended answer. Ask only those
|
|
43
|
+
that change a requirement. Everything else goes to `## Open questions` with an owner.
|
|
44
|
+
3. **Write the requirements:**
|
|
45
|
+
- Each FR is one **observable behaviour**: "When <trigger>, <actor> can/sees <result>".
|
|
46
|
+
It never names an implementation ("use Redis", "add a table").
|
|
47
|
+
- Each FR gets acceptance criteria someone else could test: given/when/then, or a short
|
|
48
|
+
bullet list.
|
|
49
|
+
- Priority: `must` (the release fails without it), `should`, `could`. Roughly 60% of
|
|
50
|
+
effort or less should be `must`.
|
|
51
|
+
- NFRs are measurable (latency p95, availability, data retention, accessibility level,
|
|
52
|
+
supported locales), and only where they matter.
|
|
53
|
+
4. **Mark generic capabilities.** For FRs that a SOFTURE module covers (WORKFLOW §10), add
|
|
54
|
+
`Module: @softure-ai/<name>` so the roadmap and plan reuse it instead of rebuilding it.
|
|
55
|
+
5. **Check consistency:**
|
|
56
|
+
- every goal has at least one FR;
|
|
57
|
+
- every `must` FR traces to a problem in the shape notes;
|
|
58
|
+
- every success metric is measurable with something that exists or is planned in an FR;
|
|
59
|
+
- nothing in *Out of scope* contradicts an FR.
|
|
60
|
+
6. Show the FR table, ask "Accept? (Recommended: accept)", then apply corrections and write.
|
|
61
|
+
|
|
62
|
+
## Output: `context/foundation/prd.md`
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
---
|
|
66
|
+
project: "<name>"
|
|
67
|
+
version: 1
|
|
68
|
+
status: draft | accepted
|
|
69
|
+
created: <YYYY-MM-DD>
|
|
70
|
+
updated: <YYYY-MM-DD>
|
|
71
|
+
source: shape-notes.md (session <n>)
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# PRD v<version>: <theme>
|
|
75
|
+
|
|
76
|
+
## Summary (5 lines: problem, who, outcome, appetite, release boundary)
|
|
77
|
+
## Goals (G-1…, each measurable)
|
|
78
|
+
## Non-goals
|
|
79
|
+
## Users (primary / secondary / not for; link to shape notes)
|
|
80
|
+
## Current system (brownfield: what stays as is, explicitly)
|
|
81
|
+
## Functional requirements
|
|
82
|
+
| ID | Requirement (observable behaviour) | Priority | Goal | Module |
|
|
83
|
+
|---|---|---|---|---|
|
|
84
|
+
| FR-1 | When …, … can … | must | G-1 | @softure-ai/auth |
|
|
85
|
+
|
|
86
|
+
### FR-1: <short name>
|
|
87
|
+
Acceptance:
|
|
88
|
+
- Given …, when …, then …
|
|
89
|
+
Notes: edge cases, copy constraints, data rules.
|
|
90
|
+
|
|
91
|
+
## Non-functional requirements (NFR-1…, each with a number)
|
|
92
|
+
## Success metrics (metric → baseline → target → how measured → when checked)
|
|
93
|
+
## Risks (risk → likelihood → impact → mitigation)
|
|
94
|
+
## Out of scope
|
|
95
|
+
## Open questions (question → owner → needed by)
|
|
96
|
+
## Changelog (v<n> <date>: what changed and why)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Write in `workflow.json` → `language`. IDs stay in this ASCII form whatever the language.
|
|
100
|
+
|
|
101
|
+
## Versioning
|
|
102
|
+
|
|
103
|
+
- A new PRD starts at `version: 1`. Every revise run increments `version` and adds a
|
|
104
|
+
`## Changelog` line.
|
|
105
|
+
- IDs are **never reused or renumbered**. A dropped FR stays, with its row struck through
|
|
106
|
+
(`~~FR-7~~`) and a reason. New FRs take the next free number.
|
|
107
|
+
- If a roadmap exists with `prd_version` lower than the new version, say which items cite
|
|
108
|
+
changed FRs and recommend running `softure-roadmap --revise`.
|
|
109
|
+
|
|
110
|
+
## `--auto`
|
|
111
|
+
|
|
112
|
+
Write only what the shape notes support. Unsupported or ambiguous points go to
|
|
113
|
+
`## Open questions`. Leave `status: draft` and record each interpretation under
|
|
114
|
+
`## Decisions (auto)`.
|
|
115
|
+
|
|
116
|
+
## Quality bar
|
|
117
|
+
|
|
118
|
+
- [ ] No FR names a technology or a table.
|
|
119
|
+
- [ ] Every FR has acceptance criteria a tester could run without asking the author.
|
|
120
|
+
- [ ] Goals and success metrics have numbers or explicit yes/no checks.
|
|
121
|
+
- [ ] Out of scope is non-empty. If nothing is excluded, the scope is not shaped yet.
|
|
122
|
+
- [ ] IDs are stable across versions.
|
|
123
|
+
|
|
124
|
+
## Do not
|
|
125
|
+
|
|
126
|
+
- Do not slice the work into milestones. That is `softure-roadmap`.
|
|
127
|
+
- Do not copy the shape notes wholesale. Link to them and keep the PRD about requirements.
|
|
128
|
+
- Do not silently change an accepted FR. Every change goes through the changelog.
|
|
129
|
+
|
|
130
|
+
## Handoff
|
|
131
|
+
|
|
132
|
+
Accepted PRD → `softure-roadmap`.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: softure-research
|
|
3
|
+
description: >
|
|
4
|
+
Investigate the codebase for an open change and write context/changes/<id>/research.md:
|
|
5
|
+
how things work today, which files, tests and data the change touches, risks, which
|
|
6
|
+
SOFTURE modules already cover the need, and answers to every unknown. Use after
|
|
7
|
+
softure-new and before planning. Triggers: "research the change", "investigate <id>",
|
|
8
|
+
"/softure-research", "investigate the code before planning".
|
|
9
|
+
argument-hint: "<change-id> [--depth quick|normal|deep] [--focus \"area\"] [--auto]"
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Read
|
|
12
|
+
- Glob
|
|
13
|
+
- Grep
|
|
14
|
+
- Bash
|
|
15
|
+
- Write
|
|
16
|
+
- Edit
|
|
17
|
+
- Agent
|
|
18
|
+
- AskUserQuestion
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# softure-research: understand before deciding
|
|
22
|
+
|
|
23
|
+
Research turns "what we want" (change.md) into "what is actually there". The plan is only as
|
|
24
|
+
good as this document. Every claim here must point at evidence (`path:line`, a query result, a
|
|
25
|
+
command output), so a planner can trust it without re-reading the code.
|
|
26
|
+
|
|
27
|
+
## Required inputs
|
|
28
|
+
|
|
29
|
+
- `context/workflow.json`: if missing, run `softure-init` first. If it lists `research.sources`, read those too
|
|
30
|
+
(docs, PRD, notes) before the codebase sweep, and cite them like code.
|
|
31
|
+
- `context/changes/<id>/change.md` with `status: new` or `preparing`: if missing, run
|
|
32
|
+
`softure-new` first. If the status is later than `preparing`, warn that research is being
|
|
33
|
+
redone and continue only when the user confirms (in `--auto`: continue and record it).
|
|
34
|
+
- If `roadmap_item` is set, read its block in `context/foundation/roadmap.md`. Its **Unknowns**
|
|
35
|
+
are mandatory questions for this research.
|
|
36
|
+
- `context/foundation/lessons.md`, when present. Note the lessons whose "Applies to" overlaps
|
|
37
|
+
this change.
|
|
38
|
+
|
|
39
|
+
## Procedure
|
|
40
|
+
|
|
41
|
+
1. **Frame the questions.** List what must be known to plan: the Intent, every roadmap
|
|
42
|
+
Unknown, and the implicit questions (where is it implemented, who calls it, what data does it
|
|
43
|
+
read and write, how is it tested, what breaks if it changes). Pick the depth:
|
|
44
|
+
- `quick`: one area, under about 10 files.
|
|
45
|
+
- `normal`: the default.
|
|
46
|
+
- `deep`: money, data migrations, auth, concurrency, or anything irreversible.
|
|
47
|
+
|
|
48
|
+
2. **Fan out for breadth.** For independent questions, launch parallel **read-only** subagents
|
|
49
|
+
(Explore-type, or general-purpose told not to edit). Each subagent gets:
|
|
50
|
+
- one question or area;
|
|
51
|
+
- the instruction to cite `path:line` for every claim;
|
|
52
|
+
- a word limit;
|
|
53
|
+
- the instruction to report facts, not proposals.
|
|
54
|
+
|
|
55
|
+
Keep the synthesis yourself. Do not delegate conclusions.
|
|
56
|
+
|
|
57
|
+
3. **Go deep where it matters.** Read the central files yourself. Trace one real request or
|
|
58
|
+
flow end to end, from entry point through logic and data to response or UI. When the change
|
|
59
|
+
touches data, look at the schema and migrations, and at real data shape if a safe read-only
|
|
60
|
+
path exists (a dev DB, fixtures). Never write to a database during research.
|
|
61
|
+
|
|
62
|
+
4. **Map the tests.** Find which tests cover the affected code (unit, integration, e2e), how to
|
|
63
|
+
run them, and where coverage is missing. Note flaky or slow suites.
|
|
64
|
+
|
|
65
|
+
5. **Check SOFTURE modules first** (WORKFLOW.md §10). If the change needs a generic capability,
|
|
66
|
+
check the `@softure-ai/*` catalog. Generic capabilities include auth, sessions, roles, feature
|
|
67
|
+
switches, mail, unsubscribe, waitlist, MCP tokens, billing/trial, GDPR, consent, channel
|
|
68
|
+
analytics, health and UI primitives. Record one of three outcomes:
|
|
69
|
+
- **covered:** module and configuration needed;
|
|
70
|
+
- **partially covered:** module plus the gap, to be filed as an issue in SOFTURE/AI;
|
|
71
|
+
- **not applicable.**
|
|
72
|
+
|
|
73
|
+
6. **Assess risks.** Cover data loss, migrations and rollback, backwards compatibility,
|
|
74
|
+
performance, security (authz, input validation, secrets), concurrency, and other in-flight
|
|
75
|
+
changes touching the same files (check `context/changes/*/change.md` Constraints).
|
|
76
|
+
|
|
77
|
+
7. **Resolve open questions.** Each question ends in one of three states:
|
|
78
|
+
- **answered**, with evidence;
|
|
79
|
+
- **decided**, with the decision, the reason, and who decided (owner, or auto);
|
|
80
|
+
- **escalated**, meaning it blocks planning, with the exact question and its options.
|
|
81
|
+
|
|
82
|
+
A research document with unanswered questions and no escalation is unfinished.
|
|
83
|
+
|
|
84
|
+
8. **Write `research.md`** using the template below, in the `workflow.json` language.
|
|
85
|
+
|
|
86
|
+
9. **Update `change.md`.** Set `status: preparing` and update `updated`.
|
|
87
|
+
|
|
88
|
+
10. **Report** a five-line summary: key findings, risks, module verdict, escalations, next step.
|
|
89
|
+
|
|
90
|
+
## Output template
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
# Research: <change-id>
|
|
94
|
+
|
|
95
|
+
Input: change.md[, roadmap <ID>]. Depth: <quick|normal|deep>.
|
|
96
|
+
|
|
97
|
+
## Summary
|
|
98
|
+
<5–8 lines a planner can act on>
|
|
99
|
+
|
|
100
|
+
## Current state
|
|
101
|
+
<how it works today, end to end, with path:line references>
|
|
102
|
+
|
|
103
|
+
## Affected surface
|
|
104
|
+
| Area | Files | Why |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
|
|
107
|
+
## Data
|
|
108
|
+
<tables, columns, migrations, real data shape, invariants — or "none">
|
|
109
|
+
|
|
110
|
+
## Tests
|
|
111
|
+
<what covers it, how to run, gaps>
|
|
112
|
+
|
|
113
|
+
## SOFTURE modules
|
|
114
|
+
<covered / partially covered (gap → issue) / not applicable — with reasoning>
|
|
115
|
+
|
|
116
|
+
## Risks
|
|
117
|
+
<each: what can go wrong, likelihood, mitigation idea>
|
|
118
|
+
|
|
119
|
+
## Relevant lessons
|
|
120
|
+
<L-NNN: why it applies>
|
|
121
|
+
|
|
122
|
+
## Answers to unknowns
|
|
123
|
+
<each roadmap unknown and implicit question → answer with evidence>
|
|
124
|
+
|
|
125
|
+
## Open questions
|
|
126
|
+
<each: answered / decided (by whom, why) / escalated (exact question + options)>
|
|
127
|
+
|
|
128
|
+
## Decisions (auto)
|
|
129
|
+
<only in --auto>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Status transitions
|
|
133
|
+
|
|
134
|
+
- `new` (or `preparing`) → `preparing`.
|
|
135
|
+
|
|
136
|
+
## `--auto`
|
|
137
|
+
|
|
138
|
+
- Choose the depth from the risk profile. Use `deep` whenever money, data migration, auth or
|
|
139
|
+
deletion is involved.
|
|
140
|
+
- Resolve questions by evidence first, then by the safer option. Record each choice under
|
|
141
|
+
`## Decisions (auto)`.
|
|
142
|
+
- Escalate (stop, do not plan) only when a question changes the scope of change.md or requires
|
|
143
|
+
an owner-only fact such as a business rule, credentials or legal text.
|
|
144
|
+
|
|
145
|
+
## Quality checklist
|
|
146
|
+
|
|
147
|
+
- [ ] Every factual claim has `path:line` or another concrete evidence pointer.
|
|
148
|
+
- [ ] Every roadmap Unknown is answered, decided or escalated.
|
|
149
|
+
- [ ] Tests that will prove the change are identified, with the command to run them.
|
|
150
|
+
- [ ] The SOFTURE module verdict is explicit.
|
|
151
|
+
- [ ] Collisions with other in-flight changes have been checked.
|
|
152
|
+
- [ ] The document contains no implementation plan, only options and facts.
|
|
153
|
+
|
|
154
|
+
## Anti-patterns
|
|
155
|
+
|
|
156
|
+
- Summarising file names without reading them ("`auth.ts` handles auth").
|
|
157
|
+
- Copying subagent output unverified. Spot-check every surprising claim yourself.
|
|
158
|
+
- Proposing the solution and calling it research.
|
|
159
|
+
- Writing to the database or changing code "to check something".
|
|
160
|
+
- Leaving an "Open questions" list with nothing marked as resolved or escalated.
|
|
161
|
+
|
|
162
|
+
## Handoff
|
|
163
|
+
|
|
164
|
+
- If the problem itself looks wrong or underspecified: `softure-frame <change-id>`.
|
|
165
|
+
- Otherwise: `softure-plan <change-id>`.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: softure-roadmap
|
|
3
|
+
description: >
|
|
4
|
+
Slice an accepted PRD (or a list of feedback items) into `context/foundation/roadmap.md`:
|
|
5
|
+
thin vertical slices with stable IDs, dependencies, ownership of hot files for parallel
|
|
6
|
+
work, unknowns, baselines, and an at-a-glance table that orchestrators parse. Optionally
|
|
7
|
+
opens a change folder for every ready item. Use after softure-prd, when feedback must be
|
|
8
|
+
turned into work, or to revise the order. Triggers: "make a roadmap", "slice the PRD",
|
|
9
|
+
"what do we build first", "order the work",
|
|
10
|
+
"turn feedback into roadmap items".
|
|
11
|
+
argument-hint: "[--revise] [--open-changes] [--from-feedback <path>] [--auto]"
|
|
12
|
+
allowed-tools:
|
|
13
|
+
- Read
|
|
14
|
+
- Glob
|
|
15
|
+
- Grep
|
|
16
|
+
- Write
|
|
17
|
+
- Edit
|
|
18
|
+
- Bash
|
|
19
|
+
- AskUserQuestion
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# softure-roadmap: ordered, parallel-safe slices
|
|
23
|
+
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
Turn requirements into an ordered list of **changes**, each small enough to be planned,
|
|
27
|
+
built, reviewed and merged on its own, and safe to run in parallel where the roadmap says so.
|
|
28
|
+
The format is a contract: `softure-worktree` and `softure-worktree-manager` parse it
|
|
29
|
+
(WORKFLOW §5). Follow it exactly.
|
|
30
|
+
|
|
31
|
+
## Inputs
|
|
32
|
+
|
|
33
|
+
- `context/foundation/prd.md` with `status: accepted`. If missing, stop and point to
|
|
34
|
+
`softure-prd`. Alternatively, `--from-feedback <path>` takes notes or screenshots and a
|
|
35
|
+
short slice is made without a PRD; record that in the header.
|
|
36
|
+
- `context/workflow.json` (for `language`, `maxParallel`, `migrations`).
|
|
37
|
+
- If an existing `roadmap.md` has items not yet `done`, this is **revise mode**. Never
|
|
38
|
+
renumber IDs and never drop an `in_progress` item. Move a finished roadmap to
|
|
39
|
+
`context/foundation/roadmaps/<YYYY-MM-DD>-<slug>.md` before starting a new one.
|
|
40
|
+
|
|
41
|
+
## Procedure
|
|
42
|
+
|
|
43
|
+
1. **List the capabilities** from the FRs (or feedback points). Group points that change the
|
|
44
|
+
same user-visible behaviour.
|
|
45
|
+
2. **Slice vertically.** Each item delivers one observable outcome end to end (data → logic →
|
|
46
|
+
UI → test), never "all the database work". Each item should:
|
|
47
|
+
- fit one plan of 1 to 4 phases;
|
|
48
|
+
- be mergeable on its own without breaking main;
|
|
49
|
+
- carry its own verification (a baseline and an after measurement).
|
|
50
|
+
|
|
51
|
+
Too big → split by user path, by data subset, or into a walking skeleton plus enhancements.
|
|
52
|
+
3. **Prefer modules.** Items whose FR is marked `Module: @softure-ai/<name>` become "adopt and
|
|
53
|
+
configure the module" items, which are much smaller than building it.
|
|
54
|
+
4. **Order:**
|
|
55
|
+
- risk first (whatever could invalidate the plan);
|
|
56
|
+
- then dependencies;
|
|
57
|
+
- then value.
|
|
58
|
+
|
|
59
|
+
Name the prerequisite IDs explicitly. Put a "finish" item last when the theme needs a
|
|
60
|
+
final measurement or review across items.
|
|
61
|
+
5. **Parallel safety.** For every item, list the files and areas it will touch (from a quick
|
|
62
|
+
code search; this is an estimate, so say so). Two items may run in parallel only if:
|
|
63
|
+
- their file sets are disjoint;
|
|
64
|
+
- at most one of them adds a migration (`workflow.json` → `migrations`);
|
|
65
|
+
- neither changes a shared primitive the other uses.
|
|
66
|
+
|
|
67
|
+
Assign **exclusive owners** for hot files and write the groups that can run together under
|
|
68
|
+
`## Order`.
|
|
69
|
+
6. **Per item, write:** Change ID (kebab-case, unique across `changes/` and `archive/`),
|
|
70
|
+
Outcome, Prerequisites, Unknowns (the questions research must answer), Risk, Baseline (how
|
|
71
|
+
it is measured before and after) and PRD refs.
|
|
72
|
+
7. **Header:**
|
|
73
|
+
- frontmatter: `prd_version` = the PRD `version`;
|
|
74
|
+
- run-wide orders in the quote block: push main or not; parallelism (default:
|
|
75
|
+
`workflow.json` → `worktree.maxParallel`); which items need the owner at the keyboard.
|
|
76
|
+
8. **Review with the user.** Show the at-a-glance table and the parallel groups, then ask
|
|
77
|
+
"Accept the order? (Recommended: accept)". Apply edits and set `status: ready`.
|
|
78
|
+
9. **`--open-changes`.** For every `ready` item without a folder, create
|
|
79
|
+
`context/changes/<change-id>/change.md` in the `softure-new` format (WORKFLOW §4):
|
|
80
|
+
- `status: new` and `roadmap_item: <ID>`;
|
|
81
|
+
- `## Intent` = the item outcome;
|
|
82
|
+
- `## Context` quotes the item block verbatim;
|
|
83
|
+
- `## Constraints` lists the exclusively owned files.
|
|
84
|
+
|
|
85
|
+
## Output: `context/foundation/roadmap.md`
|
|
86
|
+
|
|
87
|
+
Exactly the structure of WORKFLOW §5. Parser-critical rules:
|
|
88
|
+
- Table header: `| ID | Change | Outcome | Depends on | Mode | Status |`.
|
|
89
|
+
- Row: `| **FC-1** | \`change-id\` | … | FC-0, FC-2 or — | autonomous or owner | <status> |`.
|
|
90
|
+
The **status is the last cell**, and there is one row per change-id.
|
|
91
|
+
- IDs match `[A-Z]+-\d+`. Use a 2 to 4 letter prefix per roadmap theme and keep numbers
|
|
92
|
+
stable forever.
|
|
93
|
+
- Status vocabulary only: `proposed`, `ready`, `blocked (<why>)`, `in_progress (…)`,
|
|
94
|
+
`ready_to_merge (…)`, `done`, `done_code (…)`. A new roadmap uses only `proposed`, `ready`
|
|
95
|
+
and `blocked`.
|
|
96
|
+
- Every item block has `- **Change ID:** \`<id>\`` followed directly by `- **Status:** <same as row>`.
|
|
97
|
+
- `## Done` lists finished items, one line each, with their archive path.
|
|
98
|
+
|
|
99
|
+
Write prose in `workflow.json` → `language`. Keep the IDs, the status tokens and the table
|
|
100
|
+
header in English, because scripts parse them.
|
|
101
|
+
|
|
102
|
+
## `--auto`
|
|
103
|
+
|
|
104
|
+
Slice and order without asking:
|
|
105
|
+
- mark an item `proposed` when its value is doubtful;
|
|
106
|
+
- mark it `blocked (<why>)` when it needs an owner decision;
|
|
107
|
+
- record ordering choices under `## Decisions (auto)` at the end of the file.
|
|
108
|
+
|
|
109
|
+
## Quality bar
|
|
110
|
+
|
|
111
|
+
- [ ] Every `must` FR is covered by at least one item, or explicitly deferred.
|
|
112
|
+
- [ ] No item is a horizontal layer ("backend for X").
|
|
113
|
+
- [ ] Each item has unknowns and a baseline. "None" is allowed only with a reason.
|
|
114
|
+
- [ ] Items running in parallel have disjoint files and at most one migration between them.
|
|
115
|
+
- [ ] The table and item blocks agree on IDs, change-ids and statuses.
|
|
116
|
+
- [ ] The first item can start today with no open owner decision.
|
|
117
|
+
|
|
118
|
+
## Do not
|
|
119
|
+
|
|
120
|
+
- Do not plan implementation steps. That is `softure-plan`, per change.
|
|
121
|
+
- Do not change the status of an item that is in progress. That belongs to the orchestrators
|
|
122
|
+
and `softure-archive`.
|
|
123
|
+
- Do not estimate in hours. Order and slice size are the planning tools here.
|
|
124
|
+
|
|
125
|
+
## Handoff
|
|
126
|
+
|
|
127
|
+
`softure-new <change-id>` for the first item (or use `--open-changes`). For parallel execution
|
|
128
|
+
→ `softure-worktree-manager`. For a single item end to end → `softure-worktree <ID>`.
|