Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions .claude-plugin/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{
"name": "claude-code-builder",
"version": "3.0.0",
"description": "Specification-driven development framework with quantitative analysis, functional testing enforcement (NO MOCKS), and cross-session state persistence.",
"author": "Claude Code Builder Team",
"license": "MIT",
"homepage": "https://github.com/krzemienski/claude-code-builder",
"repository": {
"type": "git",
"url": "https://github.com/krzemienski/claude-code-builder.git"
},
"keywords": [
"development",
"specification-driven",
"quantitative",
"testing",
"no-mocks",
"functional-testing",
"phase-planning",
"complexity-analysis"
],
"claude": {
"version": ">=1.0.0"
},
"mcps": {
"serena": {
"package": "@modelcontextprotocol/server-memory",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"required": true,
"description": "State persistence for cross-session continuity. 61% of CCB functionality requires this MCP.",
"fallback": "none",
"degradation": "high"
},
"context7": {
"package": "@modelcontextprotocol/server-context7",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-context7"],
"required": false,
"description": "Framework documentation lookup for technology research.",
"fallback": "web-search",
"degradation": "medium"
},
"fetch": {
"package": "@modelcontextprotocol/server-fetch",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch"],
"required": false,
"description": "API documentation and external resource fetching.",
"fallback": "manual-research",
"degradation": "medium"
},
"puppeteer": {
"package": "@modelcontextprotocol/server-puppeteer",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"],
"required": false,
"description": "Real browser automation for functional web testing (NO MOCKS).",
"fallback": "manual-testing",
"degradation": "low",
"conditional": "web-projects"
},
"ios-simulator": {
"package": "@modelcontextprotocol/server-ios-simulator",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-ios-simulator"],
"required": false,
"description": "Real iOS Simulator for functional mobile testing (NO MOCKS).",
"fallback": "manual-testing",
"degradation": "low",
"conditional": "ios-projects"
},
"sequential-thinking": {
"package": "@modelcontextprotocol/server-sequential-thinking",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"],
"required": false,
"description": "Deep reasoning for complex specification analysis.",
"fallback": "standard-analysis",
"degradation": "low"
}
},
"commands": [
{
"name": "init",
"description": "Initialize build from specification with complexity analysis and phase planning"
},
{
"name": "status",
"description": "Show current build status, phase progress, and validation gates"
},
{
"name": "checkpoint",
"description": "Manually create build state checkpoint"
},
{
"name": "resume",
"description": "Resume build from checkpoint"
},
{
"name": "analyze",
"description": "Run 6D complexity analysis without initializing build"
},
{
"name": "index",
"description": "Generate PROJECT_INDEX for existing codebase (94% token reduction)"
},
{
"name": "build",
"description": "Execute current phase with validation gates"
},
{
"name": "do",
"description": "Execute task on existing codebase (brownfield support)"
},
{
"name": "test",
"description": "Run functional tests with NO MOCKS enforcement"
},
{
"name": "reflect",
"description": "Honest gap assessment and quality scoring"
}
],
"skills": {
"rigid": [
"ccb-principles",
"functional-testing"
],
"protocol": [
"spec-driven-building",
"phase-execution",
"checkpoint-preservation",
"project-indexing"
],
"quantitative": [
"complexity-analysis",
"validation-gates",
"test-coverage"
],
"flexible": [
"mcp-augmented-research",
"honest-assessment",
"incremental-enhancement"
]
},
"enforcement": {
"no_mocks": {
"enabled": true,
"level": "blocking",
"patterns": [
"jest.mock",
"unittest.mock",
"sinon",
"Mockito",
"gomock"
]
},
"specification_first": {
"enabled": true,
"level": "blocking",
"minimum_spec_words": 50
},
"quantitative_analysis": {
"enabled": true,
"level": "required",
"dimensions": 6
},
"state_persistence": {
"enabled": true,
"level": "automatic",
"checkpoint_on_precompact": true
}
},
"hooks": {
"SessionStart": "hooks/session_start.sh",
"UserPromptSubmit": "hooks/user_prompt_submit.py",
"PostToolUse": "hooks/post_tool_use.py",
"PreCompact": "hooks/precompact.py",
"Stop": "hooks/stop.py"
},
"core_docs": {
"ccb-principles": "core/ccb-principles.md",
"complexity-analysis": "core/complexity-analysis.md",
"phase-planning": "core/phase-planning.md",
"testing-philosophy": "core/testing-philosophy.md",
"state-management": "core/state-management.md",
"project-indexing": "core/project-indexing.md"
},
"dependencies": {
"python": ">=3.9",
"node": ">=18.0.0"
}
}
20 changes: 20 additions & 0 deletions .claude/commands/analyze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /ccb:analyze

Run 6D complexity analysis without initializing build.

**Usage**: `/ccb:analyze <spec> [--save] [--mcps]`

**Output**:
- 6D dimension breakdown
- Overall score (0.0-1.0) + category
- Recommended phase count (3-6)
- Timeline distribution (%)
- Risk assessment

**Options**:
- `--save`: Persist to Serena MCP
- `--mcps`: Show MCP recommendations

**Skills**: @skill complexity-analysis

