@agent-smith/feat-agents 0.0.1 → 0.0.2

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.
@@ -1,20 +1,21 @@
1
1
  ---
2
2
  name: update-codebase-summary
3
- description: use when asked to create or update the codebase summary documentation
3
+ description: use when asked to create or update the codebase summary documentation for a module or package
4
4
  ---
5
5
 
6
- This skill describes the workflow to create or update a codebase documentation file (`[project-path].agents/documentation/codebase-summary.md`).
6
+ This skill describes the workflow to create or update a codebase summary file (`.agents/documentation/codebase-summary.md`) for any module, package, or repository.
7
7
 
8
8
  ## Workflow
9
9
 
10
- 1. **Explore the project** — Walk the directory tree, identify package/module boundaries, read manifest files (e.g., `package.json`), locate entry points, and understand inter-module dependencies.
10
+ 1. **Explore the module** — Walk the directory tree, identify entry points, read manifest files (e.g., `package.json`, `setup.py`, `Cargo.toml`), locate key source files, and understand dependencies.
11
11
 
12
- 2. **Check for existing file** — Look for `[project-path].agents/documentation/codebase-summary.md` in the project directory. If it exists, update it. If not, create it.
12
+ 2. **Check for existing file** — Look for `.agents/documentation/codebase-summary.md` in the module directory. If it exists, update it. If not, create it.
13
13
 
14
14
  3. **Write the file** using exactly these 7 sections in this order:
15
15
 
16
16
  ### Section Format
17
17
 
18
+ ```markdown
18
19
  # <module-name>
19
20
 
20
21
  ## Summary
@@ -40,5 +41,12 @@ One sentence: what the module does and why it exists.
40
41
 
41
42
  ## Related
42
43
  - See `<related-module>` — how they work together
44
+ ```
43
45
 
