docs(agents): refresh AGENTS.md hierarchy via /init-deep
Updated root + 14 core subdirectory AGENTS.md files to reflect current
state (commit 2892ca4a on dev). Added 4 new AGENTS.md files for gap
directories: hooks/comment-checker (AI slop blocker), features/claude-
code-plugin-loader (CC compat layer), features/claude-code-mcp-loader
(tier 2 MCP loader), cli/doctor (health diagnostics with 25 check files).
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
# src/hooks/ — 52 Lifecycle Hooks
|
||||
|
||||
**Generated:** 2026-04-11
|
||||
**Generated:** 2026-04-18
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/atlas/ — Master Boulder Orchestrator
|
||||
|
||||
**Generated:** 2026-04-11
|
||||
**Generated:** 2026-04-18
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/claude-code-hooks/ — Claude Code Compatibility
|
||||
|
||||
**Generated:** 2026-04-11
|
||||
**Generated:** 2026-04-18
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# src/hooks/comment-checker/ — AI Slop Comment Blocker
|
||||
|
||||
**Generated:** 2026-04-18
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
Tool Guard tier hook. Runs after `write`/`edit` tools to detect AI-generated comment patterns in code and block them before they land. Backed by `@code-yeongyu/comment-checker` binary (trusted dependency).
|
||||
|
||||
## WHAT IT BLOCKS
|
||||
|
||||
AI slop comment smells:
|
||||
- Restating what code literally does (`// increment counter`)
|
||||
- Filler phrases (`// obviously`, `// clearly`, `// simply`)
|
||||
- Decorative separators without purpose
|
||||
- JSDoc on trivially-named functions
|
||||
- `// TODO:` without context
|
||||
- Comments contradicting surrounding code
|
||||
|
||||
See `@code-yeongyu/comment-checker` for the authoritative blocklist.
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
```
|
||||
tool.execute.after (write | edit | hashline edit)
|
||||
→ extract changed lines from tool output
|
||||
→ spawn comment-checker binary with changed file path
|
||||
→ parse findings (line ranges + violation category)
|
||||
→ if findings → inject tool-level error → agent must fix
|
||||
```
|
||||
|
||||
## KEY FILES
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `hook.ts` | `createCommentCheckerHook()` — main factory, tool.execute.after handler |
|
||||
| `comment-checker-runner.ts` | Spawn binary, parse JSON output |
|
||||
| `changed-line-extractor.ts` | Extract which lines changed from tool result |
|
||||
| `findings-formatter.ts` | Format violations as actionable error message |
|
||||
| `binary-resolver.ts` | Locate `comment-checker` binary (node_modules + PATH) |
|
||||
|
||||
## CONFIG
|
||||
|
||||
```jsonc
|
||||
// oh-my-opencode.jsonc
|
||||
{
|
||||
"comment_checker": {
|
||||
"enabled": true, // default: true
|
||||
"severity": "error" // error blocks, warning notifies only
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Disable via `"disabled_hooks": ["comment-checker"]`.
|
||||
|
||||
## BYPASS FOR LEGITIMATE COMMENTS
|
||||
|
||||
Prefix with `// @allow` or mark file scope with `// comment-checker-disable-file` at top. Use sparingly — defeating the purpose.
|
||||
|
||||
## RELATED
|
||||
|
||||
- Doctor check: `src/cli/doctor/checks/tools.ts` verifies `comment-checker` binary availability
|
||||
- Postinstall: `postinstall.mjs` downloads binary if missing
|
||||
Reference in New Issue
Block a user