| name | dev.speculate |
| description | Always use this skill to provide context on the codebase. Automatically initializes and references the Speculate documentation framework (coding rules, shortcuts, templates, and project specs) to ensure agents understand project structure, development workflows, and coding standards. Use for every task to maintain context and code quality. |
Project Understanding (Speculate Framework)
This skill provides comprehensive project context through the Speculate documentation framework. It ensures agents always have access to coding rules, development workflows, and project structure.
Automatic Initialization
IMPORTANT: Before working on any task, check if the Speculate docs are initialized.
Look for docs/docs-overview.md in the current project.
If it doesn't exist, initialize now using the install script
node ~/.claude/skills/dev.speculate/scripts/install.js
This copies the complete Speculate documentation structure to docs/:
docs/docs-overview.md- Overview of all documentationdocs/development.md- Project development workflows (you'll need to customize this)docs/general/- Cross-project rules, shortcuts, templatesdocs/project/- Project-specific specs, architecture, research
Reading Project Context
Always read docs/docs-overview.md first before starting any task.
The docs-overview provides:
- Navigation to all coding rules (TypeScript, Python, testing, etc.)
- Available shortcuts for common workflows
- Project structure and documentation layout
- Links to project-specific specs and architecture
Path Convention
IMPORTANT: Throughout the Speculate documentation, paths prefixed with @ indicate paths from the project root.
For example:
@docs/general/agent-rules/python-rules.md→docs/general/agent-rules/python-rules.md@shortcut:implement-spec.md→docs/general/agent-shortcuts/shortcut:implement-spec.md
When you see these @docs/... or @shortcut:... references in the documentation, resolve them relative to the project root directory.
Reading Strategy
- Start with overview: Read
docs/docs-overview.mdto understand available documentation - Check development setup: Read
docs/development.mdfor build/test/lint workflows - Load relevant rules: Based on the task, read specific rules from
docs/general/agent-rules/ - Check active specs: Look in
docs/project/specs/active/for related work - Use shortcuts: Reference shortcuts from
docs/general/agent-shortcuts/for structured workflows
Key Documentation Files
After initialization, these files are available:
Essential Docs:
docs/docs-overview.md- Start here! Overview of all documentationdocs/development.md- Project setup, build, test, lint workflows
General Rules (in docs/general/agent-rules/):
general-coding-rules.md- Universal coding standardsgeneral-testing-rules.md- Testing best practicestypescript-rules.md- TypeScript-specific rulespython-rules.md- Python-specific rulesconvex-rules.md- Convex database rules- And more language/framework specific rules
Shortcuts (in docs/general/agent-shortcuts/):
shortcut:new-plan-spec.md- Create feature planning documentshortcut:implement-spec.md- Implement from specificationshortcut:commit-code.md- Pre-commit validation workflowshortcut:create-pr-*.md- Pull request workflows- And more task-specific shortcuts
Project Docs (in docs/project/):
specs/active/- Current feature specificationsspecs/done/- Completed specs (historical reference)architecture/- System design documentationflows/- System flows documentationresearch/- Technical research notes
A note on flows. A flow is a like a mini architecture doc that describes the lifecycle of a behavior in the code base. For example, bootstraping a system could be a flow. The lifecylce of a particular API request could be another. Flows are meant to help llms and humans quickly recapture context on a particular part of the code.
Updating Documentation
To sync with the latest Speculate documentation:
node ~/.claude/skills/dev.speculate/scripts/update.js
This updates the docs/general/ folder while preserving:
- Your
docs/development.md - Your project-specific docs in
docs/project/ - Any local customizations
Workflow Integration
Before Every Task
- Check if docs are initialized (run install.js if needed)
- Read
docs/docs-overview.mdfor context - Read
docs/development.mdfor build/test workflows - Identify relevant rules and shortcuts for the task
During Development
- Follow coding rules from
docs/general/agent-rules/ - Use shortcuts for structured workflows (planning, implementation, commits, PRs)
- Create specs in
docs/project/specs/active/for new features - Document architecture decisions in
docs/project/architecture/ - Document new flows in
docs/project/flows/
For Spec-Driven Development
Use the structured workflow:
- Plan: Use
@shortcut:new-plan-spec.mdto create a feature plan - Design: Use
@shortcut:new-implementation-spec.mdfor implementation details - Implement: Follow
@shortcut:implement-spec.mdwith TDD approach - Validate: Use
@shortcut:precommit-process.mdbefore committing - Commit: Use
@shortcut:commit-code.mdfor structured commits - PR: Use
@shortcut:create-pr-*.mdfor pull requests
Customizing for Your Project
After initialization:
Edit
docs/development.md: Update with your project's specific:- Build commands
- Test commands
- Lint/format commands
- Deployment workflows
Add project specs: Create specifications in
docs/project/specs/active/Document architecture: Add design docs to
docs/project/architecture/Research notes: Store technical investigations in
docs/project/research/
Benefits
This framework ensures:
- Consistent quality - Agents follow defined coding standards
- Structured workflows - Clear processes for planning, implementing, validating
- Project context - Agents understand your codebase and workflows
- Sustainable code - Avoid "slop code" through spec-driven development
- Knowledge retention - Specs and architecture docs preserve decisions
Notes
- The install/update scripts preserve your customizations in
docs/development.mdanddocs/project/ - If you don't have a
docs/development.md, create one from the sample template - The
docs/general/folder gets updated when you run update.js