devflow-kit 3.10.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 +74 -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/cli/commands/backup-session.js +131 -0
- package/dist/cli/commands/compliance.js +16 -3
- package/dist/cli/commands/curation.js +12 -4
- package/dist/cli/commands/init.js +36 -55
- package/dist/cli/commands/install-report.js +95 -0
- package/dist/cli/commands/legacy-sweep.js +140 -45
- package/dist/cli/commands/rules.js +50 -13
- package/dist/cli/commands/uninstall.js +62 -24
- 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/compliance.js +14 -0
- package/dist/core/fs-atomic.js +5 -1
- package/dist/core/orphan-sweep.js +20 -2
- package/dist/core/path-set.js +15 -0
- package/dist/core/plugins.js +6 -5
- package/dist/core/reference-sweep.js +42 -25
- package/dist/core/retired-shipped-names.js +278 -0
- 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/compliance-install.js +38 -13
- package/dist/targets/claude-code/compliance-off-files.js +5 -1
- package/dist/targets/claude-code/curation-install.js +77 -32
- package/dist/targets/claude-code/folder-swap.js +142 -0
- package/dist/targets/claude-code/install-backup.js +780 -0
- package/dist/targets/claude-code/installer.js +383 -192
- package/dist/targets/claude-code/legacy-skill-hashes.js +170 -0
- package/dist/targets/claude-code/linked-folder.js +5 -11
- package/dist/targets/claude-code/reference-converge.js +15 -2
- package/dist/targets/claude-code/rules-folder.js +34 -0
- package/dist/targets/claude-code/shipped-set.js +160 -0
- package/dist/targets/claude-code/workflow-folder-install.js +32 -12
- 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
package/dist/core/plugins.js
CHANGED
|
@@ -86,7 +86,7 @@ export const DEVFLOW_PLUGINS = [
|
|
|
86
86
|
name: 'devflow-plan',
|
|
87
87
|
description: 'Unified design planning with gap analysis and design review',
|
|
88
88
|
commands: ['/plan'],
|
|
89
|
-
agents: ['git', 'skim', 'synthesize', 'design', 'explore'],
|
|
89
|
+
agents: ['git', 'skim', 'synthesize', 'design', 'architect', 'explore'],
|
|
90
90
|
skills: ['gap-analysis', 'design-review', 'patterns', 'worktree-support', 'feature-knowledge', 'apply-feature-knowledge'],
|
|
91
91
|
// D-CHARTER-BOUNDED-INLINE: /plan's main thread orchestrates and loads no
|
|
92
92
|
// companion skills, so `requires:` lists only skills this plugin's command,
|
|
@@ -275,7 +275,7 @@ export const DEVFLOW_PLUGINS = [
|
|
|
275
275
|
name: 'devflow-ambient',
|
|
276
276
|
description: 'Orchestrator ambient mode — session charter, per-prompt reminder, plan handoff',
|
|
277
277
|
commands: [],
|
|
278
|
-
agents: ['code', 'refactor', 'validate', 'polish', 'harden', 'evaluate', 'test', 'skim', 'review', 'git', 'synthesize', 'triage', 'design', 'knowledge', 'research', 'curate', 'explore'],
|
|
278
|
+
agents: ['code', 'refactor', 'validate', 'polish', 'harden', 'evaluate', 'test', 'skim', 'review', 'git', 'synthesize', 'triage', 'design', 'architect', 'knowledge', 'research', 'curate', 'explore'],
|
|
279
279
|
skills: [
|
|
280
280
|
'review-methodology',
|
|
281
281
|
'security',
|
|
@@ -316,7 +316,7 @@ export const DEVFLOW_PLUGINS = [
|
|
|
316
316
|
description: 'Dynamic workflow recipes - dependency-aware tickets→plan→build delivery pipeline',
|
|
317
317
|
// Commands compiled from commands/*.mds at build time (build:mds).
|
|
318
318
|
commands: ['/dynamic-tickets', '/dynamic-plan', '/dynamic-build', '/dynamic-profile'],
|
|
319
|
-
agents: ['code', 'fix', 'validate', 'polish', 'harden', 'evaluate', 'test', 'review', 'git', 'synthesize', 'knowledge', 'design'],
|
|
319
|
+
agents: ['code', 'fix', 'validate', 'polish', 'harden', 'evaluate', 'test', 'review', 'git', 'synthesize', 'knowledge', 'design', 'architect'],
|
|
320
320
|
skills: ['apply-decisions', 'apply-feature-knowledge', 'worktree-support', 'docs-framework'],
|
|
321
321
|
requires: [
|
|
322
322
|
'architecture',
|
|
@@ -640,11 +640,12 @@ export function parsePluginSelection(input, validPlugins) {
|
|
|
640
640
|
/**
|
|
641
641
|
* Deprecated command names from old installations.
|
|
642
642
|
* Used during init to clean up stale command files on upgrade.
|
|
643
|
+
*
|
|
644
|
+
* Each name is a command file that a release installed. The cleanup removes such a file with no
|
|
645
|
+
* backup, so a name that no release shipped does not belong here.
|
|
643
646
|
*/
|
|
644
647
|
export const LEGACY_COMMAND_NAMES = [
|
|
645
|
-
'review',
|
|
646
648
|
'specify',
|
|
647
|
-
'specify-teams',
|
|
648
649
|
];
|
|
649
650
|
/** A command entry of a plugin without its leading `/`. */
|
|
650
651
|
function commandName(cmd) {
|
|
@@ -14,7 +14,9 @@ import * as path from 'path';
|
|
|
14
14
|
* two providers may legitimately both carry a `comment.md`, so the registry name has to
|
|
15
15
|
* be the relative PATH, and the walk has to descend.
|
|
16
16
|
*
|
|
17
|
-
* Never writes
|
|
17
|
+
* Never writes. The sweep names what stays and what goes; a {@link ReferenceSweepDelegate}
|
|
18
|
+
* acts on every entry the manifest does not name, and the sweep itself never removes a
|
|
19
|
+
* folder recursively. No delete-then-write window.
|
|
18
20
|
*/
|
|
19
21
|
/**
|
|
20
22
|
* Descent bound for every walk over the generated reference tree — this sweep and the
|
|
@@ -42,24 +44,27 @@ export const MAX_REFERENCE_SWEEP_DEPTH = 8;
|
|
|
42
44
|
* @param root - Directory to converge (the installed `references/tracker/` tree).
|
|
43
45
|
* @param knownRelPaths - POSIX paths relative to `root` that must survive. Derived from
|
|
44
46
|
* the build's own module registries by the caller — never hand-listed.
|
|
47
|
+
* @param delegate - Acts on every entry the manifest does not name. Required: a sweep with
|
|
48
|
+
* no delegate would have to delete what it cannot name.
|
|
45
49
|
*
|
|
46
50
|
* @returns A {@link SweepResult} whose `removed` entries are POSIX relative paths. A
|
|
47
|
-
* directory into which no manifest path descends is
|
|
48
|
-
* own relative path
|
|
49
|
-
* short, and an empty provider directory is
|
|
50
|
-
* references failed to install. A subtree left
|
|
51
|
+
* directory into which no manifest path descends is handed to the delegate WHOLE and
|
|
52
|
+
* reported by its own relative path once the delegate removed it — leaving it empty
|
|
53
|
+
* would be a convergence that stops one step short, and an empty provider directory is
|
|
54
|
+
* indistinguishable from a provider whose references failed to install. A subtree left
|
|
55
|
+
* unswept because it breached
|
|
51
56
|
* {@link MAX_REFERENCE_SWEEP_DEPTH} is reported in `failed` under its own relative
|
|
52
57
|
* path, for the same reason: everything this sweep did not converge is named.
|
|
53
58
|
*
|
|
54
59
|
* A missing or unreadable `root` is a no-op, not an error: the overlay creates the tree
|
|
55
60
|
* it converges, so an absent one simply means there is nothing to prune yet.
|
|
56
61
|
*/
|
|
57
|
-
export async function sweepOrphanedReferences(root, knownRelPaths) {
|
|
62
|
+
export async function sweepOrphanedReferences(root, knownRelPaths, delegate) {
|
|
58
63
|
const acc = { scanned: 0, removed: [], failed: [] };
|
|
59
|
-
await sweepDirectory(root, '', 0, knownRelPaths, directoryPrefixes(knownRelPaths), acc);
|
|
64
|
+
await sweepDirectory(root, '', 0, knownRelPaths, directoryPrefixes(knownRelPaths), delegate, acc);
|
|
60
65
|
return { scanned: acc.scanned, removed: acc.removed, failed: acc.failed };
|
|
61
66
|
}
|
|
62
|
-
async function sweepDirectory(dir, prefix, depth, known, knownDirPrefixes, acc) {
|
|
67
|
+
async function sweepDirectory(dir, prefix, depth, known, knownDirPrefixes, delegate, acc) {
|
|
63
68
|
if (depth > MAX_REFERENCE_SWEEP_DEPTH) {
|
|
64
69
|
// A breached bound means this subtree is never visited, so any orphan inside it
|
|
65
70
|
// survives. Report it through the same channel as a failed removal: a silent return
|
|
@@ -82,35 +87,47 @@ async function sweepDirectory(dir, prefix, depth, known, knownDirPrefixes, acc)
|
|
|
82
87
|
const relPath = prefix === '' ? entry.name : `${prefix}/${entry.name}`;
|
|
83
88
|
const fullPath = path.join(dir, entry.name);
|
|
84
89
|
// A real subdirectory is either an ancestor of something the manifest names — in
|
|
85
|
-
// which case descend — or dead weight, in which case
|
|
86
|
-
// isDirectory() is false for a symlink-to-dir, so a planted link is treated
|
|
87
|
-
// leaf and
|
|
90
|
+
// which case descend — or dead weight, in which case the delegate takes the whole
|
|
91
|
+
// subtree. isDirectory() is false for a symlink-to-dir, so a planted link is treated
|
|
92
|
+
// as a leaf and handed over rather than followed.
|
|
88
93
|
if (entry.isDirectory()) {
|
|
89
94
|
if (knownDirPrefixes.has(`${relPath}/`)) {
|
|
90
|
-
await sweepDirectory(fullPath, relPath, depth + 1, known, knownDirPrefixes, acc);
|
|
95
|
+
await sweepDirectory(fullPath, relPath, depth + 1, known, knownDirPrefixes, delegate, acc);
|
|
91
96
|
continue;
|
|
92
97
|
}
|
|
93
98
|
acc.scanned++;
|
|
94
|
-
|
|
95
|
-
await fs.rm(fullPath, { recursive: true, force: true });
|
|
96
|
-
acc.removed.push(relPath);
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
acc.failed.push({ name: relPath, error: err }); /* per-item isolation */
|
|
100
|
-
}
|
|
99
|
+
await dispose(fullPath, relPath, true, delegate, acc);
|
|
101
100
|
continue;
|
|
102
101
|
}
|
|
103
102
|
acc.scanned++;
|
|
104
103
|
if (known.has(relPath))
|
|
105
104
|
continue;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
await dispose(fullPath, relPath, false, delegate, acc);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/** Hand one entry to the delegate and record the outcome; a throw from the delegate is a per-item failure. */
|
|
109
|
+
async function dispose(fullPath, relPath, isDirectory, delegate, acc) {
|
|
110
|
+
try {
|
|
111
|
+
const disposition = await delegate.dispose(fullPath, isDirectory);
|
|
112
|
+
switch (disposition.outcome) {
|
|
113
|
+
case 'removed':
|
|
114
|
+
acc.removed.push(relPath);
|
|
115
|
+
break;
|
|
116
|
+
case 'failed':
|
|
117
|
+
acc.failed.push({ name: relPath, error: disposition.error });
|
|
118
|
+
break;
|
|
119
|
+
case 'moved':
|
|
120
|
+
case 'kept':
|
|
121
|
+
break;
|
|
122
|
+
default: {
|
|
123
|
+
const _exhaustive = disposition;
|
|
124
|
+
void _exhaustive;
|
|
125
|
+
}
|
|
112
126
|
}
|
|
113
127
|
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
acc.failed.push({ name: relPath, error: err }); /* per-item isolation */
|
|
130
|
+
}
|
|
114
131
|
}
|
|
115
132
|
/**
|
|
116
133
|
* Every directory prefix some manifest path sits under, trailing slash included:
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { createPathSet } from './path-set.js';
|
|
2
|
+
const names = (list) => Object.freeze([...list]);
|
|
3
|
+
export const RETIRED_SHIPPED = Object.freeze({
|
|
4
|
+
commands: names([
|
|
5
|
+
'ambient',
|
|
6
|
+
'audit-claude',
|
|
7
|
+
'brainstorm',
|
|
8
|
+
'breakdown',
|
|
9
|
+
'catch-up',
|
|
10
|
+
'commit',
|
|
11
|
+
'design',
|
|
12
|
+
'devlog',
|
|
13
|
+
'get-issue',
|
|
14
|
+
'plan-next-steps',
|
|
15
|
+
'pre-commit',
|
|
16
|
+
'pre-pr',
|
|
17
|
+
'pull-request',
|
|
18
|
+
'resolve-comments',
|
|
19
|
+
'specify',
|
|
20
|
+
]),
|
|
21
|
+
agents: names([
|
|
22
|
+
'audit-architecture',
|
|
23
|
+
'audit-complexity',
|
|
24
|
+
'audit-database',
|
|
25
|
+
'audit-dependencies',
|
|
26
|
+
'audit-documentation',
|
|
27
|
+
'audit-performance',
|
|
28
|
+
'audit-security',
|
|
29
|
+
'audit-tests',
|
|
30
|
+
'audit-typescript',
|
|
31
|
+
'brainstorm',
|
|
32
|
+
'catch-up',
|
|
33
|
+
'claude-md-auditor',
|
|
34
|
+
'code-edit',
|
|
35
|
+
'code-fix',
|
|
36
|
+
'code-review',
|
|
37
|
+
'coder',
|
|
38
|
+
'commit',
|
|
39
|
+
'diagnose',
|
|
40
|
+
'get-issue',
|
|
41
|
+
'learning',
|
|
42
|
+
'pr-comments',
|
|
43
|
+
'project-state',
|
|
44
|
+
'pull-request',
|
|
45
|
+
'release',
|
|
46
|
+
'resolver',
|
|
47
|
+
'reviewer',
|
|
48
|
+
'scrutinize',
|
|
49
|
+
'scrutinizer',
|
|
50
|
+
'shepherd',
|
|
51
|
+
'simplifier',
|
|
52
|
+
'simplify',
|
|
53
|
+
'skimmer',
|
|
54
|
+
'synthesizer',
|
|
55
|
+
'tech-debt',
|
|
56
|
+
'validator',
|
|
57
|
+
]),
|
|
58
|
+
rules: names([]),
|
|
59
|
+
skills: names([
|
|
60
|
+
'accessibility',
|
|
61
|
+
'agent-teams',
|
|
62
|
+
'ambient-router',
|
|
63
|
+
'apply-feature-kb',
|
|
64
|
+
'apply-knowledge',
|
|
65
|
+
'architecture-patterns',
|
|
66
|
+
'code-smell',
|
|
67
|
+
'codebase-navigation',
|
|
68
|
+
'commit',
|
|
69
|
+
'complexity-patterns',
|
|
70
|
+
'consistency-patterns',
|
|
71
|
+
'core-patterns',
|
|
72
|
+
'database-patterns',
|
|
73
|
+
'debug',
|
|
74
|
+
'debug-orchestration',
|
|
75
|
+
'debug:guided',
|
|
76
|
+
'debug:orch',
|
|
77
|
+
'debug:triage',
|
|
78
|
+
'decisions-format',
|
|
79
|
+
'dependencies-patterns',
|
|
80
|
+
'devflow',
|
|
81
|
+
'devflow-accessibility',
|
|
82
|
+
'devflow-agent-teams',
|
|
83
|
+
'devflow-architecture-patterns',
|
|
84
|
+
'devflow-code-smell',
|
|
85
|
+
'devflow-codebase-navigation',
|
|
86
|
+
'devflow-commit',
|
|
87
|
+
'devflow-complexity-patterns',
|
|
88
|
+
'devflow-consistency-patterns',
|
|
89
|
+
'devflow-core-patterns',
|
|
90
|
+
'devflow-database-patterns',
|
|
91
|
+
'devflow-debug',
|
|
92
|
+
'devflow-dependencies-patterns',
|
|
93
|
+
'devflow-docs-framework',
|
|
94
|
+
'devflow-documentation-patterns',
|
|
95
|
+
'devflow-error-handling',
|
|
96
|
+
'devflow-frontend-design',
|
|
97
|
+
'devflow-git-safety',
|
|
98
|
+
'devflow-git-workflow',
|
|
99
|
+
'devflow-github-patterns',
|
|
100
|
+
'devflow-implementation-patterns',
|
|
101
|
+
'devflow-input-validation',
|
|
102
|
+
'devflow-pattern-check',
|
|
103
|
+
'devflow-performance-patterns',
|
|
104
|
+
'devflow-pull-request',
|
|
105
|
+
'devflow-react',
|
|
106
|
+
'devflow-regression-patterns',
|
|
107
|
+
'devflow-review-methodology',
|
|
108
|
+
'devflow-security-patterns',
|
|
109
|
+
'devflow-self-review',
|
|
110
|
+
'devflow-test-design',
|
|
111
|
+
'devflow-tests-patterns',
|
|
112
|
+
'devflow-typescript',
|
|
113
|
+
'devflow:agent-teams',
|
|
114
|
+
'devflow:ambient-router',
|
|
115
|
+
'devflow:apply-feature-kb',
|
|
116
|
+
'devflow:apply-knowledge',
|
|
117
|
+
'devflow:architecture-patterns',
|
|
118
|
+
'devflow:complexity-patterns',
|
|
119
|
+
'devflow:consistency-patterns',
|
|
120
|
+
'devflow:core-patterns',
|
|
121
|
+
'devflow:database-patterns',
|
|
122
|
+
'devflow:debug',
|
|
123
|
+
'devflow:debug-orchestration',
|
|
124
|
+
'devflow:debug:guided',
|
|
125
|
+
'devflow:debug:orch',
|
|
126
|
+
'devflow:debug:triage',
|
|
127
|
+
'devflow:dependencies-patterns',
|
|
128
|
+
'devflow:documentation-patterns',
|
|
129
|
+
'devflow:dream-curation',
|
|
130
|
+
'devflow:dream-decisions',
|
|
131
|
+
'devflow:dream-knowledge',
|
|
132
|
+
'devflow:dream-memory',
|
|
133
|
+
'devflow:explore',
|
|
134
|
+
'devflow:explore:guided',
|
|
135
|
+
'devflow:explore:orch',
|
|
136
|
+
'devflow:explore:triage',
|
|
137
|
+
'devflow:feature-kb',
|
|
138
|
+
'devflow:frontend-design',
|
|
139
|
+
'devflow:git-safety',
|
|
140
|
+
'devflow:git-workflow',
|
|
141
|
+
'devflow:github-patterns',
|
|
142
|
+
'devflow:implement',
|
|
143
|
+
'devflow:implement:guided',
|
|
144
|
+
'devflow:implement:orch',
|
|
145
|
+
'devflow:implement:triage',
|
|
146
|
+
'devflow:implementation-orchestration',
|
|
147
|
+
'devflow:implementation-patterns',
|
|
148
|
+
'devflow:input-validation',
|
|
149
|
+
'devflow:knowledge-persistence',
|
|
150
|
+
'devflow:performance-patterns',
|
|
151
|
+
'devflow:pipeline',
|
|
152
|
+
'devflow:pipeline-orchestration',
|
|
153
|
+
'devflow:pipeline:orch',
|
|
154
|
+
'devflow:plan',
|
|
155
|
+
'devflow:plan-orchestration',
|
|
156
|
+
'devflow:plan:guided',
|
|
157
|
+
'devflow:plan:orch',
|
|
158
|
+
'devflow:plan:triage',
|
|
159
|
+
'devflow:regression-patterns',
|
|
160
|
+
'devflow:release:guided',
|
|
161
|
+
'devflow:release:orch',
|
|
162
|
+
'devflow:release:triage',
|
|
163
|
+
'devflow:research',
|
|
164
|
+
'devflow:research:guided',
|
|
165
|
+
'devflow:research:orch',
|
|
166
|
+
'devflow:research:triage',
|
|
167
|
+
'devflow:resolve',
|
|
168
|
+
'devflow:resolve-orchestration',
|
|
169
|
+
'devflow:resolve:orch',
|
|
170
|
+
'devflow:review',
|
|
171
|
+
'devflow:review-orchestration',
|
|
172
|
+
'devflow:review:guided',
|
|
173
|
+
'devflow:review:orch',
|
|
174
|
+
'devflow:review:triage',
|
|
175
|
+
'devflow:router',
|
|
176
|
+
'devflow:search-first',
|
|
177
|
+
'devflow:security-patterns',
|
|
178
|
+
'devflow:self-review',
|
|
179
|
+
'devflow:sidecar',
|
|
180
|
+
'devflow:test-patterns',
|
|
181
|
+
'docs-framework',
|
|
182
|
+
'documentation-patterns',
|
|
183
|
+
'dream-curation',
|
|
184
|
+
'dream-decisions',
|
|
185
|
+
'dream-knowledge',
|
|
186
|
+
'dream-memory',
|
|
187
|
+
'error-handling',
|
|
188
|
+
'explore',
|
|
189
|
+
'explore:guided',
|
|
190
|
+
'explore:orch',
|
|
191
|
+
'explore:triage',
|
|
192
|
+
'feature-kb',
|
|
193
|
+
'frontend-design',
|
|
194
|
+
'git-safety',
|
|
195
|
+
'git-workflow',
|
|
196
|
+
'github-patterns',
|
|
197
|
+
'go',
|
|
198
|
+
'implement',
|
|
199
|
+
'implement:guided',
|
|
200
|
+
'implement:orch',
|
|
201
|
+
'implement:triage',
|
|
202
|
+
'implementation-orchestration',
|
|
203
|
+
'implementation-patterns',
|
|
204
|
+
'input-validation',
|
|
205
|
+
'java',
|
|
206
|
+
'knowledge-persistence',
|
|
207
|
+
'pattern-check',
|
|
208
|
+
'performance-patterns',
|
|
209
|
+
'pipeline',
|
|
210
|
+
'pipeline-orchestration',
|
|
211
|
+
'pipeline:orch',
|
|
212
|
+
'plan',
|
|
213
|
+
'plan-orchestration',
|
|
214
|
+
'plan:guided',
|
|
215
|
+
'plan:orch',
|
|
216
|
+
'plan:triage',
|
|
217
|
+
'pull-request',
|
|
218
|
+
'python',
|
|
219
|
+
'react',
|
|
220
|
+
'regression-patterns',
|
|
221
|
+
'release:guided',
|
|
222
|
+
'release:orch',
|
|
223
|
+
'release:triage',
|
|
224
|
+
'research',
|
|
225
|
+
'research:guided',
|
|
226
|
+
'research:orch',
|
|
227
|
+
'research:triage',
|
|
228
|
+
'resolve',
|
|
229
|
+
'resolve-orchestration',
|
|
230
|
+
'resolve:orch',
|
|
231
|
+
'review',
|
|
232
|
+
'review-methodology',
|
|
233
|
+
'review-orchestration',
|
|
234
|
+
'review:guided',
|
|
235
|
+
'review:orch',
|
|
236
|
+
'review:triage',
|
|
237
|
+
'router',
|
|
238
|
+
'rust',
|
|
239
|
+
'search-first',
|
|
240
|
+
'security-patterns',
|
|
241
|
+
'self-review',
|
|
242
|
+
'sidecar',
|
|
243
|
+
'test-design',
|
|
244
|
+
'test-driven-development',
|
|
245
|
+
'test-patterns',
|
|
246
|
+
'tests-patterns',
|
|
247
|
+
'typescript',
|
|
248
|
+
'worktree-support',
|
|
249
|
+
]),
|
|
250
|
+
skillFiles: Object.freeze({
|
|
251
|
+
'devflow:agent-references': names([
|
|
252
|
+
'references/learning/maintain.md',
|
|
253
|
+
]),
|
|
254
|
+
'devflow:git': names([
|
|
255
|
+
'references/pr/ensure-pr-ready.md',
|
|
256
|
+
]),
|
|
257
|
+
}),
|
|
258
|
+
});
|
|
259
|
+
/**
|
|
260
|
+
* The files of {@link RETIRED_SHIPPED} as paths relative to the Claude dir: the command, agent and
|
|
261
|
+
* rule files, and the listed files of a skill folder. A skill folder of `skills` is not a path
|
|
262
|
+
* here, since the install moves it whole.
|
|
263
|
+
*/
|
|
264
|
+
export function retiredPathSet() {
|
|
265
|
+
const paths = [];
|
|
266
|
+
for (const name of RETIRED_SHIPPED.commands)
|
|
267
|
+
paths.push(`commands/devflow/${name}.md`);
|
|
268
|
+
for (const name of RETIRED_SHIPPED.agents)
|
|
269
|
+
paths.push(`agents/devflow/${name}.md`);
|
|
270
|
+
for (const name of RETIRED_SHIPPED.rules)
|
|
271
|
+
paths.push(`rules/devflow/${name}.md`);
|
|
272
|
+
for (const [skill, files] of Object.entries(RETIRED_SHIPPED.skillFiles)) {
|
|
273
|
+
for (const file of files)
|
|
274
|
+
paths.push(`skills/${skill}/${file}`);
|
|
275
|
+
}
|
|
276
|
+
return createPathSet(paths);
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=retired-shipped-names.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Triage
|
|
3
|
-
description:
|
|
3
|
+
description: Assigns one blast-radius disposition verdict to each review issue. Never edits code.
|
|
4
4
|
model: opus
|
|
5
5
|
effort: high
|
|
6
6
|
skills:
|
|
@@ -16,7 +16,7 @@ omitClaudeMd: true
|
|
|
16
16
|
|
|
17
17
|
# Triage Agent
|
|
18
18
|
|
|
19
|
-
You
|
|
19
|
+
You validate every review issue and assign exactly one disposition from the blast-radius matrix. You judge only (see Boundaries).
|
|
20
20
|
|
|
21
21
|
## Input Context
|
|
22
22
|
|
|
@@ -31,10 +31,8 @@ You receive from orchestrator:
|
|
|
31
31
|
|
|
32
32
|
## Responsibilities
|
|
33
33
|
|
|
34
|
-
1. **Read context per issue**:
|
|
34
|
+
1. **Read context per issue**: Read 30 lines around each reported file:line. Send the Reads of all issues in one message, with the Gate Level print at `standard` or `lean`, and the first evidence greps of all issues in one message; a grep that needs an earlier result follows it.
|
|
35
35
|
2. **Assign disposition**: Run the duplicate grouping pre-pass, then apply the blast-radius matrix to each group's primary. Every issue gets exactly one verdict (DUPLICATE included) — none may vanish.
|
|
36
|
-
3. **Document evidence**: FALSE_POSITIVE requires cited grep/file:line. BY_DESIGN requires a recorded decision, stated in words, or an inline comment/doc citation.
|
|
37
|
-
4. **Assign risk tier**: For every FIX_NOW issue, annotate Standard or Careful.
|
|
38
36
|
|
|
39
37
|
## Duplicate Grouping Pre-Pass
|
|
40
38
|
|
|
@@ -66,14 +64,14 @@ REQUIRES: a comment/doc in the code itself that explicitly documents the intent.
|
|
|
66
64
|
- The affected file is in DIFF_FILES (touched in this branch)
|
|
67
65
|
- The fix is isolated (Standard-risk) anywhere in the codebase
|
|
68
66
|
- Security or correctness issue in any code path touched by this branch
|
|
69
|
-
Annotate
|
|
67
|
+
Annotate every FIX_NOW verdict, from any clause, Standard or Careful (Risk Tier Definitions).
|
|
70
68
|
|
|
71
69
|
**4. FIX_SEPARATE** — valid but exceeds diff blast radius:
|
|
72
70
|
- Unrelated files not in DIFF_FILES that require wide refactor
|
|
73
71
|
- Public API changes unrelated to branch purpose
|
|
74
72
|
- Branch is purpose-constrained (move-only refactor, release branch)
|
|
75
73
|
|
|
76
|
-
**5. TECH_DEBT** — LAST RESORT: only
|
|
74
|
+
**5. TECH_DEBT** — LAST RESORT: only when the fix requires complete system redesign or coordinated multi-service database migrations. "Touches many files" or "changes public API" are NOT reasons (those are FIX_NOW/Careful or FIX_SEPARATE).
|
|
77
75
|
|
|
78
76
|
**Terminal catch-all (no clause matched):** Any valid issue that did not match clauses 3–5: assess blast radius — if the fix scope is contained within the branch's purpose, assign **FIX_NOW** at the appropriate risk tier (Standard or Careful); if the fix scope clearly exceeds the branch's purpose, assign **FIX_SEPARATE**.
|
|
79
77
|
|
|
@@ -89,7 +87,7 @@ Annotate risk tier: **Standard** (isolated, low blast radius) or **Careful** (pu
|
|
|
89
87
|
- Adding tests or improving logging
|
|
90
88
|
- Security fixes in isolated scope
|
|
91
89
|
|
|
92
|
-
**Careful** (Code agent
|
|
90
|
+
**Careful** (Code agent works test-first):
|
|
93
91
|
- Public API or function signature changes
|
|
94
92
|
- Shared state or data model modifications
|
|
95
93
|
- Changes touching more than 3 files
|
|
@@ -165,11 +163,7 @@ Report cap: final message at most about 1,500 tokens; longer material goes to a
|
|
|
165
163
|
|
|
166
164
|
## Boundaries
|
|
167
165
|
|
|
168
|
-
|
|
169
|
-
- Read files for 30-line context around each issue
|
|
170
|
-
- Run grep/Read for FALSE_POSITIVE evidence
|
|
171
|
-
|
|
172
|
-
**Never:**
|
|
166
|
+
You read and judge, and never write. **Never:**
|
|
173
167
|
- Edit any file
|
|
174
168
|
- Run builds, tests, or lint
|
|
175
169
|
- Create commits or branches
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Proactive bug finding with static and semantic analysis
|
|
2
|
+
description: Proactive bug finding in changed code before merge, with static and semantic analysis
|
|
3
3
|
---
|
|
4
4
|
# Bug Analysis Command
|
|
5
5
|
|
|
6
|
-
Run a proactive bug analysis on the current branch: static analysis tools and parallel semantic analyzers, synthesized into one bug report.
|
|
7
|
-
|
|
8
6
|
## Usage
|
|
9
7
|
|
|
10
8
|
`/bug-analysis [--full] [--no-static]`: `--full` ignores incremental state; `--no-static` skips static analysis.
|
|
@@ -21,17 +19,19 @@ Run a proactive bug analysis on the current branch: static analysis tools and pa
|
|
|
21
19
|
node "$HOME/.devflow/scripts/resolve-evidence-policy.cjs" 2>/dev/null; echo "exit=$?"
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `EVIDENCE_POLICY=<required|standard> SOURCE=<file|worktree|default|invalid|error> REF=<branch|none>[ WARN=<remote-unavailable|invalid-file|raised-by-compliance|pr-changes-policy>[,…]] ISSUE_REQUIRED=<true|false> APPLY_CONVENTIONS=<true|false> REQUIRE_NON_AUTHOR_APPROVAL=<true|false>` — these fields, in this order, nothing else, where `<branch>` is a branch name
|
|
22
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `EVIDENCE_POLICY=<required|standard> SOURCE=<file|worktree|default|invalid|error> REF=<branch|none>[ WARN=<remote-unavailable|invalid-file|raised-by-compliance|pr-changes-policy>[,…]] ISSUE_REQUIRED=<true|false> APPLY_CONVENTIONS=<true|false> REQUIRE_NON_AUTHOR_APPROVAL=<true|false>` — these fields, in this order, nothing else, where `<branch>` is a branch name. **Anything else** (including a script that cannot run) ⇒ use `EVIDENCE_POLICY=required SOURCE=error REF=none ISSUE_REQUIRED=true APPLY_CONVENTIONS=true REQUIRE_NON_AUTHOR_APPROVAL=true` instead.
|
|
25
23
|
|
|
26
24
|
Set `EVIDENCE_POLICY`, `ISSUE_REQUIRED`, `APPLY_CONVENTIONS` and `REQUIRE_NON_AUTHOR_APPROVAL` from the accepted line. Pass agents only the three mechanism inputs, never `EVIDENCE_POLICY`. Report `Evidence policy: {EVIDENCE_POLICY} (source: {SOURCE})`, plus any `WARN` tokens as advisory, once in the final report.
|
|
27
25
|
|
|
28
|
-
**Docs root (D-DOCS-ROOT).** Every `.devflow/docs/` path
|
|
26
|
+
**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.
|
|
27
|
+
|
|
28
|
+
Once per start directory (`WORKTREE_PATH` if provided, otherwise cwd), run from it:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
|
|
31
|
+
node "$HOME/.devflow/scripts/resolve-root.cjs" "{start}"; echo "exit=$?"
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
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.
|
|
35
35
|
When `EVIDENCE_POLICY` is `required`, record `TRACEABILITY: DEGRADED (compliance off on this machine; the repository requires evidence)` once, for the Phase 7 report.
|
|
36
36
|
|
|
37
37
|
Spawn Git agent:
|
|
@@ -174,45 +174,29 @@ Set `STATIC_STATUS` to one `{tool}: {value}` per tool: `completed`, `not install
|
|
|
174
174
|
|
|
175
175
|
### Load Feature Knowledge
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
Once per start directory (`WORKTREE_PATH` if provided, otherwise cwd), run from it:
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
|
|
180
|
+
node "$HOME/.devflow/scripts/resolve-root.cjs" "{start}"; echo "exit=$?"
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
**Step 1 — Read the index cache:**
|
|
186
|
-
|
|
187
|
-
Attempt to read `{worktree}/.devflow/features/index.md`. Each line follows the format:
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
- **{slug}** — {areas} — {Use-when description}
|
|
191
|
-
```
|
|
183
|
+
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.
|
|
192
184
|
|
|
193
|
-
|
|
185
|
+
All paths below are relative to `{worktree}`.
|
|
194
186
|
|
|
195
|
-
**Step
|
|
187
|
+
**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.
|
|
196
188
|
|
|
197
|
-
|
|
189
|
+
**Step 2 — Pick relevant KBs:** select the entries whose documented area overlaps the current task (index line, or frontmatter `description` and `directories` on fallback).
|
|
198
190
|
|
|
199
|
-
**Step 3 —
|
|
191
|
+
**Step 3 — Read each selected KB's Rules.** `{kb}` is `{worktree}/.devflow/features/{slug}/KNOWLEDGE.md`:
|
|
200
192
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
**Step 4 — Read each selected KB's Rules:**
|
|
204
|
-
|
|
205
|
-
For each selected entry, `{kb}` is `{worktree}/.devflow/features/{slug}/KNOWLEDGE.md`:
|
|
206
|
-
|
|
207
|
-
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.
|
|
208
|
-
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.
|
|
193
|
+
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.
|
|
194
|
+
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.
|
|
209
195
|
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.
|
|
210
196
|
|
|
211
|
-
When a KB contradicts the code you observe, **trust the code
|
|
197
|
+
When a KB contradicts the code you observe, **trust the code**.
|
|
212
198
|
|
|
213
|
-
**Step
|
|
214
|
-
|
|
215
|
-
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.
|
|
199
|
+
**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.
|
|
216
200
|
|
|
217
201
|
```
|
|
218
202
|
--- Feature knowledge: {slug} ---
|
|
@@ -223,9 +207,7 @@ Rules:
|
|
|
223
207
|
Headings: L5 Rules · L40 Overview · L62 Anti-Patterns · L118 Key Files
|
|
224
208
|
```
|
|
225
209
|
|
|
226
|
-
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.
|
|
227
|
-
|
|
228
|
-
**One git call, then direct reads — no `.cjs` script.**
|
|
210
|
+
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)`.
|
|
229
211
|
|
|
230
212
|
#### Plan Artifact
|
|
231
213
|
|
|
@@ -253,9 +235,7 @@ Pick the focus analyzers from `CHANGED_FILES` (Step 2b; do not re-run `git diff`
|
|
|
253
235
|
**Produces:** ANALYZER_OUTPUTS
|
|
254
236
|
**Requires:** DIFF_RANGE, ANALYSIS_DIR, ACTIVE_FOCUSES, STATIC_FINDINGS, ACCEPTANCE_RULES, PLAN_CONTEXT, FEATURE_KNOWLEDGE
|
|
255
237
|
|
|
256
|
-
Spawn
|
|
257
|
-
|
|
258
|
-
For each active focus, spawn:
|
|
238
|
+
Spawn one Debug agent for each active focus, all in a single message (parallel, not background):
|
|
259
239
|
```
|
|
260
240
|
Agent(subagent_type="Debug", run_in_background=false):
|
|
261
241
|
"Analyze focusing on {focus}.
|
|
@@ -332,7 +312,7 @@ Seven phases: Phase 1 to Phase 7.
|
|
|
332
312
|
|------|----------|
|
|
333
313
|
| Rebase invalidates `.last-analysis-head` SHA | `git cat-file -t` check fails → fallback to full diff |
|
|
334
314
|
| Zero changed files in DIFF_RANGE with exit 0 | Stop: "No changes to analyze." |
|
|
335
|
-
| `--full` flag |
|
|
315
|
+
| `--full` flag | Step 2a takes the full-range path |
|
|
336
316
|
| A scanner did not run or did not complete | Name the tool and why in `STATIC_FINDINGS`, not `(none)`; a tool that did not complete keeps the marker |
|
|
337
317
|
|
|
338
318
|
## Resolve Compatibility
|