sisyo 1.1.0 → 1.2.1

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # sisyo
2
2
 
3
3
  Smart documentation system for vibe coding with Claude Code.
4
- Docs auto-update as you build. Token-efficient MAP.md routing pattern.
4
+ Docs auto-update as you build. Token-efficient 3-level routing pattern.
5
5
 
6
6
  ## Install
7
7
 
@@ -17,10 +17,10 @@ Run it in your project root.
17
17
  your-project/
18
18
  CLAUDE.md # Project rules (auto-loaded)
19
19
  .claude/
20
- rules/docs.md # Doc rules (auto-loaded, 10 lines)
20
+ rules/docs.md # Doc rules (auto-loaded)
21
21
  skills/vibe-docs/SKILL.md # Brain (loaded on trigger)
22
22
  docs/
23
- MAP.md # Routing table
23
+ MAP.md # Level 1: routing table
24
24
  99_progress/todo.md # Task backlog
25
25
  99_progress/handoff.md # Session recovery
26
26
  ```
@@ -29,31 +29,48 @@ your-project/
29
29
 
30
30
  **Problem:** Loading all docs into context = 20K+ tokens = runs out fast.
31
31
 
32
- **Solution:** `MAP.md` is a routing table with 1-line summary per doc (~500 tokens).
33
- Claude reads MAP.md first, then loads only the specific file it needs.
32
+ **Solution:** 3-level routing -- load only what you need, when you need it.
34
33
 
35
34
  ```
36
- CLAUDE.md (auto-load)
35
+ Level 1: MAP.md (~500 tokens) Read ALWAYS
36
+ |
37
+ Level 2: folder/_summary.md (~200 tokens) Compact table of all items
38
+ |
39
+ Level 3: folder/[detail].md Full detail, ONLY when needed
40
+ ```
41
+
42
+ Most tasks only need Level 1 + Level 2. Detail files load only when actively modifying.
43
+
44
+ ### Example flow
45
+
46
+ ```
47
+ MAP.md
48
+ "03_database -- 4 tables: users, posts, comments, categories"
37
49
  |
38
50
  v
39
- docs/MAP.md (routing table, ~30 lines)
51
+ 03_database/_summary.md
52
+ | Table | Description | Key relations |
53
+ | users | Accounts, auth, profile | -- |
54
+ | posts | Blog posts, draft/publish| -> users |
40
55
  |
