devflow-kit 3.11.0 → 3.12.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 +43 -0
- package/dist/agents/architect.md +87 -0
- package/dist/agents/code.md +21 -25
- package/dist/agents/debug.md +21 -49
- package/dist/agents/design.md +9 -43
- package/dist/agents/fix.md +15 -29
- package/dist/agents/git.md +19 -22
- package/dist/agents/harden.md +14 -19
- package/dist/agents/knowledge.md +11 -19
- package/dist/agents/refactor.md +9 -14
- package/dist/agents/research.md +11 -34
- package/dist/agents/review.md +22 -52
- package/dist/agents/skim.md +7 -17
- package/dist/agents/triage.md +7 -14
- package/dist/commands/bug-analysis.md +31 -62
- package/dist/commands/code-review.md +38 -87
- package/dist/commands/debug.md +32 -82
- package/dist/commands/dynamic-build.md +155 -211
- package/dist/commands/dynamic-plan.md +71 -93
- package/dist/commands/dynamic-profile.md +7 -155
- package/dist/commands/dynamic-tickets.md +65 -186
- package/dist/commands/explore.md +27 -70
- package/dist/commands/implement.md +98 -186
- package/dist/commands/plan.md +60 -107
- package/dist/commands/release.md +25 -91
- package/dist/commands/research.md +34 -103
- package/dist/commands/resolve.md +64 -128
- package/dist/commands/self-review.md +35 -99
- package/dist/compliance-off/agents/git.md +15 -18
- package/dist/compliance-off/agents/triage.md +7 -14
- package/dist/compliance-off/commands/bug-analysis.md +31 -62
- package/dist/compliance-off/commands/code-review.md +34 -82
- package/dist/compliance-off/commands/dynamic-build.md +149 -205
- package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
- package/dist/compliance-off/commands/implement.md +94 -180
- package/dist/compliance-off/commands/plan.md +60 -107
- package/dist/compliance-off/commands/release.md +25 -90
- package/dist/compliance-off/commands/resolve.md +54 -128
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/core/plugins.js +3 -3
- package/dist/curation-compliance-off/agents/triage.md +7 -13
- package/dist/curation-compliance-off/commands/bug-analysis.md +21 -41
- package/dist/curation-compliance-off/commands/code-review.md +25 -62
- package/dist/curation-compliance-off/commands/dynamic-build.md +142 -194
- package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-compliance-off/commands/implement.md +86 -161
- package/dist/curation-compliance-off/commands/plan.md +51 -86
- package/dist/curation-compliance-off/commands/release.md +17 -78
- package/dist/curation-compliance-off/commands/resolve.md +45 -108
- package/dist/curation-off/agents/architect.md +81 -0
- package/dist/curation-off/agents/code.md +20 -23
- package/dist/curation-off/agents/debug.md +19 -47
- package/dist/curation-off/agents/design.md +8 -41
- package/dist/curation-off/agents/fix.md +14 -27
- package/dist/curation-off/agents/harden.md +13 -18
- package/dist/curation-off/agents/knowledge.md +9 -17
- package/dist/curation-off/agents/refactor.md +8 -12
- package/dist/curation-off/agents/research.md +9 -32
- package/dist/curation-off/agents/review.md +11 -40
- package/dist/curation-off/agents/skim.md +7 -17
- package/dist/curation-off/agents/triage.md +7 -13
- package/dist/curation-off/commands/bug-analysis.md +21 -41
- package/dist/curation-off/commands/code-review.md +29 -67
- package/dist/curation-off/commands/debug.md +24 -63
- package/dist/curation-off/commands/dynamic-build.md +148 -200
- package/dist/curation-off/commands/dynamic-plan.md +60 -80
- package/dist/curation-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-off/commands/explore.md +18 -50
- package/dist/curation-off/commands/implement.md +90 -167
- package/dist/curation-off/commands/plan.md +51 -86
- package/dist/curation-off/commands/release.md +17 -79
- package/dist/curation-off/commands/research.md +23 -81
- package/dist/curation-off/commands/resolve.md +55 -108
- package/dist/curation-off/commands/self-review.md +26 -78
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/targets/claude-code/curation-install.js +2 -2
- package/dist/variant-axes.json +5 -1
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +3 -5
- package/src/assets/agents/_partials/_design.mds +86 -0
- package/src/assets/agents/architect.mds +41 -0
- package/src/assets/agents/code.mds +18 -20
- package/src/assets/agents/curate.md +26 -35
- package/src/assets/agents/debug.mds +21 -49
- package/src/assets/agents/design.mds +11 -114
- package/src/assets/agents/evaluate.md +6 -16
- package/src/assets/agents/explore.md +1 -2
- package/src/assets/agents/fix.mds +12 -24
- package/src/assets/agents/git.mds +20 -23
- package/src/assets/agents/harden.mds +14 -19
- package/src/assets/agents/knowledge.mds +10 -38
- package/src/assets/agents/polish.md +13 -39
- package/src/assets/agents/refactor.mds +6 -9
- package/src/assets/agents/research.mds +11 -34
- package/src/assets/agents/review.mds +12 -84
- package/src/assets/agents/skim.mds +7 -17
- package/src/assets/agents/synthesize.md +3 -21
- package/src/assets/agents/test.md +31 -32
- package/src/assets/agents/tracker.md +116 -229
- package/src/assets/agents/triage.mds +7 -26
- package/src/assets/agents/validate.md +1 -3
- package/src/assets/commands/_partials/_compliance.mds +2 -2
- package/src/assets/commands/_partials/_decisions.mds +17 -24
- package/src/assets/commands/_partials/_docs_root.mds +31 -10
- package/src/assets/commands/_partials/_engine.mds +34 -56
- package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
- package/src/assets/commands/_partials/_factory.mds +10 -104
- package/src/assets/commands/_partials/_knowledge.mds +47 -51
- package/src/assets/commands/_partials/_plan_contract.mds +2 -2
- package/src/assets/commands/_partials/_preamble.mds +21 -21
- package/src/assets/commands/_partials/_publication.mds +3 -3
- package/src/assets/commands/_partials/_roster.mds +12 -13
- package/src/assets/commands/_partials/_settings.mds +6 -3
- package/src/assets/commands/_partials/_ticket_template.mds +3 -7
- package/src/assets/commands/_partials/_tracker.mds +10 -5
- package/src/assets/commands/_partials/_wave.mds +23 -32
- package/src/assets/commands/bug-analysis.mds +3 -7
- package/src/assets/commands/code-review.mds +12 -33
- package/src/assets/commands/debug.mds +5 -47
- package/src/assets/commands/dynamic-build.mds +48 -70
- package/src/assets/commands/dynamic-plan.mds +23 -42
- package/src/assets/commands/dynamic-profile.mds +7 -57
- package/src/assets/commands/dynamic-tickets.mds +9 -29
- package/src/assets/commands/explore.mds +5 -44
- package/src/assets/commands/implement.mds +75 -117
- package/src/assets/commands/plan.mds +27 -57
- package/src/assets/commands/release.mds +4 -62
- package/src/assets/commands/research.mds +7 -53
- package/src/assets/commands/resolve.mds +40 -87
- package/src/assets/commands/self-review.mds +5 -45
- package/src/assets/mds/git/_ops_pr.mds +1 -0
- package/src/assets/mds/git/_ops_steps.mds +4 -4
- package/src/assets/mds/git/_pr.mds +1 -1
- package/src/assets/rules/engineering.md +1 -1
- package/src/assets/rules/quality.md +2 -2
- package/src/assets/scripts/ci-wait.cjs +150 -18
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
- package/src/assets/scripts/hooks/preamble +2 -3
- package/src/assets/scripts/pr-evidence.cjs +1 -0
- package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
- package/src/assets/scripts/resolve-root.cjs +186 -0
- package/src/assets/scripts/resolve-settings.cjs +14 -9
- package/src/assets/scripts/verify-evidence.cjs +355 -22
- package/src/assets/skills/accessibility/SKILL.md +28 -95
- package/src/assets/skills/agent-references/SKILL.md +2 -4
- package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
- package/src/assets/skills/apply-decisions/SKILL.md +5 -6
- package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
- package/src/assets/skills/architecture/SKILL.md +29 -105
- package/src/assets/skills/boundary-validation/SKILL.md +27 -78
- package/src/assets/skills/complexity/SKILL.md +8 -104
- package/src/assets/skills/compliance/SKILL.md +9 -67
- package/src/assets/skills/consistency/SKILL.md +7 -107
- package/src/assets/skills/database/SKILL.md +7 -72
- package/src/assets/skills/dependencies/SKILL.md +9 -109
- package/src/assets/skills/dependencies/references/detection.md +10 -0
- package/src/assets/skills/dependency-research/SKILL.md +9 -63
- package/src/assets/skills/design-review/SKILL.md +1 -35
- package/src/assets/skills/docs-framework/SKILL.md +4 -47
- package/src/assets/skills/documentation/SKILL.md +7 -71
- package/src/assets/skills/documentation/references/patterns.md +1 -1
- package/src/assets/skills/documentation/references/violations.md +1 -1
- package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
- package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
- package/src/assets/skills/gap-analysis/SKILL.md +1 -31
- package/src/assets/skills/git/SKILL.md +2 -22
- package/src/assets/skills/go/SKILL.md +24 -113
- package/src/assets/skills/java/SKILL.md +12 -98
- package/src/assets/skills/patterns/SKILL.md +8 -93
- package/src/assets/skills/performance/SKILL.md +29 -88
- package/src/assets/skills/python/SKILL.md +22 -120
- package/src/assets/skills/qa/SKILL.md +16 -54
- package/src/assets/skills/qa/references/browser-testing.md +0 -24
- package/src/assets/skills/qa/references/sources.md +2 -2
- package/src/assets/skills/quality-gates/SKILL.md +13 -100
- package/src/assets/skills/react/SKILL.md +33 -95
- package/src/assets/skills/regression/SKILL.md +8 -73
- package/src/assets/skills/reliability/SKILL.md +11 -120
- package/src/assets/skills/research-codebase/SKILL.md +7 -49
- package/src/assets/skills/research-competitor/SKILL.md +4 -39
- package/src/assets/skills/research-external/SKILL.md +5 -43
- package/src/assets/skills/research-market/SKILL.md +5 -43
- package/src/assets/skills/research-technology/SKILL.md +8 -68
- package/src/assets/skills/review-methodology/SKILL.md +10 -56
- package/src/assets/skills/rust/SKILL.md +19 -109
- package/src/assets/skills/security/SKILL.md +39 -66
- package/src/assets/skills/software-design/SKILL.md +20 -105
- package/src/assets/skills/software-design/references/patterns.md +84 -2
- package/src/assets/skills/software-design/references/violations.md +1 -1
- package/src/assets/skills/test-driven-development/SKILL.md +32 -107
- package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
- package/src/assets/skills/testing/SKILL.md +35 -53
- package/src/assets/skills/typescript/SKILL.md +23 -102
- package/src/assets/skills/ui-design/SKILL.md +26 -74
- package/src/assets/skills/worktree-support/SKILL.md +4 -10
- package/dist/curation-off/commands/dynamic-profile.md +0 -214
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Research a topic
|
|
2
|
+
description: Research a topic with parallel multi-type Research agents and trust-aware synthesis
|
|
3
3
|
---
|
|
4
4
|
# Research Command
|
|
5
5
|
|
|
6
|
-
Research a topic by spawning parallel Research agents across multiple research types (codebase, external, market, competitor, technology). Findings are trust-annotated and synthesized into structured output.
|
|
7
|
-
|
|
8
6
|
## Usage
|
|
9
7
|
|
|
10
8
|
```
|
|
@@ -22,10 +20,7 @@ What follows `/research` is bound once, here. Every later step names it `COMMAND
|
|
|
22
20
|
$ARGUMENTS
|
|
23
21
|
</command-input>
|
|
24
22
|
|
|
25
|
-
`COMMAND_INPUT`
|
|
26
|
-
- Research question: "best caching strategies"
|
|
27
|
-
- Comparison question: "compare React vs Svelte for our use case"
|
|
28
|
-
- Empty: use conversation context
|
|
23
|
+
An empty `COMMAND_INPUT` means: use the conversation context.
|
|
29
24
|
|
|
30
25
|
## Phases
|
|
31
26
|
|
|
@@ -33,50 +28,43 @@ $ARGUMENTS
|
|
|
33
28
|
|
|
34
29
|
**Produces:** DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
35
30
|
|
|
36
|
-
**Docs root (D-DOCS-ROOT).** Every `.devflow/docs/` path
|
|
31
|
+
**Docs root (D-DOCS-ROOT).** Every `.devflow/docs/` path is `{worktree}/.devflow/docs/…`. A repo-relative docs path handed to an agent travels with a `WORKTREE_PATH` naming its checkout.
|
|
32
|
+
|
|
33
|
+
Once per start directory (`WORKTREE_PATH` if provided, otherwise cwd), run from it:
|
|
37
34
|
|
|
38
35
|
```bash
|
|
39
|
-
|
|
36
|
+
node "$HOME/.devflow/scripts/resolve-root.cjs" "{start}"; echo "exit=$?"
|
|
40
37
|
```
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
Accept only the three lines `WORKTREE=<absolute path>`, `LEDGER=<absolute path>` and `exit=0`, which set `{worktree}` and `{ledger}`. Otherwise both are the start directory.
|
|
43
40
|
|
|
44
|
-
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for
|
|
41
|
+
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for:
|
|
45
42
|
|
|
46
43
|
```bash
|
|
47
44
|
node "$HOME/.devflow/scripts/resolve-settings.cjs" "{root}" 2>/dev/null; echo "exit=$?"
|
|
48
45
|
```
|
|
49
46
|
|
|
50
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (
|
|
47
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (including a script that cannot run) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=off CURATION=off KNOWLEDGE=off GATE_LEVEL=full` instead.
|
|
51
48
|
|
|
52
49
|
The accepted line is the only source of these values.
|
|
53
50
|
|
|
54
51
|
### Load DECISIONS_CONTEXT
|
|
55
52
|
|
|
56
|
-
When the settings line says `CURATION=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step,
|
|
53
|
+
When the settings line says `CURATION=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step, reading no index.
|
|
57
54
|
|
|
58
|
-
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy
|
|
55
|
+
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy.
|
|
56
|
+
|
|
57
|
+
Once per start directory (`WORKTREE_PATH` if provided, otherwise cwd), run from it:
|
|
59
58
|
|
|
60
59
|
```bash
|
|
61
|
-
|
|
60
|
+
node "$HOME/.devflow/scripts/resolve-root.cjs" "{start}"; echo "exit=$?"
|
|
62
61
|
```
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
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.
|
|
67
|
-
2. **The toplevel** — line 1, or on an older git the line after the echoed flag.
|
|
68
|
-
3. **The start directory itself** — when the command failed or printed no absolute toplevel (outside a git repository).
|
|
69
|
-
|
|
70
|
-
This is the rule the curation hooks apply, so you read the index the Curate agent writes.
|
|
71
|
-
|
|
72
|
-
**Step 1 — Read the pre-rendered index:**
|
|
73
|
-
|
|
74
|
-
Attempt to read `{ledger}/.devflow/curation/index.md`.
|
|
63
|
+
Accept only the three lines `WORKTREE=<absolute path>`, `LEDGER=<absolute path>` and `exit=0`, which set `{worktree}` and `{ledger}`. Otherwise both are the start directory.
|
|
75
64
|
|
|
76
|
-
|
|
77
|
-
- If the file is absent or empty: set `DECISIONS_CONTEXT` to `(none)`.
|
|
65
|
+
**Step 1 — Read the pre-rendered index** `{ledger}/.devflow/curation/index.md`. Its content is `DECISIONS_CONTEXT`; if it is absent or empty, `DECISIONS_CONTEXT` is `(none)`.
|
|
78
66
|
|
|
79
|
-
The index is one direct file read
|
|
67
|
+
The index is one direct file read.
|
|
80
68
|
|
|
81
69
|
**Step 2 — Slice the index, then hand it on:**
|
|
82
70
|
|
|
@@ -84,51 +72,33 @@ When `DECISIONS_CONTEXT` is not `(none)`, hand it only to the agents whose contr
|
|
|
84
72
|
|
|
85
73
|
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.
|
|
86
74
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Use `DECISIONS_CONTEXT` locally when framing research — prior decisions and pitfalls suggest areas to investigate. Follow `devflow:apply-decisions` to Read full entry bodies on demand. Pass `DECISIONS_CONTEXT` to each Research agent in Phase 4 so their findings can account for relevant decisions.
|
|
75
|
+
Use `DECISIONS_CONTEXT` locally to frame the research. Follow `devflow:apply-decisions` to Read full entry bodies on demand. Pass `DECISIONS_CONTEXT` to each Research agent in Phase 4.
|
|
90
76
|
|
|
91
77
|
### Load Feature Knowledge
|
|
92
78
|
|
|
93
|
-
|
|
79
|
+
Once per start directory (`WORKTREE_PATH` if provided, otherwise cwd), run from it:
|
|
94
80
|
|
|
95
81
|
```bash
|
|
96
|
-
|
|
82
|
+
node "$HOME/.devflow/scripts/resolve-root.cjs" "{start}"; echo "exit=$?"
|
|
97
83
|
```
|
|
98
84
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
**Step 1 — Read the index cache:**
|
|
102
|
-
|
|
103
|
-
Attempt to read `{worktree}/.devflow/features/index.md`. Each line follows the format:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
- **{slug}** — {areas} — {Use-when description}
|
|
107
|
-
```
|
|
85
|
+
Accept only the three lines `WORKTREE=<absolute path>`, `LEDGER=<absolute path>` and `exit=0`, which set `{worktree}` and `{ledger}`. Otherwise both are the start directory.
|
|
108
86
|
|
|
109
|
-
|
|
87
|
+
All paths below are relative to `{worktree}`.
|
|
110
88
|
|
|
111
|
-
**Step
|
|
89
|
+
**Step 1 — Read the index cache** `{worktree}/.devflow/features/index.md`. Each line has the form `- **{slug}** — {areas} — {Use-when description}`. If `index.md` is absent or has no entry line, glob `{worktree}/.devflow/features/*/KNOWLEDGE.md` and read only the YAML frontmatter of each file, in one turn.
|
|
112
90
|
|
|
113
|
-
|
|
91
|
+
**Step 2 — Pick relevant KBs:** select the entries whose documented area overlaps the current task (index line, or frontmatter `description` and `directories` on fallback).
|
|
114
92
|
|
|
115
|
-
**Step 3 —
|
|
93
|
+
**Step 3 — Read each selected KB's Rules.** `{kb}` is `{worktree}/.devflow/features/{slug}/KNOWLEDGE.md`:
|
|
116
94
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
**Step 4 — Read each selected KB's Rules:**
|
|
120
|
-
|
|
121
|
-
For each selected entry, `{kb}` is `{worktree}/.devflow/features/{slug}/KNOWLEDGE.md`:
|
|
122
|
-
|
|
123
|
-
1. List its `##` headings with line numbers through Bash: `command grep -n '^## ' "{kb}"`. This only locates sections; the text of a KB comes from the Read view alone.
|
|
124
|
-
2. Read the `## Rules` range (its line to the next heading) with the Read tool, using `offset` and `limit`, and choose the one to three bullets most relevant to the current task. The choice is yours, made per KB.
|
|
95
|
+
1. List the `##` headings with line numbers of all selected KBs in one Bash call: `command grep -n '^## ' "{kb}" …`. With two or more paths, each line starts with its `{kb}:` path. This only locates sections; the text of a KB comes from the Read view alone.
|
|
96
|
+
2. Read the `## Rules` range (its line to the next heading) with the Read tool, using `offset` and `limit`, all selected KBs in one turn, and choose the one to three bullets most relevant to the task.
|
|
125
97
|
3. If the KB has no `## Rules` section, choose one to three entries from its `## Anti-Patterns` or `## Gotchas` range the same way, and label them by that section's name instead of an ID.
|
|
126
98
|
|
|
127
|
-
When a KB contradicts the code you observe, **trust the code
|
|
99
|
+
When a KB contradicts the code you observe, **trust the code**.
|
|
128
100
|
|
|
129
|
-
**Step
|
|
130
|
-
|
|
131
|
-
Write one block per selected KB. Paste each bullet verbatim from the Read view, never from a shell view. The path is relative to the checkout root; an agent resolves it under `WORKTREE_PATH` when one is provided.
|
|
101
|
+
**Step 4 — Set FEATURE_KNOWLEDGE and FEATURE_KNOWLEDGE_RULES.** Write one block per selected KB. Paste each bullet verbatim from the Read view, never from a shell view. The path is relative to the checkout root; an agent resolves it under `WORKTREE_PATH` when one is provided.
|
|
132
102
|
|
|
133
103
|
```
|
|
134
104
|
--- Feature knowledge: {slug} ---
|
|
@@ -139,11 +109,9 @@ Rules:
|
|
|
139
109
|
Headings: L5 Rules · L40 Overview · L62 Anti-Patterns · L118 Key Files
|
|
140
110
|
```
|
|
141
111
|
|
|
142
|
-
A KB with no Rules section labels its entries `Rules ({section name}):` and gives them no ID. `FEATURE_KNOWLEDGE` is these blocks; `FEATURE_KNOWLEDGE_RULES` is the same blocks without the `Headings:` line.
|
|
143
|
-
|
|
144
|
-
**One git call, then direct reads — no `.cjs` script.**
|
|
112
|
+
A KB with no Rules section labels its entries `Rules ({section name}):` and gives them no ID. `FEATURE_KNOWLEDGE` is these blocks; `FEATURE_KNOWLEDGE_RULES` is the same blocks without the `Headings:` line. Each spawn names the variable its recipient takes. If no KBs exist, no KBs are relevant, or `.devflow/features/` is absent, set both to `(none)`.
|
|
145
113
|
|
|
146
|
-
Use `FEATURE_KNOWLEDGE`
|
|
114
|
+
Use `FEATURE_KNOWLEDGE` locally for research framing. Pass to each Research agent in Phase 4.
|
|
147
115
|
|
|
148
116
|
### Phase 2: Requirements
|
|
149
117
|
|
|
@@ -184,8 +152,6 @@ Each Research agent receives:
|
|
|
184
152
|
- `ORIENT_OUTPUT`: Only for `codebase` type
|
|
185
153
|
- `WORKTREE_PATH`: If in a worktree context
|
|
186
154
|
|
|
187
|
-
Each Research agent writes findings to disk at OUTPUT_PATH.
|
|
188
|
-
|
|
189
155
|
### Phase 5: Synthesize
|
|
190
156
|
|
|
191
157
|
**Produces:** RESEARCH_SUMMARY
|
|
@@ -208,6 +174,7 @@ Output: {worktree}/.devflow/docs/research/{topic-slug}/{YYYY-MM-DD_HHMM}/researc
|
|
|
208
174
|
**Requires:** RESEARCH_SUMMARY
|
|
209
175
|
|
|
210
176
|
Present findings to user with:
|
|
177
|
+
- The research folder `{worktree}/.devflow/docs/research/{topic-slug}/{YYYY-MM-DD_HHMM}/`
|
|
211
178
|
- Trust annotations per finding: (trusted) for codebase, (untrusted) for web, (mixed) for technology
|
|
212
179
|
- Explicit conflicts between codebase and web findings
|
|
213
180
|
- Drill-down offer via AskUserQuestion
|
|
@@ -229,49 +196,13 @@ If external research was skipped due to tool unavailability: inform user.
|
|
|
229
196
|
|
|
230
197
|
## Worktree Support
|
|
231
198
|
|
|
232
|
-
If the orchestrator receives a `WORKTREE_PATH` context
|
|
233
|
-
|
|
234
|
-
## Output
|
|
235
|
-
|
|
236
|
-
Research findings saved to `{worktree}/.devflow/docs/research/{topic-slug}/{YYYY-MM-DD_HHMM}/`:
|
|
237
|
-
- `{type}.md` per research type (codebase.md, external.md, etc.)
|
|
238
|
-
- `research-summary.md` — synthesized findings with trust annotations
|
|
239
|
-
|
|
240
|
-
## Architecture
|
|
241
|
-
|
|
242
|
-
```
|
|
243
|
-
/research (orchestrator)
|
|
244
|
-
│
|
|
245
|
-
├─ Phase 1: Load Decisions (Orchestrator-Local)
|
|
246
|
-
│
|
|
247
|
-
├─ Phase 2: Requirements
|
|
248
|
-
│ └─ Infer 2-5 research types from question
|
|
249
|
-
│
|
|
250
|
-
├─ Phase 3: Orient (conditional — codebase type only)
|
|
251
|
-
│ └─ Skim agent (codebase overview)
|
|
252
|
-
│
|
|
253
|
-
├─ Phase 4: Parallel Research agents
|
|
254
|
-
│ └─ 2-5 Research agents in single message (all types simultaneously)
|
|
255
|
-
│
|
|
256
|
-
├─ Phase 5: Synthesize
|
|
257
|
-
│ └─ Synthesize agent merges findings with trust-aware aggregation
|
|
258
|
-
│
|
|
259
|
-
├─ Phase 6: Present findings with trust annotations and drill-down offer
|
|
260
|
-
│
|
|
261
|
-
└─ Phase 7: Suggest feature knowledge creation (conditional)
|
|
262
|
-
└─ Knowledge agent (if codebase type researched + user accepts)
|
|
263
|
-
```
|
|
199
|
+
If the orchestrator receives a `WORKTREE_PATH` context, pass it through to all spawned agents.
|
|
264
200
|
|
|
265
201
|
## Principles
|
|
266
202
|
|
|
267
|
-
1. **
|
|
268
|
-
2. **Trust transparency** — Every finding is labeled with its trust level (trusted/untrusted/mixed)
|
|
269
|
-
3. **Conflict surfacing** — Contradictions between codebase and web findings are highlighted, not hidden
|
|
270
|
-
4. **Evidence over opinion** — All claims require citations (file:line or URL)
|
|
203
|
+
1. **Evidence over opinion** — All claims require citations (file:line or URL)
|
|
271
204
|
|
|
272
205
|
## Error Handling
|
|
273
206
|
|
|
274
|
-
- If WebSearch/WebFetch unavailable: restrict to codebase type, inform user
|
|
275
207
|
- If a Research agent fails: continue with remaining outputs, note gap in synthesis
|
|
276
208
|
- If Synthesize agent fails: present individual Research agent outputs directly
|
|
277
|
-
- If feature knowledge creation fails: log failure, report research results normally
|