sisyo 1.5.1 → 1.6.5
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/LICENSE +16 -16
- package/README.md +161 -139
- package/bin/known-hashes.json +71 -0
- package/bin/sisyo.js +200 -78
- package/package.json +30 -26
- package/templates/.claude/rules/docs.md +19 -19
- package/templates/.claude/skills/gemini-integration/GENERATE.md +111 -0
- package/templates/.claude/skills/gemini-integration/LIVE-VOICE.md +242 -0
- package/templates/.claude/skills/gemini-integration/RAG-EMBEDDING.md +93 -0
- package/templates/.claude/skills/gemini-integration/SKILL.md +157 -0
- package/templates/.claude/skills/gemini-integration/TEXT-CHAT.md +133 -0
- package/templates/.claude/skills/gemini-integration/TROUBLESHOOTING.md +67 -0
- package/templates/.claude/skills/html-docs/SKILL.md +207 -207
- package/templates/.claude/skills/terraform-best-practices/SKILL.md +341 -341
- package/templates/.claude/skills/typesafe-jev/SKILL.md +149 -0
- package/templates/.claude/skills/vibe-docs/SKILL.md +242 -242
- package/templates/SISYO.md +37 -37
- package/templates/docs/99_progress/features.md +7 -7
- package/templates/docs/99_progress/handoff.md +19 -19
- package/templates/docs/99_progress/todo.md +15 -15
- package/templates/docs/MAP.md +26 -26
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typesafe-jev
|
|
3
|
+
license: MIT
|
|
4
|
+
description: >
|
|
5
|
+
Build AI-powered software with TypeSafe: small units of AI intelligence you
|
|
6
|
+
can use like programming primitives. Its System One models, including Jev,
|
|
7
|
+
turn natural language and application state into typed judgments and
|
|
8
|
+
probabilities that code can combine. Use when a feature needs programmable
|
|
9
|
+
common sense, when brainstorming what AI could make possible in an app, or
|
|
10
|
+
when an LLM prompt-and-parse step could become a structured decision.
|
|
11
|
+
Applications include routing, ranking, extraction, verification, and
|
|
12
|
+
interactive experiences; these are starting points, not the limits.
|
|
13
|
+
Read live docs and cookbooks to find useful patterns and discover new combinations.
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Build with TypeSafe
|
|
17
|
+
|
|
18
|
+
TypeSafe makes units of AI intelligence usable like programming primitives: small
|
|
19
|
+
judgments you can compose into larger capabilities. Its **System One models** return
|
|
20
|
+
fast, focused judgments that software can consume directly. **Jev** is TypeSafe's
|
|
21
|
+
flagship and first System One model. It understands natural language and returns
|
|
22
|
+
typed answers and probabilities rather
|
|
23
|
+
than generating text or reasoning explanations. Code owns the workflow; the model
|
|
24
|
+
supplies programmable common sense where ordinary code needs semantic understanding.
|
|
25
|
+
|
|
26
|
+
## Read the live docs
|
|
27
|
+
|
|
28
|
+
**The live TypeSafe docs are the source of truth. Read them as part of the task.**
|
|
29
|
+
This skill gives direction; the docs carry current concepts, prompting guidance,
|
|
30
|
+
API contracts, SDK usage, models, limits, and worked examples.
|
|
31
|
+
|
|
32
|
+
- Start with the [documentation index](https://docs.typesafe.ai/llms.txt) to discover
|
|
33
|
+
relevant pages and cookbooks. Use targeted reads rather than loading the entire site.
|
|
34
|
+
- Mintlify serves Markdown by appending `.md` to a page path, for example
|
|
35
|
+
[how to build with TypeSafe](https://docs.typesafe.ai/concepts/how-to-build-with-system-one.md).
|
|
36
|
+
Follow links from the index; convert extensionless documentation page links to
|
|
37
|
+
`.md` when useful. Resolve relative links against `https://docs.typesafe.ai`.
|
|
38
|
+
- Before writing an integration, read the current API or chosen SDK page and the
|
|
39
|
+
question guidance relevant to the design. For a new workflow, also inspect the
|
|
40
|
+
closest cookbook: it often shows a better decomposition than a generic classifier.
|
|
41
|
+
- If the index is unavailable, use the direct links below or the site's navigation.
|
|
42
|
+
If Markdown fetching fails, try the normal page. If live access is unavailable,
|
|
43
|
+
use available local docs or installed SDK types, state that limitation, and avoid
|
|
44
|
+
inventing version-dependent details.
|
|
45
|
+
|
|
46
|
+
| Task | Start here; follow the relevant details |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| Understand the programming model | [System One](https://docs.typesafe.ai/concepts/system-one.md), [building guide](https://docs.typesafe.ai/concepts/how-to-build-with-system-one.md) |
|
|
49
|
+
| Explore what to build | [Use-case map](https://docs.typesafe.ai/concepts/use-case-map.md), then relevant cookbooks from the index |
|
|
50
|
+
| Prepare inputs and questions | [State](https://docs.typesafe.ai/concepts/state.md), [primitives](https://docs.typesafe.ai/primitives.md), then the chosen primitive's page |
|
|
51
|
+
| Decide how to handle uncertainty | [Confidence](https://docs.typesafe.ai/confidence.md) |
|
|
52
|
+
| Write API code | [HTTP API](https://docs.typesafe.ai/api.md), [Python SDK](https://docs.typesafe.ai/sdk/python.md), or [JavaScript SDK](https://docs.typesafe.ai/sdk/javascript.md) |
|
|
53
|
+
| Update an older integration | [Migration guide](https://docs.typesafe.ai/migrating-to-v1.md) and the installed SDK's current reference |
|
|
54
|
+
|
|
55
|
+
## Find the useful shape
|
|
56
|
+
|
|
57
|
+
Start from the behavior the user wants: what will the application show, select,
|
|
58
|
+
change, or hand off? Work backward to the judgments it needs. Keep known rules,
|
|
59
|
+
calculations, exact lookups, and execution in code. Preserve the user's chosen stack
|
|
60
|
+
and scope; add TypeSafe where semantic understanding helps.
|
|
61
|
+
|
|
62
|
+
When brainstorming or choosing an architecture, consider more than classification.
|
|
63
|
+
The patterns below are starting points: combine primitives around the user's goal,
|
|
64
|
+
including ideas that do not fit an established recipe.
|
|
65
|
+
|
|
66
|
+
- **Route and fill known arguments.** A request can select a handler and its typed
|
|
67
|
+
parameters. Ask useful branch-specific questions up front and consume only the
|
|
68
|
+
relevant answers. Explore [function calling](https://docs.typesafe.ai/cookbooks/function_calling.md)
|
|
69
|
+
and [speculative fan-out](https://docs.typesafe.ai/patterns/fan-out.md).
|
|
70
|
+
- **Select instead of generate.** Find candidate values or source spans in code,
|
|
71
|
+
use a judgment to select the intended one, then copy or normalize it. Code can
|
|
72
|
+
also assemble source text into a formatted document or reading guide. Explore
|
|
73
|
+
[value extraction](https://docs.typesafe.ai/cookbooks/pre_parsed_value_extraction_cookbook.md)
|
|
74
|
+
and [structure recovery](https://docs.typesafe.ai/cookbooks/autoformat.md).
|
|
75
|
+
- **Find and judge evidence.** Retrieve candidates, compare their relevance to a
|
|
76
|
+
query, and select useful context. Explore [reranking](https://docs.typesafe.ai/cookbooks/rerank_typesafe.md)
|
|
77
|
+
and [hierarchical classification](https://docs.typesafe.ai/cookbooks/hierarchical_classification.md).
|
|
78
|
+
- **Turn judgments into reusable data.** Score dimensions once, then let code or
|
|
79
|
+
user controls change weights, thresholds, rankings, and views. With labeled
|
|
80
|
+
outcomes, those signals can become classical ML features. Explore
|
|
81
|
+
[composite scoring](https://docs.typesafe.ai/patterns/composite-scoring.md) and
|
|
82
|
+
[feature discovery](https://docs.typesafe.ai/cookbooks/autoresearch_feature_discovery.md).
|
|
83
|
+
- **Verify and escalate.** Check specific claims or fields against their evidence;
|
|
84
|
+
send uncertain or failing cases to a person or reasoning model. Explore
|
|
85
|
+
[citation checks](https://docs.typesafe.ai/cookbooks/citation_check.md) and
|
|
86
|
+
[extraction cascades](https://docs.typesafe.ai/cookbooks/sde_cascade.md).
|
|
87
|
+
- **Respond to changing state.** Code can retain goals and observations while fresh
|
|
88
|
+
judgments guide the next bounded step. Keep inferred state distinct from observed
|
|
89
|
+
facts, and check freshness before applying a result to a changed situation.
|
|
90
|
+
|
|
91
|
+
For open-ended requests, offer the few directions that best serve the user's goal
|
|
92
|
+
and recommend a starting point. For a concrete request, choose the relevant pattern
|
|
93
|
+
and build; a brainstorm is not a mandatory detour.
|
|
94
|
+
|
|
95
|
+
## Design the judgments
|
|
96
|
+
|
|
97
|
+
Choose by what the answer means, then read the relevant primitive page:
|
|
98
|
+
|
|
99
|
+
| Need | Primitive | Important distinction |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| One of a defined set | [Choice](https://docs.typesafe.ai/primitives/choice.md) | Picks one option; its distribution compares competing options |
|
|
102
|
+
| Whether a condition holds | [Noul](https://docs.typesafe.ai/primitives/noul.md) | Probability of yes; no separate confidence; use one per label when several may apply |
|
|
103
|
+
| Degree along a described dimension | [Score](https://docs.typesafe.ai/primitives/score.md) | Probability-weighted position on ordered levels; use comparable per-item Scores for graded ranking |
|
|
104
|
+
|
|
105
|
+
Give each question enough relevant **state** to answer: source text, identities,
|
|
106
|
+
relationships, policies, and current facts. Prefer named JSON fields when context
|
|
107
|
+
has several parts. Put the judgment in **instructions** and define its possible
|
|
108
|
+
answers in **criteria**. Question IDs are for code and are not sent to the model;
|
|
109
|
+
include complete meaning in the question. Reference nested state with backticked
|
|
110
|
+
paths such as `ticket.messages[0].text`.
|
|
111
|
+
|
|
112
|
+
Ask one narrow, coherent judgment per question. Split independently useful dimensions,
|
|
113
|
+
without destroying the relationship being judged. A bounded action selection or
|
|
114
|
+
contextual interpretation is valid; atomic does not mean literal fact extraction
|
|
115
|
+
or a one-sentence limit. Strings work for simple questions. Use structured objects
|
|
116
|
+
or arrays when definitions, contrasts, exclusions, or examples clarify instructions
|
|
117
|
+
or criteria. Score levels must describe concrete situations and stand on their own.
|
|
118
|
+
|
|
119
|
+
Keep the needed answers available. Include a no-match outcome when nothing may fit;
|
|
120
|
+
use a separate presence judgment when it is independently useful. For source-value
|
|
121
|
+
selection, check candidate coverage: the model cannot choose an omitted value.
|
|
122
|
+
|
|
123
|
+
## Compose and verify
|
|
124
|
+
|
|
125
|
+
**Ask independent questions over the same state together**, including useful
|
|
126
|
+
speculative questions. They run in parallel and cannot see one another's answers.
|
|
127
|
+
State each speculative premise explicitly; code consumes the applicable answers.
|
|
128
|
+
A second request is warranted when an earlier answer is needed to fetch evidence,
|
|
129
|
+
construct new state, or determine the next options. Extra questions still use tokens;
|
|
130
|
+
measure actual request budgets, cost, and end-to-end latency.
|
|
131
|
+
|
|
132
|
+
Use probabilities and confidence to guide behavior, with thresholds evaluated on
|
|
133
|
+
the user's data and consequences. Choice/Score confidence summarizes distribution
|
|
134
|
+
concentration, not overall workflow correctness or permission to act. A Noul near
|
|
135
|
+
0.5 means similar probability for yes and no, not medium intensity. Several
|
|
136
|
+
acceptable alternatives can also spread probability; low confidence need not
|
|
137
|
+
invalidate a harmless preference choice. Ignore uncertainty on unused branches.
|
|
138
|
+
|
|
139
|
+
Keep policy explicit and raw judgments reusable. Weighted scores suit compensating
|
|
140
|
+
preferences; an “any serious violation” rule needs separate conditions. Changing a
|
|
141
|
+
weight or display filter need not rerun inference when evidence and question meanings
|
|
142
|
+
are unchanged. Typed output guarantees the interface, not truth. System One models
|
|
143
|
+
are trained for calibrated decisions; validate their performance in the target domain.
|
|
144
|
+
|
|
145
|
+
Test representative cases and the resulting application behavior. For failures,
|
|
146
|
+
inspect the exact state, questions, candidates, answers, composition, and observed
|
|
147
|
+
outcome. Separate missing evidence, model errors, code errors, and service failures.
|
|
148
|
+
Treat cookbook thresholds and demo results as examples to evaluate, not universal
|
|
149
|
+
rules or permanent model limitations. Keep API credentials server-side in web apps.
|
|
@@ -1,242 +1,242 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: vibe-docs
|
|
3
|
-
description: "Auto-manage project documentation during vibe coding. Triggers on feature changes, DB schema, API endpoints, frontend pages, infra, testing, security, integrations, or any task completion. Also triggers on: project status, what is next, update docs, create a plan, log this. Core principle: read docs/MAP.md first, never load all docs at once."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Vibe Docs
|
|
7
|
-
|
|
8
|
-
Keep project docs in sync with code -- automatically, without wasting tokens.
|
|
9
|
-
|
|
10
|
-
## Golden Rule: 3-Level Routing
|
|
11
|
-
|
|
12
|
-
Never load all docs at once. Use 3 levels to find what you need:
|
|
13
|
-
|
|
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.
|
|
21
|
-
|
|
22
|
-
## Folder Structure
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
docs/
|
|
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
|
|
109
|
-
|
|
110
|
-
## MAP.md Format
|
|
111
|
-
|
|
112
|
-
MAP.md is Level 1 -- one line per doc/folder with keyword-rich summary:
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
# Project Map
|
|
116
|
-
> Updated: YYYY-MM-DD | Docs: N
|
|
117
|
-
|
|
118
|
-
## 00_schedule
|
|
119
|
-
- 00_schedule/roadmap.md -- MVP phase 1 by April, phase 2 by June (2025-03-03)
|
|
120
|
-
|
|
121
|
-
## 01_requirements
|
|
122
|
-
- 01_requirements/_summary.md -- 3 features: auth, posts, comments (2025-03-03)
|
|
123
|
-
|
|
124
|
-
## 03_database
|
|
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)
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Rules for MAP.md entries:
|
|
132
|
-
- Max ~15 words per summary -- include key nouns and counts
|
|
133
|
-
- Always end with (YYYY-MM-DD) update date
|
|
134
|
-
- For folders with _summary.md, list the summary file (not every detail file)
|
|
135
|
-
- Group by folder number, skip empty sections
|
|
136
|
-
- Update total doc count in header
|
|
137
|
-
|
|
138
|
-
## Auto-trigger Matrix
|
|
139
|
-
|
|
140
|
-
| Action completed | Update | Doc contains | + MAP.md |
|
|
141
|
-
|--------------------------------|---------------------------------|-------------------------------------------------------|:--------:|
|
|
142
|
-
| Set timeline/milestone | 00_schedule/roadmap.md | Phases, milestones, deadlines, sprint goals | yes |
|
|
143
|
-
| Discussed/planned a feature | 01_requirements/_summary.md + [name].md | _summary: feature list table. Detail: user stories, acceptance criteria, scope | yes |
|
|
144
|
-
| Made tech/architecture choice | 02_architecture/decisions.md | ADR format: context, options considered, decision, why | 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 |
|
|
148
|
-
| Changed deploy/infra/env | 06_infra/[topic].md | Docker, CI/CD, env vars, cloud services config | yes |
|
|
149
|
-
| Wrote/planned tests | 07_testing/[module].md | Test cases, edge cases, coverage notes, test commands | yes |
|
|
150
|
-
| Set up auth/permissions/keys | 08_security/[topic].md | Auth flow, roles, permissions, API keys, secrets mgmt | yes |
|
|
151
|
-
| Integrated third-party service | 09_integrations/[service].md | Service config, API keys, SDK usage, webhooks, limits | yes |
|
|
152
|
-
| Completed a feature | 99_progress/features.md | Date, feature name, status, link to spec doc | yes |
|
|
153
|
-
| Completed any task | 99_progress/todo.md | Task status: doing, next, done with dates | yes |
|
|
154
|
-
| Ending session or /clear | 99_progress/handoff.md | Session summary, current state, next steps, decisions | yes |
|
|
155
|
-
|
|
156
|
-
IMPORTANT: Every doc create or update must also update _summary.md (if exists) AND MAP.md.
|
|
157
|
-
|
|
158
|
-
## Agent Reading Strategy
|
|
159
|
-
|
|
160
|
-
When working on a task:
|
|
161
|
-
1. Read MAP.md -- find relevant folder
|
|
162
|
-
2. Read _summary.md of that folder -- understand scope at a glance
|
|
163
|
-
3. ONLY if you need to modify or deeply understand a specific item → load its detail file
|
|
164
|
-
4. After changes → update detail file → update _summary.md → update MAP.md (bottom-up)
|
|
165
|
-
|
|
166
|
-
Do NOT load detail files just to "check" -- the summary table has enough info for most decisions.
|
|
167
|
-
|
|
168
|
-
## Doc Format Standard
|
|
169
|
-
|
|
170
|
-
Every doc starts with:
|
|
171
|
-
```
|
|
172
|
-
# [Title]
|
|
173
|
-
> Updated: YYYY-MM-DD | Status: draft/active/done
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Formatting rules:
|
|
177
|
-
- Tables over prose for structured data
|
|
178
|
-
- Group related items in the same table (e.g. all auth endpoints in one table, not separate sections)
|
|
179
|
-
- Mermaid for diagrams
|
|
180
|
-
- Code blocks for configs, schemas, commands
|
|
181
|
-
- Keep each file under 200 lines -- split if longer
|
|
182
|
-
- Use relative links between docs
|
|
183
|
-
|
|
184
|
-
## Context Recovery Protocol
|
|
185
|
-
|
|
186
|
-
After /clear or starting new session -- 4 steps, ~2-3K tokens total:
|
|
187
|
-
1. Read docs/MAP.md -- understand full project scope
|
|
188
|
-
2. Read docs/99_progress/handoff.md -- what happened last session
|
|
189
|
-
3. Read docs/99_progress/todo.md -- what to do next
|
|
190
|
-
4. Read _summary.md of the relevant folder -- understand scope
|
|
191
|
-
5. Load ONLY the detail docs needed for current task
|
|
192
|
-
|
|
193
|
-
## Task Tracking
|
|
194
|
-
|
|
195
|
-
99_progress/todo.md format:
|
|
196
|
-
```
|
|
197
|
-
# TODO
|
|
198
|
-
> Updated: YYYY-MM-DD
|
|
199
|
-
|
|
200
|
-
## Doing
|
|
201
|
-
- [ ] Task description -- see 01_requirements/feature.md
|
|
202
|
-
|
|
203
|
-
## Next
|
|
204
|
-
- [ ] Task description
|
|
205
|
-
|
|
206
|
-
## Done
|
|
207
|
-
- [x] [2025-03-03] Task description
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
When user asks "what is next" -- read this file.
|
|
211
|
-
When task is done -- move to Done section with date.
|
|
212
|
-
|
|
213
|
-
## Session Handoff
|
|
214
|
-
|
|
215
|
-
Write 99_progress/handoff.md before /clear or end of session:
|
|
216
|
-
```
|
|
217
|
-
# Handoff
|
|
218
|
-
> Updated: YYYY-MM-DD HH:MM
|
|
219
|
-
|
|
220
|
-
## Done this session
|
|
221
|
-
- Completed X (files: path/a.ts, path/b.py)
|
|
222
|
-
|
|
223
|
-
## State
|
|
224
|
-
- Working: [what functions correctly]
|
|
225
|
-
- Broken: [known issues]
|
|
226
|
-
- In progress: [incomplete work]
|
|
227
|
-
|
|
228
|
-
## Next
|
|
229
|
-
1. Highest priority task
|
|
230
|
-
2. Second priority
|
|
231
|
-
|
|
232
|
-
## Decisions
|
|
233
|
-
- Chose X over Y: reason
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## Project Init Protocol
|
|
237
|
-
|
|
238
|
-
When docs/ directory does not exist yet:
|
|
239
|
-
1. Create docs/MAP.md with section headers (no entries)
|
|
240
|
-
2. Create docs/99_progress/todo.md with initial tasks from conversation
|
|
241
|
-
3. Create docs/99_progress/handoff.md with initial state
|
|
242
|
-
4. Everything else is created on-demand when content exists
|
|
1
|
+
---
|
|
2
|
+
name: vibe-docs
|
|
3
|
+
description: "Auto-manage project documentation during vibe coding. Triggers on feature changes, DB schema, API endpoints, frontend pages, infra, testing, security, integrations, or any task completion. Also triggers on: project status, what is next, update docs, create a plan, log this. Core principle: read docs/MAP.md first, never load all docs at once."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vibe Docs
|
|
7
|
+
|
|
8
|
+
Keep project docs in sync with code -- automatically, without wasting tokens.
|
|
9
|
+
|
|
10
|
+
## Golden Rule: 3-Level Routing
|
|
11
|
+
|
|
12
|
+
Never load all docs at once. Use 3 levels to find what you need:
|
|
13
|
+
|
|
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.
|
|
21
|
+
|
|
22
|
+
## Folder Structure
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
docs/
|
|
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
|
|
109
|
+
|
|
110
|
+
## MAP.md Format
|
|
111
|
+
|
|
112
|
+
MAP.md is Level 1 -- one line per doc/folder with keyword-rich summary:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
# Project Map
|
|
116
|
+
> Updated: YYYY-MM-DD | Docs: N
|
|
117
|
+
|
|
118
|
+
## 00_schedule
|
|
119
|
+
- 00_schedule/roadmap.md -- MVP phase 1 by April, phase 2 by June (2025-03-03)
|
|
120
|
+
|
|
121
|
+
## 01_requirements
|
|
122
|
+
- 01_requirements/_summary.md -- 3 features: auth, posts, comments (2025-03-03)
|
|
123
|
+
|
|
124
|
+
## 03_database
|
|
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)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Rules for MAP.md entries:
|
|
132
|
+
- Max ~15 words per summary -- include key nouns and counts
|
|
133
|
+
- Always end with (YYYY-MM-DD) update date
|
|
134
|
+
- For folders with _summary.md, list the summary file (not every detail file)
|
|
135
|
+
- Group by folder number, skip empty sections
|
|
136
|
+
- Update total doc count in header
|
|
137
|
+
|
|
138
|
+
## Auto-trigger Matrix
|
|
139
|
+
|
|
140
|
+
| Action completed | Update | Doc contains | + MAP.md |
|
|
141
|
+
|--------------------------------|---------------------------------|-------------------------------------------------------|:--------:|
|
|
142
|
+
| Set timeline/milestone | 00_schedule/roadmap.md | Phases, milestones, deadlines, sprint goals | yes |
|
|
143
|
+
| Discussed/planned a feature | 01_requirements/_summary.md + [name].md | _summary: feature list table. Detail: user stories, acceptance criteria, scope | yes |
|
|
144
|
+
| Made tech/architecture choice | 02_architecture/decisions.md | ADR format: context, options considered, decision, why | 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 |
|
|
148
|
+
| Changed deploy/infra/env | 06_infra/[topic].md | Docker, CI/CD, env vars, cloud services config | yes |
|
|
149
|
+
| Wrote/planned tests | 07_testing/[module].md | Test cases, edge cases, coverage notes, test commands | yes |
|
|
150
|
+
| Set up auth/permissions/keys | 08_security/[topic].md | Auth flow, roles, permissions, API keys, secrets mgmt | yes |
|
|
151
|
+
| Integrated third-party service | 09_integrations/[service].md | Service config, API keys, SDK usage, webhooks, limits | yes |
|
|
152
|
+
| Completed a feature | 99_progress/features.md | Date, feature name, status, link to spec doc | yes |
|
|
153
|
+
| Completed any task | 99_progress/todo.md | Task status: doing, next, done with dates | yes |
|
|
154
|
+
| Ending session or /clear | 99_progress/handoff.md | Session summary, current state, next steps, decisions | yes |
|
|
155
|
+
|
|
156
|
+
IMPORTANT: Every doc create or update must also update _summary.md (if exists) AND MAP.md.
|
|
157
|
+
|
|
158
|
+
## Agent Reading Strategy
|
|
159
|
+
|
|
160
|
+
When working on a task:
|
|
161
|
+
1. Read MAP.md -- find relevant folder
|
|
162
|
+
2. Read _summary.md of that folder -- understand scope at a glance
|
|
163
|
+
3. ONLY if you need to modify or deeply understand a specific item → load its detail file
|
|
164
|
+
4. After changes → update detail file → update _summary.md → update MAP.md (bottom-up)
|
|
165
|
+
|
|
166
|
+
Do NOT load detail files just to "check" -- the summary table has enough info for most decisions.
|
|
167
|
+
|
|
168
|
+
## Doc Format Standard
|
|
169
|
+
|
|
170
|
+
Every doc starts with:
|
|
171
|
+
```
|
|
172
|
+
# [Title]
|
|
173
|
+
> Updated: YYYY-MM-DD | Status: draft/active/done
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Formatting rules:
|
|
177
|
+
- Tables over prose for structured data
|
|
178
|
+
- Group related items in the same table (e.g. all auth endpoints in one table, not separate sections)
|
|
179
|
+
- Mermaid for diagrams
|
|
180
|
+
- Code blocks for configs, schemas, commands
|
|
181
|
+
- Keep each file under 200 lines -- split if longer
|
|
182
|
+
- Use relative links between docs
|
|
183
|
+
|
|
184
|
+
## Context Recovery Protocol
|
|
185
|
+
|
|
186
|
+
After /clear or starting new session -- 4 steps, ~2-3K tokens total:
|
|
187
|
+
1. Read docs/MAP.md -- understand full project scope
|
|
188
|
+
2. Read docs/99_progress/handoff.md -- what happened last session
|
|
189
|
+
3. Read docs/99_progress/todo.md -- what to do next
|
|
190
|
+
4. Read _summary.md of the relevant folder -- understand scope
|
|
191
|
+
5. Load ONLY the detail docs needed for current task
|
|
192
|
+
|
|
193
|
+
## Task Tracking
|
|
194
|
+
|
|
195
|
+
99_progress/todo.md format:
|
|
196
|
+
```
|
|
197
|
+
# TODO
|
|
198
|
+
> Updated: YYYY-MM-DD
|
|
199
|
+
|
|
200
|
+
## Doing
|
|
201
|
+
- [ ] Task description -- see 01_requirements/feature.md
|
|
202
|
+
|
|
203
|
+
## Next
|
|
204
|
+
- [ ] Task description
|
|
205
|
+
|
|
206
|
+
## Done
|
|
207
|
+
- [x] [2025-03-03] Task description
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
When user asks "what is next" -- read this file.
|
|
211
|
+
When task is done -- move to Done section with date.
|
|
212
|
+
|
|
213
|
+
## Session Handoff
|
|
214
|
+
|
|
215
|
+
Write 99_progress/handoff.md before /clear or end of session:
|
|
216
|
+
```
|
|
217
|
+
# Handoff
|
|
218
|
+
> Updated: YYYY-MM-DD HH:MM
|
|
219
|
+
|
|
220
|
+
## Done this session
|
|
221
|
+
- Completed X (files: path/a.ts, path/b.py)
|
|
222
|
+
|
|
223
|
+
## State
|
|
224
|
+
- Working: [what functions correctly]
|
|
225
|
+
- Broken: [known issues]
|
|
226
|
+
- In progress: [incomplete work]
|
|
227
|
+
|
|
228
|
+
## Next
|
|
229
|
+
1. Highest priority task
|
|
230
|
+
2. Second priority
|
|
231
|
+
|
|
232
|
+
## Decisions
|
|
233
|
+
- Chose X over Y: reason
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Project Init Protocol
|
|
237
|
+
|
|
238
|
+
When docs/ directory does not exist yet:
|
|
239
|
+
1. Create docs/MAP.md with section headers (no entries)
|
|
240
|
+
2. Create docs/99_progress/todo.md with initial tasks from conversation
|
|
241
|
+
3. Create docs/99_progress/handoff.md with initial state
|
|
242
|
+
4. Everything else is created on-demand when content exists
|