41
- +--> 03_database/schema.md (only if working on DB)
42
- +--> 04_api/auth.md (only if working on API)
43
- +--> 99_progress/todo.md (only if checking tasks)
56
+ v (only if modifying users table)
57
+ 03_database/users.md
58
+ Full column definitions, indexes, constraints
44
59
  ```
45
60
 
46
61
  ### Auto-triggers
47
62
 
48
63
  The vibe-docs skill triggers automatically when you:
49
- - Design database tables -> creates/updates `03_database/schema.md`
50
- - Add API endpoints -> creates/updates `04_api/[module].md`
51
- - Plan features -> creates `01_requirements/[name].md`
64
+ - Design database tables -> updates `03_database/_summary.md` + detail file
65
+ - Add API endpoints -> updates `04_api/_summary.md` + detail file
66
+ - Plan features -> updates `01_requirements/_summary.md` + detail file
52
67
  - Make architecture decisions -> updates `02_architecture/decisions.md`
68
+ - Set up auth/security -> creates `08_security/[topic].md`
69
+ - Integrate third-party service -> creates `09_integrations/[service].md`
53
70
  - Complete any task -> updates `99_progress/todo.md`
54
71
  - End a session -> writes `99_progress/handoff.md`
55
72
 
56
- Every doc change also updates its summary line in MAP.md.
73
+ Every change updates bottom-up: detail → `_summary.md` → MAP.md
57
74
 
58
75
  ### Session recovery
59
76
 
@@ -74,8 +91,12 @@ Claude reads MAP.md + handoff.md + todo.md (~3K tokens) and picks up where you l
74
91
  | `04_api/` | API endpoint specs by module |
75
92
  | `05_frontend/` | Pages, components, routing |
76
93
  | `06_infra/` | Deploy, Docker, CI/CD, env vars |
94
+ | `07_testing/` | Test plans, test cases, edge cases |
95
+ | `08_security/` | Auth flows, permissions, API keys |
96
+ | `09_integrations/` | Third-party services config & usage |
77
97
  | `99_progress/` | TODO, changelog, session handoff |
78
98
 
99
+ Each folder with multiple items has a `_summary.md` (compact table) + detail files.
79
100
  Folders are created on-demand. No empty placeholders.
80
101
 
81
102
  ## After install
package/bin/sisyo.js CHANGED
@@ -5,40 +5,63 @@ const path = require("path");
5
5
 
6
6
  const RESET = "\x1b[0m";
7
7
  const GREEN = "\x1b[32m";
8
+ const YELLOW = "\x1b[33m";
8
9
  const CYAN = "\x1b[36m";
9
10
  const BOLD = "\x1b[1m";
10
11
  const DIM = "\x1b[2m";
11
12
 
12
13
  function log(msg) { console.log(msg); }
13
14
  function ok(msg) { log(`${GREEN}+${RESET} ${msg}`); }
15
+ function up(msg) { log(`${YELLOW}~${RESET} ${msg}`); }
14
16
  function info(msg) { log(`${DIM} ${msg}${RESET}`); }
15
17
 
16
- function copyDir(src, dest) {
18
+ // System files that get replaced on --update
19
+ const SYSTEM_FILES = [
20
+ ".claude/rules/docs.md",
21
+ ".claude/skills/vibe-docs/SKILL.md",
22
+ ];
23
+
24
+ function isSystemFile(relativePath) {
25
+ return SYSTEM_FILES.some(f => relativePath === f || relativePath.endsWith(f));
26
+ }
27
+
28
+ function copyDir(src, dest, { updateMode = false } = {}) {
17
29
  fs.mkdirSync(dest, { recursive: true });
18
30
  for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
19
31
  const srcPath = path.join(src, entry.name);
20
32
  const destPath = path.join(dest, entry.name);
21
33
  if (entry.isDirectory()) {
22
- copyDir(srcPath, destPath);
34
+ copyDir(srcPath, destPath, { updateMode });
23
35
  } else {
24
- // Skip if file already exists
36
+ const rel = path.relative(process.cwd(), destPath);
25
37
  if (fs.existsSync(destPath)) {
26
- info(`skip ${path.relative(process.cwd(), destPath)} (exists)`);
38
+ if (updateMode && isSystemFile(rel)) {
39
+ fs.copyFileSync(srcPath, destPath);
40
+ up(`${rel} (updated)`);
41
+ } else {
42
+ info(`skip ${rel} (exists)`);
43
+ }
27
44
  continue;
28
45
  }
29
46
  fs.copyFileSync(srcPath, destPath);
30
- ok(path.relative(process.cwd(), destPath));
47
+ ok(rel);
31
48
  }
32
49
  }
33
50
  }
34
51
 
35
52
  function main() {
36
- const targetDir = process.argv[2] || ".";
53
+ const args = process.argv.slice(2);
54
+ const updateMode = args.includes("--update");
55
+ const targetDir = args.find(a => !a.startsWith("-")) || ".";
37
56
  const target = path.resolve(targetDir);
38
57
  const templatesDir = path.join(__dirname, "..", "templates");
39
58
 
40
59
  log("");
41
- log(`${BOLD}${CYAN}sisyo${RESET} ${DIM}Smart docs for Claude Code${RESET}`);
60
+ if (updateMode) {
61
+ log(`${BOLD}${CYAN}sisyo${RESET} ${DIM}Updating system files...${RESET}`);
62
+ } else {
63
+ log(`${BOLD}${CYAN}sisyo${RESET} ${DIM}Smart docs for Claude Code${RESET}`);
64
+ }
42
65
  log("");
43
66
 
44
67
  if (!fs.existsSync(templatesDir)) {
@@ -47,31 +70,39 @@ function main() {
47
70
  }
48
71
 
49
72
  // Copy all templates
50
- copyDir(templatesDir, target);
73
+ copyDir(templatesDir, target, { updateMode });
51
74
 
52
75
  // Get today's date
53
76
  const today = new Date().toISOString().split("T")[0];
54
77
 
55
- // Update dates in MAP.md and handoff
56
- const mapPath = path.join(target, "docs", "MAP.md");
57
- if (fs.existsSync(mapPath)) {
58
- let mapContent = fs.readFileSync(mapPath, "utf8");
59
- mapContent = mapContent.replace(/YYYY-MM-DD/g, today);
60
- fs.writeFileSync(mapPath, mapContent);
61
- }
78
+ // Update dates in MAP.md and handoff (only on fresh install, not --update)
79
+ if (!updateMode) {
80
+ const mapPath = path.join(target, "docs", "MAP.md");
81
+ if (fs.existsSync(mapPath)) {
82
+ let mapContent = fs.readFileSync(mapPath, "utf8");
83
+ if (mapContent.includes("YYYY-MM-DD")) {
84
+ mapContent = mapContent.replace(/YYYY-MM-DD/g, today);
85
+ fs.writeFileSync(mapPath, mapContent);
86
+ }
87
+ }
62
88
 
63
- const handoffPath = path.join(target, "docs", "99_progress", "handoff.md");
64
- if (fs.existsSync(handoffPath)) {
65
- let content = fs.readFileSync(handoffPath, "utf8");
66
- content = content.replace(/YYYY-MM-DD/g, today);
67
- fs.writeFileSync(handoffPath, content);
68
- }
89
+ const handoffPath = path.join(target, "docs", "99_progress", "handoff.md");
90
+ if (fs.existsSync(handoffPath)) {
91
+ let content = fs.readFileSync(handoffPath, "utf8");
92
+ if (content.includes("YYYY-MM-DD")) {
93
+ content = content.replace(/YYYY-MM-DD/g, today);
94
+ fs.writeFileSync(handoffPath, content);
95
+ }
96
+ }
69
97
 
70
- const todoPath = path.join(target, "docs", "99_progress", "todo.md");
71
- if (fs.existsSync(todoPath)) {
72
- let content = fs.readFileSync(todoPath, "utf8");
73
- content = content.replace(/YYYY-MM-DD/g, today);
74
- fs.writeFileSync(todoPath, content);
98
+ const todoPath = path.join(target, "docs", "99_progress", "todo.md");
99
+ if (fs.existsSync(todoPath)) {
100
+ let content = fs.readFileSync(todoPath, "utf8");
101
+ if (content.includes("YYYY-MM-DD")) {
102
+ content = content.replace(/YYYY-MM-DD/g, today);
103
+ fs.writeFileSync(todoPath, content);
104
+ }
105
+ }
75
106
  }
76
107
 
77
108
  // Add to .gitignore if exists
@@ -87,13 +118,17 @@ function main() {
87
118
  }
88
119
 
89
120
  log("");
90
- log(`${BOLD}Done!${RESET} Next steps:`);
91
- log("");
92
- log(` 1. Edit ${CYAN}CLAUDE.md${RESET} — replace [Project Name] with yours`);
93
- log(` 2. Open Claude Code and start building`);
94
- log(` 3. Docs auto-update as you work`);
121
+ if (updateMode) {
122
+ log(`${BOLD}Done!${RESET} System files updated. Your docs are untouched.`);
123
+ } else {
124
+ log(`${BOLD}Done!${RESET} Next steps:`);
125
+ log("");
126
+ log(` 1. Edit ${CYAN}CLAUDE.md${RESET} — replace [Project Name] with yours`);
127
+ log(` 2. Open Claude Code and start building`);
128
+ log(` 3. Docs auto-update as you work`);
129
+ }
95
130
  log("");
96
- log(`${DIM}Docs system: CLAUDE.md -> docs/MAP.md -> load only what's needed${RESET}`);
131
+ log(`${DIM}Docs system: CLAUDE.md -> docs/MAP.md -> _summary.md -> detail files${RESET}`);
97
132
  log("");
