@sabaiway/agent-workflow-kit 23.11.0 → 24.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 +87 -0
- package/README.md +4 -4
- package/SKILL.md +1 -1
- package/bridges/codex-cli-bridge/SKILL.md +7 -2
- package/bridges/codex-cli-bridge/bin/codex-exec-jev.test.mjs +11 -6
- package/bridges/codex-cli-bridge/bin/codex-exec.sh +72 -33
- package/bridges/codex-cli-bridge/bin/codex-exec.test.mjs +111 -3
- package/bridges/codex-cli-bridge/bin/codex-fixtures-harness.test.mjs +16 -1
- package/bridges/codex-cli-bridge/bin/codex-model-posture.test.mjs +5 -3
- package/bridges/codex-cli-bridge/bin/codex-review.sh +1 -1
- package/bridges/codex-cli-bridge/capability.json +2 -2
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/advisor-writers.md +2 -0
- package/references/agents/author.md +21 -0
- package/references/agents/executor.md +12 -6
- package/references/contracts.md +4 -4
- package/references/hooks/gate-approve.mjs +7 -8
- package/references/hooks/stage-write-guard.mjs +314 -0
- package/references/modes/agents.md +6 -4
- package/references/modes/bootstrap.md +1 -1
- package/references/modes/control-bytes.md +38 -32
- package/references/modes/flow-writer.md +10 -2
- package/references/modes/hook.md +4 -1
- package/references/modes/now.md +1 -1
- package/references/modes/procedures.md +49 -10
- package/references/modes/recipes.md +7 -7
- package/references/modes/recommendations.md +5 -4
- package/references/modes/robustness-brief.md +9 -8
- package/references/modes/set-recipe.md +1 -1
- package/references/modes/state-block-guard.md +4 -3
- package/references/modes/status.md +1 -1
- package/references/modes/upgrade.md +1 -1
- package/references/modes/worktrees.md +28 -5
- package/references/rules/story-sessions.md +2 -2
- package/references/scripts/archives/archive-caps.mjs +1 -1
- package/references/scripts/archives/archive-changelog.mjs +8 -8
- package/references/scripts/archives/archive-decisions.mjs +7 -7
- package/references/scripts/archives/archive-issues.mjs +5 -5
- package/references/scripts/archives/rotation-conservation.mjs +2 -1
- package/references/scripts/docs-size/check-docs-size.mjs +15 -15
- package/references/scripts/family.json +2 -0
- package/references/scripts/gates/kit-command-gates.mjs +7 -8
- package/references/scripts/gates/migrate-gates.mjs +10 -10
- package/references/scripts/git-hooks/install-git-hooks.mjs +13 -13
- package/references/scripts/run.mjs +1 -2
- package/references/scripts/shared/index.mjs +2 -0
- package/references/scripts/shared/locations.mjs +103 -0
- package/references/scripts/spec-schema/spec-schema.mjs +2 -1
- package/references/templates/orchestration.json +1 -1
- package/tools/ack-store.mjs +2 -1
- package/tools/advisor-matrix.mjs +2 -1
- package/tools/advisor-skip/index.mjs +73 -0
- package/tools/apply-danger-check.mjs +20 -6
- package/tools/atomic-write.mjs +3 -2
- package/tools/attribution.mjs +2 -1
- package/tools/autonomy-config.mjs +2 -1
- package/tools/bridge-wiring.mjs +13 -11
- package/tools/carriers.mjs +54 -14
- package/tools/cheap-agents-read.mjs +28 -7
- package/tools/cheap-agents.mjs +15 -10
- package/tools/checker-gates-read.mjs +6 -5
- package/tools/commands.mjs +2 -2
- package/tools/control-bytes.mjs +43 -20
- package/tools/coverage-declared/config.mjs +2 -1
- package/tools/coverage-producer.mjs +10 -9
- package/tools/delegation.mjs +7 -6
- package/tools/detect-backends.mjs +1 -1
- package/tools/dispatch-baseline.mjs +2 -1
- package/tools/distribution-files/scripts.mjs +4 -4
- package/tools/doc-parity/index.mjs +46 -0
- package/tools/doc-parity.mjs +27 -47
- package/tools/ensure-configs.mjs +2 -2
- package/tools/ensure-ops.mjs +24 -24
- package/tools/ensure-specs.mjs +7 -7
- package/tools/epic-shape-cli.mjs +2 -2
- package/tools/epic-shape-ledger.mjs +5 -5
- package/tools/epic-shape.mjs +5 -3
- package/tools/epic-store.mjs +2 -1
- package/tools/family-members.mjs +7 -5
- package/tools/family-registry.mjs +36 -30
- package/tools/feedback-record-cli.mjs +4 -5
- package/tools/flow-writer.mjs +26 -15
- package/tools/gate-hook.mjs +33 -28
- package/tools/gates-declaration.mjs +2 -1
- package/tools/gates-init.mjs +6 -5
- package/tools/git-hooks.mjs +64 -41
- package/tools/grounding.mjs +3 -2
- package/tools/hide-footprint.mjs +2 -1
- package/tools/hook-writer/index.mjs +147 -0
- package/tools/init-preflight.mjs +5 -4
- package/tools/init-project.mjs +12 -11
- package/tools/inject-methodology.mjs +3 -2
- package/tools/jev-guide.mjs +2 -2
- package/tools/known-footprint.mjs +27 -25
- package/tools/mcp-registration.mjs +6 -5
- package/tools/migration-blocks.mjs +2 -1
- package/tools/migration-notes.mjs +2 -2
- package/tools/node-evidence.mjs +4 -4
- package/tools/now-facts.mjs +5 -5
- package/tools/now-status.mjs +1 -5
- package/tools/orchestration-config.mjs +2 -1
- package/tools/orchestration-readme.mjs +7 -2
- package/tools/plan-approval/cli.mjs +45 -0
- package/tools/plan-approval/entries.mjs +109 -0
- package/tools/plan-approval/index.mjs +2 -0
- package/tools/plan-approval/record.mjs +198 -0
- package/tools/plan-files.mjs +6 -4
- package/tools/plan-shape-cli.mjs +10 -64
- package/tools/plan-shape-facts.mjs +240 -83
- package/tools/plan-shape.mjs +173 -160
- package/tools/plan-structure/cli.mjs +79 -0
- package/tools/plan-structure/index.mjs +67 -0
- package/tools/procedures.mjs +21 -17
- package/tools/profile-gaps.mjs +4 -6
- package/tools/project-rules/rules-priors.mjs +2 -0
- package/tools/project-rules/themes.mjs +6 -4
- package/tools/recipes.mjs +44 -29
- package/tools/recommendations.mjs +90 -39
- package/tools/reference-profile.mjs +2 -2
- package/tools/release-scan/index.mjs +30 -0
- package/tools/release-scan.mjs +46 -25
- package/tools/renderers.mjs +14 -8
- package/tools/repo-lex.mjs +84 -0
- package/tools/robustness-brief.mjs +14 -11
- package/tools/sandbox-masks.mjs +6 -4
- package/tools/satellite-locator.mjs +3 -2
- package/tools/script-priors.mjs +3 -2
- package/tools/session-close-check.mjs +71 -15
- package/tools/set-flow.mjs +2 -2
- package/tools/set-recipe.mjs +17 -9
- package/tools/source-size/help.mjs +4 -4
- package/tools/source-size/layout.mjs +2 -1
- package/tools/source-size/piles.mjs +2 -2
- package/tools/source-size-config.mjs +3 -3
- package/tools/source-size-refusal.mjs +4 -3
- package/tools/source-size-report.mjs +41 -13
- package/tools/spec-check-cli.mjs +159 -21
- package/tools/spec-check-ops.mjs +74 -5
- package/tools/spec-check.mjs +54 -45
- package/tools/spec-coverage-cli.mjs +3 -2
- package/tools/stage-render/cli.mjs +231 -0
- package/tools/stage-render/index.mjs +340 -0
- package/tools/stage-render/stages.json +115 -0
- package/tools/stage-write-guard/cli.mjs +64 -0
- package/tools/stage-write-guard/index.mjs +56 -0
- package/tools/state-block-hook.mjs +38 -163
- package/tools/task-brief.mjs +8 -13
- package/tools/task-thread.mjs +3 -1
- package/tools/tier-guide-facts.mjs +23 -9
- package/tools/tier-preview.mjs +15 -19
- package/tools/transition/index.mjs +10 -9
- package/tools/uninstall.mjs +26 -12
- package/tools/vehicle-settings.mjs +2 -1
- package/tools/velocity-profile.mjs +5 -6
- package/tools/view-model.mjs +7 -4
- package/tools/worktree-prompt.mjs +7 -3
- package/tools/worktrees.mjs +235 -159
- package/tools/write-lanes.mjs +20 -14
package/tools/write-lanes.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { join, resolve } from 'node:path';
|
|
1
|
+
import { join, posix, resolve } from 'node:path';
|
|
2
|
+
import { AGENTS_DIR, GATE_HOOK, GIT_CONFIG, GIT_HOOKS, HOOKS_DIR, MCP_FILE, PRE_COMMIT, SETTINGS, SETTINGS_LOCAL, SKILLS_DIR, STAGE_GUARD_HOOK, STOP_HOOK } from '../references/scripts/shared/index.mjs';
|
|
2
3
|
import { dirCovers } from './declared-paths.mjs';
|
|
3
4
|
import { claudeDirOf, quoteArg, skillTargets } from './jev-facts.mjs';
|
|
4
5
|
import { targetsFor } from './jev-connect.mjs';
|
|
@@ -43,6 +44,8 @@ export const VARIANT_LANES = Object.freeze({
|
|
|
43
44
|
'read-lane': LANE_CHAT,
|
|
44
45
|
'state-block': LANE_HARNESS,
|
|
45
46
|
'state-block.not-current': LANE_KIT,
|
|
47
|
+
'stage-guard': LANE_HARNESS,
|
|
48
|
+
'stage-guard.not-current': LANE_KIT,
|
|
46
49
|
'mcp-channel': LANE_HARNESS,
|
|
47
50
|
'mcp-channel.differing': LANE_HARNESS,
|
|
48
51
|
agents: LANE_HARNESS,
|
|
@@ -70,14 +73,14 @@ export const laneOf = (variant) => {
|
|
|
70
73
|
return VARIANT_LANES[variant];
|
|
71
74
|
};
|
|
72
75
|
|
|
73
|
-
const SETTINGS_PATH = join(
|
|
76
|
+
const SETTINGS_PATH = join(SETTINGS);
|
|
74
77
|
const PROTECTED_FILES = [
|
|
75
78
|
SETTINGS_PATH,
|
|
76
|
-
join(
|
|
77
|
-
|
|
78
|
-
join(
|
|
79
|
+
join(SETTINGS_LOCAL),
|
|
80
|
+
MCP_FILE,
|
|
81
|
+
join(GIT_CONFIG),
|
|
79
82
|
];
|
|
80
|
-
const PROTECTED_DIRS = [
|
|
83
|
+
const PROTECTED_DIRS = [AGENTS_DIR, HOOKS_DIR, SKILLS_DIR].map((dir) => join(dir));
|
|
81
84
|
|
|
82
85
|
export const isProtectedPath = (abs, { root, home, hooksDir }) => {
|
|
83
86
|
const project = resolve(root);
|
|
@@ -92,11 +95,12 @@ export const isProtectedPath = (abs, { root, home, hooksDir }) => {
|
|
|
92
95
|
};
|
|
93
96
|
|
|
94
97
|
const SETTINGS_WRITES = [SETTINGS_PATH];
|
|
95
|
-
const LOCAL_SETTINGS_WRITES = [join(
|
|
96
|
-
const GATE_HOOK_FILE = [join(
|
|
97
|
-
const STOP_HOOK_FILE = [join(
|
|
98
|
-
const
|
|
99
|
-
const
|
|
98
|
+
const LOCAL_SETTINGS_WRITES = [join(SETTINGS_LOCAL)];
|
|
99
|
+
const GATE_HOOK_FILE = [join(GATE_HOOK)];
|
|
100
|
+
const STOP_HOOK_FILE = [join(STOP_HOOK)];
|
|
101
|
+
const STAGE_GUARD_FILE = [join(STAGE_GUARD_HOOK)];
|
|
102
|
+
const MCP_WRITES = [MCP_FILE, ...SETTINGS_WRITES];
|
|
103
|
+
const AGENT_WRITES = [join(AGENTS_DIR)];
|
|
100
104
|
|
|
101
105
|
const getSkillPaths = ({ env, home, platform }) => {
|
|
102
106
|
const claudeDir = claudeDirOf(env, home, platform).dir;
|
|
@@ -111,7 +115,7 @@ const getStartupPaths = ({ env, home, platform }) => targetsFor({
|
|
|
111
115
|
platform,
|
|
112
116
|
}).filter(({ path }) => path !== null).map(({ path }) => path);
|
|
113
117
|
|
|
114
|
-
const preCommitOf = (facts) => join(facts.hooksDir ?? join(facts.root,
|
|
118
|
+
const preCommitOf = (facts) => join(facts.hooksDir ?? join(facts.root, GIT_HOOKS), posix.basename(PRE_COMMIT));
|
|
115
119
|
const getEnforcementPaths = (facts) => [...readDeployedScripts().map(({ deployed }) => join(facts.root, deployed)), preCommitOf(facts)];
|
|
116
120
|
const getGuardPaths = (facts) => [preCommitOf(facts), join(facts.root, INSTALLER_REL)];
|
|
117
121
|
|
|
@@ -156,6 +160,8 @@ const FORMS = Object.freeze({
|
|
|
156
160
|
'gate-hook.not-current': hookForm('gate-hook.mjs', GATE_HOOK_FILE),
|
|
157
161
|
'state-block': hookForm('state-block-hook.mjs', [...STOP_HOOK_FILE, ...SETTINGS_WRITES]),
|
|
158
162
|
'state-block.not-current': hookForm('state-block-hook.mjs', STOP_HOOK_FILE),
|
|
163
|
+
'stage-guard': hookForm('stage-write-guard/cli.mjs', [...STAGE_GUARD_FILE, ...SETTINGS_WRITES]),
|
|
164
|
+
'stage-guard.not-current': hookForm('stage-write-guard/cli.mjs', STAGE_GUARD_FILE),
|
|
159
165
|
'mcp-channel': createForm('mcp.mjs', ['--cwd', '<root>'], ['--apply', '--cwd', '<root>'], MCP_WRITES),
|
|
160
166
|
'mcp-channel.differing': createForm('mcp.mjs',
|
|
161
167
|
['--replace', '--cwd', '<root>'], ['--replace', '--apply', '--cwd', '<root>'], MCP_WRITES),
|
|
@@ -183,9 +189,9 @@ const FORMS = Object.freeze({
|
|
|
183
189
|
enforcement: createForm('git-hooks.mjs',
|
|
184
190
|
['--enforcement', '--cwd', '<root>'], ['--apply', '--enforcement', '--cwd', '<root>'], getEnforcementPaths),
|
|
185
191
|
'commit-guard': createForm('git-hooks.mjs',
|
|
186
|
-
['--commit-guard', '--cwd', '<root>'], ['--apply', '--commit-guard', '--cwd', '<root>'], getGuardPaths),
|
|
192
|
+
['--commit-guard', '--cwd', '<root>'], ['--apply', '--commit-guard', '--cwd', '<root>'], getGuardPaths, false, null, true),
|
|
187
193
|
'hook-checks': createForm('git-hooks.mjs',
|
|
188
|
-
['--hook-checks', '--cwd', '<root>'], ['--apply', '--hook-checks', '--cwd', '<root>'], getGuardPaths),
|
|
194
|
+
['--hook-checks', '--cwd', '<root>'], ['--apply', '--hook-checks', '--cwd', '<root>'], getGuardPaths, false, null, true),
|
|
189
195
|
'worktrees-dir': createForm('velocity-profile.mjs',
|
|
190
196
|
['--worktrees', '--cwd', '<root>'], ['--apply', '--worktrees', '--cwd', '<root>'], LOCAL_SETTINGS_WRITES, false, null, true),
|
|
191
197
|
'worktrees-dir.home': Object.freeze({
|