Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
59 changes: 48 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ Spec-driven development ensures you think through requirements and architecture
# Implement tasks one by one
/implement-next-task my-feature

# Review implementation against planning artifacts
/review-diff my-feature

# Analyze codebase for production readiness
/productionalize my-analysis
/production-readiness-review my-analysis
```

### Full Feature Planning Workflow
Expand Down Expand Up @@ -80,10 +83,10 @@ The command guides you through 6 phases:

1. **Start Analysis**
```
/productionalize pre-launch
/production-readiness-review pre-launch
```
This will:
- Create `.shipspec/planning/pre-launch/` directory
- Create `.shipspec/production-readiness/pre-launch/` directory
- Detect tech stack and infrastructure
- Start a guided interview about concerns

Expand All @@ -105,18 +108,17 @@ The command guides you through 6 phases:

4. **Review Reports**
```
.shipspec/planning/pre-launch/
├── production-signals.md # Detected tech stack
.shipspec/production-readiness/pre-launch/
├── production-report.md # Full analysis report
└── fix-prompts.md # Agent-ready fix prompts
└── TASKS.md # Remediation tasks
```

5. **Fix Issues**
Copy prompts from `fix-prompts.md` and paste into Claude Code to remediate findings.
Run `/implement-next-task pre-launch` to work through remediation tasks.

6. **Re-verify**
```
/productionalize pre-launch-v2
/production-readiness-review pre-launch-v2
```
Run again after fixes to verify remediation.

Expand All @@ -133,13 +135,24 @@ After completing the feature planning workflow:

Note: A temporary `context.md` file is created during planning but automatically cleaned up after task generation.

After completing production readiness review:

```
.shipspec/production-readiness/your-review/
├── production-report.md # Full analysis report
└── TASKS.md # Remediation tasks
```

Note: A temporary `production-signals.md` file is created during analysis but automatically cleaned up after report generation.

## Commands

| Command | Description |
|---------|-------------|
| `/feature-planning <name>` | Run complete planning workflow (requirements → PRD → SDD → tasks) |
| `/implement-next-task <name>` | Start/continue implementing tasks from TASKS.md |
| `/productionalize <name>` | Analyze codebase for production readiness |
| `/review-diff <name>` | Review implementation against planning artifacts (TASKS.md, SDD.md, PRD.md) |
| `/production-readiness-review <name>` | Analyze codebase for production readiness |

## Agents

Expand Down Expand Up @@ -216,13 +229,37 @@ Production analysis covers six categories:
| Testing | Coverage, test types, CI | Quality assurance |
| Configuration | Secrets, env separation | Secure configuration |

## Implementation Workflow

After planning is complete, use this workflow to implement tasks:

```
/implement-next-task my-feature # Start a task (marks it [~])
Implement the task # Write the code
/review-diff my-feature # Validate against PRD, SDD, acceptance criteria
┌────┴────┐
│ Passed? │
└────┬────┘
Yes: Task marked [x], suggests next task
No: Shows issues to fix, re-run /review-diff after fixing
```

The `/review-diff` command validates three things:
1. **Acceptance Criteria** - All criteria from the task in TASKS.md are met
2. **Design Alignment** - Implementation follows the referenced SDD section
3. **Requirements Coverage** - Referenced PRD requirements are satisfied

## Tips

- **Use `/feature-planning` for full workflow**: Single command runs requirements → PRD → SDD → tasks
- **Review at each gate**: The workflow pauses after PRD and SDD for your review
- **Use `/implement-next-task` to work through tasks**: Tracks progress and verifies completion
- **Run `/productionalize` before launch**: Catch security issues early
- **Use fix prompts**: Copy prompts from fix-prompts.md to remediate issues quickly
- **Use `/review-diff` after implementing**: Validates work against planning artifacts before marking complete
- **Run `/production-readiness-review` before launch**: Catch security issues early
- **Use remediation tasks**: Run `/implement-next-task` to work through production readiness fixes

## Contributing

Expand Down
48 changes: 21 additions & 27 deletions commands/implement-next-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,52 @@ Find and display the next task ready for implementation, verifying any in-progre
> - For features: the feature name used with `/feature-planning`
> - For production readiness: the context name used with `/production-readiness-review`
>
> **To see available planning directories:**
> **To see available directories:**
> ```bash
> ls .shipspec/planning/
> ls .shipspec/planning/ # Feature planning
> ls .shipspec/production-readiness/ # Production readiness
> ```"

**Stop here** - do not proceed without an argument.

## Step 1: Validate Prerequisites and Detect Workflow
## Step 1: Auto-Detect Workflow Directory

Check that the planning directory exists:
```bash
echo "=== Checking planning directory ==="
ls -la .shipspec/planning/$ARGUMENTS/ 2>/dev/null || echo "DIRECTORY NOT FOUND"
```
Check which directory the argument exists in:

**If directory not found:**
> "No planning directory found for '$ARGUMENTS'. Please run either:
> - `/feature-planning $ARGUMENTS` - for new feature development
> - `/production-readiness-review $ARGUMENTS` - for production readiness analysis"

**Detect workflow type:**
```bash
echo "=== Detecting workflow type ==="
ls .shipspec/planning/$ARGUMENTS/PRD.md .shipspec/planning/$ARGUMENTS/SDD.md 2>/dev/null && echo "FEATURE_PLANNING"
ls .shipspec/planning/$ARGUMENTS/production-report.md 2>/dev/null && echo "PRODUCTION_READINESS"
echo "=== Auto-detecting workflow directory ==="
ls -d .shipspec/planning/$ARGUMENTS 2>/dev/null && echo "FOUND_PLANNING"
ls -d .shipspec/production-readiness/$ARGUMENTS 2>/dev/null && echo "FOUND_PRODUCTION"
```

- If `PRD.md` and `SDD.md` exist → **Feature Planning** workflow (uses TASK-XXX IDs)
- If `production-report.md` exists → **Production Readiness** workflow (uses FINDING-XXX IDs)
- If neither → Error: "Directory exists but contains no recognized planning artifacts. Expected either PRD.md/SDD.md (feature planning) or production-report.md (production readiness)."
**Directory resolution:**
- If found in `.shipspec/planning/` only → **Feature Planning** workflow (uses TASK-XXX IDs)
- Set `WORKFLOW_DIR=.shipspec/planning/$ARGUMENTS`
- If found in `.shipspec/production-readiness/` only → **Production Readiness** workflow (uses FINDING-XXX IDs)
- Set `WORKFLOW_DIR=.shipspec/production-readiness/$ARGUMENTS`
- If found in BOTH → Error: "Ambiguous: '$ARGUMENTS' exists in both `.shipspec/planning/` and `.shipspec/production-readiness/`. Please use a unique name or specify the full path."
- If found in NEITHER → Error: "No directory found for '$ARGUMENTS'. Please run either:
- `/feature-planning $ARGUMENTS` - for new feature development
- `/production-readiness-review $ARGUMENTS` - for production readiness analysis"

**Check for TASKS.md:**
```bash
ls -la .shipspec/planning/$ARGUMENTS/TASKS.md 2>/dev/null || echo "TASKS.md NOT FOUND"
ls -la $WORKFLOW_DIR/TASKS.md 2>/dev/null || echo "TASKS.md NOT FOUND"
```

**If TASKS.md not found:**
> "No TASKS.md found in '.shipspec/planning/$ARGUMENTS/'.
> "No TASKS.md found in '$WORKFLOW_DIR/'.
>
> - For feature planning: Run `/feature-planning $ARGUMENTS` to complete the planning workflow.
> - For production readiness: Run `/production-readiness-review $ARGUMENTS` to generate remediation tasks."

## Step 2: Load and Parse Tasks

Load the tasks document:
@.shipspec/planning/$ARGUMENTS/TASKS.md
@$WORKFLOW_DIR/TASKS.md

Parse the document to extract:
1. **Workflow type** (from Step 1 detection)
1. **Workflow type** (determined by directory location in Step 1)
2. **Task ID pattern**:
- Feature Planning: `TASK-XXX`
- Production Readiness: `FINDING-XXX`
Expand Down Expand Up @@ -227,6 +224,3 @@ If dependency resolution detects a cycle:

### Empty Dependencies Field
If a task has `Depends on: None` or no dependencies section, treat it as having no dependencies (ready if status is `[ ]`).

### Mixed Workflow Artifacts
If a directory contains both PRD.md/SDD.md AND production-report.md, prefer the production-report.md detection (production readiness workflow) since it's more likely to be the recent analysis overlaid on an existing feature.
19 changes: 13 additions & 6 deletions commands/production-readiness-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Analyze the codebase for production readiness, identifying security vulnerabilit
Create the output directory for analysis results:

```bash
mkdir -p .shipspec/planning/$ARGUMENTS
mkdir -p .shipspec/production-readiness/$ARGUMENTS
```

## Step 2: Gather Codebase Signals
Expand All @@ -28,7 +28,7 @@ Use the production-signals skill to detect:
- Security configuration
- Monitoring and observability

Save signals to: `.shipspec/planning/$ARGUMENTS/production-signals.md`
Save signals to: `.shipspec/production-readiness/$ARGUMENTS/production-signals.md`

## Step 3: Gather Production Context

Expand Down Expand Up @@ -70,7 +70,15 @@ Delegate to the `production-reporter` subagent to generate:
1. **production-report.md** - Executive summary, findings by category, compliance matrix, remediation roadmap
2. **TASKS.md** - Structured remediation tasks (same format as feature-planning tasks)

Save to: `.shipspec/planning/$ARGUMENTS/`
Save to: `.shipspec/production-readiness/$ARGUMENTS/`

## Step 5.5: Cleanup Intermediate Files

Remove the intermediate signals file (similar to context.md cleanup in feature-planning):

```bash
rm -f .shipspec/production-readiness/$ARGUMENTS/production-signals.md
```

## Step 6: Present Results

Expand All @@ -79,9 +87,8 @@ After report generation, present a summary:
> **Production Readiness Review Complete**
>
> **Output files:**
> - `.shipspec/planning/$ARGUMENTS/production-signals.md` - Detected tech stack and infrastructure
> - `.shipspec/planning/$ARGUMENTS/production-report.md` - Full analysis report
> - `.shipspec/planning/$ARGUMENTS/TASKS.md` - Structured remediation tasks
> - `.shipspec/production-readiness/$ARGUMENTS/production-report.md` - Full analysis report
> - `.shipspec/production-readiness/$ARGUMENTS/TASKS.md` - Structured remediation tasks
>
> **Summary:**
> - Overall Status: [Ready/Ready with Reservations/Not Ready]
Expand Down
Loading