98
133
  }
99
134
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sisyo",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Smart documentation system for vibe coding with Claude Code. Token-efficient MAP.md routing.",
5
5
  "bin": {
6
6
  "sisyo": "./bin/sisyo.js"
@@ -1,9 +1,13 @@
1
1
  # Doc Management Rule
2
2
 
3
+ 3-level routing: MAP.md → _summary.md → detail files.
4
+
3
5
  When changing code that affects project structure or behavior:
4
- 1. Read docs/MAP.md to find related docs
5
- 2. Update the relevant doc (or create if new)
6
- 3. Update that doc summary line in MAP.md
6
+ 1. Read docs/MAP.md to find relevant folder
7
+ 2. Read _summary.md of that folder (if exists)
8
+ 3. Update detail file (or create if new)
9
+ 4. Update _summary.md table
10
+ 5. Update MAP.md summary line
7
11
 
8
12
  Before ending session or when context gets large:
9
13
  - Write docs/99_progress/handoff.md
@@ -7,37 +7,109 @@ description: "Auto-manage project documentation during vibe coding. Triggers on
7
7
 
8
8
  Keep project docs in sync with code -- automatically, without wasting tokens.
9
9
 
10
- ## Golden Rule: MAP.md First
10
+ ## Golden Rule: 3-Level Routing
11
11
 
12
- `docs/MAP.md` is the routing table -- a 1-line summary of every doc in the project.
13
- ALWAYS read MAP.md before loading any other doc file.
14
- Only load the specific doc you actually need for the current task.
12
+ Never load all docs at once. Use 3 levels to find what you need:
15
13
 
16
- Why: 30 docs as MAP.md lines = ~500 tokens. Loading all 30 files = ~20K tokens.
14
+ ```
15
+ Level 1: MAP.md (~500 tokens) -- 1-line per folder, read ALWAYS
16
+ Level 2: folder/_summary.md (~200 tokens) -- compact table of all items in folder
17
+ Level 3: folder/[detail].md -- full detail, load ONLY when needed
18
+ ```
19
+
20
+ Most tasks only need Level 1 + Level 2. Load Level 3 only when actively modifying that specific item.
17
21
 
18
22
  ## Folder Structure
19
23
 
20
24
  ```
21
25
  docs/
22
- MAP.md # ROUTING TABLE -- read FIRST, always
23
- 00_schedule/ # Roadmap, milestones, sprint plans
24
- 01_requirements/ # Feature specs, user stories
25
- 02_architecture/ # System design, tech stack, decisions
26
- 03_database/ # Schema, ERD, migration log
27
- 04_api/ # Endpoint specs grouped by module
28
- 05_frontend/ # Pages, components, routing map
29
- 06_infra/ # Deploy, Docker, CI/CD, env vars
30
- 07_testing/ # Test plans, test cases, edge cases
31
- 08_security/ # Auth flows, permissions, API keys
32
- 09_integrations/ # Third-party services config & usage
33
- 99_progress/ # TODO, changelog, session handoff
34
- ```
35
-
36
- Folders are created on-demand. Never create empty folders or placeholder files.
26
+ MAP.md # Level 1: routing table -- read FIRST, always
27
+ 00_schedule/ # Roadmap, milestones, sprint plans
28
+ 01_requirements/ # Feature specs, user stories
29
+ _summary.md # List of all features (compact table)
30
+ auth.md # Detail: auth feature spec
31
+ posts.md # Detail: posts feature spec
32
+ 02_architecture/ # System design, tech stack, decisions
33
+ 03_database/ # Schema, ERD, migration log
34
+ _summary.md # List of all tables + 1-line description
35
+ users.md # Detail: users table columns, indexes, relations
36
+ posts.md # Detail: posts table columns, indexes, relations
37
+ 04_api/ # Endpoint specs grouped by module
38
+ _summary.md # All endpoints in compact table (method, path, description)
39
+ auth.md # Detail: auth endpoints (grouped, not 1 per endpoint)
40
+ posts.md # Detail: posts endpoints (grouped)
41
+ 05_frontend/ # Pages, components, routing map
42
+ 06_infra/ # Deploy, Docker, CI/CD, env vars
43
+ 07_testing/ # Test plans, test cases, edge cases
44
+ 08_security/ # Auth flows, permissions, API keys
45
+ 09_integrations/ # Third-party services config & usage
46
+ 99_progress/ # TODO, changelog, session handoff
47
+ ```
48
+
49
+ Folders and files are created on-demand. Never create empty folders or placeholder files.
50
+
51
+ ## _summary.md Pattern
52
+
53
+ Every folder with multiple items MUST have a `_summary.md`. This is a compact table that lets the agent understand the folder WITHOUT loading detail files.
54
+
55
+ ### Example: 03_database/_summary.md
56
+ ```
57
+ # Database Tables
58
+ > Updated: 2025-03-03 | Tables: 4
59
+
60
+ | Table | Description | Key relations |
61
+ |-------|-------------|---------------|
62
+ | users | User accounts, auth, profile | -- |
63
+ | posts | Blog posts with draft/publish | -> users |
64
+ | comments | Post comments, nested | -> users, posts |
65
+ | categories | Post categories, hierarchical | -- |
66
+
67
+ Detail: `03_database/[table].md`
68
+ ```
69
+
70
+ ### Example: 04_api/_summary.md
71
+ ```
72
+ # API Endpoints
73
+ > Updated: 2025-03-03 | Endpoints: 12
74
+
75
+ | Method | Path | Description | Auth |
76
+ |--------|------|-------------|:----:|
77
+ | POST | /auth/login | Email + password login | no |
78
+ | POST | /auth/register | Create new account | no |
79
+ | GET | /posts | List posts, paginated | no |
80
+ | POST | /posts | Create new post | yes |
81
+ | PUT | /posts/:id | Update post | yes |
82
+ | DELETE | /posts/:id | Delete post | yes |
83
+ | GET | /users/me | Get current user profile | yes |
84
+
85
+ Detail: `04_api/[module].md`
86
+ ```
87
+
88
+ ### Example: 05_frontend/_summary.md
89
+ ```
90
+ # Frontend Pages
91
+ > Updated: 2025-03-03 | Pages: 6
92
+
93
+ | Route | Page | Components | Description |
94
+ |-------|------|------------|-------------|
95
+ | / | Home | PostList, Hero | Landing + recent posts |
96
+ | /login | Login | LoginForm | Auth page |
97
+ | /posts/:id | PostDetail | Post, Comments | Single post view |
98
+ | /dashboard | Dashboard | Stats, PostTable | User dashboard (auth) |
99
+
100
+ Detail: `05_frontend/[page-group].md`
101
+ ```
102
+
103
+ Rules for _summary.md:
104
+ - One compact table, all items visible at a glance
105
+ - Max 1 line per item -- no detail here
106
+ - Group related items in the SAME row when possible
107
+ - Always link to detail files at the bottom
108
+ - Keep under 50 lines total
37
109
 
38
110
  ## MAP.md Format
39
111
 
40
- Every doc = exactly 1 line with keyword-rich summary + date:
112
+ MAP.md is Level 1 -- one line per doc/folder with keyword-rich summary:
41
113
 
42
114
  ```
43
115
  # Project Map
@@ -47,29 +119,32 @@ Every doc = exactly 1 line with keyword-rich summary + date:
47
119
  - 00_schedule/roadmap.md -- MVP phase 1 by April, phase 2 by June (2025-03-03)
48
120
 
49
121
  ## 01_requirements
50
- - 01_requirements/auth.md -- Email login, JWT tokens, password reset flow (2025-03-03)
51
- - 01_requirements/posts.md -- Blog CRUD: create, edit, publish, draft (2025-03-02)
122
+ - 01_requirements/_summary.md -- 3 features: auth, posts, comments (2025-03-03)
52
123
 
53
124
  ## 03_database
54
- - 03_database/schema.md -- Tables: users, posts, comments, categories (2025-03-03)
125
+ - 03_database/_summary.md -- 4 tables: users, posts, comments, categories (2025-03-03)
126
+
127
+ ## 04_api
128
+ - 04_api/_summary.md -- 12 endpoints: auth(2), posts(5), users(3), comments(2) (2025-03-03)
55
129
  ```
56
130
 
57
131
  Rules for MAP.md entries:
58
- - Max ~15 words per summary -- include key nouns for scanning
132
+ - Max ~15 words per summary -- include key nouns and counts
59
133
  - Always end with (YYYY-MM-DD) update date
134
+ - For folders with _summary.md, list the summary file (not every detail file)
60
135
  - Group by folder number, skip empty sections
61
136
  - Update total doc count in header
62
137
 
63
138
  ## Auto-trigger Matrix
64
139
 
65
- | Action completed | Create/update | Doc contains | + MAP.md |
140
+ | Action completed | Update | Doc contains | + MAP.md |
66
141
  |--------------------------------|---------------------------------|-------------------------------------------------------|:--------:|
67
142
  | Set timeline/milestone | 00_schedule/roadmap.md | Phases, milestones, deadlines, sprint goals | yes |
68
- | Discussed/planned a feature | 01_requirements/[name].md | User stories, acceptance criteria, scope, constraints | yes |
143
+ | Discussed/planned a feature | 01_requirements/_summary.md + [name].md | _summary: feature list table. Detail: user stories, acceptance criteria, scope | yes |
69
144
  | Made tech/architecture choice | 02_architecture/decisions.md | ADR format: context, options considered, decision, why | yes |
70
- | Designed DB tables/columns | 03_database/schema.md | Table definitions, relationships, indexes, migrations | yes |
71
- | Added/changed API endpoints | 04_api/[module].md | Method, path, request/response, auth, status codes | yes |
72
- | Built frontend pages/routes | 05_frontend/pages.md | Routes, components, state management, UI behavior | yes |
145
+ | Designed DB tables/columns | 03_database/_summary.md + [table].md | _summary: all tables + description. Detail: columns, types, indexes, relations | yes |
146
+ | Added/changed API endpoints | 04_api/_summary.md + [module].md | _summary: all endpoints compact table. Detail: request/response, examples | yes |
147
+ | Built frontend pages/routes | 05_frontend/_summary.md + [group].md | _summary: all routes + components. Detail: state, behavior, wireframe | yes |
73
148
  | Changed deploy/infra/env | 06_infra/[topic].md | Docker, CI/CD, env vars, cloud services config | yes |
74
149
  | Wrote/planned tests | 07_testing/[module].md | Test cases, edge cases, coverage notes, test commands | yes |
75
150
  | Set up auth/permissions/keys | 08_security/[topic].md | Auth flow, roles, permissions, API keys, secrets mgmt | yes |
@@ -77,7 +152,17 @@ Rules for MAP.md entries:
77
152
  | Completed any task | 99_progress/todo.md | Task status: doing, next, done with dates | yes |
78
153
  | Ending session or /clear | 99_progress/handoff.md | Session summary, current state, next steps, decisions | yes |
79
154
 
80
- IMPORTANT: Every doc create or update must also update its line in MAP.md.
155
+ IMPORTANT: Every doc create or update must also update _summary.md (if exists) AND MAP.md.
156
+
157
+ ## Agent Reading Strategy
158
+
159
+ When working on a task:
160
+ 1. Read MAP.md -- find relevant folder
161
+ 2. Read _summary.md of that folder -- understand scope at a glance
162
+ 3. ONLY if you need to modify or deeply understand a specific item → load its detail file
163
+ 4. After changes → update detail file → update _summary.md → update MAP.md (bottom-up)
164
+
165
+ Do NOT load detail files just to "check" -- the summary table has enough info for most decisions.
81
166
 
82
167
  ## Doc Format Standard
83
168
 
@@ -89,7 +174,8 @@ Every doc starts with:
89
174
 
90
175
  Formatting rules:
91
176
  - Tables over prose for structured data
92
- - Mermaid for all diagrams
177
+ - Group related items in the same table (e.g. all auth endpoints in one table, not separate sections)
178
+ - Mermaid for diagrams
93
179
  - Code blocks for configs, schemas, commands
94
180
  - Keep each file under 200 lines -- split if longer
95
181
  - Use relative links between docs
@@ -100,7 +186,8 @@ After /clear or starting new session -- 4 steps, ~2-3K tokens total:
100
186
  1. Read docs/MAP.md -- understand full project scope
101
187
  2. Read docs/99_progress/handoff.md -- what happened last session
102
188
  3. Read docs/99_progress/todo.md -- what to do next
103
- 4. Load ONLY the docs relevant to the current task (find via MAP.md)
189
+ 4. Read _summary.md of the relevant folder -- understand scope
190
+ 5. Load ONLY the detail docs needed for current task
104
191
 
105
192
  ## Task Tracking
106
193
 
@@ -22,15 +22,16 @@
22
22
  - [e.g. Write tests for new features]
23
23
 
24
24
  ## Docs System
25
- `docs/MAP.md` is the routing table -- 1-line summary of every doc.
25
+ 3-level routing: `MAP.md` → `_summary.md` → detail files.
26
26
 
27
27
  Session start -- read in order:
28
- 1. `docs/MAP.md` -- full project scope in ~30 lines
28
+ 1. `docs/MAP.md` -- full project scope (~500 tokens)
29
29
  2. `docs/99_progress/handoff.md` -- last session context
30
30
  3. `docs/99_progress/todo.md` -- active tasks
31
- 4. Load ONLY the specific docs needed for current task
31
+ 4. Read `_summary.md` of relevant folder -- scope at a glance
32
+ 5. Load ONLY the detail docs needed for current task
32
33
 
33
34
  During work -- vibe-docs skill auto-updates docs on code changes.
34
- Every doc change MUST also update its summary line in MAP.md.
35
+ Every change updates bottom-up: detail → `_summary.md` → MAP.md.
35
36
 
36
37
  Before `/clear` -- always write `docs/99_progress/handoff.md` first.