44
- Keep the file as short and condensed as possible
46
+ ## Rules
47
+
48
+ - **Preserve format**: The 7-section structure is standardized — do not change it
49
+ - **Information-dense**: Keep the file short and condensed
50
+ - **No project description**: That belongs in `project-overview.md`
51
+ - **No architecture patterns duplicated from project-nav.md**
52
+ - **Language-agnostic**: Adapt to the project's language and ecosystem
@@ -11,8 +11,8 @@ This skill describes the workflow to update the project navigation map file (`.a
11
11
 
12
12
  2. **Detect changes** — Walk the directory tree, identify what has changed since the last update:
13
13
  - New/removed repos or packages
14
- - New/modified plugins
15
- - UI component changes
14
+ - New/modified modules or components
15
+ - UI/frontend changes (if applicable)
16
16
  - New documentation files
17
17
  - Architecture changes (new patterns, dependencies)
18
18
 
@@ -21,9 +21,9 @@ This skill describes the workflow to update the project navigation map file (`.a
21
21
  ### Section Update Rules
22
22
 
23
23
  #### 1. Project Overview
24
- - Update the repos table if repos are added/removed/renamed
24
+ - Update the repos/modules table if components are added/removed/renamed
25
25
  - Update the purpose descriptions if functionality changes
26
- - Keep the 4-column table format: `| Repo | Path | Purpose |`
26
+ - Keep the table format: `| Repo | Path | Purpose |`
27
27
 
28
28
  #### 2. Architecture Principles
29
29
  - Add new principles when architectural patterns emerge
@@ -36,35 +36,35 @@ This skill describes the workflow to update the project navigation map file (`.a
36
36
  - Update the prose explanation below the graph
37
37
  - Keep the visual format consistent (boxes, arrows, labels)
38
38
 
39
- #### 4. Runtime Packages
40
- - Add new packages with: Purpose, Key files, Key types/classes
39
+ #### 4. Packages/Modules
40
+ - Add new packages/modules with: Purpose, Key files, Key types/classes
41
41
  - Update existing packages if API changes
42
42
  - Remove deprecated packages
43
- - Format: `### @agent-smith/<name> — <short description>` followed by bullet points
43
+ - Format: `### <module-name> — <short description>` followed by bullet points
44
44
 
45
- #### 5. Server
46
- - Update route table with new/changed routes
45
+ #### 5. Server/API (if applicable)
46
+ - Update route/endpoint tables with new/changed routes
47
47
  - Add new handler files
48
- - Update patterns if confirmation/async flow changes
48
+ - Update patterns if async flow changes
49
49
 
50
- #### 6. Plugins
51
- - Add new plugins to the table
52
- - Update plugin categories if reorganized
50
+ #### 6. Plugins/Extensions (if applicable)
51
+ - Add new plugins/extensions to the table
52
+ - Update categories if reorganized
53
53
  - Keep format: `| Plugin | Category | Purpose | Key File(s) |`
54
54
 
55
- #### 7. UI
55
+ #### 7. UI/Frontend (if applicable)
56
56
  - Update component/service tables
57
57
  - Add new themes, apps, or extensions
58
- - Note any architectural changes (Vue version, PrimeVue updates)
58
+ - Note any architectural changes (framework version updates)
59
59
 
60
- #### 8. Apps
61
- - Document new apps added to the dashboard
60
+ #### 8. Apps/Extensions (if applicable)
61
+ - Document new apps added to the project
62
62
  - Update existing app descriptions if functionality changes
63
63
 
64
64
  #### 9. Code Snippets
65
65
  - Add new patterns for new APIs or features
66
66
  - Update existing snippets if API signatures change
67
- - Keep language-appropriate examples (YAML, JS, TS)
67
+ - Keep language-appropriate examples
68
68
 
69
69
  #### 10. Navigation Quick Reference
70
70
  - Add new task→path mappings
@@ -86,7 +86,7 @@ This skill describes the workflow to update the project navigation map file (`.a
86
86
  - Per-module technical details (entry points, key files, dependencies) live in `codebase-summary.md`
87
87
  - No redundancy between files
88
88
 
89
- 5. **Write the updated file** — Preserve the header note: `> **Purpose**: Single-reference map for AI coding agents...`
89
+ 5. **Write the updated file** — Preserve the header note: `> **Purpose**: Single-reference map for AI coding agents to understand, navigate, and modify the <Project Name> codebase.`
90
90
 
91
91
  ## Rules
92
92
 
@@ -95,3 +95,4 @@ This skill describes the workflow to update the project navigation map file (`.a
95
95
  - **Preserve format**: Do not change section structure or table formats
96
96
  - **Canonical source**: `project-nav.md` is the single source of truth for project overview, architecture, and navigation
97
97
  - **Language-agnostic**: Adapt to the project's language and ecosystem
98
+ - **Include only applicable sections**: Server, Plugins, UI, and Apps sections are optional — include only if the project has them
@@ -0,0 +1,27 @@
1
+ # Goals and Success Criteria: update-project-doc
2
+
3
+ ## Primary Goal
4
+ Create or update AI agent navigation documentation for a project. Generate standardized doc files that help AI agents understand, navigate, and work within the codebase.
5
+
6
+ ## Success Criteria
7
+ - [ ] AGENTS.md created at project root with mission, conventions, quick start, and doc links
8
+ - [ ] AGENTS.md created in each repo (multi-repo projects) with localized context
9
+ - [ ] decision-tree.md created at project root with task-to-doc mapping
10
+ - [ ] project-overview.md created at project root (~1 page overview)
11
+ - [ ] codebase-summary.md created for every repo/module with 7-section format
12
+ - [ ] project-nav.md created at project root with comprehensive navigation map
13
+ - [ ] All files cross-reference each other correctly
14
+ - [ ] No duplicated content across files — each piece of info lives in exactly one file
15
+
16
+ ## Files Modified
17
+ - `AGENTS.md` — Project root index with mission, conventions, quick start
18
+ - `<repo>/AGENTS.md` — Per-repo index with localized context (multi-repo only)
19
+ - `.agents/documentation/decision-tree.md` — Quick guide for agents to find the right doc
20
+ - `.agents/documentation/project-overview.md` — Concise project overview (~1 page)
21
+ - `.agents/documentation/codebase-summary.md` — Technical summary per repo/module
22
+ - `.agents/documentation/project-nav.md` — Comprehensive navigation map
23
+
24
+ ## Exclusions
25
+ - Does not create package-level documentation for docsite (use `document-package` skill)
26
+ - Does not regenerate the documentation map script (use `update-doc-map` skill)
27
+ - Not for adding new features or modifying code
@@ -0,0 +1,35 @@
1
+ # Notes: update-project-doc
2
+
3
+ ## Context
4
+ This task was created from the `create-project-docs` skill. It standardizes the process of creating AI agent navigation documentation for any project.
5
+
6
+ ## Source Skill
7
+ - Original skill: `/workspace/agent-smith-plugins/agents/dist/skills/create-project-docs/SKILL.md`
8
+
9
+ ## Key Rules to Remember
10
+ - **No redundancy**: Each piece of information lives in exactly one file
11
+ - **codebase-summary.md core format**: 7 sections (Summary, Dependencies, Used By, Entry Point, Key Files, Architecture, Related) — do not change order or rename
12
+ - **Information-dense**: Keep files short. Use tables, bullets, one-line descriptions
13
+ - **project-nav.md is canonical**: Single source of truth for project overview, architecture, snippets, quick references
14
+ - **decision-tree.md first**: Always the first file agents should read to find the right doc
15
+ - **Language-agnostic**: Adapt examples and conventions to the project's language
16
+
17
+ ## Multi-Repo vs Single-Repo
18
+ - **Single-repo projects**: All 5 files (AGENTS.md, decision-tree.md, project-overview.md, project-nav.md, codebase-summary.md) live at the project root
19
+ - **Multi-repo projects**:
20
+ - Workspace root: AGENTS.md, decision-tree.md, project-overview.md, project-nav.md
21
+ - Each repo: its own AGENTS.md (localized context) and codebase-summary.md
22
+ - Per-repo AGENTS.md structure: Mission, Structure (key dirs), Conventions (repo-specific), Quick Start, Documentation (links to local docs + root AGENTS.md)
23
+
24
+ ## Related Skills (to load during execution)
25
+ | Skill | When to Use |
26
+ |-------|-------------|
27
+ | `smart-explore` | Phase 1 — explore project with exclusion patterns to avoid reading noise (node_modules, etc.) |
28
+ | `update-codebase-summary` | Phase 5 — create/update each module's codebase-summary.md |
29
+ | `update-project-nav` | Phase 6 — create/update project-nav.md |
30
+
31
+ ## Optional Sections (include only when they add value)
32
+ - decision-tree.md: "I need to work on a specific package" for monorepos
33
+ - project-overview.md: "Runtime Packages" table for monorepos
34
+ - codebase-summary.md: "Documentation" section — project root only
35
+ - project-nav.md: Server, Plugins, UI, Apps sections
@@ -0,0 +1,212 @@
1
+ # Task Plan: update-project-doc
2
+
3
+ ## Phase 1: Explore the Project
4
+ **Goal:** Understand the project structure, identify repos/packages, entry points, dependencies, and key conventions.
5
+
6
+ ### Step 1.0: Load smart-explore Skill
7
+ - **File:** N/A
8
+ - **Action:** Load the `smart-explore` skill to get standardized exploration workflow with exclusion patterns
9
+ - **Verify:** Skill loaded successfully
10
+
11
+ ### Step 1.05: Check Recent Changes
12
+ - **For each repository in the project**, cd into its directory and run git commands (each repo has its own `.git`):
13
+ - `cd /path/to/repo && git log --oneline -10` to see recent commits
14
+ - `git diff HEAD~10` to identify code changes in that repo
15
+ - Repeat for every repo (e.g., `agent-smith`, `agent-smith-plugins`, `agent-smith-ui`, etc.)
16
+ - Focus exploration on modified files identified in the diffs
17
+ - **Verify:**
18
+ - [ ] Git commands run in each repo directory separately
19
+ - [ ] Recent commits reviewed for all repos
20
+ - [ ] Changed files cataloged per repo
21
+ - [ ] New/modified types, interfaces, or features identified
22
+
23
+ ### Step 1.1: Walk Directory Tree (with exclusions)
24
+ - **File:** N/A (exploration)
25
+ - **Action:** Follow the `smart-explore` skill: detect project type, read `.gitignore`, walk directory tree with default exclusions (node_modules, .git, dist, build, vendor, __pycache__, etc.)
26
+ - **Verify:** List of all repos/packages with their paths and purposes documented; no noise directories in results
27
+
28
+ ### Step 1.2: Read Manifest Files
29
+ - **File:** N/A (exploration)
30
+ - **Action:** For each repo/package discovered, read its manifest file (package.json, pyproject.toml, Cargo.toml, etc.) to understand dependencies and structure
31
+ - **Verify:** All packages identified with their manifest files read
32
+
33
+ ### Step 1.3: Identify Conventions
34
+ - **File:** N/A (exploration)
35
+ - **Action:** Identify key conventions and patterns used by the project (tool formats, file structures, state management, coordinator patterns, etc.)
36
+ - **Verify:** 3-5 key conventions identified and documented for reference
37
+
38
+ ---
39
+
40
+ ## Phase 2: Create AGENTS.md (Project Root)
41
+ **Goal:** Create the root index file with mission, conventions, quick start, and doc links.
42
+
43
+ ### Step 2.1: Write AGENTS.md Structure
44
+ - **File:** `AGENTS.md` at project root
45
+ - **Action:** Create AGENTS.md with exact structure:
46
+ - `# <Project Name>` header
47
+ - `## Mission` — One-line mission statement
48
+ - `## Repositories` — Table with repo name, path, purpose
49
+ - `## Conventions (for AI Agents)` — 3-5 key patterns
50
+ - `## Quick Start for AI Agents` — Always: decision-tree → project-overview → project-nav → codebase-summary
51
+ - `## Documentation` — List all doc files with descriptions
52
+ - **Verify:** File exists at project root with all required sections; mission is one concise sentence; conventions list 3-5 patterns
53
+
54
+ ### Step 2.2: Validate AGENTS.md
55
+ - **File:** `AGENTS.md`
56
+ - **Action:** Review that all repos are listed, conventions are clear for AI agents, quick start references decision-tree.md first
57
+ - **Verify:** All sections present and complete; cross-references point to correct files
58
+
59
+ ---
60
+
61
+ ## Phase 3: Create Per-Repo AGENTS.md (Multi-Repo Projects Only)
62
+ **Goal:** Create an AGENTS.md file in each repository so agents navigating directly to a repo have localized context.
63
+
64
+ ### Step 3.1: Write Per-Repo AGENTS.md
65
+ - **File:** `<repo>/AGENTS.md` for each repo (skip for single-repo projects)
66
+ - **Action:** For each repo, create AGENTS.md with structure:
67
+ - `# <Repo Name>` header
68
+ - `## Mission` — One-line mission statement for this specific repo
69
+ - `## Structure` — Table of key directories and their purposes
70
+ - `## Conventions` — Repo-specific conventions (subset of or additions to root conventions)
71
+ - `## Quick Start` — Steps: read codebase-summary.md → explore key files → run/build
72
+ - `## Documentation` — Links to this repo's docs: `.agents/documentation/codebase-summary.md`, and link back to root `../../AGENTS.md` for project-wide context
73
+ - **Verify:** Each repo has its own AGENTS.md; all sections present; links to root AGENTS.md exist
74
+
75
+ ### Step 3.2: Validate Per-Repo AGENTS.md
76
+ - **File:** All `<repo>/AGENTS.md` files
77
+ - **Action:** Ensure each file is self-contained for agents working in that repo; cross-references to root docs are correct; no duplicated content from root AGENTS.md
78
+ - **Verify:** All repos covered; content is repo-specific; links valid
79
+
80
+ ---
81
+
82
+ ## Phase 4: Create decision-tree.md (Project Root Only)
83
+ **Goal:** Create a quick guide helping agents find the right documentation based on their task.
84
+
85
+ ### Step 4.1: Write decision-tree.md
86
+ - **File:** `.agents/documentation/decision-tree.md` at project root
87
+ - **Action:** Create with structure:
88
+ - `# Documentation Decision Tree` header with intro note
89
+ - `## I need to understand the project` — Links to overview, nav, summary
90
+ - `## I need to work on a specific repo/package` — Per-repo paths
91
+ - Optional: `## I need to work on a specific package` for monorepos
92
+ - `## I need detailed documentation` — Topic-to-path mapping
93
+ - `## Common Tasks (Quick Reference)` — Table of tasks → paths
94
+ - `## Conventions` — Brief reference linking to AGENTS.md
95
+ - **Verify:** File exists with all sections; ends with link to AGENTS.md for full conventions
96
+
97
+ ### Step 4.2: Validate decision-tree.md
98
+ - **File:** `.agents/documentation/decision-tree.md`
99
+ - **Action:** Ensure all doc files are referenced; Common Tasks table is populated; references AGENTS.md at end
100
+ - **Verify:** All paths correct; no broken references
101
+
102
+ ---
103
+
104
+ ## Phase 5: Create project-overview.md (Project Root Only)
105
+ **Goal:** Create a concise ~1 page overview of the project.
106
+
107
+ ### Step 5.1: Write project-overview.md
108
+ - **File:** `.agents/documentation/project-overview.md` at project root
109
+ - **Action:** Create with structure:
110
+ - Header with `> Role:` note and `> See also:` references to decision-tree.md and project-nav.md
111
+ - `## What is <Project Name>?` — One paragraph description
112
+ - `## Core Capabilities` — Bullet list of capabilities
113
+ - `## Repository Structure` — Table of repos
114
+ - Optional: `## Runtime Packages` for monorepos
115
+ - `## Key Architecture Patterns` — Bullet list
116
+ - `## Quick Reference: Common Tasks` — Task-to-path table
117
+ - `## Code Snippets` — Typical usage examples
118
+ - `## Documentation Links` — Resource table
119
+ - **Verify:** File is ~1 page; all sections present; header notes reference decision-tree.md and project-nav.md
120
+
121
+ ### Step 5.2: Validate project-overview.md
122
+ - **File:** `.agents/documentation/project-overview.md`
123
+ - **Action:** Ensure content is concise; code snippets show typical usage; no duplicated content from other files
124
+ - **Verify:** File fits ~1 page; cross-references correct; no redundancy with project-nav.md
125
+
126
+ ---
127
+
128
+ ## Phase 6: Create codebase-summary.md (Every Repo/Module)
129
+ **Goal:** Create standardized technical summaries for each repo/module using the `update-codebase-summary` skill.
130
+
131
+ ### Step 6.1: Load update-codebase-summary Skill
132
+ - **File:** N/A
133
+ - **Action:** Load the `update-codebase-summary` skill to get the standardized 7-section format
134
+ - **Verify:** Skill loaded successfully
135
+
136
+ ### Step 6.2: Create codebase-summary.md for Each Repo
137
+ - **File:** `<repo>/.agents/documentation/codebase-summary.md` for each repo/module
138
+ - **Action:** For each repo/module, create codebase-summary.md with 7 core sections:
139
+ 1. Summary
140
+ 2. Dependencies
141
+ 3. Used By
142
+ 4. Entry Point
143
+ 5. Key Files
144
+ 6. Architecture
145
+ 7. Related
146
+ - **Note:** Include optional "Documentation" section ONLY in the project root codebase-summary.md — omit from per-repo summaries
147
+ - **Verify:** Each repo has a codebase-summary.md with all 7 sections; no Documentation section in per-repo files
148
+
149
+ ### Step 6.3: Validate All codebase-summary.md Files
150
+ - **File:** All `.agents/documentation/codebase-summary.md` files
151
+ - **Action:** Verify each file follows the standardized format; Related section points to correct modules
152
+ - **Verify:** All repos covered; sections in correct order; no renamed sections
153
+
154
+ ---
155
+
156
+ ## Phase 7: Create project-nav.md (Project Root Only)
157
+ **Goal:** Create comprehensive navigation map using the `update-project-nav` skill.
158
+
159
+ ### Step 7.1: Load update-project-nav Skill
160
+ - **File:** N/A
161
+ - **Action:** Load the `update-project-nav` skill to get required and optional sections
162
+ - **Verify:** Skill loaded successfully
163
+
164
+ ### Step 7.2: Create project-nav.md
165
+ - **File:** `.agents/documentation/project-nav.md` at project root
166
+ - **Action:** Create with required sections:
167
+ - Header note: `> Purpose: Single-reference map for AI coding agents...`
168
+ - `## Project Overview`
169
+ - `## Architecture Principles`
170
+ - `## Dependency Graph`
171
+ - `## Packages/Modules`
172
+ - `## Code Snippets`
173
+ - `## Navigation Quick Reference`
174
+ - `## Documentation Links`
175
+ - `## Key Conventions & Patterns`
176
+ - Optional sections (Server, Plugins, UI, Apps) — include only if applicable; number sequentially skipping omitted ones
177
+ - **Verify:** File exists with all required sections; header note present; sections numbered correctly
178
+
179
+ ### Step 7.3: Validate project-nav.md
180
+ - **File:** `.agents/documentation/project-nav.md`
181
+ - **Action:** Ensure it's the canonical source for overview, architecture, snippets, quick references; no external cross-references needed
182
+ - **Verify:** All sections complete; optional sections included only when they add value
183
+
184
+ ---
185
+
186
+ ## Phase 8: Cross-Reference and Verify
187
+ **Goal:** Ensure all files cross-reference correctly and no content is duplicated.
188
+
189
+ ### Step 8.1: Verify Cross-References
190
+ - **File:** All doc files
191
+ - **Action:** Check cross-references:
192
+ - Root `AGENTS.md` → links to decision-tree.md, project-overview.md, project-nav.md, codebase-summary.md, and per-repo AGENTS.md files
193
+ - Per-repo `AGENTS.md` → links to local codebase-summary.md; links back to root `../../AGENTS.md` for project-wide context
194
+ - `decision-tree.md` → references all doc files; ends with link to root AGENTS.md
195
+ - `project-overview.md` → header notes reference decision-tree.md and project-nav.md
196
+ - `codebase-summary.md` → Related section points to related modules
197
+ - `project-nav.md` → no external cross-references needed
198
+ - **Verify:** All cross-references exist and point to correct files
199
+
200
+ ### Step 8.2: Check for Duplicated Content
201
+ - **File:** All doc files
202
+ - **Action:** Ensure no redundancy:
203
+ - Project description, architecture patterns, snippets, quick-reference tables → ONLY in project-nav.md and project-overview.md
204
+ - Per-module technical details → ONLY in codebase-summary.md
205
+ - Conventions summary → ONLY in AGENTS.md; decision-tree.md references it
206
+ - Per-repo context → ONLY in per-repo AGENTS.md files
207
+ - **Verify:** No duplicated content across files
208
+
209
+ ### Step 8.3: Final Review
210
+ - **File:** All doc files
211
+ - **Action:** Confirm all success criteria from goals.md are met
212
+ - **Verify:** All checkboxes in goals.md can be marked complete
@@ -0,0 +1,42 @@
1
+ # Task State: update-project-doc
2
+
3
+ ## Status: planned
4
+
5
+ ## Phases
6
+ - [ ] Phase 1: Explore the Project
7
+ - [ ] Step 1.0: Load smart-explore Skill
8
+ - [ ] Step 1.1: Walk Directory Tree (with exclusions)
9
+ - [ ] Step 1.2: Read Manifest Files
10
+ - [ ] Step 1.3: Identify Conventions
11
+ - [ ] Phase 2: Create AGENTS.md (Project Root)
12
+ - [ ] Step 2.1: Write AGENTS.md Structure
13
+ - [ ] Step 2.2: Validate AGENTS.md
14
+ - [ ] Phase 3: Create Per-Repo AGENTS.md (Multi-Repo Projects Only)
15
+ - [ ] Step 3.1: Write Per-Repo AGENTS.md
16
+ - [ ] Step 3.2: Validate Per-Repo AGENTS.md
17
+ - [ ] Phase 4: Create decision-tree.md (Project Root Only)
18
+ - [ ] Step 4.1: Write decision-tree.md
19
+ - [ ] Step 4.2: Validate decision-tree.md
20
+ - [ ] Phase 5: Create project-overview.md (Project Root Only)
21
+ - [ ] Step 5.1: Write project-overview.md
22
+ - [ ] Step 5.2: Validate project-overview.md
23
+ - [ ] Phase 6: Create codebase-summary.md (Every Repo/Module)
24
+ - [ ] Step 6.1: Load update-codebase-summary Skill
25
+ - [ ] Step 6.2: Create codebase-summary.md for Each Repo
26
+ - [ ] Step 6.3: Validate All codebase-summary.md Files
27
+ - [ ] Phase 7: Create project-nav.md (Project Root Only)
28
+ - [ ] Step 7.1: Load update-project-nav Skill
29
+ - [ ] Step 7.2: Create project-nav.md
30
+ - [ ] Step 7.3: Validate project-nav.md
31
+ - [ ] Phase 8: Cross-Reference and Verify
32
+ - [ ] Step 8.1: Verify Cross-References
33
+ - [ ] Step 8.2: Check for Duplicated Content
34
+ - [ ] Step 8.3: Final Review
35
+
36
+ ## Notes
37
+ - Read `notes.md` for additional context, rules, and related skills
38
+ - Next: Phase 1, Step 1.1
39
+ - This task creates documentation to help AI agents navigate a codebase
40
+ - Execute phases in order — each phase depends on the previous one
41
+ - Load `update-codebase-summary` skill during Phase 5
42
+ - Load `update-project-nav` skill during Phase 6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-smith/feat-agents",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "AI agents for Agent Smith",
5
5
  "repository": "https://github.com/lynxai-team/agent-smith-plugins",
6
6
  "type": "module",
@@ -1,8 +0,0 @@
1
- ---
2
- name: update-doc-map
3
- description: read this only when instructed to update the documentation map
4
- ---
5
-
6
- Run the `agent-smith-plugins/agents/dist/skills/update-doc-map/scripts/generate-doc-map.mjs` Nodejs script.
7
-
8
- Report only the end result: if the script has run ok or not.
@@ -1,197 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * generate-doc-map.mjs
5
- *
6
- * Scans the project for all documentation files and generates a doc-map.md
7
- * file that helps AI agents navigate the codebase documentation.
8
- */
9
-
10
- import { readdir, stat, writeFile } from 'node:fs/promises';
11
- import { join, relative, dirname, basename } from 'node:path';
12
- import { fileURLToPath } from 'node:url';
13
-
14
- const __dirname = dirname(fileURLToPath(import.meta.url));
15
- // The script is in .agents/, so the project root is one level up
16
- // Accept PROJECT_ROOT from command line argument or environment variable, otherwise calculate
17
- const PROJECT_ROOT = process.argv[2] || process.env.PROJECT_ROOT || join(__dirname, '../../../../..');
18
-
19
- // Packages that have their own .agents/documentation
20
- const PACKAGES = [
21
- 'core', 'agent', 'cli', 'wscli', 'types', 'smem', 'tmem', 'server'
22
- ];
23
-
24
- /**
25
- * Recursively find all markdown files in a directory
26
- */
27
- async function findMarkdownFiles(dir, baseDir) {
28
- const files = [];
29
- try {
30
- const entries = await readdir(dir, { withFileTypes: true });
31
- for (const entry of entries) {
32
- const fullPath = join(dir, entry.name);
33
- if (entry.isDirectory()) {
34
- // Skip node_modules and other non-doc directories
35
- if (!['node_modules', '.git', 'dist', 'build', '__pycache__'].includes(entry.name)) {
36
- files.push(...await findMarkdownFiles(fullPath, baseDir));
37
- }
38
- } else if (entry.isFile() && entry.name.endsWith('.md')) {
39
- const relPath = relative(baseDir, fullPath);
40
- files.push({ path: fullPath, relative: relPath });
41
- }
42
- }
43
- } catch (err) {
44
- // Skip directories we can't read
45
- }
46
- return files;
47
- }
48
-
49
- /**
50
- * Extract a human-readable title from the filename
51
- */
52
- function extractTitle(fileRelative) {
53
- const parts = fileRelative.split('/');
54
- const filename = basename(fileRelative, '.md');
55
-
56
- // Try to get a better name from the path segments
57
- if (parts.length > 1) {
58
- return parts.slice(0, -1).join('/') + '/' + filename;
59
- }
60
- return filename;
61
- }
62
-
63
- /**
64
- * Format a file path for display and linking using full workspace-relative path
65
- */
66
- function formatLink(fileRelative, basePath) {
67
- // Return full path from workspace root with .md extension preserved
68
- return `${basePath}/${fileRelative}`;
69
- }
70
-
71
- /**
72
- * Generate the documentation map markdown content
73
- */
74
- async function generateDocMap() {
75
- const docSections = [];
76
-
77
- // Scan public documentation (docsite/public/doc)
78
- const publicDocPath = join(PROJECT_ROOT, 'docsite/public/doc');
79
- try {
80
- await stat(publicDocPath);
81
- const files = await findMarkdownFiles(publicDocPath, publicDocPath);
82
-
83
- if (files.length > 0) {
84
- // Group by top-level category
85
- const grouped = {};
86
- for (const file of files) {
87
- const parts = file.relative.split('/');
88
- const category = parts[0] || 'root';
89
- if (!grouped[category]) grouped[category] = [];
90
- grouped[category].push(file);
91
- }
92
-
93
- docSections.push({
94
- title: '📚 Public Documentation',
95
- description: 'Main project documentation hosted in the docsite.',
96
- files: grouped,
97
- basePath: 'docsite/public/doc'
98
- });
99
- }
100
- } catch (err) {
101
- // Skip if directory doesn't exist
102
- }
103
-
104
- // Scan root .agents/documentation
105
- const rootAgentsPath = join(PROJECT_ROOT, '.agents/documentation');
106
- try {
107
- await stat(rootAgentsPath);
108
- const files = await findMarkdownFiles(rootAgentsPath, rootAgentsPath);
109
-
110
- if (files.length > 0) {
111
- docSections.push({
112
- title: '🤖 Root Agent Documentation',
113
- description: 'Documentation for the agent system itself.',
114
- files: { '': files },
115
- basePath: '.agents'
116
- });
117
- }
118
- } catch (err) {
119
- // Skip if directory doesn't exist
120
- }
121
-
122
- // Scan each package's .agents/documentation
123
- for (const pkg of PACKAGES) {
124
- const pkgAgentsPath = join(PROJECT_ROOT, `packages/${pkg}/.agents/documentation`);
125
- try {
126
- await stat(pkgAgentsPath);
127
- const files = await findMarkdownFiles(pkgAgentsPath, pkgAgentsPath);
128
-
129
- if (files.length > 0) {
130
- docSections.push({
131
- title: `📦 Package: @agent-smith/${pkg}`,
132
- description: `Documentation for the ${pkg} package.`,
133
- files: { '': files },
134
- basePath: `packages/${pkg}/.agents`
135
- });
136
- }
137
- } catch (err) {
138
- // Skip if directory doesn't exist or has no docs
139
- }
140
- }
141
-
142
- // Generate the markdown content - compact format for AI agents
143
- const lines = [
144
- '# 🗺️ Documentation Map',
145
- '',
146
- ];
147
-
148
- // Detailed sections only (no summary table, no horizontal rules)
149
- for (const section of docSections) {
150
- lines.push(`## ${section.title}`);
151
- lines.push('');
152
-
153
- for (const [category, files] of Object.entries(section.files)) {
154
- if (files.length === 0) continue;
155
-
156
- if (category) {
157
- lines.push(`### ${category}`);
158
- lines.push('');
159
- }
160
-
161
- // Sort files: files starting with numbers come first, then alphabetical
162
- const sortedFiles = [...files].sort((a, b) => {
163
- const aName = basename(a.relative, '.md');
164
- const bName = basename(b.relative, '.md');
165
- return aName.localeCompare(bName, undefined, { numeric: true });
166
- });
167
-
168
- for (const file of sortedFiles) {
169
- const fullPath = formatLink(file.relative, section.basePath);
170
- const workspacePath = `agent-smith/${fullPath}`;
171
- lines.push(`- [\`${workspacePath}\`](${workspacePath})`);
172
- }
173
-
174
- lines.push('');
175
- }
176
- }
177
-
178
- return lines.join('\n');
179
- }
180
-
181
- // Main execution
182
- async function main() {
183
- console.log('🔍 Scanning for documentation files...');
184
-
185
- const content = await generateDocMap();
186
- const outputPath = join(PROJECT_ROOT, '.agents/documentation/documentation-map.md');
187
-
188
- // Write the file
189
- await writeFile(outputPath, content, 'utf-8');
190
-
191
- console.log(`✅ Documentation map generated: ${outputPath}`);
192
- }
193
-
194
- main().catch(err => {
195
- console.error('❌ Error generating doc-map:', err);
196
- process.exit(1);
197
- });