devflow-kit 3.6.0 → 3.8.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 +438 -1
- package/README.md +15 -11
- package/dist/agents/code.md +9 -15
- package/dist/agents/design.md +1 -1
- package/dist/agents/fix.md +11 -13
- package/dist/agents/git.md +1 -1
- package/dist/agents/harden.md +1 -1
- package/dist/agents/refactor.md +7 -10
- package/dist/agents/review.md +6 -4
- package/dist/agents/skim.md +2 -2
- package/dist/agents/triage.md +2 -2
- package/dist/cli/commands/capture.js +1 -1
- package/dist/cli/commands/curation-move-io.js +102 -0
- package/dist/cli/commands/curation-move-step.js +374 -0
- package/dist/cli/commands/{learning.js → curation.js} +302 -99
- package/dist/cli/commands/gate-level-prompts.js +426 -0
- package/dist/cli/commands/gates.js +299 -0
- package/dist/cli/commands/init-seed.js +16 -5
- package/dist/cli/commands/init.js +263 -54
- package/dist/cli/commands/memory.js +20 -2
- package/dist/cli/commands/prompt-io.js +37 -0
- package/dist/cli/commands/uninstall.js +81 -9
- package/dist/cli.js +4 -2
- package/dist/commands/bug-analysis.md +25 -36
- package/dist/commands/code-review.md +77 -73
- package/dist/commands/debug.md +5 -5
- package/dist/commands/dynamic-build.md +76 -83
- package/dist/commands/dynamic-plan.md +5 -5
- package/dist/commands/dynamic-profile.md +5 -5
- package/dist/commands/dynamic-tickets.md +5 -5
- package/dist/commands/explore.md +6 -6
- package/dist/commands/implement.md +68 -102
- package/dist/commands/plan.md +19 -29
- package/dist/commands/release.md +5 -5
- package/dist/commands/research.md +6 -6
- package/dist/commands/resolve.md +29 -31
- package/dist/commands/self-review.md +5 -13
- package/dist/core/assets.js +20 -20
- package/dist/core/curate-tuning-config.js +5 -6
- package/dist/core/curation-move-notice.js +84 -0
- package/dist/core/curation-move-skip.js +36 -0
- package/dist/core/curation-move.js +35 -0
- package/dist/core/curation-queue-cleanup.js +134 -0
- package/dist/core/curation-store.js +98 -0
- package/dist/core/{learning-variants.js → curation-variants.js} +65 -41
- package/dist/core/echo-value.js +48 -0
- package/dist/core/evidence-policy.js +18 -6
- package/dist/core/feature-switch.js +95 -19
- package/dist/core/fs-atomic.js +1 -1
- package/dist/core/gate-level.js +221 -0
- package/dist/core/git.js +16 -14
- package/dist/core/ledger-root.js +82 -22
- package/dist/core/linked-path.js +4 -4
- package/dist/core/manifest-lock.js +238 -0
- package/dist/core/manifest.js +84 -24
- package/dist/core/migrations.js +1 -13
- package/dist/core/model-discovery.js +7 -1
- package/dist/core/observations.js +2 -2
- package/dist/core/plugins.js +15 -15
- package/dist/core/pool.js +26 -0
- package/dist/core/project-paths.js +103 -34
- package/dist/core/queue-drain.js +2 -2
- package/dist/core/tracked-areas.js +35 -0
- package/dist/core/tracker.js +6 -34
- package/dist/{learning-off → curation-off}/agents/code.md +9 -15
- package/dist/{learning-off → curation-off}/agents/fix.md +11 -13
- package/dist/{learning-off → curation-off}/agents/refactor.md +7 -10
- package/dist/{learning-off → curation-off}/agents/review.md +5 -3
- package/dist/{learning-off → curation-off}/agents/triage.md +1 -1
- package/dist/{learning-off → curation-off}/commands/bug-analysis.md +20 -31
- package/dist/{learning-off → curation-off}/commands/code-review.md +74 -70
- package/dist/{learning-off → curation-off}/commands/debug.md +2 -2
- package/dist/{learning-off → curation-off}/commands/dynamic-build.md +73 -80
- package/dist/{learning-off → curation-off}/commands/explore.md +2 -2
- package/dist/{learning-off → curation-off}/commands/implement.md +65 -99
- package/dist/{learning-off → curation-off}/commands/plan.md +15 -25
- package/dist/{learning-off → curation-off}/commands/resolve.md +26 -28
- package/dist/{learning-off → curation-off}/commands/self-review.md +2 -10
- package/dist/hud/components/{learning-counts.js → curation-counts.js} +36 -17
- package/dist/hud/config.js +1 -1
- package/dist/hud/index.js +6 -6
- package/dist/hud/render.js +3 -3
- package/dist/skills/git/references/pr/validate-branch.md +8 -5
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +20 -14
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +20 -20
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +20 -20
- package/dist/targets/claude-code/{learning-install.js → curation-install.js} +99 -67
- package/dist/targets/claude-code/installer.js +15 -15
- package/dist/targets/claude-code/language-stamp.js +5 -5
- package/dist/targets/claude-code/post-install.js +2 -2
- package/dist/targets/claude-code/tracker-servers.js +1 -1
- package/package.json +3 -2
- package/src/assets/agents/_partials/_code.mds +16 -17
- package/src/assets/agents/code.mds +4 -7
- package/src/assets/agents/curate.md +12 -14
- package/src/assets/agents/debug.mds +6 -6
- package/src/assets/agents/design.mds +18 -18
- package/src/assets/agents/fix.mds +6 -5
- package/src/assets/agents/git.mds +1 -1
- package/src/assets/agents/harden.mds +7 -7
- package/src/assets/agents/knowledge.mds +23 -23
- package/src/assets/agents/refactor.mds +2 -2
- package/src/assets/agents/research.mds +15 -15
- package/src/assets/agents/review.mds +45 -43
- package/src/assets/agents/skim.mds +11 -11
- package/src/assets/agents/synthesize.md +2 -2
- package/src/assets/agents/triage.mds +22 -22
- package/src/assets/agents/validate.md +13 -26
- package/src/assets/commands/_partials/_decisions.mds +13 -13
- package/src/assets/commands/_partials/_engine.mds +8 -8
- package/src/assets/commands/_partials/_knowledge.mds +29 -15
- package/src/assets/commands/_partials/_preamble.mds +4 -4
- package/src/assets/commands/_partials/_settings.mds +3 -3
- package/src/assets/commands/_partials/_wave.mds +17 -24
- package/src/assets/commands/bug-analysis.mds +37 -48
- package/src/assets/commands/code-review.mds +90 -86
- package/src/assets/commands/debug.mds +14 -14
- package/src/assets/commands/dynamic-build.mds +78 -78
- package/src/assets/commands/dynamic-plan.mds +22 -22
- package/src/assets/commands/dynamic-profile.mds +2 -2
- package/src/assets/commands/dynamic-tickets.mds +8 -8
- package/src/assets/commands/explore.mds +20 -20
- package/src/assets/commands/implement.mds +92 -118
- package/src/assets/commands/plan.mds +41 -51
- package/src/assets/commands/release.mds +12 -12
- package/src/assets/commands/research.mds +19 -19
- package/src/assets/commands/resolve.mds +56 -50
- package/src/assets/commands/self-review.mds +20 -20
- package/src/assets/mds/git/_ops.mds +3 -1
- package/src/assets/mds/git/_ops_pr.mds +1 -1
- package/src/assets/mds/git/_ops_steps.mds +13 -7
- package/src/assets/mds/git/_pr.mds +7 -4
- package/src/assets/mds/tracker/_common.mds +23 -12
- package/src/assets/mds/tracker/_github.mds +2 -9
- package/src/assets/mds/tracker/_jira.mds +2 -15
- package/src/assets/mds/tracker/_linear.mds +2 -15
- package/src/assets/rules/quality.md +1 -0
- package/src/assets/scripts/ci-wait.cjs +22 -4
- package/src/assets/scripts/claude-md-audit.cjs +66 -51
- package/src/assets/scripts/hooks/background-memory-update +406 -97
- package/src/assets/scripts/hooks/capture-prompt +12 -12
- package/src/assets/scripts/hooks/capture-question +11 -11
- package/src/assets/scripts/hooks/capture-turn +12 -12
- package/src/assets/scripts/hooks/{learning-lock → curation-lock} +2 -2
- package/src/assets/scripts/hooks/curation-move +293 -0
- package/src/assets/scripts/hooks/ensure-devflow-init +45 -13
- package/src/assets/scripts/hooks/ensure-proxy +4 -4
- package/src/assets/scripts/hooks/ensure-root-gitignore +4 -4
- package/src/assets/scripts/hooks/git-marker +81 -0
- package/src/assets/scripts/hooks/json-helper.cjs +145 -51
- package/src/assets/scripts/hooks/json-parse +19 -4
- package/src/assets/scripts/hooks/lib/curation-move.cjs +1582 -0
- package/src/assets/scripts/hooks/lib/{learning-store.cjs → curation-store.cjs} +242 -118
- package/src/assets/scripts/hooks/lib/decisions-format.cjs +3 -3
- package/src/assets/scripts/hooks/lib/mkdir-lock.cjs +24 -7
- package/src/assets/scripts/hooks/lib/project-paths.cjs +132 -39
- package/src/assets/scripts/hooks/lib/render-decisions.cjs +34 -22
- package/src/assets/scripts/hooks/lib/tracked-areas.cjs +259 -0
- package/src/assets/scripts/hooks/memory-permission +358 -0
- package/src/assets/scripts/hooks/memory-worker +1 -1
- package/src/assets/scripts/hooks/pre-compact-memory +6 -16
- package/src/assets/scripts/hooks/queue-append +228 -103
- package/src/assets/scripts/hooks/resolve-project-root +2 -2
- package/src/assets/scripts/hooks/session-start-context +145 -71
- package/src/assets/scripts/hooks/session-start-memory +27 -46
- package/src/assets/scripts/lib/project-config.cjs +31 -9
- package/src/assets/scripts/resolve-base.cjs +1043 -0
- package/src/assets/scripts/resolve-settings.cjs +238 -46
- package/src/assets/skills/agent-references/SKILL.md +9 -2
- package/src/assets/skills/agent-references/references/commands/code-review-levels.md +19 -0
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +27 -0
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +6 -4
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +40 -0
- package/src/assets/skills/agent-references/references/commands/resolve-levels.md +24 -0
- package/src/assets/skills/agent-references/references/synthesize/planning.md +9 -22
- package/src/assets/skills/agent-references/references/synthesize/review.md +11 -11
- package/src/assets/skills/apply-decisions/SKILL.md +1 -1
- package/src/assets/skills/docs-framework/SKILL.md +7 -7
- package/src/assets/skills/docs-framework/references/patterns.md +3 -4
- package/src/assets/skills/quality-gates/SKILL.md +1 -1
- package/src/assets/skills/worktree-support/references/roots.md +2 -2
- package/templates/lint-pack/.lint-pack.conf +86 -0
- package/templates/lint-pack/README.md +190 -0
- package/templates/lint-pack/lint-pack.sh +905 -0
- package/dist/core/learning-queue-cleanup.js +0 -27
- package/dist/core/learning-store.js +0 -61
- /package/dist/{learning-off → curation-off}/agents/debug.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/design.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/harden.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/knowledge.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/research.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/skim.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/dynamic-plan.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/dynamic-profile.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/dynamic-tickets.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/release.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/research.md +0 -0
|
@@ -16,12 +16,14 @@
|
|
|
16
16
|
// {"version":1,"evidence":"required|standard","compliance":["gdpr",…],
|
|
17
17
|
// "tracker":{"provider":"github|jira|linear","site":"https://…","key":"ACME"},
|
|
18
18
|
// "reviewPublication":"off|auto|full",
|
|
19
|
-
// "features":{"memory":false,"learning":false,"knowledge":false}}
|
|
19
|
+
// "features":{"memory":false,"curation":false,"learning":false,"knowledge":false}}
|
|
20
20
|
// Each known key is classified on its own — absent, valid or malformed — so one
|
|
21
21
|
// bad value never takes its neighbours down with it (AC-26). What a malformed
|
|
22
22
|
// value MEANS is the consumer's decision, made once in each caller's fold:
|
|
23
23
|
// evidence ⇒ required, compliance ⇒ generic, tracker ⇒ TRACKER_WARN=invalid,
|
|
24
|
-
// reviewPublication ⇒ off, a feature switch ⇒ not narrowed.
|
|
24
|
+
// reviewPublication ⇒ off, a feature switch ⇒ not narrowed. The personal file
|
|
25
|
+
// alone also carries `gateLevel` ("full|standard|lean"); it is a level, not a
|
|
26
|
+
// switch, so it may raise or lower what the machine records.
|
|
25
27
|
//
|
|
26
28
|
// Whole-file rule: that per-key classification applies only INSIDE a file that
|
|
27
29
|
// reads as a JSON object. A file that exists but does not — empty, unparseable,
|
|
@@ -61,6 +63,12 @@ const POLICIES = Object.freeze(['required', 'standard']);
|
|
|
61
63
|
/** Every review-publication value, in ascending order: off < auto < full. */
|
|
62
64
|
const PUBLICATIONS = Object.freeze(['off', 'auto', 'full']);
|
|
63
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Every gate level, strictest first — transcribed from GATE_LEVELS in
|
|
68
|
+
* src/core/gate-level.ts and pinned to it by a parity test.
|
|
69
|
+
*/
|
|
70
|
+
const GATE_LEVELS = Object.freeze(['full', 'standard', 'lean']);
|
|
71
|
+
|
|
64
72
|
/**
|
|
65
73
|
* The registered tracker providers — transcribed from TRACKER_PROVIDERS in
|
|
66
74
|
* src/core/tracker.ts and pinned to it by a parity test.
|
|
@@ -73,8 +81,12 @@ const TRACKER_PROVIDER_IDS = Object.freeze(['github', 'jira', 'linear']);
|
|
|
73
81
|
*/
|
|
74
82
|
const COMPLIANCE_IDS = Object.freeze(['gdpr', 'hipaa', 'pci-dss', 'soc2', 'iso-27001', 'sox']);
|
|
75
83
|
|
|
76
|
-
/**
|
|
77
|
-
|
|
84
|
+
/**
|
|
85
|
+
* The feature keys a repo layer may narrow with. `curation` is the curation
|
|
86
|
+
* feature's current name and `learning` its pre-rename one (#529): both are read,
|
|
87
|
+
* each on its own, and a literal false in either turns the feature off.
|
|
88
|
+
*/
|
|
89
|
+
const FEATURE_SWITCHES = Object.freeze(['memory', 'curation', 'learning', 'knowledge']);
|
|
78
90
|
|
|
79
91
|
/**
|
|
80
92
|
* A tracker site: the Jira setup-task gate (src/assets/mds/tracker/_jira.mds,
|
|
@@ -101,7 +113,7 @@ const SAFE_REF_RE = /^(?![A-Za-z0-9._/-]{0,254}\.\.)[A-Za-z0-9][A-Za-z0-9._/-]{0
|
|
|
101
113
|
/** The ref namespace of origin's remote-tracking branches, as `git symbolic-ref` prints it. */
|
|
102
114
|
const ORIGIN_TRACKING_PREFIX = 'refs/remotes/origin/';
|
|
103
115
|
|
|
104
|
-
/** Largest machine manifest read, in bytes. */
|
|
116
|
+
/** Largest machine manifest read, in bytes — pinned to MAX_MANIFEST_BYTES in src/core/gate-level.ts by a parity test. */
|
|
105
117
|
const MAX_MANIFEST_BYTES = 1048576;
|
|
106
118
|
|
|
107
119
|
/** Deepest nesting the duplicate-key scan follows; deeper is invalid. */
|
|
@@ -116,7 +128,7 @@ const MAX_JSON_DEPTH = 32;
|
|
|
116
128
|
* @typedef {{ kind: 'absent' } | { kind: 'malformed' } | { kind: 'valid', value: T }} Field
|
|
117
129
|
*
|
|
118
130
|
* @typedef {{ provider: Field<string>, site: Field<string>, key: Field<string> }} ProjectTracker
|
|
119
|
-
* @typedef {{ memory: Field<boolean>, learning: Field<boolean>, knowledge: Field<boolean> }} FeatureFields
|
|
131
|
+
* @typedef {{ memory: Field<boolean>, curation: Field<boolean>, learning: Field<boolean>, knowledge: Field<boolean> }} FeatureFields
|
|
120
132
|
*
|
|
121
133
|
* @typedef {{ kind: 'absent' } | { kind: 'invalid' } | {
|
|
122
134
|
* kind: 'parsed',
|
|
@@ -136,9 +148,12 @@ const MAX_JSON_DEPTH = 32;
|
|
|
136
148
|
* tracker: Field<string>,
|
|
137
149
|
* reviewPublication: Field<'off' | 'auto' | 'full'>,
|
|
138
150
|
* features: Field<FeatureFields>,
|
|
151
|
+
* gateLevel: Field<'full' | 'standard' | 'lean'>,
|
|
139
152
|
* }} PersonalConfig
|
|
140
153
|
* The personal file's `tracker` is the per-repo provider override: a provider
|
|
141
154
|
* id string (an empty string reads as absent, as parseTrackerOverride does).
|
|
155
|
+
* Its `gateLevel` is one of the three level words; every other value,
|
|
156
|
+
* including an empty string and a duplicated key, is malformed.
|
|
142
157
|
*
|
|
143
158
|
* @typedef {{ kind: 'absent' } | { kind: 'refused' } | { kind: 'ok', bytes: Buffer }} BoundedRead
|
|
144
159
|
*/
|
|
@@ -504,7 +519,9 @@ function asKey(value) {
|
|
|
504
519
|
|
|
505
520
|
/**
|
|
506
521
|
* The `features` object: each switch its own field, boolean only. A consumer
|
|
507
|
-
* narrows on a literal `false` alone.
|
|
522
|
+
* narrows on a literal `false` alone. `curation` and `learning` are two keys of
|
|
523
|
+
* one feature, parsed independently: a duplicate or a non-boolean value in one
|
|
524
|
+
* leaves the other readable. The retired `decisions` key is never read here.
|
|
508
525
|
*
|
|
509
526
|
* @param {Record<string, unknown>} obj
|
|
510
527
|
* @param {Set<string>} duplicates
|
|
@@ -518,6 +535,7 @@ function featuresField(obj, duplicates) {
|
|
|
518
535
|
ok: true,
|
|
519
536
|
value: Object.freeze({
|
|
520
537
|
memory: fieldOf(value, duplicates, base, 'memory', asBoolean),
|
|
538
|
+
curation: fieldOf(value, duplicates, base, 'curation', asBoolean),
|
|
521
539
|
learning: fieldOf(value, duplicates, base, 'learning', asBoolean),
|
|
522
540
|
knowledge: fieldOf(value, duplicates, base, 'knowledge', asBoolean),
|
|
523
541
|
}),
|
|
@@ -585,8 +603,8 @@ function parseProjectBytes(buf) {
|
|
|
585
603
|
|
|
586
604
|
/**
|
|
587
605
|
* Classify the personal `.devflow/config.json` bytes with the same rules. Only
|
|
588
|
-
* the keys a personal file may carry are read: `reviewPublication`, `features
|
|
589
|
-
*
|
|
606
|
+
* the keys a personal file may carry are read: `reviewPublication`, `features`,
|
|
607
|
+
* the `tracker` override and `gateLevel`. The retired top-level switches (`memory`,
|
|
590
608
|
* `learning`, `knowledge`, `decisions`) are never read — `features` is a new
|
|
591
609
|
* namespace, so a stale `learning: false` left from the per-repo-install era
|
|
592
610
|
* cannot come back to life. Never throws.
|
|
@@ -607,13 +625,17 @@ function parsePersonalBytes(buf) {
|
|
|
607
625
|
tracker,
|
|
608
626
|
reviewPublication: fieldOf(obj, duplicates, [], 'reviewPublication', oneOf(PUBLICATIONS)),
|
|
609
627
|
features: featuresField(obj, duplicates),
|
|
628
|
+
// No exception for an empty string, unlike `tracker`: "" is not a level.
|
|
629
|
+
gateLevel: fieldOf(obj, duplicates, [], 'gateLevel', oneOf(GATE_LEVELS)),
|
|
610
630
|
});
|
|
611
631
|
}
|
|
612
632
|
|
|
613
633
|
module.exports = Object.freeze({
|
|
614
634
|
MAX_CONFIG_BYTES,
|
|
635
|
+
MAX_MANIFEST_BYTES,
|
|
615
636
|
POLICIES,
|
|
616
637
|
PUBLICATIONS,
|
|
638
|
+
GATE_LEVELS,
|
|
617
639
|
TRACKER_PROVIDER_IDS,
|
|
618
640
|
COMPLIANCE_IDS,
|
|
619
641
|
FEATURE_SWITCHES,
|