devflow-kit 3.9.0 → 3.11.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 +142 -0
- package/README.md +1 -1
- package/dist/agents/code.md +6 -6
- package/dist/agents/fix.md +6 -6
- package/dist/agents/harden.md +7 -6
- package/dist/agents/refactor.md +6 -6
- package/dist/cli/commands/ambient.js +10 -2
- package/dist/cli/commands/backup-session.js +131 -0
- package/dist/cli/commands/compliance-prompts.js +9 -4
- package/dist/cli/commands/compliance.js +184 -24
- package/dist/cli/commands/curation.js +23 -10
- package/dist/cli/commands/gate-level-prompts.js +39 -25
- package/dist/cli/commands/gates.js +5 -7
- package/dist/cli/commands/init.js +169 -184
- package/dist/cli/commands/install-report.js +129 -0
- package/dist/cli/commands/legacy-sweep.js +159 -0
- package/dist/cli/commands/proxy.js +6 -1
- package/dist/cli/commands/rules.js +75 -21
- package/dist/cli/commands/skills.js +42 -9
- package/dist/cli/commands/tracker.js +9 -3
- package/dist/cli/commands/uninstall.js +339 -75
- package/dist/commands/bug-analysis.md +69 -120
- package/dist/commands/dynamic-build.md +23 -23
- package/dist/commands/implement.md +46 -32
- package/dist/commands/release.md +1 -1
- package/dist/commands/resolve.md +35 -31
- package/dist/commands/self-review.md +8 -7
- package/dist/compliance-off/agents/git.md +120 -0
- package/dist/compliance-off/agents/triage.md +180 -0
- package/dist/compliance-off/commands/bug-analysis.md +398 -0
- package/dist/compliance-off/commands/code-review.md +520 -0
- package/dist/compliance-off/commands/dynamic-build.md +1251 -0
- package/dist/compliance-off/commands/dynamic-tickets.md +676 -0
- package/dist/compliance-off/commands/implement.md +736 -0
- package/dist/compliance-off/commands/plan.md +671 -0
- package/dist/compliance-off/commands/release.md +309 -0
- package/dist/compliance-off/commands/resolve.md +742 -0
- package/dist/compliance-off/skills/git/references/decision-markers.md +17 -0
- package/dist/compliance-off/skills/git/references/learn-conventions.md +80 -0
- package/dist/compliance-off/skills/git/references/pr/check-ci-status.md +33 -0
- package/dist/compliance-off/skills/git/references/pr/check-merge-readiness.md +49 -0
- package/dist/compliance-off/skills/git/references/pr/fetch-review-threads.md +52 -0
- package/dist/compliance-off/skills/git/references/pr/validate-branch.md +47 -0
- package/dist/compliance-off/skills/git/references/tracker/_contract.md +33 -0
- package/dist/compliance-off/skills/git/references/tracker/_mcp.md +153 -0
- package/dist/compliance-off/skills/git/references/tracker/github/create-release.md +35 -0
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +100 -0
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-traceable-issue.md +74 -0
- package/dist/compliance-off/skills/git/references/tracker/github/fetch-issue.md +69 -0
- package/dist/compliance-off/skills/git/references/tracker/github/fetch-issues-batch.md +65 -0
- package/dist/compliance-off/skills/git/references/tracker/github/gather-release-evidence.md +48 -0
- package/dist/compliance-off/skills/git/references/tracker/github/setup-task.md +77 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/create-release.md +35 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +100 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-traceable-issue.md +61 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/fetch-issue.md +51 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/fetch-issues-batch.md +63 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/gather-release-evidence.md +47 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/setup-task.md +82 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/create-release.md +35 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +100 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-traceable-issue.md +61 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/fetch-issue.md +51 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/fetch-issues-batch.md +63 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/gather-release-evidence.md +47 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/setup-task.md +83 -0
- package/dist/compliance-off/skills/git/references/trust-rule.md +7 -0
- package/dist/core/agent-models.js +19 -4
- package/dist/core/assets.js +126 -17
- package/dist/core/compliance-off-files.js +27 -0
- package/dist/core/compliance.js +14 -0
- package/dist/core/curation-variants.js +460 -112
- package/dist/core/flags.js +2 -2
- package/dist/core/fs-atomic.js +5 -1
- package/dist/core/installed-variants.js +63 -0
- package/dist/core/manifest.js +48 -5
- package/dist/core/mds-variants.js +700 -3
- package/dist/core/orphan-sweep.js +29 -2
- package/dist/core/path-set.js +15 -0
- package/dist/core/plugins.js +68 -10
- 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 +176 -0
- package/dist/curation-compliance-off/commands/bug-analysis.md +349 -0
- package/dist/curation-compliance-off/commands/code-review.md +481 -0
- package/dist/curation-compliance-off/commands/dynamic-build.md +1211 -0
- package/dist/curation-compliance-off/commands/dynamic-tickets.md +634 -0
- package/dist/curation-compliance-off/commands/implement.md +689 -0
- package/dist/curation-compliance-off/commands/plan.md +631 -0
- package/dist/curation-compliance-off/commands/release.md +279 -0
- package/dist/curation-compliance-off/commands/resolve.md +692 -0
- package/dist/curation-off/agents/code.md +6 -6
- package/dist/curation-off/agents/fix.md +6 -6
- package/dist/curation-off/agents/harden.md +7 -6
- package/dist/curation-off/agents/refactor.md +6 -6
- package/dist/curation-off/commands/bug-analysis.md +69 -119
- package/dist/curation-off/commands/dynamic-build.md +23 -23
- package/dist/curation-off/commands/implement.md +46 -32
- package/dist/curation-off/commands/release.md +1 -1
- package/dist/curation-off/commands/resolve.md +35 -31
- package/dist/curation-off/commands/self-review.md +8 -7
- package/dist/skills/git/references/pr/resolve-review-threads.md +1 -1
- package/dist/targets/claude-code/behavior-install.js +23 -9
- package/dist/targets/claude-code/charter-render.js +374 -0
- package/dist/targets/claude-code/compliance-install.js +62 -17
- package/dist/targets/claude-code/compliance-off-files.js +249 -0
- package/dist/targets/claude-code/curation-install.js +632 -117
- 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 +795 -199
- package/dist/targets/claude-code/language-stamp.js +6 -0
- package/dist/targets/claude-code/legacy-skill-hashes.js +170 -0
- package/dist/targets/claude-code/linked-folder.js +176 -0
- package/dist/targets/claude-code/reference-converge.js +131 -0
- 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/tracker-install.js +21 -8
- package/dist/targets/claude-code/tracker-servers.js +20 -6
- package/dist/targets/claude-code/workflow-folder-install.js +251 -0
- package/dist/variant-axes.json +109 -0
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +6 -6
- package/src/assets/agents/evaluate.md +1 -1
- package/src/assets/agents/git.mds +32 -0
- package/src/assets/agents/harden.mds +7 -6
- package/src/assets/agents/test.md +21 -12
- package/src/assets/agents/triage.mds +2 -0
- package/src/assets/agents/validate.md +10 -10
- package/src/assets/commands/_partials/_compliance.mds +5 -3
- package/src/assets/commands/_partials/_engine.mds +9 -8
- package/src/assets/commands/_partials/_publication.mds +10 -1
- package/src/assets/commands/bug-analysis.mds +80 -126
- package/src/assets/commands/code-review.mds +43 -0
- package/src/assets/commands/dynamic-build.mds +109 -15
- package/src/assets/commands/dynamic-tickets.mds +13 -0
- package/src/assets/commands/implement.mds +145 -33
- package/src/assets/commands/plan.mds +19 -0
- package/src/assets/commands/release.mds +50 -1
- package/src/assets/commands/resolve.mds +217 -32
- package/src/assets/commands/self-review.mds +8 -7
- package/src/assets/mds/git/_ops.mds +23 -0
- package/src/assets/mds/git/_ops_steps.mds +17 -0
- package/src/assets/mds/git/_pr.mds +1 -1
- package/src/assets/mds/git/_references.mds +6 -0
- package/src/assets/mds/tracker/_common.mds +4 -0
- package/src/assets/mds/tracker/_github.mds +42 -0
- package/src/assets/mds/tracker/_jira.mds +43 -0
- package/src/assets/mds/tracker/_linear.mds +43 -0
- package/src/assets/rules/quality.md +2 -0
- package/src/assets/scripts/ci-wait.cjs +204 -126
- package/src/assets/scripts/hooks/assets/implement-installed +1 -0
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +13 -11
- package/src/assets/scripts/hooks/preamble +18 -8
- package/src/assets/scripts/hooks/session-start-orchestrator +4 -2
- package/src/assets/scripts/pr-evidence.cjs +41 -2
- package/src/assets/scripts/verify-evidence.cjs +408 -56
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +3 -3
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +1 -1
- package/src/assets/skills/agent-references/references/synthesize/bug-analysis.md +6 -2
- package/src/assets/skills/agent-references/references/validate/passed-alone.md +7 -7
- package/src/assets/skills/docs-framework/SKILL.md +5 -2
- package/src/assets/skills/git/SKILL.md +3 -3
- package/src/assets/skills/git/references/github-api.md +2 -139
- package/src/assets/skills/git/references/github-posting.md +158 -0
- package/src/assets/skills/review-methodology/SKILL.md +1 -1
- package/src/assets/skills/review-methodology/references/patterns.md +1 -1
- package/src/assets/skills/review-methodology/references/report-template.md +1 -2
- package/src/assets/skills/testing/SKILL.md +2 -4
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
# Devflow Preamble: UserPromptSubmit Hook
|
|
4
4
|
# Three behaviors (git repos only — silent outside a git tree):
|
|
5
5
|
# 1. Plan-handoff fast-path: if prompt begins `Implement the following plan:` (Claude Code's
|
|
6
|
-
# native plan-mode handoff), inject a directive to invoke
|
|
7
|
-
#
|
|
8
|
-
# and
|
|
6
|
+
# native plan-mode handoff) AND devflow:implement is installed, inject a directive to invoke
|
|
7
|
+
# devflow:implement immediately. devflow writes the file hooks/assets/implement-installed
|
|
8
|
+
# while implement is installed and removes it otherwise; the hook only tests that the file
|
|
9
|
+
# exists. Without it a handoff prompt falls through to the reminder (behavior 3).
|
|
10
|
+
# NOTE: the literal prefix is duplicated in orchestrator-charter.md (plan-handoff bullet,
|
|
11
|
+
# which the installed render drops when implement is absent) and in the dispatch below —
|
|
12
|
+
# update both together if Claude Code changes the handoff format.
|
|
9
13
|
# 2. Slash skip: no reminder for slash commands (/...).
|
|
10
|
-
# 3. Orchestrator reminder (2 lines): all other prompts
|
|
14
|
+
# 3. Orchestrator reminder (2 lines): all other prompts, and a handoff prompt when implement
|
|
15
|
+
# is not installed, get a generic delegation reminder.
|
|
11
16
|
|
|
12
17
|
# Safe no-op fallback: must exist before hook-bootstrap is sourced.
|
|
13
18
|
dbg() { :; }
|
|
@@ -52,7 +57,12 @@ if ! df_has_git_marker "$CWD" 2>/dev/null; then dbg "EXIT: not a git repo"; exit
|
|
|
52
57
|
# --- Prompt dispatch (pure bash 3.2; no subprocess in this block) ---
|
|
53
58
|
# The plan-handoff prefix is a Claude Code protocol marker (native "execute plan
|
|
54
59
|
# in new session" handoff), matched literally — plumbing, not semantic detection.
|
|
55
|
-
# Duplicated in orchestrator-charter.md (
|
|
60
|
+
# Duplicated in orchestrator-charter.md (plan-handoff bullet); update both together.
|
|
61
|
+
# The handoff branch also needs the implement sentinel file: the directive names
|
|
62
|
+
# devflow:implement, so it fires only while that command is installed. The sentinel
|
|
63
|
+
# check is a builtin file test (no fork) and runs only after the prefix matched.
|
|
64
|
+
# Its path equals HANDOFF_SENTINEL_RELPATH in src/targets/claude-code/charter-render.ts
|
|
65
|
+
# (the hooks directory is SCRIPT_DIR); tests/shell-hooks.test.ts pins the match.
|
|
56
66
|
# Known bound: prefix must appear within the first 256 bytes after whitespace
|
|
57
67
|
# strip (native handoffs have zero leading whitespace).
|
|
58
68
|
HEAD="${PROMPT:0:256}"
|
|
@@ -60,7 +70,7 @@ HEAD="${HEAD#"${HEAD%%[![:space:]]*}"}" # strip leading whitespace/newlines
|
|
|
60
70
|
|
|
61
71
|
if [ -z "$HEAD" ]; then
|
|
62
72
|
dbg "EXIT: empty prompt"
|
|
63
|
-
elif [[ "$HEAD" == "Implement the following plan:"* ]]; then
|
|
73
|
+
elif [[ "$HEAD" == "Implement the following plan:"* ]] && [ -f "$SCRIPT_DIR/assets/implement-installed" ]; then
|
|
64
74
|
dbg "PLAN_HANDOFF detected — injecting devflow:implement directive"
|
|
65
75
|
# D-ARGS-ONCE: the directive passes the Skill call NO arguments. The handoff
|
|
66
76
|
# prompt IS the plan, so it is already in the conversation; handing it to the
|
|
@@ -75,8 +85,8 @@ elif [[ "$HEAD" == "/"* ]]; then
|
|
|
75
85
|
dbg "EXIT: slash command — no reminder"
|
|
76
86
|
else
|
|
77
87
|
dbg "ORCHESTRATOR_REMINDER injected"
|
|
78
|
-
json_prompt_output "Orchestrator reminder: coordinate, don't produce — delegate edits, builds and multi-file reads to the fitting roster agent (Agent tool) or the matching devflow workflow skill.
|
|
79
|
-
Keep only judgment work mainline: conversation, decisions, routing,
|
|
88
|
+
json_prompt_output "Orchestrator reminder: coordinate, don't produce — delegate edits, builds and multi-file reads to the fitting roster agent (Agent tool) or the matching devflow workflow skill.
|
|
89
|
+
Keep only judgment work mainline: conversation, decisions, routing, combining a few agent reports."
|
|
80
90
|
fi
|
|
81
91
|
|
|
82
92
|
dbg "=== HOOK COMPLETE ==="
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
# SessionStart Hook: Orchestrator Charter Injection
|
|
4
4
|
# Presence-gated: registered/removed by `devflow ambient --enable/--disable`.
|
|
5
5
|
# Git repos only: silent outside a git repo (df_has_git_marker bounded walk).
|
|
6
|
-
#
|
|
7
|
-
#
|
|
6
|
+
# The installed charter carries the plan-handoff fallback bullet only while
|
|
7
|
+
# devflow:implement is installed (init renders the charter for the installed plugin set) —
|
|
8
|
+
# SessionStart provably fires (SessionStart:clear) in plan-handoff sessions even if
|
|
9
|
+
# UserPromptSubmit does not.
|
|
8
10
|
# NOTE: the literal prefix `Implement the following plan:` is duplicated in
|
|
9
11
|
# src/assets/scripts/hooks/preamble — update both if Claude Code changes the handoff format.
|
|
10
12
|
|
|
@@ -250,7 +250,11 @@ const WAVE_VERDICTS = Object.freeze(/** @type {WaveVerdict[]} */ (['PASS', 'UNVE
|
|
|
250
250
|
/** The verdicts of a ticket that merged — the only rows a `Closes` line may name. */
|
|
251
251
|
const WAVE_MERGED_VERDICTS = Object.freeze(/** @type {WaveVerdict[]} */ (['PASS', 'UNVERIFIED']));
|
|
252
252
|
|
|
253
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* An Evaluate or Test cell: a Gate 2 verdict, or `—` where the gate never ran or a Test run gave no result.
|
|
255
|
+
* `BLOCKED` is never a cell here, and it has two meanings in the table: a row Verdict `BLOCKED` is a ticket that
|
|
256
|
+
* never ran, and a Test result `BLOCKED` is a run that gave no result, shown as `—`.
|
|
257
|
+
*/
|
|
254
258
|
const WAVE_GATE_VALUES = Object.freeze(['PASS', 'FAIL', 'FAIL-FIXED', 'SKIPPED', EM_DASH]);
|
|
255
259
|
|
|
256
260
|
/** A Coverage cell: whether the review pass covered every focus. */
|
|
@@ -1816,6 +1820,26 @@ function parseWaveRow(line) {
|
|
|
1816
1820
|
};
|
|
1817
1821
|
}
|
|
1818
1822
|
|
|
1823
|
+
/**
|
|
1824
|
+
* D-WAVE-LINKS-ONLY: the links-only block, for related lines that ran to the end of the
|
|
1825
|
+
* text. Only `Refs #<n>` and `Refs <KEY-N>` lines make a block of their own (RELATED_LINE_RE
|
|
1826
|
+
* has already shaped each ref), and a ref may not repeat. Null when the lines are not all
|
|
1827
|
+
* `Refs` lines: the caller refuses the block as before.
|
|
1828
|
+
*
|
|
1829
|
+
* @param {readonly WaveRelated[]} related
|
|
1830
|
+
* @returns {Result<WaveBlock> | null}
|
|
1831
|
+
*/
|
|
1832
|
+
function parseLinksOnlyBlock(related) {
|
|
1833
|
+
if (related.length === 0 || !related.every(rel => rel.keyword === 'Refs')) return null;
|
|
1834
|
+
/** @type {Set<string>} */
|
|
1835
|
+
const seen = new Set();
|
|
1836
|
+
for (const rel of related) {
|
|
1837
|
+
if (seen.has(rel.ref)) return fail('duplicate', rel.line);
|
|
1838
|
+
seen.add(rel.ref);
|
|
1839
|
+
}
|
|
1840
|
+
return ok(Object.freeze({ tracking: null, related: Object.freeze(related), rows: Object.freeze([]) }));
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1819
1843
|
/**
|
|
1820
1844
|
* D-WAVE: parse a wave block (LF or CRLF, at most WAVE_BLOCK_CHARS). It holds
|
|
1821
1845
|
* exactly, in order: `## Related Issues`; 0–WAVE_ROWS + 1 related lines; one
|
|
@@ -1838,13 +1862,23 @@ function parseWaveRow(line) {
|
|
|
1838
1862
|
* like every related line, so it adds no free text to the body. A leading `Refs`
|
|
1839
1863
|
* that names a row is that row's line, never a tracking line.
|
|
1840
1864
|
*
|
|
1865
|
+
* D-WAVE-LINKS-ONLY: with `options.linksOnly === true` (the opt-in, spelled
|
|
1866
|
+
* `check wave --links-only` on the command line), a block may also be the
|
|
1867
|
+
* `## Related Issues` heading and 1–WAVE_ROWS + 1 `Refs #<n>` or `Refs <KEY-N>` lines and
|
|
1868
|
+
* nothing after them (blank lines aside): no evidence section, no rows. It parses to no
|
|
1869
|
+
* tracking line and no rows. A ref may not repeat (`duplicate`). `Closes` is never
|
|
1870
|
+
* admitted there: with no row, nothing has merged, so nothing may close an issue.
|
|
1871
|
+
* Without the opt-in, and for any other block that stops after its related lines, a lone
|
|
1872
|
+
* `Closes #<n>` included, the block is `malformed`, as the grammar stood before the opt-in.
|
|
1873
|
+
*
|
|
1841
1874
|
* Structure is checked before the cross rules, so the first failure found is the
|
|
1842
1875
|
* one reported. An error carries a code and a line number, never input bytes.
|
|
1843
1876
|
*
|
|
1844
1877
|
* @param {unknown} text
|
|
1878
|
+
* @param {{ linksOnly?: boolean }} [options]
|
|
1845
1879
|
* @returns {Result<WaveBlock>}
|
|
1846
1880
|
*/
|
|
1847
|
-
function parseWaveBlock(text) {
|
|
1881
|
+
function parseWaveBlock(text, options) {
|
|
1848
1882
|
if (typeof text !== 'string') return fail('invalid');
|
|
1849
1883
|
if (text.length > LIMITS.WAVE_BLOCK_CHARS) return fail('oversize');
|
|
1850
1884
|
const rows = textLines(text);
|
|
@@ -1867,6 +1901,11 @@ function parseWaveBlock(text) {
|
|
|
1867
1901
|
line: i + 1,
|
|
1868
1902
|
}));
|
|
1869
1903
|
}
|
|
1904
|
+
// D-WAVE-LINKS-ONLY: the opt-in is set and the related lines ran to the end of the text.
|
|
1905
|
+
if (isObject(options) && options.linksOnly === true && i >= end) {
|
|
1906
|
+
const linksOnly = parseLinksOnlyBlock(related);
|
|
1907
|
+
if (linksOnly !== null) return linksOnly;
|
|
1908
|
+
}
|
|
1870
1909
|
// rows[i] is the one blank line; indices past `end` hold only blanks, so a
|
|
1871
1910
|
// missing section fails the first comparison that expects a non-blank line.
|
|
1872
1911
|
if (rows[i + 1] !== WAVE_HEADINGS[1]) return fail('malformed', i + 2);
|