devflow-kit 3.5.0 → 3.6.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/CHANGELOG.md +98 -0
- package/README.md +4 -4
- package/dist/agents/{diagnose.md → debug.md} +4 -4
- package/dist/agents/{code-fix.md → fix.md} +2 -2
- package/dist/agents/{scrutinize.md → harden.md} +6 -6
- package/dist/agents/{code-edit.md → refactor.md} +3 -3
- package/dist/cli/agents-view/render.js +1 -1
- package/dist/cli/commands/init.js +3 -3
- package/dist/cli/commands/learning.js +12 -12
- package/dist/cli/commands/legacy-hooks.js +1 -1
- package/dist/cli/commands/uninstall.js +111 -5
- package/dist/commands/bug-analysis.md +19 -15
- package/dist/commands/code-review.md +13 -22
- package/dist/commands/debug.md +15 -15
- package/dist/commands/dynamic-build.md +51 -55
- package/dist/commands/dynamic-plan.md +11 -9
- package/dist/commands/dynamic-profile.md +7 -5
- package/dist/commands/dynamic-tickets.md +11 -9
- package/dist/commands/explore.md +13 -13
- package/dist/commands/implement.md +58 -127
- package/dist/commands/plan.md +19 -41
- package/dist/commands/release.md +9 -5
- package/dist/commands/research.md +12 -8
- package/dist/commands/resolve.md +42 -86
- package/dist/commands/self-review.md +42 -42
- package/dist/core/agent-models.js +47 -11
- package/dist/core/{learning-tuning-config.js → curate-tuning-config.js} +14 -14
- package/dist/core/learning-queue-cleanup.js +1 -1
- package/dist/core/migrations.js +63 -44
- package/dist/core/plugins.js +14 -12
- package/dist/core/project-paths.js +3 -3
- package/dist/hud/codex-usage.js +247 -0
- package/dist/hud/components/codex-quota.js +37 -0
- package/dist/hud/components/usage-quota.js +1 -1
- package/dist/hud/config.js +1 -0
- package/dist/hud/index.js +16 -3
- package/dist/hud/render.js +3 -1
- package/dist/learning-off/agents/{diagnose.md → debug.md} +4 -4
- package/dist/learning-off/agents/{code-fix.md → fix.md} +2 -2
- package/dist/learning-off/agents/{scrutinize.md → harden.md} +6 -6
- package/dist/learning-off/agents/{code-edit.md → refactor.md} +3 -3
- package/dist/learning-off/commands/bug-analysis.md +9 -9
- package/dist/learning-off/commands/code-review.md +2 -15
- package/dist/learning-off/commands/debug.md +4 -8
- package/dist/learning-off/commands/dynamic-build.md +45 -51
- package/dist/learning-off/commands/dynamic-plan.md +5 -5
- package/dist/learning-off/commands/dynamic-profile.md +1 -1
- package/dist/learning-off/commands/dynamic-tickets.md +5 -5
- package/dist/learning-off/commands/explore.md +2 -6
- package/dist/learning-off/commands/implement.md +46 -119
- package/dist/learning-off/commands/plan.md +8 -33
- package/dist/learning-off/commands/release.md +4 -2
- package/dist/learning-off/commands/research.md +2 -2
- package/dist/learning-off/commands/resolve.md +31 -79
- package/dist/learning-off/commands/self-review.md +30 -34
- package/dist/skills/git/references/pr/check-merge-readiness.md +2 -0
- package/dist/skills/git/references/pr/update-pr-evidence.md +4 -6
- package/dist/targets/claude-code/installer.js +117 -84
- package/dist/targets/claude-code/tracker-servers.js +1 -1
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +2 -2
- package/src/assets/agents/code.mds +2 -2
- package/src/assets/agents/{learning.md → curate.md} +4 -4
- package/src/assets/agents/{diagnose.mds → debug.mds} +4 -4
- package/src/assets/agents/evaluate.md +4 -4
- package/src/assets/agents/{code-fix.mds → fix.mds} +5 -5
- package/src/assets/agents/{scrutinize.mds → harden.mds} +6 -6
- package/src/assets/agents/{simplify.md → polish.md} +4 -4
- package/src/assets/agents/{code-edit.mds → refactor.mds} +6 -6
- package/src/assets/agents/test.md +2 -2
- package/src/assets/commands/_partials/_compliance.mds +1 -1
- package/src/assets/commands/_partials/_decisions.mds +26 -6
- package/src/assets/commands/_partials/_engine.mds +15 -15
- package/src/assets/commands/_partials/_evidence_policy.mds +0 -17
- package/src/assets/commands/_partials/_knowledge.mds +14 -9
- package/src/assets/commands/_partials/_preamble.mds +4 -2
- package/src/assets/commands/_partials/_roster.mds +4 -4
- package/src/assets/commands/bug-analysis.mds +7 -7
- package/src/assets/commands/code-review.mds +1 -14
- package/src/assets/commands/debug.mds +2 -2
- package/src/assets/commands/dynamic-build.mds +26 -32
- package/src/assets/commands/implement.mds +45 -102
- package/src/assets/commands/plan.mds +7 -37
- package/src/assets/commands/release.mds +5 -1
- package/src/assets/commands/resolve.mds +28 -76
- package/src/assets/commands/self-review.mds +27 -27
- package/src/assets/mds/git/_pr.mds +6 -6
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +4 -3
- package/src/assets/scripts/hooks/capture-prompt +1 -1
- package/src/assets/scripts/hooks/capture-question +1 -1
- package/src/assets/scripts/hooks/capture-turn +1 -1
- package/src/assets/scripts/hooks/json-helper.cjs +2 -2
- package/src/assets/scripts/hooks/lib/learning-store.cjs +1 -1
- package/src/assets/scripts/hooks/lib/project-paths.cjs +4 -4
- package/src/assets/scripts/hooks/preamble +1 -1
- package/src/assets/scripts/hooks/session-start-context +58 -45
- package/src/assets/scripts/verify-evidence.cjs +726 -9
- package/src/assets/skills/agent-references/SKILL.md +9 -5
- package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +35 -0
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +15 -0
- package/src/assets/skills/agent-references/references/synthesize/bug-analysis.md +1 -1
- package/src/assets/skills/apply-decisions/SKILL.md +6 -4
- package/src/assets/skills/docs-framework/SKILL.md +3 -3
- package/src/assets/skills/qa/SKILL.md +1 -1
- package/src/assets/skills/quality-gates/SKILL.md +7 -7
- package/src/assets/skills/quality-gates/references/report-template.md +7 -7
- /package/src/assets/skills/agent-references/references/{learning → curate}/maintain.md +0 -0
|
@@ -41,7 +41,7 @@ Spawn devflow agents with:
|
|
|
41
41
|
agent("your prompt here", { agentType: "Code" })
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Valid `agentType` values: Code,
|
|
44
|
+
Valid `agentType` values: Code, Fix, Validate, Polish, Harden, Evaluate, Test, Review, Git, Synthesize, Knowledge, Design.
|
|
45
45
|
|
|
46
46
|
**OMIT `opts.model` whenever `agentType` is set.** The agent frontmatter carries its own model tier (Code→sonnet, Validate→haiku, Review→opus, etc.) and that tier is honored automatically. Passing `opts.model` overrides it — always a mistake.
|
|
47
47
|
|
|
@@ -91,23 +91,25 @@ The accepted line is the only source of these values: the script alone folds the
|
|
|
91
91
|
|
|
92
92
|
When the settings line says `LEARNING=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step, locating no ledger and reading no index.
|
|
93
93
|
|
|
94
|
-
The decisions ledger belongs to the repository, not to one checkout:
|
|
94
|
+
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy, a subdirectory session the repository root's. Locate it with ONE git call, run from the start directory — `WORKTREE_PATH` if provided, otherwise cwd (`devflow:worktree-support`):
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
97
|
git -C "{start}" rev-parse --path-format=absolute --show-toplevel --git-common-dir
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Line 1 is the checkout's toplevel, line 2 the
|
|
100
|
+
Line 1 is the checkout's toplevel, line 2 the common git directory. A git older than 2.31 echoes `--path-format=absolute` back as a line of its own first. `{ledger}` is the first that applies:
|
|
101
101
|
|
|
102
102
|
1. **The main worktree** — line 2 without its trailing `/.git`, when the output is exactly two lines each beginning with `/`, line 2 ends in `/.git`, and the directory left once it is removed is not your home directory and contains a `.devflow/` directory.
|
|
103
103
|
2. **The toplevel** — line 1, or on an older git the line after the echoed flag.
|
|
104
104
|
3. **The start directory itself** — when the command failed or printed no absolute toplevel (outside a git repository).
|
|
105
105
|
|
|
106
|
-
This is the rule the learning hooks apply
|
|
106
|
+
This is the rule the learning hooks apply, so you read the index the Curate agent writes.
|
|
107
107
|
|
|
108
108
|
Before you author the workflow script, read `{ledger}/.devflow/learning/index.md`. If the file is absent or empty, set `DECISIONS_CONTEXT` to `(none)`; otherwise use the file content as `DECISIONS_CONTEXT`.
|
|
109
109
|
|
|
110
|
-
The script body cannot perform this read — you (the main model) do it before authoring. Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code,
|
|
110
|
+
The script body cannot perform this read — you (the main model) do it before authoring. Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code, Fix, Design, Knowledge, Review and Harden agents, which follow `devflow:apply-decisions`. Those are the agent types above whose contract declares it; every other agent type gets no decisions context.
|
|
111
|
+
|
|
112
|
+
Hand each agent that takes `DECISIONS_CONTEXT` a slice, not the whole index: the index lines whose title, scope or area touch the files and task it works on, verbatim, led by `(slice: N of M entries — full index: <absolute index path>)` and closed by the index footer. When unsure, include the line. Siblings over one diff share ONE slice. The script carries one `DECISIONS_CONTEXT` for every agent, so cut it once, over the whole run.
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
@@ -122,10 +124,10 @@ The following agentType values are valid. Model tiers are shown for reference
|
|
|
122
124
|
| agentType | Model tier | Role |
|
|
123
125
|
|-----------|-----------|------|
|
|
124
126
|
| Code | sonnet | Implements the plan and fixes review findings — the Code family is the ONLY one that writes code |
|
|
125
|
-
|
|
|
127
|
+
| Fix | sonnet | Fixes the listed validation, alignment and QA failures — part of the Code family |
|
|
126
128
|
| Validate | haiku | Build / typecheck / lint / test — fast correctness gate |
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
+
| Polish | sonnet | Reduces complexity, removes duplication, improves readability |
|
|
130
|
+
| Harden | opus | 9-pillar self-review — deep structural analysis |
|
|
129
131
|
| Evaluate | sonnet | Plan-fidelity / alignment — "was the plan implemented correctly?" |
|
|
130
132
|
| Test | sonnet | Scenario-based acceptance tests against acceptance criteria |
|
|
131
133
|
| Review | opus | Focus-parameterized code review — spawn ONE agent() per focus area |
|
|
@@ -136,7 +138,7 @@ The following agentType values are valid. Model tiers are shown for reference
|
|
|
136
138
|
|
|
137
139
|
### Agent caveats
|
|
138
140
|
|
|
139
|
-
- **The Code family writes every fix** — Code for review findings,
|
|
141
|
+
- **The Code family writes every fix** — Code for review findings, Fix for gate failures; no other agent type writes code. Finding-verification uses adversarial Review agent-style passes (§6.3 of design doc). Risk-assessment and tech-debt routing live in the post-code pipeline + escalation doctrine.
|
|
140
142
|
- **Always omit `opts.model` with `agentType`.** Each agent honors its own frontmatter model tier; overriding it defeats the per-agent specialization.
|
|
141
143
|
- **Review agents are focus-parameterized.** Each focus is a SEPARATE `agent()` call with `agentType: "Review"` and the focus baked into the prompt. Do NOT batch multiple focuses into one Review agent call — that defeats parallel specialization.
|
|
142
144
|
- **Do not depend on agents enumerating their own skills.** Skills are loaded (spike F5 confirmed) but self-reporting is imperfect. Write agent prompts that give the agent full context directly.
|
|
@@ -41,7 +41,7 @@ Spawn devflow agents with:
|
|
|
41
41
|
agent("your prompt here", { agentType: "Code" })
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Valid `agentType` values: Code,
|
|
44
|
+
Valid `agentType` values: Code, Fix, Validate, Polish, Harden, Evaluate, Test, Review, Git, Synthesize, Knowledge, Design.
|
|
45
45
|
|
|
46
46
|
**OMIT `opts.model` whenever `agentType` is set.** The agent frontmatter carries its own model tier (Code→sonnet, Validate→haiku, Review→opus, etc.) and that tier is honored automatically. Passing `opts.model` overrides it — always a mistake.
|
|
47
47
|
|
|
@@ -91,23 +91,25 @@ The accepted line is the only source of these values: the script alone folds the
|
|
|
91
91
|
|
|
92
92
|
When the settings line says `LEARNING=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step, locating no ledger and reading no index.
|
|
93
93
|
|
|
94
|
-
The decisions ledger belongs to the repository, not to one checkout:
|
|
94
|
+
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy, a subdirectory session the repository root's. Locate it with ONE git call, run from the start directory — `WORKTREE_PATH` if provided, otherwise cwd (`devflow:worktree-support`):
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
97
|
git -C "{start}" rev-parse --path-format=absolute --show-toplevel --git-common-dir
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Line 1 is the checkout's toplevel, line 2 the
|
|
100
|
+
Line 1 is the checkout's toplevel, line 2 the common git directory. A git older than 2.31 echoes `--path-format=absolute` back as a line of its own first. `{ledger}` is the first that applies:
|
|
101
101
|
|
|
102
102
|
1. **The main worktree** — line 2 without its trailing `/.git`, when the output is exactly two lines each beginning with `/`, line 2 ends in `/.git`, and the directory left once it is removed is not your home directory and contains a `.devflow/` directory.
|
|
103
103
|
2. **The toplevel** — line 1, or on an older git the line after the echoed flag.
|
|
104
104
|
3. **The start directory itself** — when the command failed or printed no absolute toplevel (outside a git repository).
|
|
105
105
|
|
|
106
|
-
This is the rule the learning hooks apply
|
|
106
|
+
This is the rule the learning hooks apply, so you read the index the Curate agent writes.
|
|
107
107
|
|
|
108
108
|
Before you author the workflow script, read `{ledger}/.devflow/learning/index.md`. If the file is absent or empty, set `DECISIONS_CONTEXT` to `(none)`; otherwise use the file content as `DECISIONS_CONTEXT`.
|
|
109
109
|
|
|
110
|
-
The script body cannot perform this read — you (the main model) do it before authoring. Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code,
|
|
110
|
+
The script body cannot perform this read — you (the main model) do it before authoring. Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code, Fix, Design, Knowledge, Review and Harden agents, which follow `devflow:apply-decisions`. Those are the agent types above whose contract declares it; every other agent type gets no decisions context.
|
|
111
|
+
|
|
112
|
+
Hand each agent that takes `DECISIONS_CONTEXT` a slice, not the whole index: the index lines whose title, scope or area touch the files and task it works on, verbatim, led by `(slice: N of M entries — full index: <absolute index path>)` and closed by the index footer. When unsure, include the line. Siblings over one diff share ONE slice. The script carries one `DECISIONS_CONTEXT` for every agent, so cut it once, over the whole run.
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
@@ -41,7 +41,7 @@ Spawn devflow agents with:
|
|
|
41
41
|
agent("your prompt here", { agentType: "Code" })
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Valid `agentType` values: Code,
|
|
44
|
+
Valid `agentType` values: Code, Fix, Validate, Polish, Harden, Evaluate, Test, Review, Git, Synthesize, Knowledge, Design.
|
|
45
45
|
|
|
46
46
|
**OMIT `opts.model` whenever `agentType` is set.** The agent frontmatter carries its own model tier (Code→sonnet, Validate→haiku, Review→opus, etc.) and that tier is honored automatically. Passing `opts.model` overrides it — always a mistake.
|
|
47
47
|
|
|
@@ -91,23 +91,25 @@ The accepted line is the only source of these values: the script alone folds the
|
|
|
91
91
|
|
|
92
92
|
When the settings line says `LEARNING=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step, locating no ledger and reading no index.
|
|
93
93
|
|
|
94
|
-
The decisions ledger belongs to the repository, not to one checkout:
|
|
94
|
+
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy, a subdirectory session the repository root's. Locate it with ONE git call, run from the start directory — `WORKTREE_PATH` if provided, otherwise cwd (`devflow:worktree-support`):
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
97
|
git -C "{start}" rev-parse --path-format=absolute --show-toplevel --git-common-dir
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Line 1 is the checkout's toplevel, line 2 the
|
|
100
|
+
Line 1 is the checkout's toplevel, line 2 the common git directory. A git older than 2.31 echoes `--path-format=absolute` back as a line of its own first. `{ledger}` is the first that applies:
|
|
101
101
|
|
|
102
102
|
1. **The main worktree** — line 2 without its trailing `/.git`, when the output is exactly two lines each beginning with `/`, line 2 ends in `/.git`, and the directory left once it is removed is not your home directory and contains a `.devflow/` directory.
|
|
103
103
|
2. **The toplevel** — line 1, or on an older git the line after the echoed flag.
|
|
104
104
|
3. **The start directory itself** — when the command failed or printed no absolute toplevel (outside a git repository).
|
|
105
105
|
|
|
106
|
-
This is the rule the learning hooks apply
|
|
106
|
+
This is the rule the learning hooks apply, so you read the index the Curate agent writes.
|
|
107
107
|
|
|
108
108
|
Before you author the workflow script, read `{ledger}/.devflow/learning/index.md`. If the file is absent or empty, set `DECISIONS_CONTEXT` to `(none)`; otherwise use the file content as `DECISIONS_CONTEXT`.
|
|
109
109
|
|
|
110
|
-
The script body cannot perform this read — you (the main model) do it before authoring. Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code,
|
|
110
|
+
The script body cannot perform this read — you (the main model) do it before authoring. Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code, Fix, Design, Knowledge, Review and Harden agents, which follow `devflow:apply-decisions`. Those are the agent types above whose contract declares it; every other agent type gets no decisions context.
|
|
111
|
+
|
|
112
|
+
Hand each agent that takes `DECISIONS_CONTEXT` a slice, not the whole index: the index lines whose title, scope or area touch the files and task it works on, verbatim, led by `(slice: N of M entries — full index: <absolute index path>)` and closed by the index footer. When unsure, include the line. Siblings over one diff share ONE slice. The script carries one `DECISIONS_CONTEXT` for every agent, so cut it once, over the whole run.
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
@@ -122,10 +124,10 @@ The following agentType values are valid. Model tiers are shown for reference
|
|
|
122
124
|
| agentType | Model tier | Role |
|
|
123
125
|
|-----------|-----------|------|
|
|
124
126
|
| Code | sonnet | Implements the plan and fixes review findings — the Code family is the ONLY one that writes code |
|
|
125
|
-
|
|
|
127
|
+
| Fix | sonnet | Fixes the listed validation, alignment and QA failures — part of the Code family |
|
|
126
128
|
| Validate | haiku | Build / typecheck / lint / test — fast correctness gate |
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
+
| Polish | sonnet | Reduces complexity, removes duplication, improves readability |
|
|
130
|
+
| Harden | opus | 9-pillar self-review — deep structural analysis |
|
|
129
131
|
| Evaluate | sonnet | Plan-fidelity / alignment — "was the plan implemented correctly?" |
|
|
130
132
|
| Test | sonnet | Scenario-based acceptance tests against acceptance criteria |
|
|
131
133
|
| Review | opus | Focus-parameterized code review — spawn ONE agent() per focus area |
|
|
@@ -136,7 +138,7 @@ The following agentType values are valid. Model tiers are shown for reference
|
|
|
136
138
|
|
|
137
139
|
### Agent caveats
|
|
138
140
|
|
|
139
|
-
- **The Code family writes every fix** — Code for review findings,
|
|
141
|
+
- **The Code family writes every fix** — Code for review findings, Fix for gate failures; no other agent type writes code. Finding-verification uses adversarial Review agent-style passes (§6.3 of design doc). Risk-assessment and tech-debt routing live in the post-code pipeline + escalation doctrine.
|
|
140
142
|
- **Always omit `opts.model` with `agentType`.** Each agent honors its own frontmatter model tier; overriding it defeats the per-agent specialization.
|
|
141
143
|
- **Review agents are focus-parameterized.** Each focus is a SEPARATE `agent()` call with `agentType: "Review"` and the focus baked into the prompt. Do NOT batch multiple focuses into one Review agent call — that defeats parallel specialization.
|
|
142
144
|
- **Do not depend on agents enumerating their own skills.** Skills are loaded (spike F5 confirmed) but self-reporting is imperfect. Write agent prompts that give the agent full context directly.
|
package/dist/commands/explore.md
CHANGED
|
@@ -46,19 +46,19 @@ The accepted line is the only source of these values: the script alone folds the
|
|
|
46
46
|
|
|
47
47
|
When the settings line says `LEARNING=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step, locating no ledger and reading no index.
|
|
48
48
|
|
|
49
|
-
The decisions ledger belongs to the repository, not to one checkout:
|
|
49
|
+
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy, a subdirectory session the repository root's. Locate it with ONE git call, run from the start directory — `WORKTREE_PATH` if provided, otherwise cwd (`devflow:worktree-support`):
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
git -C "{start}" rev-parse --path-format=absolute --show-toplevel --git-common-dir
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Line 1 is the checkout's toplevel, line 2 the
|
|
55
|
+
Line 1 is the checkout's toplevel, line 2 the common git directory. A git older than 2.31 echoes `--path-format=absolute` back as a line of its own first. `{ledger}` is the first that applies:
|
|
56
56
|
|
|
57
57
|
1. **The main worktree** — line 2 without its trailing `/.git`, when the output is exactly two lines each beginning with `/`, line 2 ends in `/.git`, and the directory left once it is removed is not your home directory and contains a `.devflow/` directory.
|
|
58
58
|
2. **The toplevel** — line 1, or on an older git the line after the echoed flag.
|
|
59
59
|
3. **The start directory itself** — when the command failed or printed no absolute toplevel (outside a git repository).
|
|
60
60
|
|
|
61
|
-
This is the rule the learning hooks apply
|
|
61
|
+
This is the rule the learning hooks apply, so you read the index the Curate agent writes.
|
|
62
62
|
|
|
63
63
|
**Step 1 — Read the pre-rendered index:**
|
|
64
64
|
|
|
@@ -67,11 +67,15 @@ Attempt to read `{ledger}/.devflow/learning/index.md`.
|
|
|
67
67
|
- If the file exists and contains non-empty content: use that content as `DECISIONS_CONTEXT`.
|
|
68
68
|
- If the file is absent or empty: set `DECISIONS_CONTEXT` to `(none)`.
|
|
69
69
|
|
|
70
|
-
The index is one direct file read, written at render time by `render-decisions.cjs`
|
|
70
|
+
The index is one direct file read, written at render time by `render-decisions.cjs` — no `.cjs` script runs here.
|
|
71
71
|
|
|
72
|
-
**Step 2 —
|
|
72
|
+
**Step 2 — Slice the index, then hand it on:**
|
|
73
73
|
|
|
74
|
-
When `DECISIONS_CONTEXT` is not `(none)`, hand it only to the agents whose contract declares it.
|
|
74
|
+
When `DECISIONS_CONTEXT` is not `(none)`, hand it only to the agents whose contract declares it.
|
|
75
|
+
|
|
76
|
+
Hand each agent that takes `DECISIONS_CONTEXT` a slice, not the whole index: the index lines whose title, scope or area touch the files and task it works on, verbatim, led by `(slice: N of M entries — full index: <absolute index path>)` and closed by the index footer. When unsure, include the line. Siblings over one diff share ONE slice.
|
|
77
|
+
|
|
78
|
+
Those agents follow `devflow:apply-decisions`. A host that uses the index in its own thread says so in its own step.
|
|
75
79
|
|
|
76
80
|
The orchestrator uses `DECISIONS_CONTEXT` locally when framing exploration — prior decisions and pitfalls suggest specific areas to investigate. Follow `devflow:apply-decisions` to Read full entry bodies on demand. **Do NOT pass `DECISIONS_CONTEXT` to Explore sub-agents** — decisions context stays in the orchestrator, not in the investigation workers.
|
|
77
81
|
|
|
@@ -167,21 +171,17 @@ FEATURE_SLUG: {slug derived from primary changed directory, kebab-case}
|
|
|
167
171
|
FEATURE_NAME: {human-readable name}
|
|
168
172
|
DIRECTORIES: {list of primary directories touched by this workflow}
|
|
169
173
|
FILES_CHANGED: {list of files changed}
|
|
170
|
-
DECISIONS_CONTEXT: {
|
|
174
|
+
DECISIONS_CONTEXT: {the slice for these directories, else (none)}
|
|
171
175
|
|
|
172
176
|
Write the knowledge base to:
|
|
173
177
|
{worktree}/.devflow/features/{slug}/KNOWLEDGE.md
|
|
174
178
|
|
|
175
|
-
Then update the index cache
|
|
179
|
+
Then update the index cache:
|
|
176
180
|
{worktree}/.devflow/features/index.md
|
|
177
181
|
|
|
178
182
|
Index line format: `- **{slug}** — {areas} — {Use-when description}` — at most 300 characters, the description at most 220; reword a longer one, never cut it.
|
|
179
183
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
The frontmatter in KNOWLEDGE.md is the source of truth — index.md is only a cache. Write the two files directly — no intermediate result JSON files, no external scripts.
|
|
183
|
-
|
|
184
|
-
After writing, commit the two files to the current worktree branch yourself by running git via your Bash tool (do not use a script). Stage ONLY .devflow/features/index.md and .devflow/features/{slug}/KNOWLEDGE.md, then commit just those paths with a docs(knowledge): message. Do NOT push, do NOT force, do NOT stage anything else. Follow your Commit Protocol — it is non-blocking, so if any git step fails, report KB_COMMIT and finish normally."
|
|
184
|
+
Then commit the two files as your Commit Protocol directs."
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
**Step 4 — Surface an uncommitted knowledge base:**
|