id | title | type | status | domain | owner | last_reviewed | depends_on | implements | covers_tests | code_refs |
---|---|---|---|---|---|---|---|---|---|---|
DOC-8ec9a00 |
Spec Driven Product Design Tool |
doc |
draft |
general |
unassigned |
2025-07-27 |
This project is a specification-driven development tool designed to help product teams collaboratively define, refine, and implement product requirements, use cases, and tests. It leverages GitHub Copilot to generate code based on detailed specifications, ensuring alignment between product intent and implementation.
This tool supports collaborative specification design for product teams, enabling them to define and refine product requirements, use cases, and tests in a shared environment.
specs/
: All feature descriptions, requirements, and design documents.specs/product-overview/
: Foundational product documents (intent, use cases, architecture, UX, data model)specs/tests/
: Test cases described in natural language.planning/
: Centralized TODO management with area-specific planning files.src/
: Application source code for managing specs, tests, and user flows.docs/
: Documentation including Copilot quick reference..github/instructions/
: GitHub Copilot instructions for the project.tools/
: Automation scripts for maintaining spec-driven workflow.infra/
: Deployment and infrastructure scripts.
This project uses a centralized planning system organized in the /planning
folder:
TODO.md
: Dashboard with high-level overview and statusplanning/TODO.feature.md
: Feature implementation tasksplanning/TODO.specs.md
: Specification completeness trackingplanning/TODO.tests.md
: Test coverage and CI/CD testingplanning/TODO.techdebt.md
: Code quality and refactoring tasksplanning/TODO.devops.md
: Infrastructure and deployment tasksplanning/TODO.context.md
: Context management and Copilot integration
Use npm run update-todos
to automatically refresh all planning files from the current codebase and specifications.
- Node.js 18+ and npm
- PostgreSQL 12+ (local or remote)
- VS Code with GitHub Copilot extension
-
Install dependencies:
npm install
-
Configure environment:
cp .env.example .env # Edit .env with your database connection details
-
Set up the database:
npm run db:setup
This creates all tables and populates them with realistic test data.
-
Start development:
- Open this folder in VS Code with GitHub Copilot enabled
- Start with
specs/product-intent.md
and related foundational documents - Run
npm run update-context
to generate all Copilot context files - Use Copilot or Copilot Chat to generate code based on specs
After running npm run db:setup
, you can use these test accounts:
- Alice (Owner):
alice@example.com
/password123
- Bob (Admin):
bob@example.com
/password123
- Carol (Contributor):
carol@example.com
/password123
- David (Viewer):
david@example.com
/password123
Start with foundational product intent and use cases in specs/product-overview/
, then add or evolve feature and test specs in specs/features/
and specs/tests/
. Use these to drive AI-assisted code generation and refinement using Copilot.
This project includes a comprehensive suite of tools that automatically keep GitHub Copilot synchronized with your specifications:
1. Spec Extractor (tools/spec-extractor.js
)
- Aggregates all specifications into
context-for-copilot.js
- Provides raw specification content for direct context injection
2. Quick Reference Updater (tools/update-quick-reference.js
)
- Generates
docs/copilot-quick-reference.md
with data model patterns - Provides a developer cheat sheet for common conventions
3. Copilot Instructions Updater (tools/update-copilot-instructions.js
)
- Updates
.github/instructions/copilot-instructions.md
with comprehensive project guidance - Automatically discovers current specifications and project structure
4. TODO Updater (tools/update-todos.js
)
- Automatically scans specifications and codebase for tasks and TODOs
- Generates organized task lists in
TODO.md
with priority levels - Tracks feature implementation status and missing specifications
5. Update All Context (tools/update-all-context.js
)
- Runs all four tools above in one command
- Ensures complete Copilot context synchronization
Update all context files at once:
npm run update-context
Individual tools:
npm run extract-specs # Generate context-for-copilot.js
npm run update-quick-ref # Update quick reference
npm run update-copilot-instructions # Update comprehensive instructions
npm run update-todos # Generate TODO list from specifications
Via VS Code Tasks:
- Open Command Palette (
Cmd+Shift+P
) - Choose from: "Extract Spec Context", "Update Quick Reference", "Update Copilot Instructions", "Update TODOs"
- Make specification changes in
/specs
directory - Run
npm run update-context
to update all Copilot context files - GitHub Copilot automatically uses updated context for better suggestions
- Implement features following current specifications and patterns
context-for-copilot.js
: Raw specifications for direct contextdocs/copilot-quick-reference.md
: Quick reference patterns and rules.github/instructions/copilot-instructions.md
: Comprehensive project instructionsTODO.md
: Automatically generated task lists from specifications and codebaseTODO.md
: Organized task lists with priority levels
This automated approach ensures GitHub Copilot always has current, comprehensive understanding of your project specifications, data models, API patterns, and architectural decisions.
This project includes intelligent TODO management that automatically scans your specifications and codebase to generate organized task lists:
- Specification Analysis: Scans
/specs/
for missing or incomplete specifications - Feature Status Tracking: Monitors implementation status of defined features
- Technical Debt Detection: Finds TODO/FIXME comments in source code
- Test Coverage Analysis: Identifies missing test implementations
- Priority Classification: Organizes tasks by High/Medium/Low priority
Generate updated TODO list:
npm run update-todos
Include in full context update:
npm run update-context # Includes TODO generation
- π― Current Sprint Goals: High and medium priority tasks
- π Feature Implementation Status: In-progress and planned features
- π§ Technical Debt & Code TODOs: Source code improvements needed
- π§ͺ Test Implementation Status: Missing test coverage
- π Specification Status: Incomplete or missing specifications
The TODO system automatically discovers your project structure and provides actionable task lists to guide development priorities.
This project includes a Technical Architecture Space - a comprehensive mapping system that organizes all architecture-related files, specifications, and resources. This space is defined in .copilot/spaces-mapping.yaml
and helps developers quickly find relevant files for architectural work.
The Technical Architecture Space includes:
- Core Specifications:
specs/product-overview/architecture.md
- Main system architecture documentationspecs/technical/
- Technical implementation specifications
- Infrastructure Files:
infra/
- Infrastructure configuration and deploymentdatabase/
- Database setup and schema management
- Configuration:
- Environment setup, workspace configuration, and deployment settings
Finding Architecture Files:
# View the complete architecture space mapping
cat .copilot/spaces-mapping.yaml | grep -A 50 "technical_architecture:"
Common Architecture Tasks:
- System Design: Start with
specs/product-overview/architecture.md
- Technical Specs: Add new files to
specs/technical/
- Infrastructure Changes: Update files in
infra/
and reference in spaces mapping - Database Changes: Modify
database/
files and update architectural documentation
When making architectural changes:
- Update specifications in the relevant technical spec files
- Update the spaces mapping in
.copilot/spaces-mapping.yaml
if adding new files - Run context updates with
npm run update-context
- Document architectural decisions in the appropriate specification files
The spaces mapping automatically tracks dependencies and relationships between architectural components, ensuring Copilot has comprehensive context for architecture-related development.
- Define or update specifications in
/specs/
before coding - Update context with
npm run update-context
- Use Copilot to generate implementation following specs
- Iterate on specs and code together
context-for-copilot.js
: Keep open for maximum Copilot contextdocs/copilot-quick-reference.md
: Reference for data patterns.copilot/spaces-mapping.yaml
: Architecture space and file relationships- Relevant spec files: The features you're currently implementing
- After any changes to
/specs/
directory - Before starting new feature development
- When onboarding new team members
- As part of your CI/CD pipeline
- After updating the spaces mapping configuration
Define the specification for collaborative spec editing, including roles, permissions, and version control behavior, to guide implementation and testing.
While GenAI may assist in exploring and defining specifications outside of VS Code, this project is designed to pair those specs with GitHub Copilot to generate, refine, and maintain implementation code.
These prompt snippets can be used in Copilot Chat or inserted as comments to guide Copilot:
gencomp β Generate a [React] component for the feature described in `specs/features/[feature-name].md`. Implement [specific functionality].
refspec β Refactor `src/[file].js` based on changes in `specs/features/[feature-name].md`. The new requirement is [description].
gentest β Generate test cases for `src/[file].js` based on the scenarios described in `specs/tests/[test-file].md`.
alignux β Update the UI in `src/[component].js` to follow the flow in `specs/features/[feature-name].md`, focusing on [UX behavior].
explain β Explain how the code in `src/[file].js` implements the requirements in `specs/features/[feature-name].md`.
gendeploy β Generate a deployment script based on `specs/deployment.md`.
These snippets accelerate development and keep implementation in sync with evolving specifications.