@sabaiway/agent-workflow-kit 10.6.0 → 11.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/SKILL.md +9 -1
  3. package/bridges/antigravity-cli-bridge/SKILL.md +1 -1
  4. package/bridges/antigravity-cli-bridge/bin/agy-review.sh +6 -6
  5. package/bridges/antigravity-cli-bridge/capability.json +1 -1
  6. package/bridges/codex-cli-bridge/SKILL.md +1 -1
  7. package/bridges/codex-cli-bridge/bin/codex-exec.sh +1 -1
  8. package/bridges/codex-cli-bridge/bin/codex-review.sh +6 -6
  9. package/bridges/codex-cli-bridge/capability.json +1 -1
  10. package/capability.json +1 -1
  11. package/package.json +1 -1
  12. package/references/modes/commit-guard.md +2 -2
  13. package/references/modes/control-bytes.md +91 -0
  14. package/references/modes/flow-writer.md +16 -4
  15. package/references/modes/procedures.md +2 -0
  16. package/references/modes/review-state.md +1 -1
  17. package/references/modes/robustness-brief.md +61 -0
  18. package/references/modes/velocity.md +2 -0
  19. package/references/robustness-literals.json +107 -0
  20. package/tools/changed-surface.mjs +1 -1
  21. package/tools/commands.mjs +14 -0
  22. package/tools/commit-guard.mjs +20 -9
  23. package/tools/control-bytes.mjs +264 -0
  24. package/tools/core-evidence.mjs +33 -20
  25. package/tools/coverage-check.mjs +1 -1
  26. package/tools/dispatch-store-read.mjs +2 -2
  27. package/tools/flow-check-git-lane.mjs +2 -1
  28. package/tools/flow-delta-proof.mjs +4 -4
  29. package/tools/flow-record-shape.mjs +44 -2
  30. package/tools/flow-round-gates.mjs +151 -0
  31. package/tools/flow-store-read.mjs +1 -1
  32. package/tools/flow-writer.mjs +235 -82
  33. package/tools/fold-scope.mjs +7 -3
  34. package/tools/fs-read-nofollow.mjs +56 -4
  35. package/tools/git-env.mjs +120 -0
  36. package/tools/grounding.mjs +4 -3
  37. package/tools/plan-shape-facts.mjs +23 -10
  38. package/tools/plan-shape.mjs +8 -0
  39. package/tools/procedures.mjs +18 -4
  40. package/tools/repo-lex.mjs +29 -0
  41. package/tools/review-state.mjs +43 -34
  42. package/tools/robustness-brief.mjs +209 -0
  43. package/tools/robustness-literals.mjs +101 -0
  44. package/tools/sandbox-masks.mjs +2 -1
  45. package/tools/set-flow.mjs +2 -1
  46. package/tools/source-size-scope.mjs +19 -25
  47. package/tools/tracked-tree-census.mjs +3 -3
  48. package/tools/velocity-profile.mjs +5 -2
  49. package/tools/worktree-handoff-return.mjs +2 -2
  50. package/tools/worktrees.mjs +2 -2
@@ -1,6 +1,6 @@
1
1
  // tracked-tree-census.mjs — how much of a project's TRACKED tree the changed-line coverage domain
2
2
  // can actually assess, in the closed vocabulary that domain already speaks. A LEAF: it imports the
3
- // classification and nothing else, and it spawns exactly one read-only `git ls-files`.
3
+ // changed-surface classification and the shared git-spawn buffer from the git-location leaf, and it spawns exactly one read-only `git ls-files`.
4
4
  //
5
5
  // Why this exists: the coverage checker's domain is `.mjs/.cjs/.js` by design, and on a TS project
6
6
  // that domain is a rounding error of the tree. Certifying it and calling the flow optimal is the
@@ -10,9 +10,9 @@
10
10
  // Read-only: never writes, never commits. Dependency-free, Node >= 22. No side effects on import.
11
11
 
12
12
  import { spawnSync } from 'node:child_process';
13
- import { classifyChangedPath } from './changed-surface.mjs';
14
13
 
15
- const GIT_MAX_BUFFER = 256 * 1024 * 1024; // a large tracked tree; never truncate
14
+ import { classifyChangedPath } from './changed-surface.mjs';
15
+ import { GIT_MAX_BUFFER } from './git-env.mjs';
16
16
 
17
17
  export const CENSUS_VERDICT = Object.freeze({ NARROW: 'domain-narrow', WITHIN_DOMAIN: 'within-domain' });
18
18
 
