Initialize project with constitution, standards, and docs structure for AI-augmented development
Scaffolds AI-augmented development infrastructure with project constitution and standards.
/plugin marketplace add FortiumPartners/ensemble/plugin install ensemble-core@ensembleensemble/Usage: Invoke
/init-projectfrom the project root to scaffold AI-augmented development infrastructure. Optional hints: "minimal" (skip prompts, use defaults), "force" (overwrite existing)
$ARGUMENTS
Examples:
docs/standards/constitution.md with project guardrailsdocs/PRD/ and docs/TRD/ directories.gitignore for state files/create-prd, /create-trd, and /implement-trd workflowsCheck existing structures
docs/standards/constitution.md exists and not "force" mode: Report existing setup, offer to update.specify/ exists: Detect speckit installation, offer migration.agent-os/ exists: Detect agent-os patterns, incorporateDetect technology stack Scan project files to auto-detect:
| File Pattern | Detection |
|---|---|
package.json | Node.js, extract framework from dependencies |
Cargo.toml | Rust |
go.mod | Go |
requirements.txt, pyproject.toml | Python |
Gemfile | Ruby |
*.csproj, *.sln | .NET |
mix.exs | Elixir |
composer.json | PHP |
Extract from package.json/similar:
Detect existing testing setup
tests/, __tests__/, spec/, test/jest.config.*, vitest.config.*, pytest.ini, .rspecUse AskUserQuestion tool to gather:
Project Identity
Questions:
- "What is the project name?" (default: directory name)
- "Brief project description?" (1-2 sentences)
Development Methodology
Question: "What development methodology should be enforced?"
Options:
- "TDD (Test-Driven Development)" - Tests before code, RED-GREEN-REFACTOR
- "Flexible" - No strict ordering, trust developer judgment
- "Characterization-first" - For brownfield, add tests without changing code
Quality Gates
Question: "What test coverage targets?"
Options:
- "High (80% unit, 70% integration)" - Recommended for production systems
- "Standard (60% unit, 50% integration)" - Balanced coverage
- "Minimal (40% unit)" - Prototypes and MVPs
- "Custom" - Specify your own targets
Approval Requirements
Question: "What changes should require explicit approval?"
MultiSelect: true
Options:
- "Architecture changes" (default: selected)
- "New dependencies" (default: selected)
- "Database schema changes" (default: selected)
- "Breaking API changes" (default: selected)
- "Production deployments" (default: selected)
- "Security-sensitive code"
Create docs/standards/constitution.md with the following structure:
# Project Constitution: [Project Name]
> This document defines the non-negotiable standards, guardrails, and quality gates for AI-augmented development.
> Generated by `/init-project` on [date]. Edit to customize.
---
## 1. Core Principles
### Development Methodology: [Selected]
[Description based on selection]
### Non-Negotiable Rules
1. **No secrets in code** - All credentials via environment variables or secrets manager
2. **Input validation required** - Validate all external input at system boundaries
3. **Tests accompany features** - No feature is complete without tests
4. [Additional user-defined principles]
---
## 2. Tech Stack
### Languages & Frameworks
- **Primary Language:** [detected]
- **Framework:** [detected]
- **Runtime:** [detected version if available]
### Testing
- **Unit Testing:** [detected or specified]
- **Integration Testing:** [detected or specified]
- **E2E Testing:** [detected or specified]
### Build & Deploy
- **Build Tool:** [detected]
- **CI/CD:** [if detected]
- **Deployment Target:** [if detected]
---
## 3. Quality Gates (Definition of Done)
### Test Coverage Targets
- Unit Tests: ≥[X]%
- Integration Tests: ≥[Y]%
### Code Quality
- [ ] All acceptance criteria met
- [ ] Test coverage targets satisfied
- [ ] No critical/high security vulnerabilities
- [ ] Code review approved
- [ ] Documentation updated
- [ ] No linting errors
### Security Requirements
- [ ] Input validation at all entry points
- [ ] No hardcoded secrets or credentials
- [ ] Authentication/authorization verified (where applicable)
- [ ] OWASP Top 10 considerations addressed
---
## 4. Approval Requirements
The following changes require explicit user approval before implementation:
### Always Require Approval
[List based on user selections]
### No Approval Needed
- Reading files or searching code
- Running tests (non-destructive)
- Creating new files in appropriate locations
- Adding tests or documentation
- Development server operations
- Git operations (status, diff, log, add, commit)
---
## 5. Agent Delegation Standards
### Specialist Priority
When delegating implementation work:
1. Use framework-specific specialists when available (e.g., `rails-backend-expert`, `react-component-architect`)
2. Fall back to general specialists (`backend-developer`, `frontend-developer`)
3. Use `general-purpose` only for research, not implementation
### Quality Validation
Every implementation must pass through:
1. `test-runner` for coverage validation
2. `code-reviewer` for security and quality
3. `playwright-tester` for E2E (when applicable)
---
## Changelog
| Date | Change | Author |
|------|--------|--------|
| [today] | Initial constitution generated | /init-project |
# Create directories
mkdir -p docs/standards
mkdir -p docs/PRD
mkdir -p docs/TRD/completed
# Create placeholder READMEs (optional, brief)
Create docs/PRD/.gitkeep and docs/TRD/.gitkeep if directories are empty.
Append to .gitignore if not already present:
# TRD Implementation State
.trd-state/
Output summary:
Project initialized for AI-augmented development
Created:
docs/standards/constitution.md - Project guardrails and quality gates
docs/PRD/ - Product Requirements Documents
docs/TRD/ - Technical Requirements Documents
docs/TRD/completed/ - Archived completed TRDs
Updated:
.gitignore - Added .trd-state/ exclusion
Next steps:
1. Review docs/standards/constitution.md and customize as needed
2. Create a PRD with /create-prd for new features
3. Generate TRD with /create-trd from approved PRD
4. Implement with /implement-trd
Tech stack detected:
[summary of detected stack]
If .specify/memory/constitution.md exists:
.specify/ structureIf .agent-os/product/tech-stack.md exists:
.agent-os/ for other purposes (specs, roadmap)