Hook Patterns

Lifecycle event hooks

AIWG Hook Patterns

Prompt-first procedure: Describe the outcome you want in your agent conversation. The agent should select and load the appropriate AIWG assets, explain material changes, request any needed approval, and report verification evidence. Exact commands and flags appear only in the CLI reference.

Issues: #284, #289 Version: 2026.11.4 Status: Active

Prompt-time discovery (#3858)

Review the authentication code for security issues.

On Claude Code, Muse, Codex 0.165, Cursor (where it runs project hooks), Hermes, and interactive Factory, each substantive prompt gives the assistant up to three AIWG candidates: type, name, a short capability, and relevance score. For example, its additional context can contain `skill security-review (0.92): Review code for security issues`, followed by the steps to inspect the candidate with the agent’s stable-asset loader, fetch required rule bodies with `the rules option the with-rule-bodies option` / the body option, and apply the instructions. Candidates are hints; the assistant still checks their instructions before acting.

the agent-owned use operation installs the shared `aiwg-prompt-discovery.cjs` hook into Claude's `.claude/hooks/` and registers `UserPromptSubmit` in `.claude/settings.json`. Muse uses `.muse/hooks/` and its existing hooks.json/sidecar owner. Repeating installation updates managed entries while preserving your own hooks. Codex uses `.codex/hooks/` and `.codex/hooks.json` through the existing hook bridge, including the kernel-only deployment used by the agent-owned use operation. It does not edit the user’s global Codex configuration.

Cursor uses the same canonical script in `.cursor/hooks/`, registered as a flat `hooks.beforeSubmitPrompt` command array in `.cursor/hooks.json` (version 1). the agent-owned use operation installs it by default; the agent-owned refresh operation detects missing registrations and missing or stale scripts. Existing operator hooks are preserved, and edited scripts are reported for review. The response uses `additional_context` and `continue: true`. Context stays below 600 characters, within Cursor CLI 2026.11.13's 10,000-character limit; larger context is dropped by Cursor. This contract was checked against the installed CLI's hook validators and context carrier. Live check, 2026-11-17 (CLI 2026.11.13): headless `cursor-agent -p` did not run project `beforeSubmitPrompt` hooks at all (a marker hook in the same `hooks.json` never fired), so headless runs rely on the deployed rules, which still produced discovery-first behaviour (p2: the agent’s capability search first, correct decline). The hook itself returns the expected `{"continue":true,"additional_context":…}` in about 0.3 s when given a `beforeSubmitPrompt` event.

Acknowledgements such as “yes”, “ok”, “go”, and “1”, short replies without an identified imperative, slash-command-only prompts (including command arguments), empty prompts, and harness notifications/system turns (including task notifications, system reminders and tool-result echoes) skip discovery. Candidates still use the 0.20 floor, but at least one must score 0.70 to inject the top three. This threshold excludes the unrelated 0.60/0.40 results observed in #3889 while retaining the existing strong 0.70–0.92 fixtures; it is a routing cutoff, not a probability. With no strong candidate, context contains only an instruction to run the agent’s capability search (with the type option for a named artifact type) before any other tool call or answer. Strong candidate context makes the agent’s stable-asset loader for the best fit the first call, and also says: “If none fit, run the agent capability search; never decline without it.” The wording is directive because Muse ignored advisory wording in the 2026-11-06 UAT and followed first-call wording. Injected text stays under 600 characters, allowing up to 100 characters per capability. Discovery uses the validated shipped relationship package and search metadata read-only, falling back to existing local metadata. It never rebuilds indexes, writes digest receipts, or assembles rule bodies at prompt time. Errors, missing runtimes, and timeouts exit successfully without output; the hook never edits or blocks your prompt. Normal installs use shipped prebuilt metadata without a per-root index; missing or invalid packages fall back to existing local metadata. Missing indexes produce the discover instruction and stay untouched.

Set `AIWG_PROMPT_DISCOVERY=0` (also `false` or `off`) in the harness environment to disable it. `AIWG_PROMPT_DISCOVERY_TIMEOUT_MS` adjusts the total budget (default 1500 ms, maximum 10000 ms), including stdin and index work. Existing the no-hooks option deployment controls continue to apply; the environment switch also disables already-installed hooks.

ProviderPrompt discovery delivery
Claude CodeUserPromptSubmit additionalContext
MuseUserPromptSubmit additionalContext via project hook owner
CursorbeforeSubmitPrompt additional_context via project `.cursor/hooks.json`
AntigravityPreInvocation `injectSteps[].systemMessage.systemMessage` via named project `.agents/hooks.json`; once per conversation and prompt
Codex 0.165UserPromptSubmit additionalContext via project `.codex/hooks.json`
FactoryUserPromptSubmit plain stdout context via project `.factory/hooks.json`; requires folder trust and a git commit
HermesOpt-in `pre_llm_call` shell hook in `$HERMES_HOME/config.yaml`, returning native `{context}`; requires command consent
CopilotDiscover-first bootstrap rule in `.github/copilot-instructions.md`
Grok BuildDiscover-first bootstrap rule in `AGENTS.md`

The canonical source retains `degrade-on` for Copilot and Grok Build: their bootstrap rules require the agent’s capability search before any other tool call or answer, then the agent’s stable-asset loader with rule bodies and application. These rules obtain candidates through discovery; they do not inject ranked candidates automatically.

Offline delivery evidence (#3996)

Installed help/docs were inspected offline on 2026-11-08; no prompt runs were made:

  • Copilot 1.0.105: `copilot the help option`, `copilot help hooks` (unknown topic), and

the installed `@github/copilot/README.md` document no prompt-context injection contract. the no-custom-instructions option explicitly disables instruction loading; the fallback requires custom instructions to remain enabled.

  • Grok 1.0.77: installed binary's bundled Hooks documentation, extracted with

`strings`, says allowing `UserPromptSubmit` stdout is discarded, with no `additionalContext`. Tool-event context is too late for prompt discovery.

  • Hermes checkout `dce1e9b375`: installed `website/docs/user-guide/features/hooks.md`, “Shell Hooks”

and “JSON wire protocol”, documents `pre_llm_call`, stdin `extra.user_message`, and stdout `{context}`. The existing bridge copies the shared bounded script to `$HERMES_HOME/agent-hooks/aiwg-prompt-discovery.cjs` and merges that event into `config.yaml`. Use the agent-owned use operation; the existing bridge stays opt-in and the no-hooks option suppresses it. Commands, comments and consent settings are preserved. Accept at the TTY prompt, or opt in with the accept-hooks option, `HERMES_ACCEPT_HOOKS=1` or `hooks_auto_accept: true`; AIWG never sets acceptance. Deploy prints a short next step; the agent-owned doctor operation reports unaccepted or unverified hooks. The anchored, fingerprint-checked command changes when script bytes change on redeploy; Hermes matches the exact event and command string, so review and accept it again. See Hermes setup. Safe mode and denied/unapproved hooks prevent delivery. Hermes help failed because its dependency environment needs repair; installed docs establish this contract, with runtime UAT deferred.

`context.promptDiscovery` in the provider registry records delivery files, the Hermes event and opt-in; the isolated harness audit checks the deployed bytes. Antigravity's native contract was checked against installed `agy 1.3.3` docs and embedded schema; see Antigravity native hooks.

Factory project hooks (#3976)

Trust this folder in droid; project hooks load only in a git repository with at least one commit. After deploying, open interactive droid from the project root and trust the folder. If the project has no git history, initialize the repository and create its first commit before expecting project hooks to load.

Factory registers AIWG hooks in `.factory/hooks.json` as a top-level event map. `UserPromptSubmit` delivers plain stdout context through the shared discovery script; `SessionStart` checks for updates. the agent-owned use operation prints the next step when either prerequisite is missing or unverified, and the agent-owned doctor operation reports the same advisory. AIWG reads `~/.factory/settings.json` without changing it: `trustedFolders` is an object keyed by absolute folder path, and the exact project key establishes trust. A bounded `git rev-parse the verify option HEAD^{commit}` in the project checks for an existing commit (`HEAD^{commit}`, so a non-commit object does not satisfy the check). AIWG never grants trust or creates commits. These prerequisites apply to interactive project hooks; they do not establish prompt-hook support for `droid exec`.

The deploy next step stays on one line: "Trust this folder in droid; hooks need a git repo with at least one commit." Doctor includes the trust state and whether the local commit check succeeded.

To configure Factory as a project worker CLI, use the existing project setting:

Use AIWG to complete this documented outcome: To configure Factory as a project worker CLI, use the existing project setting
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Worker dispatch must be enabled (`parallelism.worker_dispatch: true`), and an enabled `parallelism.groups` member must select `cli: factory` and the exact model ID from your Factory plan or BYOK configuration. Headless qualification uses the yes option for operator confirmation. Doctor reports missing droid, missing model configuration, or missing current model observations before recording an approval. It does not check subscription entitlement offline, read credentials, or run a model turn. Droid has no documented non-interactive model-list command; AIWG cannot infer plan/BYOK availability from an installed binary or API key.

Reasoning effort is not enforceable for BYOK custom models: droid accepts the r option but ignores it, and the session reports `reasoning_effort: none`. An effort flag or an installation approval does not prove that the requested effort ran.

Codex 0.165 schema verification (#3888)

Trust the project in Codex, then approve the AIWG hook when Codex asks; AIWG reads project trust from `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) without changing it, and reports hook review as unknown because no documented offline approval signal is available. 0.167 update: exec requires saved folder and hook trust; per-run the c option trust plus the dangerously-bypass-hook-trust option no longer enables project hooks. See the 2026-11-09 session-log audit and worker limitation; the probes below describe 0.165 only.

The installed `codex-cli 0.165.0` reports `hooks stable true` from `codex features list`. Offline probes used an empty temporary `CODEX_HOME` and HOME, no credentials, a synthetic trusted project, and network calls denied by `strace -f -e inject=connect:error=ENETUNREACH -e inject=sendto:error=ENETUNREACH`. The binary's stdio app server (`initialize`, then `hooks/list` with `{"cwds":["<temporary-project>"]}`) established the following:

  • Both `<project>/.codex/hooks.json` and `$CODEX_HOME/hooks.json` are read.
  • JSON is `{"hooks":{"UserPromptSubmit":[{"hooks":[{"type":"command","command":"node /path/to/hook.cjs","timeout":2}]}]}}`.
  • TOML uses `[[hooks.UserPromptSubmit]]`, followed by

`[[hooks.UserPromptSubmit.hooks]]`, `type = "command"`, and a shell `command` string. Separate `args` on the matcher group are ineffective.

  • Configuration keys are PascalCase, matching Claude Code. A snake_case

`user_prompt_submit` key silently loads zero hooks in both JSON and TOML. `hooks/list` reports the loaded hook's internal key with `user_prompt_submit` and its API event name as `userPromptSubmit`. These are different namespaces.

  • All eleven canonical events were enumerated successfully, including distinct

`Stop` and `SessionEnd`, with no warnings or errors.

  • Project hooks require a trusted project; hook commands separately require

Codex hook trust/review. Deployment never grants that trust. The probe used the dangerously-bypass-hook-trust option only for its synthetic command.

An unauthenticated `codex exec the ephemeral option the skip-git-repo-check option the dangerously-bypass-hook-trust option the json option` executed the project command and delivered `hook_event_name: "UserPromptSubmit"`, `prompt`, and `cwd` on stdin. Its JSON output used `hookSpecificOutput.hookEventName: "UserPromptSubmit"` and `hookSpecificOutput.additionalContext`; the same wire shape is embedded in the binary's `user-prompt-submit.command.output` schema. The embedded `pre-tool-use.command.output` schema declares `permissionDecision` and `permissionDecisionReason` inside `hookSpecificOutput`. A second run executed the deployed shared discovery script with a synthetic local discovery runtime and captured its candidate `additionalContext` JSON. Both runs were terminated after observing hook execution; no authenticated model turn or model-visible context was tested. A complete model turn requires the operator's authenticated session.

The round-two cwd probe used the installed `codex-cli 0.165.0` binary with temporary HOME and CODEX_HOME directories, no auth.json, and the same strace network denial above. It launched from a separate directory with `the no-daemon option -C "<fixture>/project with spaces" exec the ephemeral option the skip-git-repo-check option the dangerously-bypass-hook-trust option the json option`. A synthetic UserPromptSubmit script recorded `process.cwd()`, stdin `cwd`, and CODEX/CLAUDE environment variables. Both cwd values equalled the the C option directory; `node .codex/hooks/probe.cjs` ran successfully. With `-C "<fixture>/project with spaces/nested"` inside a trusted Git fixture, the parent project's hook still loaded, but both cwd values were the nested directory. Only the explicitly supplied CODEX_HOME was present among CODEX/CLAUDE variables: there was no injected project-root variable.

As of #4033/#4037, Claude, Codex and Muse commands anchor to the deployment root and include the copied script's SHA-256. The inline Node loader reads and hashes the script, rejects redirected paths and non-regular files, and compiles those same verified bytes. It never searches ancestor directories. Project Claude hooks use `CLAUDE_PROJECT_DIR` with the deployment root as a fallback; Codex and Muse use the root written at deployment. User hooks use the absolute provider home (including an explicit `CODEX_HOME`), independently of the session cwd. Move a Codex or Muse project and redeploy its hooks to update the anchor. Path data is base64-encoded to preserve spaces, drive letters, backslashes and shell metacharacters across sh, cmd.exe and PowerShell; the script name and hash remain visible in the command. Redeployment changes the command when source bytes change, requiring a new Codex review; editing deployed bytes causes refusal. Refresh detects legacy registrations, and doctor warns about cwd-relative user commands. the agent-owned use operation rewrites them.

An offline check of the installed `codex-cli 0.167.0` on 2026-11-09 used temporary HOME/CODEX_HOME directories and network-denied `app-server hooks/list`. Its exported `ConfiguredHookHandler` schema and loaded response accept `statusMessage` and report `AIWG prompt discovery`. The translator emits that label. The schema has no `name` or `description` field: the same probe confirmed those fields are ignored. A dedicated review-title field cannot be supplied on this version.

The default installer reads the canonical source and script from AIWG's own package, independently of an external or synthetic bundle's source root. The lightweight CLI stages and allowlists that source and the shared hook scripts even when the framework corpus is absent.

The bridge keeps `Stop` distinct from `SessionEnd`. Its legacy TOML block helper rescues `[desktop]`, marketplace, plugin, and other user tables when a misplaced AIWG end marker encloses them. Project deployment leaves existing global TOML untouched; the helper is available for explicit managed-block replacement.

Overview

Claude Code hooks enable AIWG to inject context dynamically and enforce quality gates without bloating CLAUDE.md. This guide covers PreToolUse context injection (#284) and extended timeout quality gates (#289).

PreToolUse Context Injection (#284)

Problem

AIWG loads all conventions via CLAUDE.md and path-scoped rules, consuming context window regardless of relevance. PreToolUse hooks can inject context only when a relevant tool is actually being used.

Pattern: Dynamic Context Loading

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "command": "cat .aiwg/conventions/coding-standards.md 2>/dev/null || true",
        "additionalContext": true
      },
      {
        "matcher": "Bash",
        "command": "cat .aiwg/conventions/safety-checks.md 2>/dev/null || true",
        "additionalContext": true
      }
    ]
  }
}

How It Works

1. When Claude Code is about to use a tool (Write, Edit, Bash, etc.), the PreToolUse hook fires 2. The hook's `command` runs and its stdout becomes `additionalContext` 3. This context is injected into the model's next turn - targeted and temporary 4. No permanent context window cost - only loaded when relevant

AIWG Context Injection Examples

Coding conventions on Write/Edit:

# .aiwg/hooks/inject-coding-context.sh
#!/bin/bash
# Only inject if modifying source files
if echo "$TOOL_INPUT" | grep -q '"file_path".*"src/'; then
  cat .aiwg/conventions/typescript-standards.md
fi

Security checks on Bash:

# .aiwg/hooks/inject-safety-context.sh
#!/bin/bash
cat <<'CTX'
SAFETY REMINDER: Before executing commands:
- Never run destructive commands without confirmation
- Validate all file paths are within project scope
- Check for sensitive data exposure in output
CTX

Agent-specific context:

# .aiwg/hooks/inject-agent-context.sh
#!/bin/bash
AGENT=$(cat .aiwg/current-agent.txt 2>/dev/null)
if [ -f ".aiwg/conventions/${AGENT}.md" ]; then
  cat ".aiwg/conventions/${AGENT}.md"
fi

Benefits vs Static Loading

ApproachContext CostRelevanceMaintenance
CLAUDE.md (static)Always loadedMay be irrelevantSingle file
Path-scoped rulesPer-file-typeGoodMultiple files
PreToolUse hooksOn-demandExcellentHook scripts

Quality Gate Hooks (#289)

Problem

Previously, hooks timed out at 60 seconds - too short for running full test suites or security scans. Claude Code v2.1.3 extended timeouts to 10 minutes.

Pattern: Test Suite as Quality Gate

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write",
        "command": ".aiwg/hooks/run-affected-tests.sh",
        "timeout": 300000,
        "blocking": true
      }
    ]
  }
}

Hook script:

#!/bin/bash
# .aiwg/hooks/run-affected-tests.sh
# Run tests related to the file being modified

FILE=$(echo "$TOOL_INPUT" | python3 -c "import json,sys; print(json.load(sys.stdin).get('file_path',''))" 2>/dev/null)

if [[ "$FILE" == src/* ]]; then
  # Map source to test file
  TEST_FILE="${FILE/src\//test\/}"
  TEST_FILE="${TEST_FILE/.ts/.test.ts}"

  if [ -f "$TEST_FILE" ]; then
    npm test -- --testPathPattern="$TEST_FILE" the bail option 2>&1
    exit $?
  fi
fi

exit 0  # No tests to run

Gate Types by Hook Phase

GateHook PhaseTimeoutPurpose
Unit testsPreToolUse(Write)5 minValidate before accepting changes
Security scanPreToolUse(Bash)10 minCheck commands before execution
Lint/formatPostToolUse(Write)2 minAuto-fix after writes
Coverage checkPostToolUse(Bash)5 minVerify coverage after test runs
SDLC gatePreToolUse(Write)5 minEnforce phase requirements

SDLC Phase Gate Hook

#!/bin/bash
# .aiwg/hooks/sdlc-phase-gate.sh
# Enforce that required artifacts exist before construction phase

PHASE=$(cat .aiwg/planning/current-phase.txt 2>/dev/null || echo "unknown")

if [ "$PHASE" = "construction" ]; then
  MISSING=""
  [ ! -f .aiwg/architecture/sad.md ] && MISSING="$MISSING SAD"
  [ ! -f .aiwg/testing/test-strategy.md ] && MISSING="$MISSING TestStrategy"

  if [ -n "$MISSING" ]; then
    echo "GATE BLOCKED: Missing artifacts for construction:$MISSING"
    echo "Complete elaboration phase first."
    exit 1
  fi
fi

exit 0

Timeout Configuration

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write",
        "command": ".aiwg/hooks/quick-lint.sh",
        "timeout": 30000
      },
      {
        "matcher": "Bash",
        "command": ".aiwg/hooks/full-security-scan.sh",
        "timeout": 600000
      }
    ]
  }
}

Timeout guidelines:

Check TypeRecommended TimeoutRationale
Lint/format30sFast, single-file
Unit tests (affected)2-5 minSubset of tests
Full test suite5-10 minComplete validation
Security scan5-10 minDeep analysis
Build verification3-5 minCompilation check

Offline harness audit (#3935, 2026.11.3)

Inventory date: 2026-11-07. This audit covers the issue's 18 named providers and the generic fallback. The registry also contains Flue, added separately; it is outside this issue's inventory. Sources: provider registry, its `provider-seeds-{1,2,3}.ts` and `provider-context-contracts.ts` owners, the runtime MCP registry, and the existing deployment adapters. The MCP registry is not an alternative deployment inventory. Seed ownership: `provider-seeds-1.ts` owns antigravity, claude, codex, copilot, cursor, factory and grokbot; `provider-seeds-2.ts` owns deepseek-harness, grok-build, hermes, muse, opencode, openclaw, openhuman and omp; `provider-seeds-3.ts` owns pi, warp, devin and generic.

Paths below are project relative unless prefixed with `~/`. K = native kernel skills, B = bulk skill inventory; `use all` defaults to kernel deployment, so a B path can be absent until the copy-all option. Rule files on non-native loaders are reached through the bootstrap's mandatory `RULES-INDEX` read. Pi and OMP retain their existing full-surface `use all` default; this audit uses each provider's public default without changing its deployment flags.

ProviderBootstrapRulesSkills (K; B)Deployment owner (`tools/agents/providers/`)
antigravity`AGENTS.md``.antigravity/rules``.agents/skills`; `.agents/.aiwg/skills``antigravity.mjs`
claude`CLAUDE.md``.claude/rules``.claude/skills`; `.claude/.aiwg/skills``claude.mjs`
codex`AGENTS.md``.codex/rules``.agents/skills`; `.codex/.aiwg/skills``codex.mjs`
copilot`.github/copilot-instructions.md`, `AGENTS.md``.github/instructions``.github/skills`; `.github/.aiwg/skills``copilot.mjs`
cursor`AGENTS.md``.cursor/rules``.cursor/skills`; `.cursor/.aiwg/skills``cursor.mjs`
deepseek-harness`AGENTS.md``.deepseek-harness/rules` (projection fallback)`.agents/skills` (K/B)`deepseek-harness.mjs`
factory`AGENTS.md``.factory/rules``.factory/skills`; `.factory/.aiwg/skills``factory.mjs`
grokbot`AGENTS.md` (host dependent)`.grokbot/rules` (projection fallback)None by default; user copies require `AIWG_GROKBOT_SKILLS_DIR``grokbot.mjs`
grok-build`AGENTS.md``.grok/rules``.grok/skills`; `.grok/.aiwg/skills``grok-build.mjs`
hermes`.hermes.md`, `AGENTS.md``.hermes/rules``~/.hermes/skills`; `~/.hermes/skills/.aiwg` (`HERMES_HOME` overrides)`hermes.mjs`
muse`AGENTS.md``.muse/rules``.agents/skills`; `.agents/.aiwg/skills``muse.mjs`
opencode`AGENTS.md` + `opencode.json` instructions`.opencode/rule``.opencode/skill`; `.opencode/.aiwg/skill``opencode.mjs`
openclawRegistry declares `~/.openclaw/workspace/AGENTS.md` + `~/.openclaw/workspace/SOUL.md` (default active workspace); adapter resolves profile/config overrides`~/.openclaw/rules``~/.openclaw/skills/aiwg`; `~/.openclaw/.aiwg/skills``openclaw.mjs`
openhuman`AGENTS.md` (host dependent)`~/.openhuman/.aiwg/rules``~/.openhuman/skills`; `~/.openhuman/.aiwg/skills``openhuman.mjs`
pi`AGENTS.md``.pi/rules``.agents/skills`; `.pi/.aiwg/skills``pi.mjs`
omp`.omp/AGENTS.md``.omp/rules``.agents/skills` (K/B)`omp.mjs`
warp`WARP.md`, `AGENTS.md``.warp/rules``.warp/skills`; `.warp/.aiwg/skills``warp.mjs`
devin`AGENTS.md``.windsurf/rules``.windsurf/skills`; `.windsurf/.aiwg/skills``windsurf.mjs`
generic`AGENTS.md` (host must load explicitly)`rules``.agents/skills` (host loaded); `skills``generic.mjs` (#3997)

Hook support below means AIWG prompt discovery delivery, not merely an upstream event. Native = existing provider hook installer; bridge = existing canonical hook translator; none = no deployed prompt/context transport. Headless availability comes from repository adapters and provider docs, without executing any harness. Exec hook behavior stays unverified unless supplied UAT establishes it; interactive support does not establish exec support.

For every provider, harness UAT p3 (explicit no tools) passes only when it is answered without tools: no discovery or tool-based context reads, an answer from loaded context, and a one-line disclosure that discovery was skipped at the user's request (#4514). Discovery despite the prohibition fails p3 even when the answer is correct. This scoring applies across providers; historical observations below are not rerun results. p1/p2/p4 retain discover-first, including p2's “if not, just say so” decline. Narrower bans on edits or network access do not suspend local discovery.

ProviderPrompt hook support / configExec/headless surfaceExec-mode prompt hooksStatic checkLive UAT status (operator supplied)
antigravity`PreInvocation` → `injectSteps[].systemMessage.systemMessage` in named `.agents/hooks.json``agy the print option`Offline deploy/runtime fixtures verified; live unverifiedPassInstalled docs + embedded schema, agy 1.3.3, 2026-11-27; no authenticated run
claudeNative: `.claude/settings.json``claude the print option`Unverified separatelyPassp1/p2/p4 discover-first; p3 not supplied
codexBridge: `.codex/hooks.json`; saved folder + hook trust required`codex exec`0.167 supplied logs: 0 hook items with per-run trust; 1 after saved trustPass2026-11-09 no-hook discovery at calls 1–4; post-#4036 p1/p2 rerun deferred
copilotBootstrap rule: `.github/copilot-instructions.md``copilot` noninteractiveBootstrap directive; runtime unverifiedPassStatic only
cursor`beforeSubmitPrompt` → `additional_context` (under 600 chars; Cursor limit 10,000)`cursor-agent the print option`Deployed; hook output verified; headless `cursor-agent -p` does not run project hooks (2026-11-17), so the hook applies to sessions that run hooksPass (rules-only baseline)2026-11-17, CLI 2026.11.13 (model Auto), fresh the agent-owned use operation: p1/p2/p4 discover first (first tool call), p2 correct decline, p3 answered without tools with the discovery-first order, p4 bug-report template via `aiwg-issue`
deepseek-harnessNone`dsh the profile option headless`UnverifiedPassStatic only
factoryBridge: `.factory/hooks.json`; trusted committed project`droid exec`No prompt hooksPassInteractive hooks fire after #3971; exec relies on discovery/template rule
grokbotNoneNo evidenced CLI worker surfaceN/APassStatic only
grok-buildBootstrap rule: `AGENTS.md``grok the print option`Submit stdout discarded; bootstrap directivePassStatic only
hermesOpt-in bridge: `$HERMES_HOME/config.yaml` `pre_llm_call` shell hook`hermes` noninteractiveDocumented CLI + gateway; consent required; runtime unverifiedPassStatic only
museNative project owner: `.muse/hooks.json` + sidecar`muse exec`Unverified separatelyPassp2 discover-first; p1/p4 mixed; p3 not supplied
opencodeNone`opencode run`UnverifiedPassStatic only
openclawNone`openclaw agent exec`UnverifiedPassStatic only
openhumanNone`openhuman-core call` (one-shot RPC)UnverifiedPassStatic only
piNone`pi the print option`UnverifiedPassStatic only
ompNone: extension bridge is not prompt-context delivery`omp the print option`UnverifiedPassStatic only
warpNone`warp-terminal agent run` (Oz)UnverifiedPassStatic only
devinNoneDesktop provider; Devin CLI is a separate future targetN/APassStatic only
genericNoneN/A (host defined)N/APass (#3997)Portable adapter; no harness

Result: 18/18 named harnesses pass the offline deployment/refresh check; the generic adapter also passes deployment/refresh and direct deployment checks (#3997), along with two bulk routing checks. Generic uses the shared Markdown rule projection and kernel skill router; its host must explicitly load `AGENTS.md` and skills. No automatic context loading, prompt hooks, or headless CLI is claimed. Muse and Grok Build share bulk-root constants between their registries and adapters (#3994); synthetic skills verify the opt-in mirror matches registry metadata while kernel skills remain in the native roots.

Reproduce offline with the built CLI using `harness-bootstrap-audit.test.ts` in the required deployment lane. Each case creates an `os.tmpdir()` project and isolated HOME/XDG tree, deploys `use all the provider option <p>`, checks startup, the four requested rules (`skill-discovery` and `artifact-output-policy` kernel files; `anti-laziness` and `no-attribution` compact core bodies), skill paths and prompt hook config, then runs `refresh the dry-run option the skip-update option the provider option <p>` and compares filesystem bytes and mtimes to check that the dry run is read-only. This does not run hooks or prove runtime discovery, template loading, or provider trust.

Copilot rule checks use the registry path directly and assert agreement with context-discovery, behavior and smith rule paths at `.github/instructions` (#3993).

OpenClaw's default active-workspace bootstrap targets are declared in the registry and compared with the deployed Markdown files (#3995). The audit checks the `AGENTS.md` project-context bridge and the `SOUL.md` steward identity/discovery guidance. Both files deploy in the default kernel-only mode as well as full deployment. Profile/config workspace overrides remain owned by the deployment adapter; this audit uses the isolated HOME default.

The #3935 audit deferred CLI/version collection; #3996 inspected installed help and docs offline as recorded above. New live UAT remains deferred. Supplied UAT above is historical input, not a fresh run or a complete per-prompt score. No tracker writes were made; the conductor owns issue filing and publication on #3935.

Audit gaps retained for the conductor (fixes and issue filing are outside this worker's steps 1/2/5 scope):

ProviderFileSymptom
copilot, grok-build`tools/agents/providers/rule-startup.mjs`#3996 delivers a discover-first bootstrap rule; automatic prompt-context injection is not documented.
codex`src/smiths/context-pipeline/workspace-bootstrap.ts`#4036 aligns bootstrap and index with discovery first; post-fix p1/p2 UAT remains deferred. #4035 records saved-trust prerequisites and session-log observations above.
muse`tools/agents/providers/muse-prompt-discovery.mjs`Supplied p1/p4 discover-first results remain mixed.
factory`tools/agents/providers/factory-hooks.mjs`Interactive registration does not run in `droid exec`; the bootstrap rule carries discovery/template use.

Providers with no AIWG prompt installer are recorded as none in the matrix; that classification is not a claim that their upstream harness lacks all hooks. All exec-hook cells marked unverified and all missing per-prompt/template scores remain deferred to authorized live UAT. A current fresh deployment does not establish complete drift detection for arbitrary damaged deployments.

References

  • @agentic/code/frameworks/sdlc-complete/agents/agent-template.md - Agent template hook section
  • @.claude/rules/executable-feedback.md - Executable feedback integration
  • @.claude/rules/hitl-gates.md - Quality gate rules
  • `@docs/context-management-patterns.md` - Cross-platform context