@@ -133,7 +133,7 @@ export const SHELL_READONLY = Object.freeze([
133
133
  // seed time from the RUNNING tool's own location — resolved-absolute, so a moved or reinstalled
134
134
  // skill leaves a stale rule that FAIL-SAFE prompts again (never a silent widening).
135
135
  //
136
- // Membership (13, frozen): the read-only kit tools plus run-gates.mjs — which is NOT read-only but
136
+ // Membership (14, frozen): the read-only kit tools plus run-gates.mjs — which is NOT read-only but
137
137
  // project-exec (it runs the project's OWN declared gates.json commands), so it seeds as ONE exact
138
138
  // byte-string pinned to this project root (`--cwd <resolved root>`): a wildcard would be BROADER
139
139
  // than the AD-037 hook boundary (`--cwd <dir>` executes an arbitrary OTHER project's gates.json)
@@ -163,6 +163,9 @@ export const KIT_READONLY_TOOLS = Object.freeze([
163
163
  // The round table the procedures advisor names every review round; its path argument is resolved
164
164
  // and compared, never opened as a pattern, so it rides the settings-level posture like the rest.
165
165
  'tools/review-rounds-cli.mjs',
166
+ // The control-byte gate: a pure reader over the work tree, run by hand before the matrix runs it.
167
+ 'tools/control-bytes.mjs',
168
+ 'tools/robustness-brief.mjs',
166
169
  ]);
167
170
  // Writer previews: ONLY writers whose ARG-FREE invocation is a documented dry-run ("Default is
168
171
  // --dry-run" in their usage) seed an EXACT preview byte-string — every --apply/--write/--yes keeps
@@ -780,7 +783,7 @@ export const screenAllowlistEntry = (pattern) => {
780
783
  };
781
784
 
782
785
  /**
783
- * Derive the opt-in kit-tools tier for a project: 12 wildcard entries (resolved-absolute script
786
+ * Derive the opt-in kit-tools tier for a project: 13 wildcard entries (resolved-absolute script
784
787
  * path + args wildcard), ONE exact run-gates entry pinned to the resolved project root, and the
785
788
  * writer-preview exact dry-run byte-strings. Pure derivation — a stale path simply prompts again.
786
789
  */
@@ -34,12 +34,14 @@
34
34
  import { spawnSync } from 'node:child_process';
35
35
  import { lstatSync, readdirSync, realpathSync } from 'node:fs';
36
36
  import { createHash } from 'node:crypto';
37
+
37
38
  import { findSatelliteEntry, readSatelliteIdentity, WORKTREES_STOP } from './satellite-locator.mjs';
38
39
  import { locateProvisionRecordSection, parseProvisionRecord, displayValue } from './worktrees-record.mjs';
39
40
  import { readFileBytesNoFollow } from './fs-read-nofollow.mjs';
40
41
  import { computeNumerator } from './dispatch-record.mjs';
41
42
  import { resolveRepoRoot, formatRatio, buildObservationRecord } from './observation-builder.mjs';
42
43
  import { appendDelegationRecord, DELEGATION_STORE_STOP } from './dispatch-store.mjs';
44
+ import { GIT_MAX_BUFFER } from './git-env.mjs';
43
45
 
44
46
  // The worktrees slug grammar, repeated here so the CLI can refuse a malformed slug as USAGE before
45
47
  // any probe echoes it — the locator's own refusal interpolates the slug into a terminal message.
@@ -57,8 +59,6 @@ const PROVENANCE = 'self-reported';
57
59
  const REGULAR_MODES = new Set(['100644', '100755']);
58
60
  const RECORD_HEADING = '## Provision record';
59
61
 
60
- const GIT_MAX_BUFFER = 64 * 1024 * 1024;
61
-
62
62
  const defaultGit = (args, cwd) => {
63
63
  const r = spawnSync('git', args, { cwd, encoding: 'utf8', windowsHide: true, maxBuffer: GIT_MAX_BUFFER });
64
64
  return {
@@ -16,6 +16,7 @@ import { join, dirname, basename, resolve, relative, isAbsolute, sep } from 'nod
16
16
  import { fileURLToPath } from 'node:url';
17
17
  import { spawnSync } from 'node:child_process';
18
18
  import { randomBytes } from 'node:crypto';
19
+
19
20
  import { MCP_JSON_REL, SERVER_NAME, SETTINGS_REL, withoutRegistration } from './mcp-registration.mjs';
20
21
  import {
21
22
  KIT_OWN_PATHS, KNOWN_FOOTPRINT, expandGlob, normalizeSlashes, isDirPattern, isGlobPattern,
@@ -25,6 +26,7 @@ import { isDirectRun } from './direct-run.mjs';
25
26
  import { isScratchPlanName, plansInFlight, PLANS_REL, shellQuoteArg } from './review-state.mjs';
26
27
  import { writeContainedFileAtomic } from './atomic-write.mjs';
27
28
  import { assertContainedRealPath } from './fs-safe.mjs';
29
+ import { GIT_MAX_BUFFER } from './git-env.mjs';
28
30
  import { isFinalCapableDeclaration } from './run-gates.mjs';
29
31
  import {
30
32
  WORKTREES_STOP, stop, EXIT, handoffBasename, recordValue, hasControlByte, displayValue,
@@ -76,8 +78,6 @@ const TRACKED_PIN_DECLARATION =
76
78
  const TRANSFER_EXCLUSIONS = Object.freeze([':!docs/ai', ':!docs/plans']);
77
79
  const PREPARE_LOCK_BASENAME = 'aw-prepare-lock';
78
80
 
79
- const GIT_MAX_BUFFER = 256 * 1024 * 1024;
80
-
81
81
  const USAGE = [
82
82
  'usage: worktrees.mjs <subcommand> [args]',
83
83
  '',