telo3-ai 5.0.7 → 6.2.0
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 +32 -791
- package/SKILL.md +36 -657
- package/bootstrap/TELO3.md +17 -0
- package/cli.js +223 -42
- package/hooks/inject-contract.mjs +23 -0
- package/hooks/session-start.example.json +15 -0
- package/index.js +48 -14
- package/package.json +32 -69
- package/references/accessibility-quality.md +92 -272
- package/references/ai-behavior.md +70 -332
- package/references/anti-slop.md +71 -0
- package/references/document-specification.md +110 -419
- package/references/legal-compliance.md +90 -395
- package/references/performance-quality.md +100 -351
- package/references/privacy-compliance.md +88 -464
- package/references/project-audit.md +79 -440
- package/references/security-quality.md +68 -220
- package/references/seo-quality.md +83 -339
- package/references/smart-skill-delegation.md +73 -419
- package/references/token-optimization.md +83 -450
- package/references/ui-quality.md +106 -481
- package/references/workflow.md +91 -447
- package/scripts/postinstall.mjs +27 -0
- package/src/activate.js +159 -0
- package/src/context.js +72 -0
- package/src/find-context.js +41 -0
- package/src/init.js +38 -0
- package/src/install.js +128 -0
- package/src/paths.js +20 -0
- package/src/status.js +30 -0
- package/src/tokens.js +10 -0
- package/src/validate.js +220 -0
- package/src/version.js +12 -0
- package/templates/architecture.md +17 -398
- package/templates/design.md +22 -631
- package/templates/memory.md +13 -351
- package/templates/prd.md +15 -295
- package/templates/rules.md +20 -600
- package/templates/tasks.md +10 -210
- package/AI-CONTEXT.md +0 -272
- package/ONBOARDING-SKILL.md +0 -738
- package/SKILL-METADATA.json +0 -237
- package/scripts/init-project-context.sh +0 -139
- package/scripts/validate-project-context.sh +0 -164
- package/skills/telo3/SKILL.md +0 -315
- package/skills/telo3-context/SKILL.md +0 -272
- package/skills/telo3-onboarding/SKILL.md +0 -738
|
@@ -1,425 +1,116 @@
|
|
|
1
1
|
# Document Specification
|
|
2
|
+
**Load when:** creating, updating, validating, or locating the six project-context documents.
|
|
3
|
+
|
|
4
|
+
Six documents, non-overlapping responsibilities. The validator (`src/validate.js`) checks required sections by case-insensitive substring match against markdown headings: each required key must appear inside some heading; extra words and any casing are allowed.
|
|
5
|
+
Example: heading "## Recently Completed Work" satisfies key "recently completed work"; "## Security Practices" satisfies "security". Run `telo3 validate [dir] [--json] [--strict]` after edits.
|
|
6
|
+
|
|
7
|
+
## Ownership
|
|
8
|
+
|
|
9
|
+
| Doc | Single responsibility | Temporal scope |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| prd.md | WHAT the product is and WHY it exists | Stable, strategic |
|
|
12
|
+
| architecture.md | HOW the system is built | Stable with evolution |
|
|
13
|
+
| rules.md | HOW to engineer the project | Stable, principles-based |
|
|
14
|
+
| design.md | HOW the product looks and behaves | Stable with refinement |
|
|
15
|
+
| tasks.md | WHAT implementation work remains | Dynamic, short-term |
|
|
16
|
+
| memory.md | CURRENT STATE and continuity | Dynamic |
|
|
17
|
+
|
|
18
|
+
Information flows prd → architecture → rules → design → tasks → memory. Reference upstream docs; don't restate them.
|
|
19
|
+
|
|
20
|
+
## Required Sections and Per-Document Rules
|
|
21
|
+
|
|
22
|
+
### prd.md
|
|
23
|
+
- Required headings: Project Overview; Problem Statement; Target Users; Goals; Functional Requirements; Success Criteria.
|
|
24
|
+
- Holds: vision/strategy; users and use cases; functional requirements; goals and success criteria; scope boundaries (goals/non-goals); product decisions and rationale.
|
|
25
|
+
- Excludes: implementation (architecture.md); coding standards (rules.md); visual design (design.md); status (tasks.md, memory.md).
|
|
26
|
+
- Update when: requirements change/clarify; scope changes; product decisions; success criteria defined/changed; new user insights.
|
|
27
|
+
- Avoid: inventing requirements without user input; technical detail; temporary notes (memory.md); duplicating architecture/design.
|
|
28
|
+
|
|
29
|
+
### architecture.md
|
|
30
|
+
- Required headings: Architecture Overview; Technology Stack; Project Structure; Architectural Decisions.
|
|
31
|
+
- Holds: stack and dependencies; system structure; data models/relationships; API architecture/conventions; auth flow; external integrations; deployment/infrastructure; decisions and rationale.
|
|
32
|
+
- Excludes: requirements (prd.md); coding standards (rules.md); visual design (design.md); task lists (tasks.md); temporary notes (memory.md).
|
|
33
|
+
- Update when: stack changes; new external services; significant schema changes; API changes; deployment changes; major refactoring; architectural decisions.
|
|
34
|
+
- Avoid: documenting what should exist instead of what does; implementation TODOs (tasks.md); duplicating package-file dependency lists (reference them); coding standards (rules.md).
|
|
35
|
+
|
|
36
|
+
### rules.md
|
|
37
|
+
- Required headings: Core Principles; Security; Testing; Validation.
|
|
38
|
+
- Holds: coding standards/conventions; file organization; security practices; privacy guidelines; testing requirements; git practices; performance guidelines; accessibility standards; compliance awareness; refactoring principles.
|
|
39
|
+
- Excludes: requirements (prd.md); architecture (architecture.md); visual design (design.md); tasks (tasks.md); current violations/debt (memory.md).
|
|
40
|
+
- Update when: standards established/changed; security practices evolve; new compliance considerations; team quality agreements; accessibility/performance standards change.
|
|
41
|
+
- Avoid: rules nobody follows; over-prescription blocking judgment; duplicating conventions documented elsewhere; implementation-specific notes.
|
|
42
|
+
|
|
43
|
+
### design.md
|
|
44
|
+
- Required headings: Design Philosophy; Colors; Typography; Components; Accessibility.
|
|
45
|
+
- Holds: philosophy/principles; color system; typography; spacing/layout; component specs; interaction patterns; accessibility guidelines; responsive behavior; animation/motion; anti-patterns.
|
|
46
|
+
- Excludes: features (prd.md); implementation (architecture.md); code organization (rules.md); design tasks (tasks.md); current inconsistencies (memory.md).
|
|
47
|
+
- Update when: brand changes; components standardized; tokens modified; accessibility requirements change; breakpoints change; new anti-patterns identified.
|
|
48
|
+
- Avoid: every component variant; implementation code (reference components); one-off designs; style guide without UX guidance.
|
|
49
|
+
|
|
50
|
+
### tasks.md
|
|
51
|
+
- Required headings: Current Sprint; Backlog; Completed Recently.
|
|
52
|
+
- Holds: feature backlog; bug list; technical debt; implementation phases; work in progress; recently completed work; blocked tasks.
|
|
53
|
+
- Excludes: requirements (prd.md); architecture (architecture.md); standards (rules.md); design system (design.md); decisions/context (memory.md).
|
|
54
|
+
- Update when: meaningful work completed; backlog additions; reprioritization; bugs found/fixed; debt identified/addressed.
|
|
55
|
+
- Avoid: tracking every tiny change; keeping completed tasks forever (archive); decision rationale (memory.md); duplicating an external bug tracker.
|
|
56
|
+
|
|
57
|
+
### memory.md
|
|
58
|
+
- Required headings: Current State; Recently Completed Work; Important Decisions; Known Issues.
|
|
59
|
+
- Holds: current status; recent work summaries; decisions that must persist; known bugs/limitations; temporary workarounds; debt context; discoveries; pending questions; project preferences; security/privacy/compliance considerations.
|
|
60
|
+
- Excludes: stable requirements/architecture/rules/design (their docs); detailed task breakdowns (tasks.md); conversation transcripts; secrets/credentials.
|
|
61
|
+
- Update when: significant work done; important decisions; workarounds introduced; bugs/limitations discovered; architecture changes in progress; important context emerges.
|
|
62
|
+
- Avoid: conversation-log format; stable info belonging elsewhere; secrets/sensitive data; outdated entries kept indefinitely; long prose — keep concise and scannable.
|
|
63
|
+
|
|
64
|
+
## Global Anti-Patterns
|
|
65
|
+
|
|
66
|
+
- memory.md is NOT a conversation transcript.
|
|
67
|
+
- No duplication across docs: choose the primary home by responsibility and reference it; brief context summaries are acceptable (architecture.md owns "database is PostgreSQL"; rules.md says "see architecture.md; all queries parameterized").
|
|
68
|
+
- No secrets or credentials in any context doc — record that a secret is needed, never its value.
|
|
69
|
+
- Mark unknowns as [UNKNOWN] or [TODO: clarify]; never invent requirements or facts.
|
|
70
|
+
|
|
71
|
+
## Location
|
|
72
|
+
|
|
73
|
+
All six files share one location; any of:
|
|
74
|
+
- `project-context/` — dedicated directory.
|
|
75
|
+
- `docs/project-context/` — inside general docs.
|
|
76
|
+
- Project root — simple projects.
|
|
77
|
+
|
|
78
|
+
Existing docs: don't replace unnecessarily; complement with structure; consolidate only for clear benefit. Reference them, e.g.:
|
|
2
79
|
|
|
3
|
-
> Detailed specifications for each of the six core project context documents.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
The project context system uses six distinct documents with non-overlapping responsibilities:
|
|
10
|
-
|
|
11
|
-
| Document | Focus | Temporal Scope |
|
|
12
|
-
|----------|-------|----------------|
|
|
13
|
-
| **prd.md** | Requirements & Product | Stable, strategic |
|
|
14
|
-
| **architecture.md** | Technical Structure | Stable with evolution |
|
|
15
|
-
| **rules.md** | Engineering Standards | Stable, principles-based |
|
|
16
|
-
| **design.md** | Visual & UX Patterns | Stable with refinement |
|
|
17
|
-
| **tasks.md** | Implementation Work | Dynamic, short-term |
|
|
18
|
-
| **memory.md** | Current State & Context | Dynamic, continuity |
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## prd.md — Product Requirements Document
|
|
23
|
-
|
|
24
|
-
### Purpose
|
|
25
|
-
Define **WHAT** the product is and **WHY** it exists.
|
|
26
|
-
|
|
27
|
-
### Responsibilities
|
|
28
|
-
- Product vision and strategy
|
|
29
|
-
- Target users and use cases
|
|
30
|
-
- Functional requirements
|
|
31
|
-
- Goals and success criteria
|
|
32
|
-
- Scope boundaries (goals and non-goals)
|
|
33
|
-
- Product decisions and rationale
|
|
34
|
-
|
|
35
|
-
### What NOT to Include
|
|
36
|
-
- ❌ How the system is implemented (that's architecture.md)
|
|
37
|
-
- ❌ Coding standards (that's rules.md)
|
|
38
|
-
- ❌ Visual design (that's design.md)
|
|
39
|
-
- ❌ Current implementation status (that's tasks.md and memory.md)
|
|
40
|
-
|
|
41
|
-
### When to Update
|
|
42
|
-
- Requirements change or are clarified
|
|
43
|
-
- Scope changes (new goals or non-goals)
|
|
44
|
-
- Important product decisions are made
|
|
45
|
-
- Success criteria are defined or changed
|
|
46
|
-
- New user insights emerge
|
|
47
|
-
|
|
48
|
-
### Anti-Patterns
|
|
49
|
-
- Inventing requirements without user input
|
|
50
|
-
- Documenting technical implementation details
|
|
51
|
-
- Including temporary notes that belong in memory.md
|
|
52
|
-
- Duplicating architecture or design information
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## architecture.md — Architecture Documentation
|
|
57
|
-
|
|
58
|
-
### Purpose
|
|
59
|
-
Define **HOW** the system works technically.
|
|
60
|
-
|
|
61
|
-
### Responsibilities
|
|
62
|
-
- Technology stack and dependencies
|
|
63
|
-
- System structure and organization
|
|
64
|
-
- Data models and relationships
|
|
65
|
-
- API architecture and conventions
|
|
66
|
-
- Authentication and authorization flow
|
|
67
|
-
- External service integrations
|
|
68
|
-
- Deployment and infrastructure
|
|
69
|
-
- Architectural decisions and rationale
|
|
70
|
-
|
|
71
|
-
### What NOT to Include
|
|
72
|
-
- ❌ Product requirements (that's prd.md)
|
|
73
|
-
- ❌ Coding standards (that's rules.md)
|
|
74
|
-
- ❌ Visual design system (that's design.md)
|
|
75
|
-
- ❌ Implementation task list (that's tasks.md)
|
|
76
|
-
- ❌ Temporary implementation notes (that's memory.md)
|
|
77
|
-
|
|
78
|
-
### When to Update
|
|
79
|
-
- Technology stack changes
|
|
80
|
-
- New external services are integrated
|
|
81
|
-
- Database schema changes significantly
|
|
82
|
-
- API structure changes
|
|
83
|
-
- Deployment process changes
|
|
84
|
-
- Major architectural refactoring occurs
|
|
85
|
-
- Architectural decisions are made
|
|
86
|
-
|
|
87
|
-
### Anti-Patterns
|
|
88
|
-
- Documenting what should exist rather than what does exist
|
|
89
|
-
- Including implementation TODOs (use tasks.md)
|
|
90
|
-
- Duplicating dependency lists from package files (reference them instead)
|
|
91
|
-
- Documenting coding standards (use rules.md)
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## rules.md — Engineering Rules
|
|
96
|
-
|
|
97
|
-
### Purpose
|
|
98
|
-
Define **HOW** the project must be engineered.
|
|
99
|
-
|
|
100
|
-
### Responsibilities
|
|
101
|
-
- Coding standards and conventions
|
|
102
|
-
- File organization patterns
|
|
103
|
-
- Security practices
|
|
104
|
-
- Privacy guidelines
|
|
105
|
-
- Testing requirements
|
|
106
|
-
- Git and version control practices
|
|
107
|
-
- Performance guidelines
|
|
108
|
-
- Accessibility standards
|
|
109
|
-
- Compliance awareness
|
|
110
|
-
- Refactoring principles
|
|
111
|
-
|
|
112
|
-
### What NOT to Include
|
|
113
|
-
- ❌ Product requirements (that's prd.md)
|
|
114
|
-
- ❌ System architecture (that's architecture.md)
|
|
115
|
-
- ❌ Visual design standards (that's design.md)
|
|
116
|
-
- ❌ Specific implementation tasks (that's tasks.md)
|
|
117
|
-
- ❌ Current violations or technical debt (that's memory.md)
|
|
118
|
-
|
|
119
|
-
### When to Update
|
|
120
|
-
- Engineering standards are established or changed
|
|
121
|
-
- Security practices evolve
|
|
122
|
-
- New compliance considerations are identified
|
|
123
|
-
- Team agreements about code quality are made
|
|
124
|
-
- Accessibility or performance standards change
|
|
125
|
-
|
|
126
|
-
### Anti-Patterns
|
|
127
|
-
- Writing rules that are not actually followed
|
|
128
|
-
- Creating overly prescriptive rules that prevent good judgment
|
|
129
|
-
- Duplicating technology-specific conventions that are documented elsewhere
|
|
130
|
-
- Including implementation-specific notes
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## design.md — Design System
|
|
135
|
-
|
|
136
|
-
### Purpose
|
|
137
|
-
Define **HOW** the product looks and behaves.
|
|
138
|
-
|
|
139
|
-
### Responsibilities
|
|
140
|
-
- Design philosophy and principles
|
|
141
|
-
- Color system
|
|
142
|
-
- Typography
|
|
143
|
-
- Spacing and layout
|
|
144
|
-
- Component specifications
|
|
145
|
-
- Interaction patterns
|
|
146
|
-
- Accessibility guidelines
|
|
147
|
-
- Responsive behavior
|
|
148
|
-
- Animation and motion
|
|
149
|
-
- Anti-patterns to avoid
|
|
150
|
-
|
|
151
|
-
### What NOT to Include
|
|
152
|
-
- ❌ Product features (that's prd.md)
|
|
153
|
-
- ❌ Technical implementation (that's architecture.md)
|
|
154
|
-
- ❌ Code organization (that's rules.md)
|
|
155
|
-
- ❌ Design tasks (that's tasks.md)
|
|
156
|
-
- ❌ Current design inconsistencies (that's memory.md)
|
|
157
|
-
|
|
158
|
-
### When to Update
|
|
159
|
-
- Brand identity changes
|
|
160
|
-
- New components are standardized
|
|
161
|
-
- Design tokens are modified
|
|
162
|
-
- Accessibility requirements change
|
|
163
|
-
- Responsive breakpoints change
|
|
164
|
-
- Design anti-patterns are identified
|
|
165
|
-
|
|
166
|
-
### Anti-Patterns
|
|
167
|
-
- Documenting every possible component variant
|
|
168
|
-
- Including implementation code (reference components instead)
|
|
169
|
-
- Documenting one-off designs that aren't patterns
|
|
170
|
-
- Making it a visual style guide without UX guidance
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## tasks.md — Tasks & Implementation Backlog
|
|
175
|
-
|
|
176
|
-
### Purpose
|
|
177
|
-
Track **WHAT** implementation work remains.
|
|
178
|
-
|
|
179
|
-
### Responsibilities
|
|
180
|
-
- Feature backlog
|
|
181
|
-
- Bug list
|
|
182
|
-
- Technical debt tracking
|
|
183
|
-
- Implementation phases
|
|
184
|
-
- Active work in progress
|
|
185
|
-
- Recently completed work
|
|
186
|
-
- Blocked tasks
|
|
187
|
-
|
|
188
|
-
### What NOT to Include
|
|
189
|
-
- ❌ Product requirements (that's prd.md)
|
|
190
|
-
- ❌ Architectural design (that's architecture.md)
|
|
191
|
-
- ❌ Coding standards (that's rules.md)
|
|
192
|
-
- ❌ Design system (that's design.md)
|
|
193
|
-
- ❌ Decisions and context (that's memory.md)
|
|
194
|
-
|
|
195
|
-
### When to Update
|
|
196
|
-
- After completing meaningful work
|
|
197
|
-
- When adding new features to the backlog
|
|
198
|
-
- When prioritization changes
|
|
199
|
-
- When bugs are discovered or fixed
|
|
200
|
-
- When technical debt is identified or addressed
|
|
201
|
-
|
|
202
|
-
### Anti-Patterns
|
|
203
|
-
- Tracking every tiny code change
|
|
204
|
-
- Keeping completed tasks indefinitely (archive them)
|
|
205
|
-
- Including decision rationale (use memory.md)
|
|
206
|
-
- Duplicating bug tracker content
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## memory.md — Project Memory
|
|
211
|
-
|
|
212
|
-
### Purpose
|
|
213
|
-
Track **CURRENT STATE** and important continuity information.
|
|
214
|
-
|
|
215
|
-
### Responsibilities
|
|
216
|
-
- Current project status
|
|
217
|
-
- Recently completed work (summary)
|
|
218
|
-
- Important decisions that must be preserved
|
|
219
|
-
- Known bugs and limitations
|
|
220
|
-
- Temporary workarounds
|
|
221
|
-
- Technical debt context
|
|
222
|
-
- Important discoveries
|
|
223
|
-
- Pending questions
|
|
224
|
-
- Project-specific preferences
|
|
225
|
-
- Security/privacy/compliance considerations
|
|
226
|
-
|
|
227
|
-
### What NOT to Include
|
|
228
|
-
- ❌ Stable product requirements (that's prd.md)
|
|
229
|
-
- ❌ Stable architecture (that's architecture.md)
|
|
230
|
-
- ❌ Established engineering rules (that's rules.md)
|
|
231
|
-
- ❌ Established design patterns (that's design.md)
|
|
232
|
-
- ❌ Detailed task breakdowns (that's tasks.md)
|
|
233
|
-
- ❌ Conversation transcripts
|
|
234
|
-
- ❌ Secrets or credentials
|
|
235
|
-
|
|
236
|
-
### When to Update
|
|
237
|
-
- After significant implementation work
|
|
238
|
-
- When important decisions are made
|
|
239
|
-
- When temporary workarounds are introduced
|
|
240
|
-
- When new bugs or limitations are discovered
|
|
241
|
-
- When architectural changes are in progress
|
|
242
|
-
- When important context emerges
|
|
243
|
-
|
|
244
|
-
### Anti-Patterns
|
|
245
|
-
- Turning it into a conversation log
|
|
246
|
-
- Documenting stable information that belongs elsewhere
|
|
247
|
-
- Including secrets or sensitive data
|
|
248
|
-
- Keeping outdated information indefinitely
|
|
249
|
-
- Writing novels (keep it concise and scannable)
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
## Document Relationships
|
|
254
|
-
|
|
255
|
-
### Information Flow
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
Product Strategy (prd.md)
|
|
259
|
-
↓
|
|
260
|
-
Technical Design (architecture.md)
|
|
261
|
-
↓
|
|
262
|
-
Engineering Standards (rules.md)
|
|
263
|
-
↓
|
|
264
|
-
Visual Design (design.md)
|
|
265
|
-
↓
|
|
266
|
-
Implementation (tasks.md)
|
|
267
|
-
↓
|
|
268
|
-
Current State (memory.md)
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### Cross-References
|
|
272
|
-
|
|
273
|
-
Documents should reference each other when necessary:
|
|
274
|
-
|
|
275
|
-
- **prd.md** might reference architecture.md for technical constraints
|
|
276
|
-
- **architecture.md** might reference prd.md for product requirements
|
|
277
|
-
- **rules.md** might reference architecture.md for technology-specific standards
|
|
278
|
-
- **design.md** might reference rules.md for accessibility standards
|
|
279
|
-
- **tasks.md** should reference all documents for implementation context
|
|
280
|
-
- **memory.md** might reference any document for context
|
|
281
|
-
|
|
282
|
-
### Avoiding Duplication
|
|
283
|
-
|
|
284
|
-
When information logically belongs in multiple documents:
|
|
285
|
-
|
|
286
|
-
1. **Choose the primary home** based on responsibility
|
|
287
|
-
2. **Reference, don't duplicate** — Link to the primary source
|
|
288
|
-
3. **Exception:** Brief summaries are acceptable for context
|
|
289
|
-
|
|
290
|
-
Example:
|
|
291
|
-
- **Primary:** architecture.md documents the database is PostgreSQL
|
|
292
|
-
- **Reference:** rules.md might say "See architecture.md for database choice; all queries must use parameterized statements"
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## Document Lifecycle
|
|
297
|
-
|
|
298
|
-
### Creation
|
|
299
|
-
1. Start with templates
|
|
300
|
-
2. Inspect actual project implementation
|
|
301
|
-
3. Fill in known information
|
|
302
|
-
4. Mark unknowns explicitly
|
|
303
|
-
5. Never invent information
|
|
304
|
-
|
|
305
|
-
### Maintenance
|
|
306
|
-
1. Update after meaningful changes
|
|
307
|
-
2. Keep information current
|
|
308
|
-
3. Remove outdated information
|
|
309
|
-
4. Archive historical information when appropriate
|
|
310
|
-
5. Maintain clear document history
|
|
311
|
-
|
|
312
|
-
### Archival
|
|
313
|
-
1. Move completed tasks to "Recently Completed" or remove
|
|
314
|
-
2. Move superseded decisions to "Historical Decisions" or note status
|
|
315
|
-
3. Remove temporary workarounds after they're fixed
|
|
316
|
-
4. Keep information needed for understanding current state
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
320
|
-
## Document Location
|
|
321
|
-
|
|
322
|
-
### Recommended Locations
|
|
323
|
-
|
|
324
|
-
**Option 1: Dedicated directory**
|
|
325
|
-
```
|
|
326
|
-
project-context/
|
|
327
|
-
├── prd.md
|
|
328
|
-
├── architecture.md
|
|
329
|
-
├── rules.md
|
|
330
|
-
├── design.md
|
|
331
|
-
├── tasks.md
|
|
332
|
-
└── memory.md
|
|
333
80
|
```
|
|
334
|
-
|
|
335
|
-
**Option 2: General documentation directory**
|
|
336
|
-
```
|
|
337
|
-
docs/project-context/
|
|
338
|
-
├── prd.md
|
|
339
|
-
├── architecture.md
|
|
340
|
-
├── rules.md
|
|
341
|
-
├── design.md
|
|
342
|
-
├── tasks.md
|
|
343
|
-
└── memory.md
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
**Option 3: Project root** (for simple projects)
|
|
347
|
-
```
|
|
348
|
-
PROJECT_ROOT/
|
|
349
|
-
├── prd.md
|
|
350
|
-
├── architecture.md
|
|
351
|
-
├── rules.md
|
|
352
|
-
├── design.md
|
|
353
|
-
├── tasks.md
|
|
354
|
-
└── memory.md
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
### Integration with Existing Documentation
|
|
358
|
-
|
|
359
|
-
If the project already has documentation:
|
|
360
|
-
- **Don't replace** existing docs unnecessarily
|
|
361
|
-
- **Reference** existing docs from context documents
|
|
362
|
-
- **Complement** existing docs with structure
|
|
363
|
-
- **Consolidate** only if there's clear benefit
|
|
364
|
-
|
|
365
|
-
Example integration in architecture.md:
|
|
366
|
-
```markdown
|
|
367
81
|
## Additional Documentation
|
|
368
|
-
|
|
369
|
-
-
|
|
370
|
-
-
|
|
371
|
-
- Deployment guide: See `DEPLOY.md`
|
|
82
|
+
- API docs: /docs/api/README.md
|
|
83
|
+
- Schema: /docs/schema.md
|
|
84
|
+
- Deploy guide: DEPLOY.md
|
|
372
85
|
```
|
|
373
86
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
-
|
|
393
|
-
|
|
394
|
-
-
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
✅ New developers can onboard from the documents
|
|
405
|
-
✅ Decisions are documented and preserved
|
|
406
|
-
✅ Architectural drift is prevented
|
|
407
|
-
✅ Design consistency is maintained
|
|
408
|
-
✅ Important context is not lost
|
|
409
|
-
✅ Documentation stays synchronized with code
|
|
410
|
-
✅ Team members reference the docs regularly
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
|
|
414
|
-
## Summary
|
|
415
|
-
|
|
416
|
-
| Document | Question | Update Frequency |
|
|
417
|
-
|----------|----------|------------------|
|
|
418
|
-
| prd.md | What & Why? | Quarterly or when requirements change |
|
|
419
|
-
| architecture.md | How is it built? | When architecture changes |
|
|
420
|
-
| rules.md | How should we code? | When standards evolve |
|
|
421
|
-
| design.md | How should it look? | When design patterns change |
|
|
422
|
-
| tasks.md | What needs to be done? | Weekly or after significant work |
|
|
423
|
-
| memory.md | What's the current state? | After important work or decisions |
|
|
424
|
-
|
|
425
|
-
**Remember:** These are living documents. Keep them current, concise, and useful.
|
|
87
|
+
## Templates and Lifecycle
|
|
88
|
+
|
|
89
|
+
- Templates are lean starting skeletons (~50–80 lines), not 400-line questionnaires. Grow sections only as the project needs.
|
|
90
|
+
- Create: start from template → inspect actual implementation → fill known information → mark unknowns → never invent.
|
|
91
|
+
- Maintain: update after meaningful changes; keep current; remove stale info; archive history when appropriate; keep docs synchronized with code.
|
|
92
|
+
- Archive: completed tasks → "Completed Recently" or remove; superseded decisions → historical section or status note; remove workarounds once fixed; keep what explains current state.
|
|
93
|
+
|
|
94
|
+
## Update Cadence
|
|
95
|
+
|
|
96
|
+
| Doc | Typical frequency |
|
|
97
|
+
|---|---|
|
|
98
|
+
| prd.md | Quarterly or when requirements change |
|
|
99
|
+
| architecture.md | When architecture changes |
|
|
100
|
+
| rules.md | When standards evolve |
|
|
101
|
+
| design.md | When design patterns change |
|
|
102
|
+
| tasks.md | Weekly or after significant work |
|
|
103
|
+
| memory.md | After important work or decisions |
|
|
104
|
+
|
|
105
|
+
## Cross-References and Quality
|
|
106
|
+
|
|
107
|
+
- Cross-reference when needed: prd↔architecture (constraints/requirements); rules→architecture (tech-specific standards); design→rules (accessibility); tasks→any doc; memory→any doc.
|
|
108
|
+
- Each doc must be: clear, current (matches code), concise, complete for its responsibility, consistent with other docs, actionable.
|
|
109
|
+
- Common failures:
|
|
110
|
+
- Stale info — doc says X, code does Y.
|
|
111
|
+
- Missing info — key decisions undocumented.
|
|
112
|
+
- Duplicated info — same content in multiple docs.
|
|
113
|
+
- Wrong doc — info outside its responsibility.
|
|
114
|
+
- Too detailed — every implementation detail captured.
|
|
115
|
+
- Too vague — no useful guidance.
|
|
116
|
+
- System works when: agents understand the project before coding; newcomers can onboard from docs; decisions persist; architectural drift and design inconsistency are prevented; context is never lost; docs stay synchronized with code.
|