devflow-kit 2.5.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -0
- package/README.md +44 -19
- package/dist/agents/git.md +13 -15
- package/dist/cli/commands/ambient.js +160 -145
- package/dist/cli/commands/capture.js +29 -55
- package/dist/cli/commands/compliance.js +32 -61
- package/dist/cli/commands/context.js +17 -32
- package/dist/cli/commands/debug.js +65 -26
- package/dist/cli/commands/flags.js +3 -3
- package/dist/cli/commands/hud.js +34 -10
- package/dist/cli/commands/init-seed.js +40 -4
- package/dist/cli/commands/init.js +249 -271
- package/dist/cli/commands/install-report.js +10 -15
- package/dist/cli/commands/knowledge/index.js +1 -1
- package/dist/cli/commands/knowledge/toggle.js +11 -3
- package/dist/cli/commands/learning.js +52 -37
- package/dist/cli/commands/legacy-hooks.js +11 -14
- package/dist/cli/commands/memory.js +67 -78
- package/dist/cli/commands/proxy.js +23 -41
- package/dist/cli/commands/security.js +5 -13
- package/dist/cli/commands/skills.js +21 -3
- package/dist/cli/commands/tracker.js +100 -228
- package/dist/cli/commands/uninstall.js +343 -138
- package/dist/commands/bug-analysis.md +38 -12
- package/dist/commands/code-review.md +70 -21
- package/dist/commands/debug.md +37 -7
- package/dist/commands/dynamic-build.md +66 -17
- package/dist/commands/dynamic-plan.md +19 -8
- package/dist/commands/dynamic-profile.md +24 -10
- package/dist/commands/dynamic-tickets.md +22 -11
- package/dist/commands/explore.md +37 -7
- package/dist/commands/implement.md +96 -32
- package/dist/commands/plan.md +62 -19
- package/dist/commands/release.md +2 -2
- package/dist/commands/research.md +34 -8
- package/dist/commands/resolve.md +65 -17
- package/dist/commands/self-review.md +45 -9
- package/dist/core/compliance-compose.js +27 -27
- package/dist/core/evidence-policy.js +240 -24
- package/dist/core/feature-config.js +94 -25
- package/dist/core/feature-switch.js +1 -1
- package/dist/core/flags.js +30 -2
- package/dist/core/fs-atomic.js +27 -0
- package/dist/core/hook-log-dirs.js +104 -0
- package/dist/core/learning-tuning-config.js +5 -3
- package/dist/core/ledger-root.js +102 -0
- package/dist/core/manifest.js +6 -4
- package/dist/core/mds-variants.js +34 -97
- package/dist/core/migrations.js +49 -23
- package/dist/core/plugins.js +5 -4
- package/dist/core/project-paths.js +0 -17
- package/dist/core/same-location.js +25 -0
- package/dist/core/tracker.js +226 -139
- package/dist/hud/components/config-counts.js +15 -4
- package/dist/hud/components/learning-counts.js +14 -0
- package/dist/hud/config.js +2 -1
- package/dist/hud/cost-history.js +2 -4
- package/dist/hud/git.js +52 -7
- package/dist/hud/index.js +7 -9
- package/dist/skills/git/references/pr/check-merge-readiness.md +1 -1
- package/dist/skills/git/references/pr/ensure-pr-ready.md +1 -1
- package/dist/skills/git/references/pr/update-pr-evidence.md +1 -1
- package/dist/skills/git/references/tracker/_mcp.md +1 -1
- package/dist/skills/git/references/tracker/github/backlink-shipped-issues.md +1 -1
- package/dist/skills/git/references/tracker/github/ensure-traceable-issue.md +1 -1
- package/dist/skills/git/references/tracker/github/gather-release-evidence.md +2 -2
- package/dist/skills/git/references/tracker/github/manage-debt.md +3 -3
- package/dist/skills/git/references/tracker/jira/backlink-shipped-issues.md +1 -1
- package/dist/skills/git/references/tracker/jira/ensure-traceable-issue.md +1 -1
- package/dist/skills/git/references/tracker/jira/gather-release-evidence.md +2 -2
- package/dist/skills/git/references/tracker/jira/manage-debt.md +1 -1
- package/dist/skills/git/references/tracker/jira/post-wave-report.md +1 -1
- package/dist/skills/git/references/tracker/jira/setup-task.md +1 -1
- package/dist/skills/git/references/tracker/linear/backlink-shipped-issues.md +1 -1
- package/dist/skills/git/references/tracker/linear/ensure-traceable-issue.md +1 -1
- package/dist/skills/git/references/tracker/linear/gather-release-evidence.md +2 -2
- package/dist/skills/git/references/tracker/linear/manage-debt.md +1 -1
- package/dist/skills/git/references/tracker/linear/post-wave-report.md +1 -1
- package/dist/skills/git/references/tracker/linear/setup-task.md +1 -1
- package/dist/targets/claude-code/claude-paths.js +59 -57
- package/dist/targets/claude-code/compliance-install.js +49 -65
- package/dist/targets/claude-code/hooks.js +108 -3
- package/dist/targets/claude-code/installer.js +30 -57
- package/dist/targets/claude-code/post-install.js +232 -139
- package/dist/targets/claude-code/tracker-install.js +38 -65
- package/package.json +5 -4
- package/src/assets/agents/code.md +4 -3
- package/src/assets/agents/design.md +1 -0
- package/src/assets/agents/git.mds +55 -57
- package/src/assets/agents/knowledge.md +2 -2
- package/src/assets/agents/review.md +3 -1
- package/src/assets/agents/tracker.md +37 -30
- package/src/assets/commands/_partials/_compliance.mds +19 -1
- package/src/assets/commands/_partials/_decisions.mds +15 -3
- package/src/assets/commands/_partials/_docs_root.mds +35 -0
- package/src/assets/commands/_partials/_engine.mds +2 -2
- package/src/assets/commands/_partials/_evidence_policy.mds +3 -3
- package/src/assets/commands/_partials/_factory.mds +1 -1
- package/src/assets/commands/_partials/_knowledge.mds +27 -9
- package/src/assets/commands/_partials/_plan_contract.mds +2 -2
- package/src/assets/commands/_partials/_preamble.mds +1 -1
- package/src/assets/commands/_partials/_publication.mds +6 -2
- package/src/assets/commands/_partials/_settings.mds +28 -0
- package/src/assets/commands/_partials/_ticket_template.mds +3 -3
- package/src/assets/commands/_partials/_tracker.mds +4 -4
- package/src/assets/commands/_partials/_wave.mds +4 -4
- package/src/assets/commands/bug-analysis.mds +19 -17
- package/src/assets/commands/code-review.mds +39 -33
- package/src/assets/commands/debug.mds +4 -5
- package/src/assets/commands/dynamic-build.mds +75 -53
- package/src/assets/commands/dynamic-plan.mds +20 -15
- package/src/assets/commands/dynamic-profile.mds +24 -11
- package/src/assets/commands/dynamic-tickets.mds +25 -20
- package/src/assets/commands/explore.mds +4 -5
- package/src/assets/commands/implement.mds +58 -45
- package/src/assets/commands/plan.mds +34 -29
- package/src/assets/commands/release.md +2 -2
- package/src/assets/commands/research.mds +11 -9
- package/src/assets/commands/resolve.mds +41 -39
- package/src/assets/commands/self-review.mds +24 -25
- package/src/assets/mds/git/_pr.mds +61 -61
- package/src/assets/mds/git/_references.mds +19 -19
- package/src/assets/mds/tracker/_common.mds +8 -8
- package/src/assets/mds/tracker/_github.mds +71 -71
- package/src/assets/mds/tracker/_jira.mds +74 -74
- package/src/assets/mds/tracker/_linear.mds +75 -75
- package/src/assets/mds/tracker/_mcp.mds +23 -17
- package/src/assets/scripts/hooks/background-memory-update +35 -19
- package/src/assets/scripts/hooks/capture-prompt +18 -12
- package/src/assets/scripts/hooks/capture-question +18 -12
- package/src/assets/scripts/hooks/capture-turn +27 -17
- package/src/assets/scripts/hooks/debug-trace +11 -6
- package/src/assets/scripts/hooks/ensure-devflow-init +33 -6
- package/src/assets/scripts/hooks/ensure-proxy +9 -8
- package/src/assets/scripts/hooks/ensure-root-gitignore +111 -36
- package/src/assets/scripts/hooks/git-marker +48 -0
- package/src/assets/scripts/hooks/json-helper.cjs +6 -1
- package/src/assets/scripts/hooks/lib/project-paths.cjs +0 -19
- package/src/assets/scripts/hooks/log-paths +80 -0
- package/src/assets/scripts/hooks/memory-worker +17 -15
- package/src/assets/scripts/hooks/pre-compact-memory +41 -16
- package/src/assets/scripts/hooks/queue-append +104 -30
- package/src/assets/scripts/hooks/resolve-project-root +101 -7
- package/src/assets/scripts/hooks/session-start-context +289 -122
- package/src/assets/scripts/hooks/session-start-memory +35 -16
- package/src/assets/scripts/lib/project-config.cjs +633 -0
- package/src/assets/scripts/resolve-evidence-policy.cjs +300 -220
- package/src/assets/scripts/resolve-settings.cjs +1054 -0
- package/src/assets/scripts/verify-evidence.cjs +1 -1
- package/src/assets/skills/compliance/SKILL.md +2 -2
- package/src/assets/skills/docs-framework/SKILL.md +6 -7
- package/src/assets/skills/docs-framework/references/patterns.md +10 -17
- package/src/assets/skills/gap-analysis/SKILL.md +2 -2
- package/src/assets/skills/git/references/github-api.md +9 -9
- package/src/assets/skills/git/references/patterns.md +1 -1
- package/src/assets/skills/worktree-support/SKILL.md +1 -1
- package/src/assets/skills/worktree-support/references/roots.md +29 -0
- package/src/targets/claude-code/templates/managed-settings.json +25 -9
|
@@ -42,23 +42,23 @@ source "$SCRIPT_DIR/resolve-project-root" 2>/dev/null || true
|
|
|
42
42
|
PROJECT_ROOT="$(df_resolve_root "$CWD" 2>/dev/null || true)"
|
|
43
43
|
[ -n "$PROJECT_ROOT" ] || PROJECT_ROOT="$CWD"
|
|
44
44
|
|
|
45
|
-
# The machine-wide manifest (the memory switch, D-FEATURES-
|
|
46
|
-
# queue-append)
|
|
47
|
-
#
|
|
48
|
-
DEVFLOW_MANIFEST="$
|
|
49
|
-
|
|
50
|
-
MEMORY_DIR="$
|
|
45
|
+
# The machine-wide manifest (the memory switch, D-FEATURES-NARROW-ONLY in
|
|
46
|
+
# queue-append) lives at the machine root,
|
|
47
|
+
# $HOME/.devflow (D-ONE-HOME).
|
|
48
|
+
DEVFLOW_MANIFEST="$HOME/.devflow/manifest.json"
|
|
49
|
+
PROJECT_DEVFLOW_DIR="$PROJECT_ROOT/.devflow"
|
|
50
|
+
MEMORY_DIR="$PROJECT_DEVFLOW_DIR/memory"
|
|
51
51
|
|
|
52
52
|
# Normal logging
|
|
53
53
|
source "$SCRIPT_DIR/hook-log-init" "session-start-memory"
|
|
54
54
|
|
|
55
|
-
# Memory gate: the machine
|
|
56
|
-
#
|
|
57
|
-
#
|
|
55
|
+
# Memory gate: the machine switch, narrowed by this checkout's project.json /
|
|
56
|
+
# config.json `features.memory`, read by the helper every memory/learning gate
|
|
57
|
+
# shares (D-FEATURES-NARROW-ONLY, see queue-append).
|
|
58
58
|
source "$SCRIPT_DIR/queue-append" || { echo "session-start-memory: failed to source queue-append" >&2; exit 1; }
|
|
59
|
-
queue_read_gates "$DEVFLOW_MANIFEST"
|
|
59
|
+
queue_read_gates "$DEVFLOW_MANIFEST" "$PROJECT_ROOT"
|
|
60
60
|
if [ "$_QG_MEMORY" != "true" ]; then
|
|
61
|
-
dbg "EXIT: memory disabled
|
|
61
|
+
dbg "EXIT: memory disabled"
|
|
62
62
|
exit 0
|
|
63
63
|
fi
|
|
64
64
|
|
|
@@ -225,30 +225,49 @@ if [ -f "$MEMORY_FILE" ]; then
|
|
|
225
225
|
dbg "COMMITS=$COMMITS"
|
|
226
226
|
|
|
227
227
|
# --- Branch mismatch warning (shown for any state) ---
|
|
228
|
+
# A `(detached)` stamp (pre-compact-memory's D-DETACHED-HEAD bootstrap) names no
|
|
229
|
+
# branch, so it is worded as the state it is rather than as a branch called that.
|
|
228
230
|
BRANCH_MISMATCH_NOTE=""
|
|
229
231
|
if [ -n "$STAMP_BRANCH" ] && [ -n "$BRANCH" ] && [ "$STAMP_BRANCH" != "$BRANCH" ]; then
|
|
230
|
-
|
|
232
|
+
if [ "$STAMP_BRANCH" = "(detached)" ]; then
|
|
233
|
+
BRANCH_MISMATCH_NOTE="⚠ Memory was written on a detached HEAD; you are now on ${BRANCH}.
|
|
231
234
|
"
|
|
235
|
+
else
|
|
236
|
+
BRANCH_MISMATCH_NOTE="⚠ Memory was written on branch ${STAMP_BRANCH}; you are now on ${BRANCH}.
|
|
237
|
+
"
|
|
238
|
+
fi
|
|
232
239
|
fi
|
|
233
240
|
|
|
234
241
|
# --- State C detection: refresh failing ---
|
|
235
242
|
detect_refresh_failing "$NOW" "$MEMORY_DIR" "$LOG_DIR"
|
|
236
243
|
|
|
237
244
|
# --- Build state-specific header ---
|
|
245
|
+
# D-DETACHED-HEAD: where the session is, as one phrase. On a branch it is
|
|
246
|
+
# `on <branch>`; on a detached HEAD — a commit checked out rather than a branch,
|
|
247
|
+
# for which `git branch --show-current` prints nothing — it is
|
|
248
|
+
# `detached @ <short-sha>`, naming the commit instead of rendering "unknown" as if
|
|
249
|
+
# the state could not be read. HEAD passes the same hex gate the stamp does before
|
|
250
|
+
# it is sliced into the header. Only an unreadable state is `on unknown`.
|
|
238
251
|
_STAMP_LABEL="${STAMP_SHA:-unknown}"
|
|
239
|
-
|
|
252
|
+
if [ -n "$BRANCH" ]; then
|
|
253
|
+
_WHERE_LABEL="on ${BRANCH}"
|
|
254
|
+
elif [ -n "$HEAD" ] && is_hex_sha "$HEAD"; then
|
|
255
|
+
_WHERE_LABEL="detached @ ${HEAD:0:7}"
|
|
256
|
+
else
|
|
257
|
+
_WHERE_LABEL="on unknown"
|
|
258
|
+
fi
|
|
240
259
|
|
|
241
260
|
if [ -z "$STAMP_SHA" ]; then
|
|
242
261
|
# No stamp (legacy / killed mid-write) — render as A "synced @ unknown"
|
|
243
|
-
MEMORY_HEADER="--- WORKING MEMORY (synced @ unknown
|
|
262
|
+
MEMORY_HEADER="--- WORKING MEMORY (synced @ unknown ${_WHERE_LABEL}, ${AGE_MIN}m ago) ---"
|
|
244
263
|
dbg "State A (no stamp)"
|
|
245
264
|
elif [ "$COMMITS" -le 0 ]; then
|
|
246
265
|
# State A: in-sync
|
|
247
|
-
MEMORY_HEADER="--- WORKING MEMORY (synced @ ${_STAMP_LABEL}
|
|
266
|
+
MEMORY_HEADER="--- WORKING MEMORY (synced @ ${_STAMP_LABEL} ${_WHERE_LABEL}, ${AGE_MIN}m ago) ---"
|
|
248
267
|
dbg "State A: in-sync"
|
|
249
268
|
else
|
|
250
269
|
# State B: drifted — _DRIFT_LOG already populated from the single rev-walk above
|
|
251
|
-
MEMORY_HEADER="--- WORKING MEMORY (${COMMITS} commit(s) ago @ ${_STAMP_LABEL}
|
|
270
|
+
MEMORY_HEADER="--- WORKING MEMORY (${COMMITS} commit(s) ago @ ${_STAMP_LABEL} ${_WHERE_LABEL}, ${AGE_MIN}m ago — ⚠ reconcile) ---
|
|
252
271
|
Commits since memory was written:
|
|
253
272
|
${_DRIFT_LOG}"
|
|
254
273
|
dbg "State B: drifted COMMITS=$COMMITS"
|