The thoughts/ directory is your project's knowledge base, containing all documentation, research, plans, and decisions. It serves as persistent memory for both human developers and AI agents.
thoughts/
├── architecture/ # System design and decisions
├── tickets/ # Work items and feature requests
├── research/ # Analysis and findings
├── plans/ # Implementation specifications
├── reviews/ # Post-implementation validation
└── archive/ # Outdated documents (excluded from searches)
Purpose: Foundational design documents that guide development.
Common Files:
overview.md- High-level system outlinesystem-architecture.md- Technical infrastructuredomain-model.md- Business logic and featurestesting-strategy.md- Testing approachesdevelopment-workflow.md- Process documentationpersistence.md- Data storage design
Usage:
- Referenced during research phase
- Updated when architecture evolves
- Source of truth for design decisions
Purpose: Track work items, issues, and feature requests.
File Format: [type]-[number].md (e.g., eng-123.md, bug-456.md)
Content Structure:
# [Type]-[Number]: [Title]
## Description
What needs to be done and why
## Requirements
- Specific requirement 1
- Specific requirement 2
## Success Criteria
- How to verify completion
## Context
Any relevant background informationUsage:
- Starting point for research phase
- Defines scope and requirements
- Will sync with external trackers (future)
Purpose: Store findings from codebase and thoughts analysis.
File Format: YYYY-MM-DD_topic.md
Content Structure:
- YAML frontmatter with metadata
- Summary of findings
- Detailed analysis with file references
- Architecture insights
- Historical context from thoughts
- Open questions
Usage:
- Input for planning phase
- Historical reference
- Knowledge accumulation
Purpose: Detailed implementation specifications.
File Format: descriptive-name.md
Content Structure:
- Overview and approach
- Phased implementation steps
- Specific code changes
- Success criteria (automated and manual)
- Testing strategy
- References to ticket and research
Usage:
- Guide for implementation phase
- Track progress with checkmarks
- Source for review phase
Purpose: Post-implementation validation and documentation.
File Format: YYYY-MM-DD_review.md
Content Structure:
- Implementation summary
- Deviations from plan
- Verification results
- Lessons learned
- Recommendations
Usage:
- Closes the loop on tickets
- Documents implementation reality
- Captures improvements for future
Purpose: Store outdated documents that are no longer relevant.
Important Notes:
- Excluded from all searches by AI agents
- Contains misleading or outdated information
- Kept for historical record only
- Subject to future deletion
When to Archive:
- Code has significantly changed
- Architecture has evolved
- Requirements were cancelled
- Information is superseded
Use ISO format: YYYY-MM-DD (e.g., 2025-01-15)
- Use kebab-case:
user-authentication-plan.md - Be specific:
oauth-google-implementation.md - Avoid generic names:
plan1.md
eng-for engineering tasksbug-for bug fixesfeat-for featuresarch-for architecture changes
Research and review documents use YAML frontmatter:
---
date: 2025-01-15T10:30:00Z
researcher: Opus
git_commit: abc123def456
branch: feature/oauth
repository: my-app
topic: "Google OAuth Implementation"
tags: [auth, oauth, security]
status: complete
last_updated: 2025-01-15
last_updated_by: Opus
---- thoughts-locator: Finds relevant documents by topic
- thoughts-analyzer: Extracts insights from specific documents
- Archive exclusion: Never searches archive/ directory
- architecture/ - System design truth
- research/ - Recent analysis
- plans/ and reviews/ - Implementation history
- tickets/ - Upcoming work
archive/- Never searched
- Keep files focused: One topic per document
- Use clear names: Immediately understandable
- Archive regularly: Move outdated docs
- Cross-reference: Link related documents
- Be specific: Include file paths and line numbers
- Date everything: Add timestamps to documents
- Explain decisions: Document the "why"
- Update metadata: Keep frontmatter current
- Regular reviews: Quarterly architecture review
- Archive outdated: Move irrelevant docs
- Update references: Fix broken links
- Consolidate: Merge related documents
- Choose appropriate directory
- Use naming conventions
- Include required frontmatter
- Cross-reference related docs
- Update
last_updatedfields - Add update notes
- Preserve historical context
- Consider archiving if major changes
- Move to
archive/directory - Add archive note to top:
> **ARCHIVED**: [Date] - [Reason] - Update any references
- Consider creating successor document
- Searches all thoughts (except archive)
- Creates new research documents
- References architecture for context
- Reads research and tickets
- May reference previous plans
- Creates new plan documents
- Compares implementation to plan
- Creates review documents
- May trigger architecture updates
tickets/feat-123.md
↓
research/2025-01-15_oauth-research.md
↓
plans/oauth-implementation.md
↓
reviews/2025-01-20_oauth-review.md
architecture/v1/system-architecture.md
↓
tickets/arch-001.md
↓
architecture/v2/system-architecture.md
↓
archive/architecture/v1/
tickets/bug-456.md
↓
research/2025-01-15_memory-leak.md
↓
plans/memory-leak-fix.md
↓
reviews/2025-01-16_memory-fix-review.md
- Start Small: Begin with basic architecture docs
- Build Over Time: Add documents as needed
- Stay Current: Update regularly
- Be Ruthless: Archive aggressively
- Cross-Link: Connect related information