Loading...
Loading...
This skill provides documentation-driven development workflow guidance. It ensures proper Story file creation, ROADMAP status tracking, and documentation synchronization. Essential for creating or updating Story files, checking ROADMAP.md status, validating completion status, and syncing documentation with code changes.
npx skill4agent add zigcc/skills doc-driven-devCore Principle: Documentation first, code follows, tests verify, documentation closes. All features must follow the documentation-driven development cycle.
stories/docs/design/docs/CHANGELOG.mdROADMAP.mdsolana-sdk-zigzig-0.15zig-memoryDetailed templates and examples:
| Document | Path | Content |
|---|---|---|
| CHANGELOG Template | | Session entry format, version release format |
┌─────────────────────────────────────────────────────────────────┐
│ 1. Documentation Preparation │
│ ├── Update/create design docs (docs/design/) │
│ ├── Update ROADMAP.md (if new feature) │
│ └── Create/Update Story file (stories/) │
├─────────────────────────────────────────────────────────────────┤
│ 2. Coding Phase │
│ ├── Implement feature code │
│ ├── Add code comments with Rust source references │
│ ├── Sync update docs/ (REQUIRED!) │
│ └── Update Story checkboxes as features complete │
├─────────────────────────────────────────────────────────────────┤
│ 3. Testing Phase │
│ ├── Unit tests (zig test src/xxx.zig) │
│ ├── Integration tests (zig build test) │
│ └── All tests MUST pass before proceeding │
├─────────────────────────────────────────────────────────────────┤
│ 4. Documentation Finalization │
│ ├── Update CHANGELOG.md with session entry │
│ ├── Update Story status (⏳ → ✅) if ALL complete │
│ └── Update README.md (if user-visible changes) │
└─────────────────────────────────────────────────────────────────┘stories/
├── v0.1.0-core-types.md
├── v0.2.0-serialization.md
├── v0.29.0-program-sdk-completion.md
├── v1.0.0-sdk-restructure.md
├── v2.0.0-spl-token.md
└── v2.2.0-stake-program.md# Story: vX.Y.Z Feature Name
> Brief description (one sentence)
## Goals
- Goal 1
- Goal 2
## Acceptance Criteria
### module_name.zig
- [ ] Feature 1
- [ ] Feature 2
- [ ] Unit tests
### Integration
- [ ] root.zig exports
- [ ] Documentation update
- [ ] Tests passing
## Completion Status
- Start date: YYYY-MM-DD
- Completion date: YYYY-MM-DD
- Status: ⏳ In Progress / ✅ Completed| Marker | Location | Meaning | When to Use |
|---|---|---|---|
| ROADMAP, stories, docs | Pending/In Progress | Feature started but not complete |
| ROADMAP, stories | Currently Working | Active development this session |
| ROADMAP, stories | Completed | ALL checkboxes are |
| stories, docs | Unchecked task | Task not yet done |
| stories, docs | Completed task | Task finished and verified |
| Code comments | To implement | Future work |
| Code comments | To fix | Known issue |
| Code comments | Attention needed | Needs review |
| Timing | Required Action |
|---|---|
| Start new version | Create Story file, list ALL acceptance criteria |
| Complete single feature | Change |
| Complete entire version | ONLY update status to ✅ when ALL |
| Add new feature | Add acceptance criteria to Story |
| Before version release | Ensure all |
# ❌ WRONG - Marking complete with unchecked items
## Completion Status
- Status: ✅ Completed
## Acceptance Criteria
- [x] Feature 1
- [ ] Feature 2 ← Still unchecked!
# ✅ CORRECT - All items checked before marking complete
## Completion Status
- Status: ✅ Completed
## Acceptance Criteria
- [x] Feature 1
- [x] Feature 2# Check uncompleted tasks in stories/
grep -rn "\[ \]" stories/
# Check story status markers
grep -rn "Status:" stories/
# Check ROADMAP status
grep -n "⏳\|✅" ROADMAP.md
# Full scan (one command)
echo "=== ROADMAP.md ===" && grep -n "⏳" ROADMAP.md && \
echo "=== stories/ ===" && grep -rn "\[ \]\|⏳" stories/ && \
echo "=== docs/ ===" && grep -rn "TODO\|FIXME\|⏳\|\[ \]" docs/ && \
echo "=== src/ ===" && grep -rn "TODO\|FIXME\|XXX" src/ --include="*.zig"
# Verify Story-ROADMAP consistency
echo "=== ROADMAP ===" && grep -n "✅\|⏳" ROADMAP.md
echo "=== Stories ===" && grep -rn "Status:" stories/| Criterion | Verification |
|---|---|
| Core functionality 100% | All |
| All tests passing | |
| No memory leaks | Testing allocator reports no leaks |
| Documentation synced | CHANGELOG updated, Story status correct |
| Issues documented | Any deferred items noted |
Phase 1: Refactor Existing Code
├── Move/reorganize file structure
├── Update import paths and dependencies
├── Run tests: zig build test
└── Ensure all existing tests 100% pass
└── Commit: "refactor: reorganize project structure"
Phase 2: Verify Refactoring Complete
├── Compilation passes, no errors
├── All original tests pass
├── Functionality unchanged from before
└── DO NOT proceed until 100% verified
Phase 3: Add New Features (ONLY after Phase 2)
├── Add new modules/files
├── Implement new features
├── Add tests for new features
└── Commit: "feat: add new feature"| Behavior | Status |
|---|---|
| Mix refactoring + new features in one commit | ❌ PROHIBITED |
| Start new features before refactoring tests pass | ❌ PROHIBITED |
| Skip test verification between phases | ❌ PROHIBITED |
| Combine Phase 1 and Phase 3 in same commit | ❌ PROHIBITED |
See:for complete templates.references/changelog-template.md
### Session YYYY-MM-DD-NNN
**Date**: YYYY-MM-DD
**Goal**: Brief description of session goal
#### Completed Work
1. Implemented feature X
2. Fixed bug in Y
3. Added tests for Z
#### Test Results
- Unit tests: 305 tests passed
- Integration tests: 53 vectors verified
#### Next Steps
- [ ] Task for next session## [vX.Y.Z] - YYYY-MM-DD
### Added
- New feature 1
- New feature 2
### Changed
- Modified behavior 1
### Fixed
- Bug fix 1# Run full test suite
./solana-zig/zig build test --summary all
# Or run SDK tests
cd sdk && ../solana-zig/zig build test --summary all| Situation | Action |
|---|---|
| Test fails | Fix immediately, do NOT commit |
| Cannot fix quickly | Revert changes, investigate |
| Need help | Ask before committing broken code |
zig build testgit commit| Error | Cause | Fix |
|---|---|---|
Story says ✅ but has | Premature completion | Uncheck ✅, complete remaining items |
| ROADMAP and Story disagree | Sync issue | Run validation commands, align status |
| Code complete, Story unchanged | Forgot to update | Update Story checkboxes immediately |
| Tests fail after "complete" | Incomplete verification | Never mark complete without test pass |
grep -rn "\[ \]" stories/vX.Y.Z-*.mdzig build test[ ]