@khoavu882/doflow 2.0.0 → 2.0.1

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 (113) hide show
  1. package/README.md +4 -5
  2. package/bin/doflow.js +1 -1
  3. package/core/.claude-plugin/plugin.json +1 -1
  4. package/core/.codex-plugin/plugin.json +1 -1
  5. package/core/.plugin/plugin.json +1 -1
  6. package/core/harnesses/claude/hooks/mcp-tool-guard.sh +4 -1
  7. package/core/harnesses/claude/hooks/pre-implement-gate.sh +4 -1
  8. package/core/harnesses/claude/settings/settings.json +8 -9
  9. package/core/harnesses/codex/hooks/hooks.json +0 -10
  10. package/core/harnesses/codex/hooks/mcp-tool-guard.sh +4 -1
  11. package/core/harnesses/codex/hooks/pre-implement-gate.sh +4 -1
  12. package/core/harnesses/copilot/hooks/doflow-lib.sh +4 -3
  13. package/core/harnesses/copilot/hooks/doflow.json +0 -6
  14. package/core/harnesses/kiro/agents/doflow.json +0 -10
  15. package/core/harnesses/kiro/hooks/doflow.json +0 -10
  16. package/core/harnesses/kiro/hooks/mcp-tool-guard.sh +7 -3
  17. package/core/harnesses/kiro/hooks/pre-implement-gate.sh +7 -3
  18. package/core/harnesses/pi/extensions/doflow-guard.js +3 -2
  19. package/core/harnesses/shared/hooks/ENVELOPE_MIGRATION.md +1 -1
  20. package/core/harnesses/shared/hooks/adapters/antigravity.js +1 -1
  21. package/core/harnesses/shared/hooks/bridge/bridge.sh +35 -25
  22. package/core/harnesses/shared/hooks/bridge/envelope.jq +1 -1
  23. package/core/harnesses/shared/hooks/bridge/respond.sh +6 -0
  24. package/core/harnesses/shared/hooks/policies/capture-failure.sh +1 -1
  25. package/core/harnesses/shared/hooks/policies/deny-json.sh +23 -1
  26. package/core/harnesses/shared/hooks/policies/mcp-policy.conf +1 -1
  27. package/core/harnesses/shared/hooks/policies/mcp-tool-guard.sh +4 -6
  28. package/core/harnesses/shared/hooks/policies/pre-implementation-gate.sh +20 -21
  29. package/core/harnesses/shared/hooks/policies/stop-check.sh +7 -6
  30. package/core/harnesses/shared/hooks/policies/subagent-audit.sh +1 -1
  31. package/core/harnesses/shared/hooks/stream-hook-runner.js +11 -12
  32. package/core/registry/contracts.json +1 -1
  33. package/core/registry/contribution-points.json +5 -2
  34. package/core/registry/gates.json +5 -5
  35. package/core/registry/harnesses.json +9 -9
  36. package/core/registry/intake.json +53 -0
  37. package/core/registry/lifecycle.json +133 -711
  38. package/core/registry/package-templates/intake-category/files/category.json +8 -0
  39. package/core/registry/package-templates/intake-category/template.json +4 -0
  40. package/core/registry/packages/doflow/doflow-package.json +2 -2
  41. package/core/registry/rules.json +8 -8
  42. package/core/registry/settings.json +0 -4
  43. package/core/registry/storage.json +8 -0
  44. package/core/registry/telemetry.json +1 -1
  45. package/core/registry/verification.json +0 -5
  46. package/core/shared/guidance/references/DOFLOW_CHAIN.md +4 -4
  47. package/core/shared/guidance/references/ORCHESTRATION.md +2 -0
  48. package/core/shared/guidance/references/WORKFLOW_HANDOFF.md +19 -1
  49. package/core/shared/guidance/rules/RULES.md +2 -2
  50. package/core/shared/scripts/doflow/bash/validate-artifacts.sh +1 -1
  51. package/core/shared/scripts/doflow/bin/doflow-run +5 -2
  52. package/core/shared/skills/do/SKILL.md +3 -3
  53. package/core/shared/skills/do-brainstorm/SKILL.md +26 -24
  54. package/core/shared/skills/do-brainstorm/references/handoff_branches.md +2 -1
  55. package/core/shared/skills/do-code-review/SKILL.md +7 -4
  56. package/core/shared/skills/do-design/SKILL.md +5 -3
  57. package/core/shared/skills/do-diagnose/SKILL.md +4 -2
  58. package/core/shared/skills/do-document/SKILL.md +1 -0
  59. package/core/shared/skills/do-document/references/embedded-research.md +1 -1
  60. package/core/shared/skills/do-execute-plan/SKILL.md +4 -2
  61. package/core/shared/skills/do-execute-plan/references/run_position.md +3 -1
  62. package/core/shared/skills/do-execute-plan/references/scaffold.md +1 -1
  63. package/core/shared/skills/do-flow/SKILL.md +4 -4
  64. package/core/shared/skills/do-flow/references/task_classes.md +5 -5
  65. package/core/shared/skills/do-implement/SKILL.md +9 -7
  66. package/core/shared/skills/do-plan/SKILL.md +9 -6
  67. package/core/shared/workflows/do-flow-chain.md +2 -0
  68. package/package.json +1 -1
  69. package/src/adapters/claude/index.js +23 -2
  70. package/src/adapters/codex/hooks.js +39 -3
  71. package/src/adapters/codex/index.js +13 -0
  72. package/src/adapters/copy-tree.js +1 -2
  73. package/src/cli/commands/status.js +1 -1
  74. package/src/cli/index.js +20 -8
  75. package/src/cli/runtime-commands.js +12 -4
  76. package/src/lifecycle/coverage.js +1 -30
  77. package/src/lifecycle/hook-tier.js +2 -2
  78. package/src/release/docs-blocks.js +32 -52
  79. package/src/runtime/context/pointer.js +67 -12
  80. package/src/runtime/context-pack.js +4 -1
  81. package/src/runtime/evidence-ledger.js +18 -0
  82. package/src/runtime/health.js +59 -1
  83. package/src/runtime/implementation-gate.js +4 -4
  84. package/src/runtime/intake/engine.js +677 -0
  85. package/src/runtime/intake/index.js +136 -0
  86. package/src/runtime/intake/manifest.js +140 -0
  87. package/src/runtime/intake/taxonomy.js +206 -0
  88. package/src/runtime/lifecycle/cli.js +73 -5
  89. package/src/runtime/lifecycle/followup.js +32 -6
  90. package/src/runtime/lifecycle/overview.js +2 -1
  91. package/src/runtime/packages/points.js +10 -0
  92. package/src/runtime/roadmap/attendance.js +137 -0
  93. package/src/runtime/roadmap/gates.js +6 -3
  94. package/src/runtime/roadmap/loop.js +113 -30
  95. package/src/runtime/roadmap/merge.js +17 -8
  96. package/src/runtime/roadmap/rows.js +13 -4
  97. package/src/runtime/roadmap/seed.js +153 -41
  98. package/src/runtime/roadmap/worktree-cleanup.js +147 -0
  99. package/src/runtime/settings/registry.js +1 -1
  100. package/src/runtime/slots.js +1 -1
  101. package/src/runtime/task-classifier.js +39 -4
  102. package/src/runtime/task-state.js +2 -3
  103. package/src/runtime/verb-view.js +267 -0
  104. package/src/runtime/verification/engine.js +0 -45
  105. package/src/runtime/worker/launch.js +5 -37
  106. package/src/runtime/worker/readiness.js +2 -2
  107. package/src/runtime/workflow-orchestrator.js +33 -5
  108. package/core/harnesses/claude/hooks/pre-bash-guard.sh +0 -10
  109. package/core/harnesses/codex/hooks/pre-bash-guard.sh +0 -10
  110. package/core/harnesses/copilot/hooks/doflow-pre-bash-guard.sh +0 -9
  111. package/core/harnesses/kiro/hooks/pre-bash-guard.sh +0 -25
  112. package/core/harnesses/shared/hooks/policies/blocked-patterns.conf +0 -105
  113. package/core/harnesses/shared/hooks/policies/pre-bash-guard.sh +0 -579