**Example**: `/ccb:analyze spec.md --save`
23 changes: 23 additions & 0 deletions .claude/commands/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# /ccb:build

Execute current phase with validation gates.

**Usage**: `/ccb:build [--phase N] [--auto]`

**Workflow**:
1. Load phase plan
2. Display objectives and gates
3. Execute phase tasks
4. Run functional tests (NO MOCKS)
5. Measure coverage
6. Check validation gates
7. If all pass: checkpoint, advance phase
8. If any fail: mark incomplete, BLOCK

**Options**:
- `--phase N`: Execute specific phase
- `--auto`: Skip confirmations

**Skills**: @skill phase-execution, @skill validation-gates, @skill functional-testing

**Enforcement**: Gates must pass to proceed
13 changes: 13 additions & 0 deletions .claude/commands/checkpoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# /ccb:checkpoint

Manually create build state checkpoint.

**Usage**: `/ccb:checkpoint`

**Creates**:
- `.serena/ccb/checkpoints/ckpt_YYYYMMDD_HHMMSS.tar.gz`
- Contains: build state, artifacts, metadata

**Skills**: @skill checkpoint-preservation

**Returns**: Checkpoint ID
23 changes: 23 additions & 0 deletions .claude/commands/do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# /ccb:do

Execute task on existing codebase.

**Usage**: `/ccb:do "<task_description>"`

**Workflow**:
1. Check for PROJECT_INDEX.md (generate if missing)
2. Analyze task against index (3K tokens)
3. Identify affected modules (0 tokens, index lookup)
4. Load only affected files (500-2K tokens)
5. Execute with functional tests
6. Validate existing tests still pass

**Use Cases**:
- Add feature to existing app
- Refactor existing code
- Fix bugs
- Update dependencies

**Skills**: @skill project-indexing, @skill incremental-enhancement, @skill functional-testing

**Example**: `/ccb:do "add user authentication with JWT"`
18 changes: 18 additions & 0 deletions .claude/commands/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# /ccb:index

Generate PROJECT_INDEX for existing codebase.

**Usage**: `/ccb:index [directory]`

**Process**:
1. Discover structure (files, dirs)
2. Analyze tech stack
3. Identify architecture
4. Extract patterns
5. Generate PROJECT_INDEX.md (3K tokens vs 58K raw)

**Output**: PROJECT_INDEX.md with Quick Stats, Tech Stack, Core Modules, Dependencies, Patterns

**Skills**: @skill project-indexing

**Savings**: 94% token reduction
22 changes: 22 additions & 0 deletions .claude/commands/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# /ccb:init

Initialize build from specification.

**Usage**: `/ccb:init <spec_file_or_description>`

**Workflow**:
1. Load specification (file or inline)
2. Run 6D complexity analysis
3. Generate phase plan
4. Save to `.serena/ccb/`
5. Display: score, phases, timeline, next steps

**Example**:
```
/ccb:init spec.md
/ccb:init "Build REST API with auth and rate limiting"
```

**Skills**: @skill spec-driven-building, @skill complexity-analysis

**Output**: `.serena/ccb/build_goal.txt`, `complexity_analysis.json`, `phase_plan.json`
24 changes: 24 additions & 0 deletions .claude/commands/reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# /ccb:reflect

Honest gap assessment and quality scoring.

**Usage**: `/ccb:reflect`

**Analysis**:
- Compare artifacts vs specification
- Identify gaps and missing features
- Measure completeness (%)
- Assess code quality
- Test coverage analysis
- Grade: A+ to F

**Output**: Reflection document with:
- Completeness: X%
- Gaps: [list]
- Quality: [assessment]
- Grade: A+ / A / B+ / B / C / D / F
- Recommendations: [improvements]

**Skills**: @skill honest-assessment

**Purpose**: Identify improvements before completion
13 changes: 13 additions & 0 deletions .claude/commands/resume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# /ccb:resume

Resume build from checkpoint.

**Usage**: `/ccb:resume [checkpoint_id]`

**Logic**:
- No ID: Use latest if <24hrs old
- With ID: Restore specific checkpoint

**Skills**: @skill checkpoint-preservation

**Displays**: Restored phase, artifacts, next steps
16 changes: 16 additions & 0 deletions .claude/commands/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# /ccb:status

Show current build status.

**Usage**: `/ccb:status`

**Displays**:
- Build goal
- Current phase and progress (%)
- Validation gates status (βœ…/⏳/❌)
- Test coverage
- Recent checkpoints

**Skills**: @skill phase-execution

**Serena**: Reads `.serena/ccb/*`
21 changes: 21 additions & 0 deletions .claude/commands/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# /ccb:test

Run functional tests with NO MOCKS enforcement.

**Usage**: `/ccb:test [--coverage] [--functional-only]`

**Process**:
1. Discover test files
2. Scan for mock patterns (BLOCK if found)
3. Run tests with coverage
4. Display results and coverage %
5. Check β‰₯80% threshold
6. Save to `.serena/ccb/test_results.json`

**Options**:
- `--coverage`: Show detailed coverage
- `--functional-only`: Skip unit tests

**Skills**: @skill functional-testing, @skill test-coverage

**Enforcement**: Mocks BLOCKED, coverage enforced
Loading