@sabaiway/agent-workflow-kit 14.40.0 → 14.42.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 +54 -0
- package/SKILL.md +1 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/advisor-writers.md +2 -0
- package/references/modes/bootstrap.md +1 -0
- package/references/modes/recommendations.md +9 -8
- package/references/modes/upgrade.md +2 -2
- package/references/scripts/install-git-hooks-repo-exec.test.mjs +56 -6
- package/references/scripts/install-git-hooks.mjs +60 -4
- package/references/scripts/install-git-hooks.test.mjs +173 -75
- package/tools/apply-danger-check.mjs +16 -6
- package/tools/ensure-configs.mjs +6 -3
- package/tools/ensure-ops.mjs +68 -20
- package/tools/ensure-vocabulary.mjs +3 -3
- package/tools/git-hooks.mjs +146 -20
- package/tools/node-evidence.mjs +10 -2
- package/tools/recommendations.mjs +60 -4
- package/tools/script-priors.mjs +19 -8
- package/tools/source-size/index.mjs +6 -0
- package/tools/source-size/setup.mjs +40 -0
- package/tools/source-size-check.mjs +11 -7
- package/tools/source-size-core.mjs +24 -5
- package/tools/write-lanes.mjs +6 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// source-size-core.mjs — the PURE READ core of the source-size practice (D-18): the ONE import point
|
|
2
|
-
// for every surface that must ask about the practice without reaching a writer. It owns no logic
|
|
3
|
-
// no write API, and spawns only a read-only git query, so the read-graph purity suite
|
|
2
|
+
// for every surface that must ask about the practice without reaching a writer. It owns no logic but
|
|
3
|
+
// the layout setup's one bound form, no write API, and spawns only a read-only git query, so the read-graph purity suite
|
|
4
4
|
// (test/read-graph-purity.test.mjs) stays true however the halves behind it move.
|
|
5
5
|
//
|
|
6
6
|
// The halves, each holding ONE rule set and each within the cap this practice declares:
|
|
@@ -10,10 +10,15 @@
|
|
|
10
10
|
// • source-size-gate-cmd.mjs — whether a declared gate cmd IS this checker (the canonical matcher),
|
|
11
11
|
// and which of the three tool claims it makes when it is not
|
|
12
12
|
// • source-size/index.mjs — the door of the size check's module: the kit's limits and their
|
|
13
|
-
// lines, the band and the layout count,
|
|
13
|
+
// lines, the band and the layout count, the recorded ratchet as data
|
|
14
|
+
// and the layout setup
|
|
14
15
|
//
|
|
15
|
-
// Re-export only: a consumer imports the practice, never a particular half, so
|
|
16
|
-
// code without touching a single call site.
|
|
16
|
+
// Re-export only, but for readLayoutSetup: a consumer imports the practice, never a particular half, so
|
|
17
|
+
// a later split moves code without touching a single call site.
|
|
18
|
+
|
|
19
|
+
import { INITIAL_ADOPTION_REASON, SOURCE_SIZE_SCHEMA, loadSourceSizeConfig, validateSourceSizeConfig } from './source-size-config.mjs';
|
|
20
|
+
import { judgeTree, stopsOf } from './source-size-judge.mjs';
|
|
21
|
+
import { layoutSetupOf } from './source-size/index.mjs';
|
|
17
22
|
|
|
18
23
|
export {
|
|
19
24
|
SOURCE_SIZE_CONFIG_REL,
|
|
@@ -71,6 +76,9 @@ export {
|
|
|
71
76
|
resolveLimits,
|
|
72
77
|
serialize,
|
|
73
78
|
walkSpecStore,
|
|
79
|
+
SETUP_ANSWERS,
|
|
80
|
+
checkTargetOf,
|
|
81
|
+
layoutSetupOf,
|
|
74
82
|
} from './source-size/index.mjs';
|
|
75
83
|
|
|
76
84
|
export {
|
|
@@ -84,3 +92,14 @@ export {
|
|
|
84
92
|
// The claim vocabulary itself — a consumer naming an outcome imports the name, never a string
|
|
85
93
|
// literal it could misspell into a silently-never-true comparison.
|
|
86
94
|
export { CHECKER_CLAIM } from './checker-claim.mjs';
|
|
95
|
+
|
|
96
|
+
// readLayoutSetup(root, deps) → the layout setup's answer for a project, the one bound form the advisor
|
|
97
|
+
// and the git-hooks leaf ask: the loader, the tree judge and its stop filter, the absent config the
|
|
98
|
+
// check judges (schema 2 under the kit's values) and the reason the record's first entries take.
|
|
99
|
+
export const readLayoutSetup = (root, deps = {}) => layoutSetupOf(root, {
|
|
100
|
+
loadSourceSizeConfig,
|
|
101
|
+
judgeTree,
|
|
102
|
+
stopsOf,
|
|
103
|
+
absentConfig: validateSourceSizeConfig({ schema: SOURCE_SIZE_SCHEMA }),
|
|
104
|
+
reason: INITIAL_ADOPTION_REASON,
|
|
105
|
+
}, deps);
|
package/tools/write-lanes.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { join, resolve } from 'node:path';
|
|
|
2
2
|
import { dirCovers } from './declared-paths.mjs';
|
|
3
3
|
import { claudeDirOf, quoteArg, skillTargets } from './jev-facts.mjs';
|
|
4
4
|
import { targetsFor } from './jev-connect.mjs';
|
|
5
|
-
import { BUNDLED_SCRIPT_NAMES, INSTALLER_REL,
|
|
5
|
+
import { BUNDLED_SCRIPT_NAMES, INSTALLER_REL, SCRIPTS_DIR } from './node-evidence.mjs';
|
|
6
6
|
import { dqUnsafePath } from './checker-claim.mjs';
|
|
7
7
|
import { isLineUnsafe } from './source-size-refusal.mjs';
|
|
8
8
|
import { SOURCE_SIZE_GATE_ID } from './source-size-gate-cmd.mjs';
|
|
@@ -32,9 +32,11 @@ export const VARIANT_LANES = Object.freeze({
|
|
|
32
32
|
'source-size.adopted-elsewhere': LANE_CHAT,
|
|
33
33
|
'source-size.id-squatter': LANE_USER,
|
|
34
34
|
'source-size.schema-1': LANE_CHAT,
|
|
35
|
+
'source-size.layout': LANE_CHAT,
|
|
35
36
|
'gate-hook': LANE_HARNESS,
|
|
36
37
|
'gate-hook.marker-stale': LANE_HARNESS,
|
|
37
38
|
'commit-guard': LANE_HARNESS,
|
|
39
|
+
'hook-checks': LANE_HARNESS,
|
|
38
40
|
enforcement: LANE_HARNESS,
|
|
39
41
|
'read-lane': LANE_CHAT,
|
|
40
42
|
'read-lane.stale': LANE_HARNESS,
|
|
@@ -110,7 +112,7 @@ const getStartupPaths = ({ env, home, platform }) => targetsFor({
|
|
|
110
112
|
}).filter(({ path }) => path !== null).map(({ path }) => path);
|
|
111
113
|
|
|
112
114
|
const preCommitOf = (facts) => join(facts.hooksDir ?? join(facts.root, '.git', 'hooks'), 'pre-commit');
|
|
113
|
-
const getEnforcementPaths = (facts) => [...BUNDLED_SCRIPT_NAMES.map((name) => join(facts.root,
|
|
115
|
+
const getEnforcementPaths = (facts) => [...BUNDLED_SCRIPT_NAMES.map((name) => join(facts.root, SCRIPTS_DIR, name)), preCommitOf(facts)];
|
|
114
116
|
const getGuardPaths = (facts) => [preCommitOf(facts), join(facts.root, INSTALLER_REL)];
|
|
115
117
|
|
|
116
118
|
const formatCommand = (argv) => argv.map(quoteArg).join(' ');
|
|
@@ -183,6 +185,8 @@ const FORMS = Object.freeze({
|
|
|
183
185
|
['--enforcement', '--cwd', '<root>'], ['--apply', '--enforcement', '--cwd', '<root>'], getEnforcementPaths),
|
|
184
186
|
'commit-guard': createForm('git-hooks.mjs',
|
|
185
187
|
['--commit-guard', '--cwd', '<root>'], ['--apply', '--commit-guard', '--cwd', '<root>'], getGuardPaths),
|
|
188
|
+
'hook-checks': createForm('git-hooks.mjs',
|
|
189
|
+
['--hook-checks', '--cwd', '<root>'], ['--apply', '--hook-checks', '--cwd', '<root>'], getGuardPaths),
|
|
186
190
|
'worktrees-dir': createForm('velocity-profile.mjs',
|
|
187
191
|
['--worktrees', '--cwd', '<root>'], ['--apply', '--worktrees', '--cwd', '<root>'], LOCAL_SETTINGS_WRITES, false, null, true),
|
|
188
192
|
'worktrees-dir.home': Object.freeze({
|