docs(agents): regenerate hierarchical AGENTS.md for 2026-05-20
Sync the AGENTS.md hierarchy to current code state:
Drift fixes in 11 existing files
- Root: 2026-05-20 commit 39aadbf9f, ~2167 TS files, 120 barrel index.ts,
57 src/hooks dirs, 297 (179 non-test) src/shared files, 11 OpenCode hook
handlers in plugin-interface.ts, packages list adds ast-grep-mcp + rules-core,
first-prompt-watchdog 206 LOC, parent-wake-notifier 587 LOC
- src/AGENTS.md: file counts, plugin-interface handler count
- src/shared/AGENTS.md: title + counts 278/170 -> 297/179
- src/hooks/AGENTS.md: 57 dirs, note unwired WIP (task-reminder,
hashline-edit-diff-enhancer)
- src/features/AGENTS.md: module map with NON-TEST counts + sub-AGENTS.md
column, 7 modules without sub-doc
- src/features/background-agent/AGENTS.md: add 12 newer files (parent-wake-
notifier 587 LOC, loop-detector, error-classifier, fallback-retry-handler,
process-cleanup, subagent-spawn-limits, session-status-classifier,
compaction-aware-message-resolver, etc.)
- src/plugin/AGENTS.md: 11 handlers, add system-transform.ts + command-
execute-before.ts + build-team-idle-wake-hint-client.ts
- src/config/AGENTS.md: note schema/internal/permission.ts
- src/cli/AGENTS.md: 8 commands including 'version'
- src/plugin-handlers/AGENTS.md, packages/web/AGENTS.md: date bump
New AGENTS.md in 4 directories
- packages/AGENTS.md: index of 15 packages (11 platform binaries + 2 MCP
packages + rules-core + web), role map, conventions
- docs/AGENTS.md: WHERE TO LOOK table for 19 docs across 6 subdirs
- .opencode/AGENTS.md: 5 skills + 4 slash commands + relationship to .agents/
- .agents/AGENTS.md: superset migration target (9 skills + 4 commands)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# src/plugin/ — 10 OpenCode Hook Handlers + Hook Composition
|
||||
# src/plugin/ — 11 OpenCode Hook Handlers + Hook Composition
|
||||
|
||||
**Generated:** 2026-05-15
|
||||
**Generated:** 2026-05-20
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
Core glue layer. Files assemble the 10 OpenCode hook handlers and compose the 5-tier hook system into the `PluginInterface`. Each handler file maps to one OpenCode hook type.
|
||||
Core glue layer. Files assemble the 11 OpenCode hook handlers wired into `PluginInterface` here (an additional 2 — `experimental.session.compacting` + `experimental.compaction.autocontinue` — are wired in `src/testing/create-plugin-module.ts`). Each handler file maps to one OpenCode hook type.
|
||||
|
||||
## HANDLER FILES
|
||||
|
||||
@@ -15,12 +15,15 @@ Core glue layer. Files assemble the 10 OpenCode hook handlers and compose the 5-
|
||||
| `chat-message.ts` | `chat.message` | First-message variant resolution, session setup, keyword detection trigger |
|
||||
| `chat-params.ts` | `chat.params` | Anthropic effort, think mode, runtime fallback model override |
|
||||
| `chat-headers.ts` | `chat.headers` | Copilot `x-initiator` header injection |
|
||||
| `event.ts` | `event` | Session lifecycle (created/deleted/idle/error/status), openclaw dispatch, runtime fallback |
|
||||
| `command-execute-before.ts` | `command.execute.before` | Pre-command guards (slash-command interception, etc.) |
|
||||
| `event.ts` | `event` | Session lifecycle (created/deleted/idle/error/status), openclaw dispatch, runtime fallback, 4 team-session-event handlers (when team_mode.enabled) |
|
||||
| `tool-execute-before.ts` | `tool.execute.before` | Pre-tool guards |
|
||||
| `tool-execute-after.ts` | `tool.execute.after` | Post-tool hooks (truncation, comment-checker, hashline read tagging, json-error-recovery) |
|
||||
| `messages-transform.ts` | `experimental.chat.messages.transform` | Context injection, thinking-block validation, tool-pair validation, keyword detection |
|
||||
| `session-compacting.ts` | `experimental.session.compacting` | Context + todo preservation across compaction |
|
||||
| `system-transform.ts` | `experimental.chat.system.transform` | System-message-level transforms |
|
||||
| `session-compacting.ts` | `experimental.session.compacting` | Context + todo preservation across compaction (registered via `create-plugin-module.ts`) |
|
||||
| `skill-context.ts` | (helper) | Skill/browser/category context shared with tool creation |
|
||||
| `build-team-idle-wake-hint-client.ts` | (helper) | Build the team idle-wake-hint client wired into event handlers |
|
||||
|
||||
## HOOK COMPOSITION (hooks/ subdir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user