@@ -2,11 +2,11 @@
2
2
  case "${OSTYPE:-}" in msys*|cygwin*|win32*) if command -v jq >/dev/null 2>&1; then jq() { command jq -b "$@"; }; fi ;; esac # native jq.exe ends lines with CRLF unless -b
3
3
  _DOFLOW_SRC=${0//\\//}; case $_DOFLOW_SRC in */*) _DOFLOW_POLDIR=${_DOFLOW_SRC%/*} ;; *) _DOFLOW_POLDIR=. ;; esac
4
4
  # pre-implementation-gate.sh — Canonical Policy Library: PreToolUse(Edit|Write|...)
5
- # backstop for the doflow implement gate. The HARD half of the one enforced
6
- # gate (the other half is the prompt-level do-prereqs.sh inside
7
- # /do-execute-plan — defense in depth).
5
+ # advisory for the doflow implement gate (the other half is the prompt-level
6
+ # do-prereqs.sh inside /do-execute-plan). It never denies: each finding below is
7
+ # a doflow_decide advisory code plus one stderr line.
8
8
  #
9
- # Denies a SOURCE-file edit in two cases:
9
+ # Advises on a SOURCE-file edit in two cases:
10
10
  # 1. a feature has been STARTED (its feature_dir exists, in this checkout or,
11
11
  # from a linked worktree, in the main checkout) but requirement.md,
12
12
  # design.md, or plan.md is still missing: "don't write code before you've
@@ -23,7 +23,7 @@ _DOFLOW_SRC=${0//\\//}; case $_DOFLOW_SRC in */*) _DOFLOW_POLDIR=${_DOFLOW_SRC%/
23
23
  # - edit target is under agent-docs/ -> allow (editing the artifacts themselves)
24
24
  # - edit target outside the repo -> allow
25
25
  # It reads files with jq and lists checkouts with one git call; it never runs
26
- # the DoFlow runtime. Missing or malformed v1 input is denied as out of step; other faults follow IC-011.
26
+ # the DoFlow runtime. Missing or malformed v1 input is allowed with an out-of-step line; other faults follow IC-011.
27
27
  #
28
28
  # Canonical Policy Script Contract (design.md §4):
29
29
  # env DOFLOW_PROJECT_DIR (repo root, if the front door sets it),
@@ -33,8 +33,8 @@ _DOFLOW_SRC=${0//\\//}; case $_DOFLOW_SRC in */*) _DOFLOW_POLDIR=${_DOFLOW_SRC%/
33
33
  # replaces — kept so an unmodified front door still resolves its own
34
34
  # harness's do-paths.sh resolver)
35
35
  # stdin a native payload encoded as envelope v1 by the lifecycle bridge.
36
- # exit exit 2 + doflow_decide deny = deny; other faults per IC-011. A front
37
- # door translates this into its native response shape.
36
+ # exit always 0: every finding is a doflow_decide advisory code plus one stderr
37
+ # line, which the lifecycle bridge renders per harness. This policy never denies.
38
38
  #
39
39
  # Reconciliation note (022-normalize-hooks, Phase A): claude/codex/kiro
40
40
  # each shipped a separately-adapted copy of this gate; antigravity's copy
@@ -65,8 +65,7 @@ else
65
65
  else
66
66
  printf '[pre-implementation-gate] DoFlow hooks out of step; run: doflow update\n' >&2
67
67
  fi
68
- doflow_decide deny contract-missing
69
- exit 2
68
+ exit 0
70
69
  fi
71
70
  doflow_decision_init pre-implementation-gate 1
72
71
  command -v jq >/dev/null 2>&1 || {
@@ -113,8 +112,8 @@ else
113
112
  ( . "$_DOFLOW_POLDIR/capture-failure.sh"; doflow_capture_failure pre-implementation-gate envelope-missing ) >/dev/null 2>&1 || true
114
113
  fi
115
114
  if [[ "${DOFLOW_AGENT:-}" =~ ^[a-z]+$ ]]; then printf '[pre-implementation-gate] DoFlow hooks out of step; run: doflow update -t %s\n' "$DOFLOW_AGENT" >&2; else printf '[pre-implementation-gate] DoFlow hooks out of step; run: doflow update\n' >&2; fi
116
- doflow_decide deny "${DF_ENV_CODE:-envelope-missing}"
117
- exit 2
115
+ doflow_decide unsupported "${DF_ENV_CODE:-envelope-missing}"
116
+ exit 0
118
117
  fi
119
118
 
120
119
  # ── Resolve repo root ───────────────────────────────────────────────────────
@@ -377,8 +376,8 @@ find_state() {
377
376
  copy="$repo_root${HIT#"$MAIN"}"
378
377
  if [ -f "$copy" ] && ! same_bytes "$copy" "$HIT"; then
379
378
  printf "doflow gate readiness-before-implementation: task '%s' has a readiness record in this worktree (%s) that differs from the main checkout's (%s). Next: keep one of the two and remove the other, then re-run. Nothing was changed.\n" "$task_id" "$copy" "$HIT" >&2
380
- doflow_decide deny readiness-store-conflict
381
- exit 2
379
+ doflow_decide advisory readiness-store-conflict
380
+ exit 0
382
381
  fi
383
382
  FOUND="$HIT"
384
383
  return 0
@@ -453,8 +452,8 @@ PLANNED=false
453
452
  # plan.md all exist. Classes that cannot be a feature skip this check.
454
453
  if [ "$exempt" = false ] && [ -n "$FEATURE_ROOT" ] && [ "$PLANNED" = false ]; then
455
454
  echo "[pre-implementation-gate] doflow gate: feature $feature_dir is missing requirement.md, design.md, or plan.md — run /do-brainstorm, /do-design, then /do-plan before editing source. (Edits under agent-docs/ are always allowed; skip the flow by removing the feature dir.)" >&2
456
- doflow_decide deny missing-artifacts
457
- exit 2
455
+ doflow_decide advisory missing-artifacts
456
+ exit 0
458
457
  fi
459
458
 
460
459
  # ── Readiness ────────────────────────────────────────────────────────────────
@@ -547,20 +546,20 @@ gate="doflow gate readiness-before-implementation: task '$task_id'"
547
546
  rest="Next: $next, then gather what it lists until it reports READY. Nothing was changed."
548
547
  if [ -z "$FOUND" ]; then
549
548
  printf "%s has no readiness record for the '%s' template. %s\n" "$gate" "$STAGE_TEMPLATE" "$rest" >&2
550
- doflow_decide deny readiness-missing
551
- exit 2
549
+ doflow_decide advisory readiness-missing
550
+ exit 0
552
551
  fi
553
552
  if [ "$record_state" != READY ]; then
554
553
  printf "%s was last evaluated %s at %s against the '%s' template, not READY. %s\n" \
555
554
  "$gate" "$record_state" "$record_at" "$STAGE_TEMPLATE" "$rest" >&2
556
- doflow_decide deny readiness-not-ready
557
- exit 2
555
+ doflow_decide advisory readiness-not-ready
556
+ exit 0
558
557
  fi
559
558
  if [ "$record_class" != "$STAGE_TEMPLATE" ]; then
560
559
  printf "%s has a READY record for the '%s' template, and this stage needs '%s'. %s\n" \
561
560
  "$gate" "$record_class" "$STAGE_TEMPLATE" "$rest" >&2
562
- doflow_decide deny readiness-wrong-template
563
- exit 2
561
+ doflow_decide advisory readiness-wrong-template
562
+ exit 0
564
563
  fi
565
564
 
566
565
  exit 0
@@ -13,10 +13,11 @@ _DOFLOW_SRC=${0//\\//}; case $_DOFLOW_SRC in */*) _DOFLOW_POLDIR=${_DOFLOW_SRC%/
13
13
  # 2. Stub detection: takes the payload's last_assistant_message, or else the
14
14
  # last assistant message in the JSONL transcript (Claude Code, Codex and
15
15
  # flat {role,content} shapes), then checks for unfinished-work markers.
16
- # Exits non-zero if stubs are found (blocks the session from stopping).
16
+ # Records an advisory and prints one warning line when stubs are found; it never
17
+ # blocks the session from stopping.
17
18
  # Runs independently of (1) — it needs only the payload field or a
18
19
  # transcript path, not a session_id, so it still fires for a harness that
19
- # has no edited-files queue. A given message blocks once: harnesses without
20
+ # has no edited-files queue. A given message is warned about once: harnesses without
20
21
  # stop_hook_active (Antigravity, Kiro) have no other loop guard.
21
22
  # 3. Process-leak scan: DoFlow's own identifiers (FR-###, agent-docs/, chain
22
23
  # artifact names) reaching files that ship. Warns, never blocks.
@@ -27,7 +28,7 @@ _DOFLOW_SRC=${0//\\//}; case $_DOFLOW_SRC in */*) _DOFLOW_POLDIR=${_DOFLOW_SRC%/
27
28
  # Canonical Policy Script Contract (design.md §4):
28
29
  # env DOFLOW_PROJECT_DIR, DOFLOW_AGENT (both optional here)
29
30
  # stdin envelope v1 from a native front door via the shared lifecycle bridge.
30
- # exit exit 2 + doflow_decide deny = deny; other faults per IC-011.
31
+ # exit always 0; a finding is a doflow_decide advisory code plus one stderr line.
31
32
  #
32
33
  # Depends on lib.sh (require_jq, json_field, ensure_session_dir,
33
34
  # run_with_timeout) being discoverable next to this script when it runs — see
@@ -277,7 +278,7 @@ BEGIN {
277
278
  STUB_PATTERN='(#|//)[[:space:]]*(TODO|FIXME)([^[:alnum:]_]|$)|raise NotImplementedError|throw new Error\(.*[Nn]ot [Ii]mplemented|(#|//)[[:space:]]*stub([^[:alnum:]_]|$)'
278
279
 
279
280
  if grep -qiE -- "$STUB_PATTERN" <<<"$STUB_TEXT" 2>/dev/null; then
280
- # Block a given message once: the continuation that follows is judged on new text, and a
281
+ # Warn about a given message once: the continuation that follows is judged on new text, and a
281
282
  # harness with no stop_hook_active would otherwise be blocked on this one forever. State is
282
283
  # per session, or per transcript when the harness sends no session_id; any failure here
283
284
  # leaves the block in force only for this call. With no config home there is no state store, so
@@ -295,8 +296,8 @@ if grep -qiE -- "$STUB_PATTERN" <<<"$STUB_TEXT" 2>/dev/null; then
295
296
  fi
296
297
  [ -n "$MESSAGE_SUM" ] && [ -n "$GUARD_FILE" ] && { printf '%s\n' "$MESSAGE_SUM" > "$GUARD_FILE"; } 2>/dev/null || true
297
298
  echo "[stop-check] The last response contains an unfinished-work marker (TODO/FIXME/stub comment or a not-implemented raise/throw)." >&2
298
- doflow_decide deny unfinished-work
299
- exit 2
299
+ doflow_decide advisory unfinished-work
300
+ exit 0
300
301
  fi
301
302
 
302
303
  exit 0
@@ -11,7 +11,7 @@ _DOFLOW_SRC=${0//\\//}; case $_DOFLOW_SRC in */*) _DOFLOW_POLDIR=${_DOFLOW_SRC%/
11
11
  # Today there is zero record of which of the installed agents/ specialists actually run, how often, or
12
12
  # whether one is invoked outside its intended use (e.g. everything routing through general-purpose
13
13
  # instead of do-code-review/security-engineer) — this hook is the evidence base a future policy
14
- # hook (e.g. an agent-aware pre-bash-guard extension) would need before writing rules on a guess.
14
+ # hook (e.g. an agent-aware tool guard) would need before writing rules on a guess.
15
15
  # Per agent-docs/research/hook-governance-agent-tool-mcp-skill.md §3.1: pure logging, no deny path,
16
16
  # safe to ship immediately, and the recommended first step before any tighter agent governance.
17
17
  #
@@ -21,11 +21,10 @@ const antigravityAdapter = require('./adapters/antigravity');
21
21
 
22
22
  // Tool-name classification for PreToolUse, generalized to the union every Phase A canonical
23
23
  // script's own case statement already recognizes (session-context.sh/pre-implementation-gate.sh/
24
- // mcp-tool-guard.sh/pre-bash-guard.sh headers) rather than only the two harnesses this runner
24
+ // mcp-tool-guard.sh headers) rather than only the two harnesses this runner
25
25
  // drives — kept in sync with those scripts, not redefined independently of them.
26
26
  const MCP_TOOL_PATTERN = /^mcp_/i;
27
27
  const EDIT_TOOL_PATTERN = /^(replace_file_content|write_to_file|multi_replace_file_content|edit_file|write_file|create_file|replace_file|replace|Edit|Write|MultiEdit|apply_patch)$/i;
28
- const COMMAND_TOOL_PATTERN = /^(run_command|run_shell_command|Bash|bash)$/i;
29
28
 
30
29
  // ── Failure capture (feature 046: IC-010, IC-011, IC-014, IC-015, IC-018) ─────────────────────────
31
30
  //
@@ -363,21 +362,22 @@ function resolveProjectRoot(workspacePaths) {
363
362
  */
364
363
  function delegateToPolicy(projectRoot, agent, event, policyId, nativeRaw) {
365
364
  const bridgeSh = path.join(__dirname, 'bridge', 'bridge.sh');
365
+ const profile = process.env.DOFLOW_FAULT_PROFILE || 'compat-1';
366
+ const effectiveProfile = profile === 'compat-1' || profile === 'strict-1' ? profile : 'compat-1';
367
+ if (profile !== effectiveProfile) captureHookFailure({ command: policyId, kind: 'fault-profile-unknown' });
368
+ const blockingPolicy = ['pre-implementation-gate', 'mcp-tool-guard', 'stop-check'].includes(policyId);
369
+ const faultEffect = effectiveProfile === 'strict-1' && blockingPolicy ? 'block' : 'proceed';
366
370
  if (!fs.existsSync(bridgeSh)) {
367
371
  captureHookFailure({ command: policyId, kind: 'bridge-missing' });
368
- if (policyId === 'stop-check') {
369
- return { v: 1, harness: agent, event, policy: policyId, policyVersion: 0, outcome: 'unsupported', code: 'bridge-missing', effect: 'proceed' };
372
+ // D1: a missing bridge allows with a recorded warning; only strict-1, a person's opt-in, blocks a tool call.
373
+ if (policyId === 'stop-check' || faultEffect === 'proceed') {
374
+ return { v: 1, harness: agent, event, policy: policyId, policyVersion: 0, outcome: 'unsupported', code: 'bridge-missing', faultProfile: effectiveProfile, effect: 'proceed' };
370
375
  }
371
376
  return {
372
377
  v: 1, harness: agent, event, policy: policyId, policyVersion: 0,
373
- outcome: 'deny', code: 'bridge-missing', reason: '[doflow] shared hooks lack the bridge; run: doflow update -t antigravity', effect: 'block',
378
+ outcome: 'deny', code: 'bridge-missing', reason: '[doflow] shared hooks lack the bridge; run: doflow update -t antigravity', faultProfile: effectiveProfile, effect: 'block',
374
379
  };
375
380
  }
376
- const profile = process.env.DOFLOW_FAULT_PROFILE || 'compat-1';
377
- const effectiveProfile = profile === 'compat-1' || profile === 'strict-1' ? profile : 'compat-1';
378
- if (profile !== effectiveProfile) captureHookFailure({ command: policyId, kind: 'fault-profile-unknown' });
379
- const blockingPolicy = ['pre-implementation-gate', 'pre-bash-guard', 'mcp-tool-guard', 'stop-check'].includes(policyId);
380
- const faultEffect = effectiveProfile === 'strict-1' && blockingPolicy ? 'block' : 'proceed';
381
381
  const faultDecision = (code) => ({
382
382
  v: 1, harness: agent, event, policy: policyId, policyVersion: 0,
383
383
  outcome: 'error', code, reason: code, faultProfile: effectiveProfile, effect: faultEffect,
@@ -415,7 +415,6 @@ function delegateToPolicy(projectRoot, agent, event, policyId, nativeRaw) {
415
415
  function classifyPreToolUsePolicy(toolName) {
416
416
  if (MCP_TOOL_PATTERN.test(toolName)) return 'mcp-tool-guard.sh';
417
417
  if (EDIT_TOOL_PATTERN.test(toolName)) return 'pre-implementation-gate.sh';
418
- if (COMMAND_TOOL_PATTERN.test(toolName)) return 'pre-bash-guard.sh';
419
418
  return null;
420
419
  }
421
420
 
@@ -431,7 +430,7 @@ function evaluatePreToolUsePolicy(payload, nativeRaw, projectRoot, agent) {
431
430
  * decision. Every event this runner drives maps to at most one Phase A script:
432
431
  * SessionStart -> session-context.sh (side-effect only; the script's own contract says it never
433
432
  * denies, so its exit code is not propagated as a decision)
434
- * PreToolUse -> mcp-tool-guard.sh | pre-implementation-gate.sh | pre-bash-guard.sh, chosen by
433
+ * PreToolUse -> mcp-tool-guard.sh | pre-implementation-gate.sh, chosen by
435
434
  * the tool-name classification above
436
435
  * Stop -> stop-check.sh
437
436
  * PostToolUse, PreInvocation -> no Phase A policy owns these yet (post-edit-lint.sh's collector
@@ -179,7 +179,7 @@
179
179
  {
180
180
  "harness": "kiro",
181
181
  "completeness": "lower-bound",
182
- "note": "hookEvents lists only the events DoFlow actually installs a doflow.json entry for (session-context on SessionStart, pre-implementation-gate, pre-bash-guard and mcp-tool-guard all on PreToolUse \u2014 hence PreToolUse appearing once, not twice \u2014 and stop-check on Stop), not the full set of trigger names Kiro's docs confirm (SessionStart, Stop, PreToolUse, PostToolUse, UserPromptSubmit, PreTaskExec, PostTaskExec, PostFileSave, PostFileCreate, PostFileDelete, plus SessionEnd on CLI V3 only \u2014 see kiro.dev/docs/hooks/types/). Widen this list only when DoFlow wires a hook to one of the unused confirmed events, alongside an added evidence URL.",
182
+ "note": "hookEvents lists only the events DoFlow actually installs a doflow.json entry for (session-context on SessionStart, pre-implementation-gate and mcp-tool-guard both on PreToolUse \u2014 hence PreToolUse appearing once, not twice \u2014 and stop-check on Stop), not the full set of trigger names Kiro's docs confirm (SessionStart, Stop, PreToolUse, PostToolUse, UserPromptSubmit, PreTaskExec, PostTaskExec, PostFileSave, PostFileCreate, PostFileDelete, plus SessionEnd on CLI V3 only \u2014 see kiro.dev/docs/hooks/types/). Widen this list only when DoFlow wires a hook to one of the unused confirmed events, alongside an added evidence URL.",
183
183
  "skillFields": ["name", "description", "license", "compatibility", "metadata"],
184
184
  "skillFieldsSource": "https://kiro.dev/docs/skills/",
185
185
  "skillFieldsVerifiedOn": "2026-10-27",
@@ -24,9 +24,12 @@
24
24
  "referencedBy": ["workers.billing"], "slice": "D", "template": "package-templates/worker" },
25
25
  { "id": "capability-provider", "versions": [1], "tier": "executable", "status": "open", "entry": "file",
26
26
  "validator": "capability-provider-v1", "combine": "add-only", "consumer": "src/runtime/capability-router.js",
27
- "referencedBy": [], "slice": "D", "template": "package-templates/capability-provider" }
27
+ "referencedBy": [], "slice": "D", "template": "package-templates/capability-provider" },
28
+ { "id": "intake-category", "versions": [1], "tier": "inert", "status": "open", "entry": "file",
29
+ "validator": "intake-category-v1", "combine": "add-only", "consumer": "src/runtime/intake/taxonomy.js",
30
+ "referencedBy": [], "slice": "136", "template": "package-templates/intake-category" }
28
31
  ],
29
32
  "bundled": [
30
- { "id": "doflow", "dir": "core/registry/packages/doflow", "contentDigest": "492b10df12d1281743ee26a31a5acab8a90c39e2b7c9ed29fdca5cc0a94bf24a" }
33
+ { "id": "doflow", "dir": "core/registry/packages/doflow", "contentDigest": "4684bab1385564aef5e65100c789605895f3597c7fc23f340afa55333d11377b" }
31
34
  ]
32
35
  }
@@ -6,14 +6,14 @@
6
6
  "gate-a": { "autopilot": "approve", "predicates": ["protected-paths", "plan-verification-absent", "plan-parses", "markers-zero:design", "markers-zero:plan", "needs-merged", "requires-reachable", "plan-within-write-set"] },
7
7
  "gate-b": { "autopilot": "approve", "minSeats": 2, "predicates": ["protected-paths", "plan-verification-absent", "verify-pass-on-head", "findings-valid", "no-dropped-findings", "dispositions-backed", "blockers-zero"] }
8
8
  },
9
- "bug": {},
10
- "refactor": {},
9
+ "bug": { "gate-b": { "autopilot": "approve", "minSeats": 2, "predicates": ["protected-paths", "plan-verification-absent", "verify-pass-on-head", "findings-valid", "no-dropped-findings", "dispositions-backed", "blockers-zero"] } },
10
+ "refactor": { "gate-b": { "autopilot": "approve", "minSeats": 2, "predicates": ["protected-paths", "plan-verification-absent", "verify-pass-on-head", "findings-valid", "no-dropped-findings", "dispositions-backed", "blockers-zero"] } },
11
11
  "review": {},
12
12
  "research": {},
13
- "documentation": {},
13
+ "documentation": { "gate-b": { "autopilot": "approve", "minSeats": 2, "predicates": ["protected-paths", "plan-verification-absent", "verify-pass-on-head", "findings-valid", "no-dropped-findings", "dispositions-backed", "blockers-zero"] } },
14
14
  "dependency-change": {},
15
15
  "operations": {},
16
- "trivial-edit": {}
16
+ "trivial-edit": { "gate-b": { "autopilot": "approve", "minSeats": 2, "predicates": ["protected-paths", "plan-verification-absent", "verify-pass-on-head", "findings-valid", "no-dropped-findings", "dispositions-backed", "blockers-zero"] } }
17
17
  },
18
18
  "protected": {
19
19
  "paths": ["core/registry/gates.json", "src/runtime/roadmap/", "core/registry/verification.json", "src/runtime/workflow-orchestrator.js", "src/runtime/decision-register.js", "core/registry/settings.json", "core/harnesses/shared/hooks/policies/", ".github/workflows/"],
@@ -27,6 +27,6 @@
27
27
  "unresolved-clarifications", "markers-open", "protected-path", "plan-unparsable", "need-unmerged", "prerequisite-no-source", "capability-unreachable", "write-set-exceeded",
28
28
  "verify-missing", "verify-not-pass", "verify-flaky", "findings-missing", "findings-invalid", "review-stale-head", "seats-too-few", "finding-dropped", "refuted-without-evidence", "accepted-without-user-decision", "user-accepted-needs-person", "fixed-not-ancestor", "blockers-open",
29
29
  "lease-held", "lease-lost", "stage-not-performed", "plan-exit-refused", "report-changed", "pause-not-machine", "facts-unreadable", "autopilot-disabled",
30
- "git-too-old", "merge-conflict", "develop-wrong-branch", "develop-dirty", "ff-running", "develop-moved", "head-moved", "no-develop-worktree", "plan-changed", "needs-person", "needs-person-tty"
30
+ "git-too-old", "merge-conflict", "develop-wrong-branch", "develop-dirty", "ff-running", "develop-moved", "head-moved", "no-develop-worktree", "plan-changed", "needs-person-tty", "needs-person-confirm"
31
31
  ]
32
32
  }
@@ -1611,7 +1611,7 @@
1611
1611
  },
1612
1612
  "PreToolUse": {
1613
1613
  "status": "different",
1614
- "note": "DoFlow's user- or project-scope extension evaluates tool_call before execution; tool_execution_start is observation-only."
1614
+ "note": "DoFlow's user- or project-scope extension evaluates tool_call before execution; tool_execution_start is observation-only. The extension acts only on a `{block:true}` answer, so an advisory from the gate or MCP guard is recorded and never reaches the model."
1615
1615
  },
1616
1616
  "PostToolUse": {
1617
1617
  "status": "different",
@@ -2065,8 +2065,8 @@
2065
2065
  "https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-hooks",
2066
2066
  "https://docs.github.com/en/copilot/reference/hooks-reference"
2067
2067
  ],
2068
- "note": "Surface chosen 2026-10-27 from a live capture (Copilot CLI 1.0.103, `copilot -p`, agent-docs/maintain/issue-21): camelCase events in .github/hooks/*.json (repo) and $COPILOT_HOME or ~/.copilot/hooks/ (user), shape {version:1,hooks:{<event>:[{type:command,bash,cwd,timeoutSec}]}}. camelCase fired sessionStart, sessionEnd, userPromptSubmitted, userPromptTransformed, preToolUse, postToolUse, permissionRequest, agentStop, subagentStart and subagentStop; the PascalCase aliases fired only PreToolUse, PostToolUse, SessionStart, SessionEnd, SubagentStart and SubagentStop (no UserPromptSubmit, Stop or permission event), so camelCase is the only surface that reaches agentStop. DoFlow writes .github/hooks/doflow.json plus doflow-*.sh front doors (project: <root>/.github/hooks; user: $COPILOT_HOME/hooks when COPILOT_HOME is set, else ~/.copilot/hooks) that normalise the camelCase payload to the canonical Claude-style payload (toolName bash/edit/create/apply_patch -> Bash/Edit/Write/apply_patch, toolArgs -> tool_input, sessionId/transcriptPath/agentId -> snake_case) and run the shared lifecycle bridge in ../.doflow/shared/hooks. Wired: sessionStart (session-context), preToolUse (pre-implementation-gate, pre-bash-guard, mcp-tool-guard), agentStop (stop-check; a subagent's own agentStop, which carries agentId, is skipped), subagentStart and subagentStop (subagent-audit). A guarded preToolUse policy that errors or cannot decide (jq or the policy script missing, an edit tool whose target path is not decodable) is denied under every fault profile, Copilot only. A preToolUse deny is the flat JSON {permissionDecision:\"deny\",permissionDecisionReason} on stdout with exit 0; the capture shows Copilot blocked `echo hi` with that output. Where the docs and the capture disagree the capture wins: the docs type camelCase toolArgs `unknown` (and describe tool_input as parsed from a JSON string); the capture shows toolArgs as a JSON object for bash, skill and task and as a raw string (the freeform patch) for apply_patch, and the normaliser accepts an object, a JSON string and a raw string. Copilot also sets CLAUDE_PROJECT_DIR and reads .claude/settings.json, so a project holding both a Claude and a Copilot DoFlow install runs the Claude-wired hooks on Copilot too. The guards are idempotent, but subagent-audit appends unconditionally, so one subagent completion writes two stop records (the capture holds both P:SubagentStop and subagentStop); the dedupe is not done here. Not live-verified: the agentStop block shape {decision:\"block\",reason} (documented, not exercised), MCP tool names on preToolUse, and the arguments of Copilot's `edit` and `create` tools (only apply_patch was captured; path, file_path, filePath, filename and target_file are decoded as the target, anything else is denied). The bash entry only runs under a POSIX shell; no powershell entry is written.",
2069
- "verification": "Run `copilot -p` in a project with `doflow install -t copilot`, confirm .github/hooks/doflow.json is loaded (hooks fire on a shell command), and that a force-push shell command is denied by pre-bash-guard. Docs read and capture taken 2026-10-27.",
2068
+ "note": "Surface chosen 2026-10-27 from a live capture (Copilot CLI 1.0.103, `copilot -p`, agent-docs/maintain/issue-21): camelCase events in .github/hooks/*.json (repo) and $COPILOT_HOME or ~/.copilot/hooks/ (user), shape {version:1,hooks:{<event>:[{type:command,bash,cwd,timeoutSec}]}}. camelCase fired sessionStart, sessionEnd, userPromptSubmitted, userPromptTransformed, preToolUse, postToolUse, permissionRequest, agentStop, subagentStart and subagentStop; the PascalCase aliases fired only PreToolUse, PostToolUse, SessionStart, SessionEnd, SubagentStart and SubagentStop (no UserPromptSubmit, Stop or permission event), so camelCase is the only surface that reaches agentStop. DoFlow writes .github/hooks/doflow.json plus doflow-*.sh front doors (project: <root>/.github/hooks; user: $COPILOT_HOME/hooks when COPILOT_HOME is set, else ~/.copilot/hooks) that normalise the camelCase payload to the canonical Claude-style payload (toolName bash/edit/create/apply_patch -> Bash/Edit/Write/apply_patch, toolArgs -> tool_input, sessionId/transcriptPath/agentId -> snake_case) and run the shared lifecycle bridge in ../.doflow/shared/hooks. Wired: sessionStart (session-context), preToolUse (pre-implementation-gate, mcp-tool-guard), agentStop (stop-check; a subagent's own agentStop, which carries agentId, is skipped), subagentStart and subagentStop (subagent-audit). A guarded preToolUse policy that errors or cannot decide (jq or the policy script missing, an edit tool whose target path is not decodable) is denied under every fault profile, Copilot only. A preToolUse deny is the flat JSON {permissionDecision:\"deny\",permissionDecisionReason} on stdout with exit 0; the capture shows Copilot blocked `echo hi` with that output. Where the docs and the capture disagree the capture wins: the docs type camelCase toolArgs `unknown` (and describe tool_input as parsed from a JSON string); the capture shows toolArgs as a JSON object for bash, skill and task and as a raw string (the freeform patch) for apply_patch, and the normaliser accepts an object, a JSON string and a raw string. Copilot also sets CLAUDE_PROJECT_DIR and reads .claude/settings.json, so a project holding both a Claude and a Copilot DoFlow install runs the Claude-wired hooks on Copilot too. The guards are idempotent, but subagent-audit appends unconditionally, so one subagent completion writes two stop records (the capture holds both P:SubagentStop and subagentStop); the dedupe is not done here. Not live-verified: the agentStop block shape {decision:\"block\",reason} (documented, not exercised), MCP tool names on preToolUse, and the arguments of Copilot's `edit` and `create` tools (only apply_patch was captured; path, file_path, filePath, filename and target_file are decoded as the target, anything else is denied). The bash entry only runs under a POSIX shell; no powershell entry is written.",
2069
+ "verification": "Run `copilot -p` in a project with `doflow install -t copilot`, confirm .github/hooks/doflow.json is loaded (hooks fire on a shell command). Docs read and capture taken 2026-10-27.",
2070
2070
  "events": {
2071
2071
  "SessionStart": {
2072
2072
  "status": "supported",
@@ -2078,7 +2078,7 @@
2078
2078
  },
2079
2079
  "PreToolUse": {
2080
2080
  "status": "supported",
2081
- "note": "Native preToolUse -> pre-implementation-gate, pre-bash-guard and mcp-tool-guard. Command hooks are fail-closed on a non-zero exit; a deny is the flat {permissionDecision,permissionDecisionReason} JSON (live-verified). Timeouts fail open."
2081
+ "note": "Native preToolUse -> pre-implementation-gate and mcp-tool-guard. Command hooks are fail-closed on a non-zero exit; a deny is the flat {permissionDecision,permissionDecisionReason} JSON (live-verified). DoFlow's pre-implementation-gate no longer denies (advisory only, D1): the bridge records the advisory and Copilot has no documented way to show it to the model on allow. Only mcp-tool-guard's blocked-pattern denies. Timeouts fail open."
2082
2082
  },
2083
2083
  "PostToolUse": {
2084
2084
  "status": "different",
@@ -2090,7 +2090,7 @@
2090
2090
  },
2091
2091
  "Stop": {
2092
2092
  "status": "supported",
2093
- "note": "Native agentStop -> stop-check, rendered as stdout {decision:\"block\",reason} (documented; capped by Copilot at 8 consecutive blocks; the payload carries stop_hook_active, which stop-check honours). Not live-exercised."
2093
+ "note": "Native agentStop -> stop-check, advisory only (D1): an unfinished-work finding is recorded and the stop proceeds; DoFlow no longer renders Copilot's documented stdout {decision:\"block\",reason} (capped by Copilot at 8 consecutive blocks). The payload carries stop_hook_active, which stop-check honours. Not live-exercised."
2094
2094
  },
2095
2095
  "UserPromptSubmit": {
2096
2096
  "status": "different",
@@ -2127,7 +2127,7 @@
2127
2127
  "https://docs.github.com/en/copilot/concepts/agents/about-plugins",
2128
2128
  "https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference"
2129
2129
  ],
2130
- "note": "Copilot CLI documents plugins (plugin.json manifest bundling agents, skills, hooks, .mcp.json and lsp.json; installed via 'copilot plugin install' or enabledPlugins in settings). Manifest discovery checks .plugin/plugin.json, plugin.json, .github/plugin/plugin.json, then .claude-plugin/plugin.json - there is no .copilot-plugin/ convention. DoFlow publishes a skills-only manifest at core/.plugin/plugin.json declaring only what activates there: agent specs are excluded (Copilot requires .agent.md; shared agent-specs are plain .md), hooks stay unprojected (Claude-payload-coupled), MCP registration stays installer-managed. Findings: docs/distribution-notes.md.",
2130
+ "note": "Copilot CLI documents plugins (plugin.json manifest bundling agents, skills, hooks, .mcp.json and lsp.json; installed via 'copilot plugin install' or enabledPlugins in settings). Manifest discovery checks .plugin/plugin.json, plugin.json, .github/plugin/plugin.json, then .claude-plugin/plugin.json - there is no .copilot-plugin/ convention. DoFlow publishes a skills-only manifest at core/.plugin/plugin.json declaring only what activates there: agent specs are excluded (Copilot requires .agent.md; shared agent-specs are plain .md), hooks stay unprojected (Claude-payload-coupled), MCP registration stays installer-managed.",
2131
2131
  "verification": "Report that no Copilot plugin package is installed."
2132
2132
  }
2133
2133
  },
@@ -2517,7 +2517,7 @@
2517
2517
  "https://kiro.dev/docs/hooks/types/",
2518
2518
  "https://kiro.dev/docs/permissions/"
2519
2519
  ],
2520
- "note": "kiro-cli reads hooks from an agent config's `hooks` array (agentSpawn, userPromptSubmit, preToolUse, postToolUse, stop). In a CLI 2.x agent config a preToolUse hook that exits 2 blocks the tool call and any other non-zero exit warns and allows; kiro.dev/docs/hooks/actions/ says that for its hooks any non-zero exit blocks Pre Tool Use. DoFlow note: CLI 2.x agent-config exit semantics not re-fetched (2026-10-24). Stop is not blockable on 2.x. DoFlow writes three preToolUse hooks (pre-implementation-gate on `write`, pre-bash-guard on `shell`, mcp-tool-guard on `*`) into every rendered agent, plus agentSpawn (session context) and stop (stop-check) on the doflow agent only. The Kiro front doors translate Kiro tool names, KIRO_SESSION_ID and assistant_response to the canonical payload before running the shared policies. `.kiro/hooks/doflow.json` (flat `{version, hooks: [...]}`, PascalCase triggers) is read by the Kiro IDE and by CLI V3 (for every agent); CLI 2.x does not read it. Kiro CLI V3 also loads standalone `.kiro/hooks/*.json` (workspace) and `~/.kiro/hooks/*.json` (global) for every agent, alongside agent-profile hooks, so doflow.json runs for all agents there, and with `--agent doflow` on V3 the preToolUse checks run twice (accepted, idempotent). V3 payloads carry `session_id`, and V3 built-in tool IDs include `read_file`, `execute_bash`, `execute_pwsh`, `fs_write`, `fs_append`, `str_replace` and `delete_file`; the front doors map the write family to Write and `execute_pwsh` to Bash, and V3 MCP IDs (`mcp_<server>_<tool>`) reach mcp-tool-guard unchanged. doflow.json scopes the MCP guard with the V3 `@mcp` selector. V3 Stop: exit 0 finishes, exit 0 with stdout JSON `{\"decision\":\"block\",\"reason\":\"...\"}` starts another turn, exit 1 also starts another turn, and exit 2 does not block; the stop front door therefore turns the policy's deny into that JSON block when the payload has a session_id and keeps exit 2 with stderr for 2.x, where any non-zero exit only warns. It is not in Kiro v3's untrusted-workspace exclusion list; an untrusted workspace asks before every shell command, and whether that covers hook commands is undocumented. Observed on CLI V3 (kiro-cli 2.27.1 --v3, 2026-10-11): PreToolUse payloads carry session_id, tool_name execute_bash with tool_input.command, fs_write and str_replace with tool_input.path; the Stop payload carries only session_id, hook_event_name and cwd, with no response text or transcript path, so stop-check's unfinished-work scan has nothing to read on V3 and allows the stop.",
2520
+ "note": "kiro-cli reads hooks from an agent config's `hooks` array (agentSpawn, userPromptSubmit, preToolUse, postToolUse, stop). In a CLI 2.x agent config a preToolUse hook that exits 2 blocks the tool call and any other non-zero exit warns and allows; kiro.dev/docs/hooks/actions/ says that for its hooks any non-zero exit blocks Pre Tool Use. DoFlow note: CLI 2.x agent-config exit semantics not re-fetched (2026-10-24). Stop is not blockable on 2.x. DoFlow writes two preToolUse hooks (pre-implementation-gate on `write`, mcp-tool-guard on `*`) into every rendered agent, plus agentSpawn (session context) and stop (stop-check) on the doflow agent only. The Kiro front doors translate Kiro tool names, KIRO_SESSION_ID and assistant_response to the canonical payload before running the shared policies. `.kiro/hooks/doflow.json` (flat `{version, hooks: [...]}`, PascalCase triggers) is read by the Kiro IDE and by CLI V3 (for every agent); CLI 2.x does not read it. Kiro CLI V3 also loads standalone `.kiro/hooks/*.json` (workspace) and `~/.kiro/hooks/*.json` (global) for every agent, alongside agent-profile hooks, so doflow.json runs for all agents there, and with `--agent doflow` on V3 the preToolUse checks run twice (accepted, idempotent). V3 payloads carry `session_id`, and V3 built-in tool IDs include `read_file`, `execute_bash`, `execute_pwsh`, `fs_write`, `fs_append`, `str_replace` and `delete_file`; the front doors map the write family to Write and `execute_pwsh` to Bash, and V3 MCP IDs (`mcp_<server>_<tool>`) reach mcp-tool-guard unchanged. doflow.json scopes the MCP guard with the V3 `@mcp` selector. V3 Stop: exit 0 finishes, exit 0 with stdout JSON `{\"decision\":\"block\",\"reason\":\"...\"}` starts another turn, exit 1 also starts another turn, and exit 2 does not block; stop-check is advisory only (D1), so the stop front door exits 0 on V3 and 2.x and never renders that JSON block. The door prints stderr only on exit 2, so on every Kiro profile the unfinished-work finding is record-only: the bridge trace shows advisory/unfinished-work, and neither the user nor the model sees a line. The gate's PreToolUse advisory is written to stderr by the front door, which Kiro documents no model-visible path for. It is not in Kiro v3's untrusted-workspace exclusion list; an untrusted workspace asks before every shell command, and whether that covers hook commands is undocumented. Observed on CLI V3 (kiro-cli 2.27.1 --v3, 2026-10-11): PreToolUse payloads carry session_id, tool_name execute_bash with tool_input.command, fs_write and str_replace with tool_input.path; the Stop payload carries only session_id, hook_event_name and cwd, with no response text or transcript path, so stop-check's unfinished-work scan has nothing to read on V3 and allows the stop.",
2521
2521
  "verification": "Confirm kiro-cli reads hooks from the agent config JSON `hooks` (installed .kiro/agents/doflow.json and the specialist agents) with the expected trigger names, and that, in an agent config on CLI 2.x, a preToolUse hook blocks only on exit 2 (any other non-zero exit warns and allows). .kiro/hooks/doflow.json is the Kiro IDE and CLI V3 surface, where any non-zero exit blocks Pre Tool Use.",
2522
2522
  "events": {
2523
2523
  "UserPromptSubmit": {
@@ -3011,7 +3011,7 @@
3011
3011
  },
3012
3012
  "PreToolUse": {
3013
3013
  "status": "supported",
3014
- "note": "DoFlow projects its pre-implementation gate as a native shim: matcher write_to_file|replace_file_content|multi_replace_file_content, deny decision until the branch-coupled feature's three specifications exist."
3014
+ "note": "DoFlow projects its pre-implementation gate as a native shim: matcher write_to_file|replace_file_content|multi_replace_file_content, advisory only (D1): the native shim allows the edit and records an advisory while the branch-coupled feature's three specifications are missing. The allow response carries no advice, so the advisory is record-only and does not reach the model."
3015
3015
  },
3016
3016
  "PostToolUse": {
3017
3017
  "status": "different",
@@ -3027,7 +3027,7 @@
3027
3027
  },
3028
3028
  "Stop": {
3029
3029
  "status": "supported",
3030
- "note": "DoFlow projects its stop check as a native shim: emits the documented {decision:'continue', reason} when the last assistant response in transcriptPath carries unfinished-work markers (the same gate Claude's stop-check enforces via exit 2). transcriptPath is a documented required common field, but empty/garbage stdin, missing/unreadable/unrecognized transcripts all fail open, so a broken hook can never trap session end."
3030
+ "note": "DoFlow projects its stop check as a native shim: records an advisory (D1) and lets the session end when the last assistant response in transcriptPath carries unfinished-work markers; it no longer emits the documented {decision:'continue', reason}. Silence is the whole response, so the advisory is record-only and reaches neither the model nor the user. transcriptPath is a documented required common field, but empty/garbage stdin, missing/unreadable/unrecognized transcripts all fail open, so a broken hook can never trap session end."
3031
3031
  },
3032
3032
  "UserPromptSubmit": {
3033
3033
  "status": "unavailable",
@@ -0,0 +1,53 @@
1
+ {
2
+ "version": 1,
3
+ "description": "Categories for sorting the loose files a user drops into a feature's additional-context/ folder. A rule matches on file name and extension only, never on content. Categories are tried in order, rules in order, and the first match wins; a package adds categories through the intake-category contribution point.",
4
+ "recentWindowSeconds": 60,
5
+ "pointerMaxBytes": 262144,
6
+ "textExtensions": ["md", "txt", "mmd", "puml", "vtt", "srt", "json", "yaml", "yml", "csv", "html"],
7
+ "promptCategory": "prompt",
8
+ "categories": [
9
+ {
10
+ "id": "raw-prd",
11
+ "names": ["prd", "requirements"],
12
+ "summary": "Product requirement documents, briefs and stories as the user wrote them.",
13
+ "rules": [
14
+ { "extensions": ["md", "txt", "pdf", "docx"], "namePattern": "prd|requirement|brief|epic|(^|[^a-z0-9])(story|stories)([^a-z0-9]|$)" }
15
+ ]
16
+ },
17
+ {
18
+ "id": "hld",
19
+ "names": ["design", "architecture"],
20
+ "summary": "High-level design notes, diagram sources and their rendered images.",
21
+ "rules": [
22
+ { "extensions": ["mmd", "puml", "drawio", "excalidraw"], "into": "diagrams" },
23
+ { "extensions": ["png", "svg", "jpg", "jpeg"], "companionOf": ["mmd", "puml", "drawio", "excalidraw"] },
24
+ { "extensions": ["md"], "namePattern": "hld|high[-_ ]?level|design|architecture|decision|adr" }
25
+ ]
26
+ },
27
+ {
28
+ "id": "discuss-session",
29
+ "names": ["meetings"],
30
+ "summary": "Recordings, transcripts and notes of a discussion.",
31
+ "rules": [
32
+ { "extensions": ["mp3", "m4a", "wav", "ogg", "mp4", "mov", "webm"], "into": "records" },
33
+ { "extensions": ["vtt", "srt"], "into": "transcripts" },
34
+ { "extensions": ["txt", "md"], "namePattern": "transcript|meeting|minutes|discuss|session", "into": "transcripts" },
35
+ { "extensions": ["txt"], "namePattern": "^(\\d{1,2}-\\d{1,2}-\\d{4}|\\d{4}-\\d{2}-\\d{2})", "into": "transcripts" }
36
+ ]
37
+ },
38
+ {
39
+ "id": "references",
40
+ "names": ["docs", "vendor-docs"],
41
+ "summary": "Reference documents, spreadsheets and vendor material.",
42
+ "rules": [
43
+ { "extensions": ["pdf", "docx", "xlsx", "pptx", "html"] }
44
+ ]
45
+ },
46
+ {
47
+ "id": "prompt",
48
+ "names": [],
49
+ "summary": "Context pasted into the prompt, filed verbatim by the intake verb; no rule sorts a file here.",
50
+ "rules": []
51
+ }
52
+ ]
53
+ }