Skip to content

Commit 5cf7167

Browse files
authored
docs: update AGENTS.md hierarchy with current counts and code map (#314)
- Root AGENTS.md: test files 11→14, TypeScript 5.7+→6.x, code map line numbers updated from LSP, add INTERNAL_AGENT_SIGNATURES and TOOL_NAME_MAP to code map, add content-integrity gate to Where to Look and Notes, update generated stamp - docs/AGENTS.md: skills pages 48→45, agents pages 29→50, fix category list (add document-review), remove CEP sync reference - src/lib/AGENTS.md: add TOOL_NAME_MAP and INTERNAL_AGENT_SIGNATURES to module tables
1 parent 7a64113 commit 5cf7167

3 files changed

Lines changed: 21 additions & 17 deletions

File tree

AGENTS.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AGENTS.md - Coding Agent Guidelines for Systematic
22

3-
**Generated:** 2026-03-22 | **Commit:** 500b805 | **Branch:** main
3+
**Generated:** 2026-04-25 | **Commit:** 7a64113 | **Branch:** main
44

55
## Overview
66

@@ -17,7 +17,7 @@ bun install # Install deps
1717
bun run build # Build to dist/
1818
bun run typecheck # Type check (strict)
1919
bun run lint # Biome linter
20-
bun test tests/unit # Unit tests (11 files)
20+
bun test tests/unit # Unit tests (14 files)
2121
bun test tests/integration # Integration tests (2 files)
2222
bun test # All tests
2323
bun test --filter "pattern" # Filter tests
@@ -31,7 +31,7 @@ bun run registry:validate # Validate registry without building
3131
## Stack
3232

3333
- **Runtime:** Bun (Node.js API compatible)
34-
- **Language:** TypeScript 5.7+ strict mode
34+
- **Language:** TypeScript 6.x strict mode
3535
- **Modules:** ESM (`"type": "module"`)
3636
- **Linter:** Biome (not ESLint/Prettier)
3737
- **Tests:** `bun:test`
@@ -53,10 +53,10 @@ systematic/
5353
│ ├── scripts/ # Content generation from bundled assets
5454
│ └── src/content/ # Manual guides + generated reference
5555
├── registry/ # OCX registry config + profiles (omo, standalone)
56-
├── scripts/ # Build scripts (build-registry.ts)
56+
├── scripts/ # Build + integrity scripts
5757
├── assets/ # Static assets (banner SVG)
5858
├── tests/
59-
│ ├── unit/ # 11 test files
59+
│ ├── unit/ # 14 test files
6060
│ └── integration/ # 2 test files
6161
├── .opencode/ # Project-specific OC config + commands
6262
│ └── commands/ # Project-only commands (generate-readme)
@@ -82,19 +82,22 @@ systematic/
8282
| Add new skill | `skills/<name>/SKILL.md` |
8383
| Add new agent | `agents/<category>/<name>.md` |
8484
| OCX registry building | `scripts/build-registry.ts` |
85+
| Content integrity gate | `scripts/content-integrity.ts` |
8586
| Docs content generation | `docs/scripts/transform-content.ts` |
8687
| Docs site config | `docs/astro.config.mjs` |
8788

8889
## Code Map
8990

9091
| Symbol | Type | Location | Refs | Role |
9192
|--------|------|----------|------|------|
92-
| `SystematicPlugin` | export | src/index.ts:47 | 2 | Main plugin factory |
93-
| `createConfigHandler` | fn | src/lib/config-handler.ts:215 | 3 | Config hook — merges bundled assets |
94-
| `createSkillTool` | fn | src/lib/skill-tool.ts:87 | 3 | systematic_skill tool factory |
95-
| `getBootstrapContent` | fn | src/lib/bootstrap.ts:32 | 3 | System prompt injection |
96-
| `convertContent` | fn | src/lib/converter.ts:371 | 4 | CC→OpenCode body conversion |
97-
| `convertFileWithCache` | fn | src/lib/converter.ts:411 | 6 | Cached file conversion (mtime invalidation) |
93+
| `SystematicPlugin` | export | src/index.ts:44 | 2 | Main plugin factory |
94+
| `createConfigHandler` | fn | src/lib/config-handler.ts:221 | 3 | Config hook — merges bundled assets |
95+
| `createSkillTool` | fn | src/lib/skill-tool.ts:88 | 3 | systematic_skill tool factory |
96+
| `getBootstrapContent` | fn | src/lib/bootstrap.ts:43 | 3 | System prompt injection |
97+
| `INTERNAL_AGENT_SIGNATURES` | const | src/lib/bootstrap.ts:12 | 2 | Skip heuristic for internal agents |
98+
| `convertContent` | fn | src/lib/converter.ts:373 | 4 | CC→OpenCode body conversion |
99+
| `convertFileWithCache` | fn | src/lib/converter.ts:413 | 6 | Cached file conversion (mtime invalidation) |
100+
| `TOOL_NAME_MAP` | const | src/lib/converter.ts:85 | 2 | CC→OC tool name lookup |
98101
| `findSkillsInDir` | fn | src/lib/skills.ts:90 | 6 | Skill discovery (highest centrality) |
99102
| `findAgentsInDir` | fn | src/lib/agents.ts:49 | 4 | Agent discovery (category from subdir) |
100103
| `findCommandsInDir` | fn | src/lib/commands.ts:27 | 4 | Command discovery |
@@ -151,6 +154,7 @@ The `commands/` directory contains only `.gitkeep` (all commands converted to sk
151154

152155
## Notes
153156

157+
- Content-integrity gate runs in CI (build job) — catches phantom `systematic:*` refs and banned CC/CEP patterns
154158
- Bootstrap injection is opt-out via `bootstrap.enabled: false`
155159
- Converter caches results using file mtime
156160
- CLI commands: `list` (skills/agents/commands), `convert` (file conversion), `config show/path`

docs/AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ docs/
3333
│ ├── getting-started/ # 2 manual pages (installation, configuration)
3434
│ ├── guides/ # 7 manual pages (philosophy, main-loop, agent-install, architecture, conversion-guide, ocx-registry, exemplary-checklist)
3535
│ └── reference/ # Generated — DO NOT EDIT
36-
│ ├── skills/ # 48 pages + index.mdx (generated from skills/)
37-
│ └── agents/ # 29 pages + index.mdx (generated from agents/)
36+
│ ├── skills/ # 45 pages + index.mdx (generated from skills/)
37+
│ └── agents/ # 50 pages + index.mdx (generated from agents/)
3838
└── package.json
3939
```
4040

@@ -49,9 +49,9 @@ docs/
4949

5050
Pipeline: `read file → parseFrontmatter → transformFrontmatter (name→title, agent category→badge) → generatePage → write`
5151

52-
Each run cleans output dirs before regenerating. Index pages (`index.mdx`) are dynamically generated from the same enumerated entries using Starlight `CardGrid`/`LinkCard` components. Agents are grouped by category (design/docs/research/review/workflow). Slug collisions abort with error.
52+
Each run cleans output dirs before regenerating. Index pages (`index.mdx`) are dynamically generated from the same enumerated entries using Starlight `CardGrid`/`LinkCard` components. Agents are grouped by category (design/docs/document-review/research/review/workflow). Slug collisions abort with error.
5353

54-
NOTE: `commands/` is empty (all commands converted to skills in upstream CEP sync). The generation script may still have command handling code but produces no command pages from current source.
54+
NOTE: `commands/` is empty (all commands converted to skills). The generation script may still have command handling code but produces no command pages from current source.
5555

5656
## Where to Look
5757

src/lib/AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ All discovery follows same pattern: `dir → walkDir() → find files → parseF
3333

3434
| Module | Key Exports | Role |
3535
|--------|-------------|------|
36-
| `converter.ts` | `convertContent`, `convertFileWithCache`, `clearConverterCache` | CEP→OpenCode transforms (tool names, models, body refs) |
36+
| `converter.ts` | `convertContent`, `convertFileWithCache`, `clearConverterCache`, `TOOL_NAME_MAP` | CEP→OpenCode transforms (tool names, models, body refs) |
3737
| `skill-loader.ts` | `loadSkill`, `LoadedSkill`, `SKILL_PREFIX` | Loads + wraps skill content in XML template |
3838
| `validation.ts` | `isAgentMode`, `isPermissionSetting`, `normalizePermission`, `extractString`, `extractBoolean` | Agent config extraction + type guards + safe value extraction |
3939

@@ -44,7 +44,7 @@ All discovery follows same pattern: `dir → walkDir() → find files → parseF
4444
| `config.ts` | `loadConfig`, `getConfigPaths`, `SystematicConfig`, `DEFAULT_CONFIG` | JSONC config loading + merging |
4545
| `config-handler.ts` | `createConfigHandler`, `ConfigHandlerDeps`, `formatAgentDescription`, `toTitleCase` | OpenCode config hook (collects + converts all assets) |
4646
| `skill-tool.ts` | `createSkillTool`, `SkillToolOptions` | `systematic_skill` tool (XML description, skill execution) |
47-
| `bootstrap.ts` | `getBootstrapContent`, `BootstrapDeps` | System prompt injection (using-systematic skill) |
47+
| `bootstrap.ts` | `getBootstrapContent`, `INTERNAL_AGENT_SIGNATURES`, `BootstrapDeps` | System prompt injection (using-systematic skill) |
4848

4949
## Key Types
5050

0 commit comments

Comments
 (0)