@sabaiway/agent-workflow-kit 16.1.0 → 18.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 +75 -0
- package/README.md +3 -3
- package/SKILL.md +1 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/advisor-writers.md +3 -4
- package/references/contracts.md +10 -3
- package/references/modes/agents.md +8 -6
- package/references/modes/gates.md +1 -1
- package/references/modes/hook.md +7 -7
- package/references/modes/recommendations.md +3 -3
- package/references/modes/state-block-guard.md +4 -0
- package/references/modes/upgrade.md +1 -1
- package/tools/apply-danger-check.mjs +35 -27
- package/tools/cheap-agents-read.mjs +8 -3
- package/tools/cheap-agents.mjs +62 -74
- package/tools/distribution-files/scripts.mjs +6 -2
- package/tools/ensure-configs.mjs +2 -2
- package/tools/ensure-executor.mjs +4 -4
- package/tools/gate-hook.mjs +25 -55
- package/tools/recommendations.mjs +109 -213
- package/tools/state-block-hook.mjs +6 -6
- package/tools/write-lanes.mjs +12 -15
package/tools/write-lanes.mjs
CHANGED
|
@@ -35,19 +35,18 @@ export const VARIANT_LANES = Object.freeze({
|
|
|
35
35
|
'source-size.schema-1': LANE_CHAT,
|
|
36
36
|
'source-size.layout': LANE_CHAT,
|
|
37
37
|
'gate-hook': LANE_HARNESS,
|
|
38
|
-
'gate-hook.
|
|
38
|
+
'gate-hook.not-current': LANE_KIT,
|
|
39
39
|
'commit-guard': LANE_HARNESS,
|
|
40
40
|
'hook-checks': LANE_HARNESS,
|
|
41
41
|
enforcement: LANE_HARNESS,
|
|
42
42
|
'read-lane': LANE_CHAT,
|
|
43
|
-
'read-lane.stale': LANE_HARNESS,
|
|
44
|
-
'read-lane.missing': LANE_HARNESS,
|
|
45
43
|
'state-block': LANE_HARNESS,
|
|
44
|
+
'state-block.not-current': LANE_KIT,
|
|
46
45
|
'mcp-channel': LANE_HARNESS,
|
|
47
46
|
'mcp-channel.differing': LANE_HARNESS,
|
|
48
47
|
agents: LANE_HARNESS,
|
|
48
|
+
'agents.not-current': LANE_KIT,
|
|
49
49
|
'executor-vehicle': LANE_HARNESS,
|
|
50
|
-
'executor-vehicle.differing': LANE_KIT,
|
|
51
50
|
attribution: LANE_HARNESS,
|
|
52
51
|
'footprint-global': LANE_HARNESS,
|
|
53
52
|
'family-freshness': LANE_USER,
|
|
@@ -93,8 +92,8 @@ export const isProtectedPath = (abs, { root, home, hooksDir }) => {
|
|
|
93
92
|
|
|
94
93
|
const SETTINGS_WRITES = [SETTINGS_PATH];
|
|
95
94
|
const LOCAL_SETTINGS_WRITES = [join('.claude', 'settings.local.json')];
|
|
96
|
-
const
|
|
97
|
-
const
|
|
95
|
+
const GATE_HOOK_FILE = [join('.claude', 'hooks', 'agent-workflow-gates.mjs')];
|
|
96
|
+
const STOP_HOOK_FILE = [join('.claude', 'hooks', 'state-block-guard.mjs')];
|
|
98
97
|
const MCP_WRITES = ['.mcp.json', ...SETTINGS_WRITES];
|
|
99
98
|
const AGENT_WRITES = [join('.claude', 'agents')];
|
|
100
99
|
|
|
@@ -139,8 +138,8 @@ const createForm = (file, preview, apply, writes, envDependent = false, userStep
|
|
|
139
138
|
});
|
|
140
139
|
|
|
141
140
|
const CORE_FORM = createForm('velocity-profile.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], SETTINGS_WRITES);
|
|
142
|
-
|
|
143
|
-
const
|
|
141
|
+
// A hook's offer writes its file and the settings entry; its kit item, over a wired hook, the file alone.
|
|
142
|
+
const hookForm = (file, writes) => createForm(file, ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], writes);
|
|
144
143
|
const AGENT_FORM = createForm('cheap-agents.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], AGENT_WRITES);
|
|
145
144
|
const SKILL_FORM = createForm('jev-skill.mjs', ['--claude-dir', '<dir>'], ['--apply', '--claude-dir', '<dir>'], getSkillPaths, true);
|
|
146
145
|
|
|
@@ -152,18 +151,16 @@ const FORMS = Object.freeze({
|
|
|
152
151
|
['--bridge-tier', '--cwd', '<root>'], ['--apply', '--bridge-tier', '--cwd', '<root>'], SETTINGS_WRITES, true),
|
|
153
152
|
'autonomy-render': createForm('velocity-profile.mjs',
|
|
154
153
|
['--autonomy', '--cwd', '<root>'], ['--autonomy', '--apply', '--cwd', '<root>'], SETTINGS_WRITES),
|
|
155
|
-
'gate-hook':
|
|
156
|
-
'
|
|
157
|
-
'
|
|
158
|
-
'
|
|
159
|
-
'state-block': createForm('state-block-hook.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], STOP_HOOK_WRITES),
|
|
154
|
+
'gate-hook': hookForm('gate-hook.mjs', [...GATE_HOOK_FILE, ...SETTINGS_WRITES]),
|
|
155
|
+
'gate-hook.not-current': hookForm('gate-hook.mjs', GATE_HOOK_FILE),
|
|
156
|
+
'state-block': hookForm('state-block-hook.mjs', [...STOP_HOOK_FILE, ...SETTINGS_WRITES]),
|
|
157
|
+
'state-block.not-current': hookForm('state-block-hook.mjs', STOP_HOOK_FILE),
|
|
160
158
|
'mcp-channel': createForm('mcp.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], MCP_WRITES),
|
|
161
159
|
'mcp-channel.differing': createForm('mcp.mjs',
|
|
162
160
|
['--replace', '--cwd', '<root>'], ['--replace', '--apply', '--cwd', '<root>'], MCP_WRITES),
|
|
163
161
|
agents: AGENT_FORM,
|
|
162
|
+
'agents.not-current': AGENT_FORM,
|
|
164
163
|
'executor-vehicle': AGENT_FORM,
|
|
165
|
-
'executor-vehicle.differing': createForm('cheap-agents.mjs',
|
|
166
|
-
['--executor', '--cwd', '<root>'], ['--apply', '--executor', '--cwd', '<root>'], [join('.claude', 'agents', 'executor.md')]),
|
|
167
164
|
attribution: createForm('attribution.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], SETTINGS_WRITES),
|
|
168
165
|
'footprint-global': createForm('hide-footprint.mjs',
|
|
169
166
|
['--remove-global', '--dry-run', '--dir', '<root>'], ['--remove-global', '--dir', '<root>'], [], false, null, true),
|