create-issflow 1.0.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.
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Record an architectural decision in docs/DESIGN_LOG.md. Use only when the kit's structure changes.
3
+ argument-hint: [what changed]
4
+ ---
5
+
6
+ Caveman ULTRA mode.
7
+
8
+ Append an architectural decision to docs/DESIGN_LOG.md. Change: $ARGUMENTS
9
+
10
+ WHEN this applies — the change is ARCHITECTURAL:
11
+ - new / removed / renamed agent, hook, or command
12
+ - changed workflow rule (escalation, phase gate, test layering)
13
+ - design decision where alternatives were weighed
14
+
15
+ WHEN it does NOT apply:
16
+ - code changes, features, phase progress -> HISTORY.md
17
+ - bugs + fixes -> ISSUES.md
18
+
19
+ Steps:
20
+ 1. Read docs/DESIGN_LOG.md.
21
+ 2. Append a dated line to `## 0. Changelog`, newest first.
22
+ 3. If alternatives were weighed, ALSO append a full entry to §5:
23
+ ```
24
+
25
+ ### 5.x <decision title>
26
+
27
+ Options: <a, b, c>. **Chosen: <x>.** <why it won.>
28
+
29
+ ```
30
+ 4. If agent/hook/command/file added or removed, update the file inventory (§6).
31
+ 5. NEVER rewrite or delete existing entries — append only.
32
+
33
+ Confirm back in 2-3 lines: what was logged and where.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Log an error to docs/ISSUES.md with root cause + solution, in the canonical format.
3
+ argument-hint: [short error description]
4
+ ---
5
+
6
+ Caveman ULTRA mode.
7
+
8
+ Append an entry to docs/ISSUES.md. Error: $ARGUMENTS
9
+
10
+ Canonical format:
11
+ ```
12
+
13
+ ### <short error title — searchable, literal error keywords>
14
+
15
+ - [x] open (or “- [x] resolved”)
16
+ - symptom: <what was observed>
17
+ - root cause: <the REAL underlying cause>
18
+ - solution: <exact fix, or “pending”>
19
+ - failed attempts: <approaches that did NOT work>
20
+
21
+ ```
22
+ Rules:
23
+ - title must contain literal error keywords -> grep finds it.
24
+ - root cause is the real cause, not "the line threw an error".
25
+ - always fill "failed attempts" — stops repeated dead ends.
26
+ - open issues go at the TOP; resolved below; archived oldest at bottom.
27
+
28
+ Confirm the entry back in 2 lines.
@@ -0,0 +1,98 @@
1
+ ---
2
+ description: Bootstrap a new project. Runs design-research, double grill, and planning. Run once per project.
3
+ ---
4
+
5
+ Caveman ULTRA mode.
6
+
7
+ Recommended: run from plan mode (Shift+Tab). Planning agents are read-only by
8
+ tool grant; plan mode adds a read-only gate on the main session too. Optional.
9
+
10
+ Goal: stand up a fresh project workspace with a well-grounded plan.
11
+
12
+ ---
13
+
14
+ ## Steps
15
+
16
+ ### Round 1 — Initial grill
17
+
18
+ 1. Run the `grill-me` skill to interrogate me. Goal: understand initial scope.
19
+ known constraints, unknowns.
20
+ Do not stop early. Do not write OVERVIEW.md yet.
21
+
22
+ Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
23
+
24
+ ---
25
+
26
+ ### Design research
27
+
28
+ 2. Extract DESIGN TOPICS from the round-1 answers. These are things we need
29
+ to verify before planning:
30
+ - Each external service mentioned: what does it support at the relevant tier?
31
+ Quotas, rate limits, known gaps?
32
+ - Auth patterns: any MSAL/Entra constraints for this scenario?
33
+ - Any other architectural assumption in the round-1 answers worth verifying.
34
+
35
+ 3. Dispatch `researcher` in DESIGN mode with the DESIGN TOPICS list.
36
+ It returns a terse summary + file paths. Read the design-<slug>.md files
37
+ only if needed.
38
+
39
+ ---
40
+
41
+ ### Round 2 — Research-informed re-grill
42
+
43
+ 4. Run `grill-me` again — a second focused pass. Seed it with:
44
+ - The round-1 answers (already established — do not re-ask these)
45
+ - The design-research key findings and new questions raised
46
+
47
+ The re-grill asks whatever it needs to build complete understanding. It is
48
+ not limited to "gaps from research" — research context makes new questions
49
+ relevant even if it found no blockers. Do not re-ask what round 1 already
50
+ established clearly.
51
+
52
+ ---
53
+
54
+ ### Write OVERVIEW.md
55
+
56
+ 5. Write docs/OVERVIEW.md from the COMBINED output of round-1 + design-research
57
+ + round-2. Include:
58
+ - Project purpose and success criteria
59
+ - Scope and constraints (informed by research findings)
60
+ - External services with confirmed capabilities/limits
61
+ - Known risks / open questions (if any remain)
62
+
63
+ OVERVIEW.md is written HERE — after the re-grill, not before.
64
+
65
+ ---
66
+
67
+ ### Plan
68
+
69
+ 6. Hand OVERVIEW.md + design-research findings to the `planner` subagent.
70
+ PLAN.md MUST:
71
+ - Start with Phase 0 (infra setup) as the first entry (always).
72
+ - End with a final code phase that contains the deploy task block.
73
+
74
+ 7. Create docs/STATE.md:
75
+ ```
76
+
77
+ # STATE
78
+
79
+ phase: 0 (pending)
80
+ completed: project bootstrapped — design research done, double grill done
81
+ blocker: none
82
+
83
+ ```
84
+ 8. Create docs/ISSUES.md with header `# Issues` and `## Archived` section.
85
+
86
+ 9. Create empty docs/HISTORY.md.
87
+
88
+
89
+ 11. Create docs/ENDPOINTS.md:
90
+ ```
91
+ # Endpoints — <project name>
92
+ > Maintained by implementer. Updated each phase.
93
+ > Base URL: (populated after deployment phase)
94
+ ```
95
+
96
+ Then stop and show me PLAN.md for approval before any phase starts.
97
+
98
+ before starting Phase 1."
@@ -0,0 +1,191 @@
1
+ ---
2
+ description: Run one phase end-to-end. TDD phases run SCAFFOLD -> RED -> GREEN; non-TDD phases run IMPLEMENT -> TEST. Both with the debug circuit breaker and the regression guard at CLOSE.
3
+ argument-hint: [phase number]
4
+ ---
5
+
6
+ Caveman ULTRA mode. You are the ORCHESTRATOR. Route work to subagents —
7
+ you do NOT implement or debug yourself.
8
+
9
+ Note: subagents cannot talk to the user. Only YOU can.
10
+
11
+ Target phase: $ARGUMENTS (default: the phase marked pending in docs/PLAN.md)
12
+
13
+ ---
14
+
15
+ ## 0. PRE-FLIGHT
16
+
17
+ a. INFRA CHECK (phases > 0):
18
+
19
+ b. PHASE STATE CHECK: Read docs/STATE.md and docs/PLAN.md.
20
+ - No phase in progress, requested is next pending -> START at step 1.
21
+ - Same phase in-progress -> RESUME from STATE.md "next action".
22
+ - Different phase in-progress -> STOP. Tell me which phase is open.
23
+ - Out of dependency order -> STOP. Warn, proceed only if I confirm.
24
+ - Phase not in PLAN.md -> STOP. Suggest /overview or /replan.
25
+
26
+ c. FINAL PHASE CHECK: Read docs/PLAN.md. Is this the last phase (no further
27
+ pending phases after this one)? Record this as IS_FINAL_PHASE=true/false.
28
+
29
+
30
+ ---
31
+
32
+ ## 1. RESEARCH + TDD APPLICABILITY
33
+
34
+ Dispatch `researcher` in IMPL mode scoped to this phase.
35
+ Returns terse summary + path. Read the file only if needed.
36
+ Unknowns block the phase -> re-dispatch narrowed. No guessing.
37
+
38
+ Then classify the phase:
39
+
40
+ `TDD_PHASE` = the phase adds or changes a PUBLIC CALLABLE SURFACE (endpoint,
41
+ exported function/class, CLI command, message contract) assertable from the
42
+ acceptance spec. Size is NOT the criterion.
43
+
44
+ - Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §3a → §3b).
45
+ - Pure infra/config/doc, no public surface -> `TDD_PHASE=false` -> run the
46
+ non-TDD path (§2N → §3N).
47
+ - AMBIGUOUS -> default `TDD_PHASE=true`, but STATE the classification + the reason
48
+ to me, so I can override to non-TDD BEFORE SCAFFOLD fires. (Hard rule 11: never
49
+ downgrade a TDD phase just to dodge the RED gate.)
50
+
51
+ =====================================================================
52
+ ## TDD PATH (TDD_PHASE=true)
53
+ =====================================================================
54
+
55
+ ## 2. SCAFFOLD
56
+
57
+ Dispatch `implementer` in SCAFFOLD mode: interface stubs only (signatures +
58
+ types; bodies raise NotImplementedError / return 501); NO logic, NO tests.
59
+ Returns the stub files + the interface surface.
60
+
61
+ ## 3a. RED
62
+
63
+ Dispatch `test-author` to write the REAL API suite (+ mock) BLIND against the
64
+ stubs + acceptance. Place contract/ENDPOINTS tests in `tests/regression/`,
65
+ phase-local tests in `tests/phase-<n>/`. Run the suite.
66
+
67
+ RED GATE = every acceptance test COLLECTS cleanly AND FAILS (assertion /
68
+ NotImplemented).
69
+ - Any test PASSES on stubs -> STOP (spec trivial or test wrong); show me.
70
+ - Collection / import / syntax error -> stub mismatch; re-dispatch SCAFFOLD to
71
+ fix SIGNATURES (not logic); re-run.
72
+ - UNDERSPEC -> STOP; ask me to sharpen the acceptance spec.
73
+
74
+ ## 3b. GREEN
75
+
76
+ Dispatch `implementer` in FILL mode with the phase spec + research + the test
77
+ file paths (it MAY read the tests — frozen before logic, no overfit — but must
78
+ NOT edit them). Fill to green. Budget 3, WARN@2, STUCK@3.
79
+
80
+ `scripts/e2e-stack.sh up` / Playwright / `down`).
81
+
82
+ PHASE GATE (rule 5) -> go to §4/§5/§6 (see GATE below).
83
+
84
+ =====================================================================
85
+ ## NON-TDD PATH (TDD_PHASE=false)
86
+ =====================================================================
87
+
88
+ ## 2N. IMPLEMENT
89
+
90
+ Dispatch `implementer` (legacy mode) with phase spec + research summary.
91
+ Returns STUCK -> go to ESCALATE.
92
+ If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
93
+ includes "deployed URL" before proceeding.
94
+
95
+ ## 3N. TEST (blind)
96
+
97
+ Dispatch `test-author`. It writes MOCK + REAL API suites from the acceptance
98
+ spec — never reads the logic. (e2e-runner only if frontend.)
99
+
100
+ =====================================================================
101
+
102
+ ## GATE (both paths)
103
+
104
+ PHASE GATE = current-phase REAL API suite passes AND (if frontend) E2E passes AND
105
+ the accumulated mock regression corpus stays green AND every docs/ENDPOINTS.md
106
+ entry has a regression test (checked at CLOSE).
107
+ - GATE PASS -> go to CLOSE.
108
+ - GATE FAIL (LOGIC FAIL) -> go to FIX.
109
+
110
+ ---
111
+
112
+ ## 4. FIX
113
+
114
+ Dispatch `debugger` (isolated context) on the specific failure.
115
+ - FIXED -> re-run TEST (and the regression corpus).
116
+ - WARN (2 attempts failed) -> relay immediately, then let debugger finish attempt 3.
117
+ - STUCK -> go to ESCALATE.
118
+
119
+ ---
120
+
121
+ ## 5. ESCALATE — circuit breaker. Mode B.
122
+
123
+ FIRST STUCK: STOP. Present to me: the problem, 3 failed hypotheses, the
124
+ debugger's recommendation, the debug file path. Ask what to do. Wait. Options:
125
+ (a) "re-research" -> /unstuck
126
+ (b) hint -> re-dispatch debugger with hint, budget 3
127
+ (c) "skip" / "re-slice" -> mark blocked, dispatch planner
128
+
129
+ SECOND STUCK: STOP completely. Full summary — every hypothesis, current state,
130
+ what to try next. Hand control to me.
131
+
132
+ ---
133
+
134
+ ## 6. CLOSE
135
+
136
+ REGRESSION GATE (before closing — Feature 3):
137
+ - Run `scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
138
+ - ENDPOINTS COVERAGE: every `docs/ENDPOINTS.md` entry MUST have >=1 test in
139
+ `tests/regression/`. Zero coverage -> FAIL HARD; do not close.
140
+ - IF IS_FINAL_PHASE: additionally run `scripts/regression.sh --real` (full real
141
+ corpus). A failure blocks close.
142
+
143
+ Mark phase `done` in docs/PLAN.md.
144
+
145
+ ARCHITECTURE SELF-CHECK: did this phase add/remove/rename an agent, hook, or
146
+ command, or change a workflow rule? YES -> run `/log-decision`. NO -> state why not.
147
+
148
+ IF IS_FINAL_PHASE — FINAL CLOSE sequence:
149
+
150
+ a. Run `/synthesize` — pass the signal that this is the final phase so the
151
+ synthesizer runs the extended pass (OVERVIEW.md + README.md update).
152
+
153
+ b. Read docs/ENDPOINTS.md. Surface a "READY TO USE" summary to me:
154
+ ```
155
+ ✅ PROJECT COMPLETE
156
+
157
+
158
+ ## Endpoints
159
+ <paste the full docs/ENDPOINTS.md table>
160
+
161
+ ## Quick start
162
+ - Base URL: <URL>
163
+ - Auth: <Bearer token / API key / none — from ENDPOINTS.md>
164
+ - Health check: GET <base URL>/health
165
+
166
+ ## Docs
167
+ - Full endpoint catalogue: docs/ENDPOINTS.md
168
+ - Project history: docs/HISTORY.md
169
+ ```
170
+ Tell me the project is complete and ready to use.
171
+
172
+ ELSE (not final phase):
173
+
174
+ Run `/synthesize`.
175
+ Tell me phase done + the next phase. Recommend `/clear` then `/phase` next.
176
+
177
+ ---
178
+
179
+ ## STATE CHECKPOINTING
180
+
181
+ After each step, update docs/STATE.md:
182
+ ```
183
+
184
+ phase: <n> (in progress)
185
+ tdd: <true|false>
186
+ completed: <steps done so far>
187
+ next: <exact next step>
188
+ blocker: <none or open issue>
189
+
190
+ ```
191
+ Keep STATE.md small — overwrite, do not append.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Make a small, obvious change directly — no agent chain, no phase overhead.
3
+ argument-hint: [what to change]
4
+ ---
5
+
6
+ Caveman ULTRA mode. Apply `karpathy-guidelines` skill.
7
+
8
+ Purpose: skip the orchestration tax for a 5-line fix.
9
+
10
+ Use `/quick` when ALL hold:
11
+ - change is small (under 30 lines) and obvious
12
+ - no new vertical slice
13
+ - no external service contract change
14
+ - not mid-phase
15
+
16
+ If any fail -> STOP, tell me, recommend `/phase`.
17
+ (Hard rule 11: never route phase-worthy work through `/quick` to dodge the RED gate.)
18
+
19
+ Steps:
20
+ 1. grep docs/ISSUES.md for anything related.
21
+ 2. Make the change. Smallest diff that works.
22
+ 3. Run it — lint/typecheck/smoke. Show me result.
23
+ 4. REGRESSION GUARD: run `scripts/regression.sh` (mock corpus). A break BLOCKS the
24
+ `/quick` — surface it to me and stop. No agent chain is added.
25
+ 5. Error you cannot fix in 2 tries -> STOP. Recommend `/phase`.
26
+ 6. Change revealed a bug -> `/log-issue`.
27
+ 7. ARCHITECTURE SELF-CHECK: touched an agent, hook, command, or workflow rule?
28
+ YES -> `/log-decision`.
29
+
30
+ No STATE.md rewrite, no synthesize, no /clear needed.
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: Revise docs/PLAN.md when it no longer matches reality — add, cut, split, merge, or reorder phases.
3
+ argument-hint: [what changed about the plan]
4
+ ---
5
+
6
+ Caveman ULTRA mode.
7
+
8
+ Recommended: run from plan mode (Shift+Tab). Optional; the command stops for
9
+ your approval regardless.
10
+
11
+ Use when PLAN.md no longer matches reality. Change: $ARGUMENTS
12
+
13
+ ---
14
+
15
+ ## Steps
16
+
17
+ 1. PRE-FLIGHT. Read docs/STATE.md and docs/PLAN.md.
18
+ - Phase in progress -> tell me which. Ask: revise around it, or is it the
19
+ thing being changed? Do not silently rewrite a mid-execution phase.
20
+ - Done phases are FROZEN. /replan never edits or reorders done phases.
21
+ - Phase 0 (infra) is ALWAYS frozen once done.
22
+
23
+ 2. DESIGN RESEARCH CHECK. Scan $ARGUMENTS for signals that design research
24
+ is warranted before re-planning:
25
+ - The change involves architecture (a new integration pattern, auth change, etc.)
26
+ - A service tier or quota change is implied
27
+
28
+ If ANY of these signals are present: dispatch `researcher` in DESIGN mode
29
+ with the specific new service/pattern as the DESIGN TOPICS list. Show me the
30
+ key findings before proceeding to step 3.
31
+
32
+ If none: proceed directly to step 3 (impl-research may still be dispatched
33
+ in step 3 for non-trivial changes per the original logic).
34
+
35
+ 3. IMPL RESEARCH if needed. If the change is non-trivial but design research
36
+ was not needed, dispatch `researcher` in IMPL mode to ground the re-plan
37
+ in facts.
38
+
39
+ 4. RE-PLAN. Dispatch `planner` with the change + current PLAN.md. It must:
40
+ - Keep done phases untouched.
41
+ - Insert / cut / split / merge / reorder only PENDING phases.
42
+ - Place new phases in correct DEPENDENCY order.
43
+ - Keep every phase a vertical slice with its own acceptance spec.
44
+ - Ensure the LAST pending phase still contains the deploy task block.
45
+ - Renumber pending phases if needed; update STATE.md `phase:` pointer.
46
+
47
+ 5. RECONCILE THE REGRESSION CORPUS (scoped to `tests/regression/`):
48
+ - A CUT phase -> retire its regression tests.
49
+ - A MERGE -> consolidate the merged phases' regression tests.
50
+ - A REORDER -> keep the tests as-is (contracts are phase-independent).
51
+ Do NOT touch phase-local `tests/phase-<n>/` here beyond renumbering dirs.
52
+ After reconciling, run `scripts/regression.sh --real` to confirm the
53
+ reconciled corpus still passes against live services. A failure -> surface it
54
+ and stop before approval.
55
+
56
+ 6. SHOW ME the revised phase list + the regression-corpus changes, and STOP for
57
+ approval.
58
+
59
+ 7. ARCHITECTURE SELF-CHECK: re-planning is not normally a kit-architecture
60
+ change. Only run /log-decision if the workflow itself changed (rare).
61
+
62
+ Report what changed: phases added / cut / split / reordered, and regression
63
+ tests retired / consolidated.
@@ -0,0 +1,194 @@
1
+ ---
2
+ description: Promote resolved issues and research findings from this project to the shared istartsoft-flow-kb repo. Analyzes, proposes candidates for your review, then pushes approved entries.
3
+ ---
4
+
5
+ Caveman ULTRA mode. You are the ORCHESTRATOR.
6
+
7
+ Purpose: share what this project learned with all future projects.
8
+ Only resolved issues and completed research qualify. Open issues do NOT.
9
+
10
+ ---
11
+
12
+ ## PRE-FLIGHT
13
+
14
+ 1. Read `.claude/kb-config.json`.
15
+ - Not found -> STOP. Tell me: "KB not configured. Run setup.sh to set up the
16
+ shared KB repo, then retry /store-wisdom."
17
+ - Found -> extract `kb_path` and `kb_remote`.
18
+
19
+ 2. Expand `kb_path` (resolve `~` to home directory).
20
+ Verify the path exists and is a git repo (`git -C <path> status`).
21
+ - Fails -> STOP. Tell me the path is broken and to re-run setup.sh.
22
+
23
+ ---
24
+
25
+ ## STEP 1 — PULL LATEST KB
26
+
27
+ Run: `git -C <kb_path> pull --ff-only`
28
+
29
+ - Success -> continue.
30
+ - Conflict or diverged -> STOP. Tell me:
31
+ "KB has a conflict. Resolve manually in <kb_path>, then retry /store-wisdom."
32
+ - Offline (no network) -> WARN me, ask: "KB pull failed (offline?). Continue
33
+ with local KB copy, or abort?" Wait for answer.
34
+
35
+ ---
36
+
37
+ ## STEP 2 — ANALYZE LOCAL PROJECT
38
+
39
+ Scan this project for promotion candidates:
40
+
41
+ ### From docs/ISSUES.md — resolved issues only
42
+ - Read all entries marked `- [x] resolved`.
43
+ - Exclude: entries with no root cause filled in, entries without a solution.
44
+ - For each qualifying entry, note: title, symptom, root cause, solution,
45
+ failed attempts.
46
+
47
+ ### From docs/research/ — completed research files
48
+ - Read docs/research/INDEX.md. For each entry:
49
+ - Read the corresponding file.
50
+ - A research entry qualifies if: it documents an external service behavior,
51
+ API contract, SDK gotcha, architectural constraint, or cost finding that
52
+ would be useful in a different project.
53
+ - A research entry does NOT qualify if: it is a project-specific config
54
+ finding, a one-off trace with no generalizable conclusion, or a debug
55
+ trace (`debug-*.md`).
56
+ - Note: research entries get a `created:` timestamp (today's date if not
57
+ already present in the file). Staleness is measured from this date.
58
+
59
+ ### Cross-check against KB
60
+ - Read `<kb_path>/INDEX.md` (if it exists).
61
+ - For each candidate: does a matching slug already exist in the KB?
62
+ - YES, fresh entry: skip (already in KB, not stale).
63
+ - YES, stale entry (marked [STALE] in the snapshot): flag as REWRITE candidate.
64
+ - NO: flag as NEW candidate.
65
+
66
+ ---
67
+
68
+ ## STEP 3 — PROPOSE CANDIDATES
69
+
70
+ Present candidates one at a time. For each:
71
+ ```
72
+
73
+ [N of M] <type: NEW | REWRITE> — <slug>
74
+ Tags: <tag1, tag2, tag3>
75
+ Action: <“new entry” | “replaces stale entry from YYYY-MM-DD”>
76
+
77
+ ## Preview:
78
+
79
+ ## [<slug>]
80
+
81
+ ## created: <YYYY-MM-DD>
82
+ tags: <tags>
83
+ symptom/context: <…>
84
+ root-cause / finding: <…>
85
+ fix / recommendation: <…>
86
+
87
+ [APPROVE / EDIT / SKIP]
88
+
89
+ ```
90
+ - APPROVE: add to approved list.
91
+ - EDIT: ask me for the edit, apply it, re-show, wait for APPROVE or SKIP.
92
+ - SKIP: discard this candidate.
93
+
94
+ After all candidates: show me the summary:
95
+ ```
96
+
97
+ Approved: <N> entries
98
+ Skipped: <M> entries
99
+ Domains to write: <list>
100
+ New domain folders to create: <list or “none”>
101
+ Proceed? [yes / abort]
102
+
103
+ ```
104
+ Wait for "yes" before writing anything.
105
+
106
+ ---
107
+
108
+ ## STEP 4 — WRITE TO KB
109
+
110
+ For each approved entry:
111
+
112
+ 1. Determine the domain file path: `<kb_path>/<domain>/<file>.md`
113
+ - If the directory does not exist: create it.
114
+ - If the file does not exist: create it with a `# <domain> — <file>` header.
115
+
116
+ 2. REWRITE candidates: find the existing `## [<slug>]` block in the file and
117
+ replace it entirely with the new entry.
118
+
119
+ 3. NEW candidates: append the entry to the end of the domain file.
120
+
121
+ 4. Update `<kb_path>/INDEX.md`:
122
+ - For NEW entries: append a line:
123
+ `YYYY-MM-DD | <domain>/<file> | <slug> | <one-sentence summary>`
124
+ - For REWRITE entries: update the existing line in-place (new date, same slug).
125
+
126
+ 5. If this is the first `/store-wisdom` run (no INDEX.md existed):
127
+ Also create `<kb_path>/KB_GUIDE.md` with the entry format reference:
128
+
129
+ ```markdown
130
+ # istartsoft-flow-kb — guide
131
+
132
+ This repo accumulates resolved issues and research findings from iStartSoftFlow projects.
133
+ Populated by `/store-wisdom`. Read by the iStartSoftFlow `researcher` agent at session start.
134
+
135
+ ## Entry format — issues
136
+ ## [slug]
137
+ created: YYYY-MM-DD
138
+ tags: tag1, tag2
139
+ symptom: what was observed
140
+ root-cause: the real underlying cause
141
+ fix: exact solution
142
+ failed-attempts: what did not work
143
+
144
+ ## Entry format — research
145
+ ## [slug]
146
+ created: YYYY-MM-DD
147
+ tags: tag1, tag2
148
+ symptom/context: what prompted the research
149
+ finding: what was discovered
150
+ recommendation: what to do
151
+
152
+ ## INDEX.md format
153
+ YYYY-MM-DD | domain/file | slug | one-sentence summary
154
+
155
+ ## Staleness
156
+ Research entries older than 6 months are flagged [STALE] at session load.
157
+ Stale entries are re-researched locally and rewritten via /store-wisdom.
158
+ Issue entries never go stale.
159
+ ```
160
+
161
+ -----
162
+
163
+ ## STEP 5 — COMMIT AND PUSH
164
+
165
+ Run from `<kb_path>`:
166
+
167
+ ```bash
168
+ git add -A
169
+ git commit -m "store-wisdom: <N> entries from <project-name> (<YYYY-MM-DD>)"
170
+ git push
171
+ ```
172
+
173
+ - Push success -> tell me:
174
+
175
+ ```
176
+ KB updated.
177
+ - entries written: <N> (<list of slugs>)
178
+ - domains touched: <list>
179
+ - new domains created: <list or "none">
180
+ - pushed to: <kb_remote>
181
+ ```
182
+ - Push fails -> tell me the push failed, show the git error.
183
+ The entries ARE written locally — tell me to push manually:
184
+ `git -C <kb_path> push`
185
+
186
+ -----
187
+
188
+ ## NOTES
189
+
190
+ - `/store-wisdom` never modifies docs/ISSUES.md or docs/research/ in this project.
191
+ It reads them; it does not change them.
192
+ - If there are no qualifying candidates, tell me so and stop. Do not push an empty commit.
193
+ - The KB is append-only except for REWRITE of stale research entries.
194
+ Issue entries are never deleted or overwritten — they are facts.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: Compress handoff docs, dedup the issue log, prune snapshots. Run before /clear.
3
+ ---
4
+
5
+ Caveman ULTRA mode.
6
+
7
+ Trigger: end of a phase, or any time STATE.md / ISSUES.md feel bloated.
8
+
9
+ Dispatch the `synthesizer` subagent.
10
+
11
+ For a normal phase: it rewrites STATE.md, dedups ISSUES.md, prunes snapshots,
12
+ appends to HISTORY.md.
13
+
14
+ For the FINAL phase (no further pending phases): also pass the signal
15
+ "FINAL PHASE" so the synthesizer runs the extended pass — updating OVERVIEW.md
16
+ and README.md to reflect the completed project state.
17
+
18
+ To determine if this is the final phase: read docs/PLAN.md. If no phases remain
19
+ with status "pending" after the current one, it is the final phase.
20
+
21
+ When synthesizer returns "safe to /clear: yes", tell me:
22
+ - before/after line counts
23
+ - whether the final-pass ran
24
+ - that I can now run /clear (or proceed to the endpoint summary if final phase)
25
+
26
+ If it returns anything unsafe, show me what and stop.