Claude-skill-registry dev-swarm-code-development
Complete backlog implementation in feature-driven development. Read backlog requirements, reference implemented features, design approach, implement code, and document. Use when implementing features, changes, bug fixes, or improvements.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/dev-swarm-code-development" ~/.claude/skills/majiayu000-claude-skill-registry-dev-swarm-code-development && rm -rf "$T"
skills/data/dev-swarm-code-development/SKILL.mdAI Builder - Code Development
This skill implements backlogs through a structured feature-driven approach. As a Software Engineer expert, you'll read backlog requirements, reference existing features, design implementation approach, write code, and create comprehensive documentation for the features knowledge base.
When to Use This Skill
- User asks to implement a backlog
- User requests to complete a feature, change, bug fix, or improvement
- User says "develop backlog X"
- User wants to implement work from sprint
- User asks to code a specific backlog item
Prerequisites
This skill requires:
- Product Requirements Document (business requirements and acceptance criteria)04-prd/
- Engineering standards and constraints07-tech-specs/
folder with active sprint and backlogs09-sprints/
folder with features-index.md (existing features knowledge base)features/- Understanding of the backlog type: FEATURE, CHANGE, BUG, or IMPROVE
Feature-Driven Development Workflow
CRITICAL: This skill follows a strict feature-driven approach where
feature-name is the index for the entire project:
For Each Backlog:
- Read
frombacklog09-sprints/SPRINT-XX-descriptive-name/[BACKLOG_TYPE]-XX-[feature-name]-<sub-feature>.md - Extract the
from the backlog file namefeature-name - Read
to find the feature filefeatures/features-index.md - Read feature documentation in this order:
- Feature definition (WHAT/WHY/SCOPE)features/[feature-name].md
- User flows and process flows (if exists)features/flows/[feature-name].md
- API/data contracts (if exists)features/contracts/[feature-name].md
- Implementation notes (if exists)features/impl/[feature-name].md
- Locate source code at
usingsrc/features/impl/[feature-name].md - Implement the code following
07-tech-specs/ - Update
with development notesbacklog
This approach ensures AI developers can work on large projects without reading all code at once.
Your Roles in This Skill
See
dev-swarm/docs/general-dev-stage-rule.md for role selection guidance.
Role Communication
See
dev-swarm/docs/general-dev-stage-rule.md for the required role announcement format.
Instructions
Follow these steps in order for coding development:
Step 0: Verify Prerequisites and Gather Context
IMPORTANT: Follow this exact order to efficiently locate all relevant context:
-
Identify the backlog:
- User specifies which backlog to work on
- Or you select next backlog from
in order09-sprints/
09-sprints/ └── SPRINT-XX-descriptive-name/ └── [BACKLOG_TYPE]-XX-[feature-name]-<sub-feature>.md- Locate the sprint README at
for required progress log updates09-sprints/SPRINT-XX-descriptive-name/README.md
-
Read the backlog file:
- Understand task description and requirements
- Note backlog type (FEATURE/CHANGE/BUG/IMPROVE)
- Extract the
from the file name (CRITICAL)feature-name - Verify
in backlog metadata matches the file nameFeature Name - If they do not match, stop and ask the user to confirm the correct feature name
- Review test plan requirements
- Identify acceptance criteria
-
Read source code structure standards:
- Read
for general guidelinesdev-swarm/docs/source-code-structure.md - Note file naming conventions and directory structure
- Read
-
Read PRD and tech specs:
- Read
(all markdown files) - Product requirements and acceptance criteria for the feature04-prd/ - Read
(all markdown files) - Technical specifications and engineering standards07-tech-specs/ - Understand the business context and technical constraints
- Read
-
Read feature documentation (using feature-name as index):
- Read
to confirm feature existsfeatures/features-index.md - Read
- Feature definition (WHAT/WHY/SCOPE)features/[feature-name].md - Read
- User flows (if exists)features/flows/[feature-name].md - Read
- API contracts (if exists)features/contracts/[feature-name].md - Read
- Implementation notes (if exists)features/impl/[feature-name].md
- Read
-
Locate existing source code:
- Use
to find code locationsfeatures/impl/[feature-name].md - Navigate to
directorysrc/ - Review existing code structure and patterns
- Identify files to modify (CHANGE/BUG/IMPROVE) or create (FEATURE)
- Use
-
Understand codebase patterns:
- Review existing code in
using locations fromsrc/features/impl/[feature-name].md - Note architectural patterns and integration points
- Review existing code in
DO NOT read the entire codebase. Use
features/impl/[feature-name].md to find only relevant files in src/.
Step 1: Design the Implementation
Before writing code, create the feature design document:
-
Create/Update file
features/{feature-name}.md- If backlog type is
and the related feature file is not exist, create new feature filefeature - If backlog type is
or the feature file is exist, update existing feature filechange/bug/improve - Use the provided templates for consistency
- If backlog type is
-
Create/update
andflow
files if it is neededcontract
- User flows and process flows (when needed)features/flows/{feature-name}.md
- API contracts and interfaces (when needed)features/contracts/{feature-name}.md
-
Present design to user for approval
- Show the feature design document
- Explain approach and rationale
- Highlight any assumptions or decisions
- Wait for user confirmation before proceeding
Step 2: Implement the Code (After User Confirms)
Once user approves the design:
-
Organize code in src/:
- Follow
for file organization guidelinesdev-swarm/docs/source-code-structure.md - Place code in appropriate locations within
src/ - Use file naming conventions defined in source-code-structure.md
- Follow
-
Write the code:
- Implement according to the approved design
- Follow coding standards
- Write clean, modular, maintainable code
- Include appropriate error handling
- Avoid over-engineering (keep it simple)
-
Code quality guidelines:
- Modular: Break code into small, focused functions/components
- Readable: Clear variable names, self-documenting code
- Simple: Don't add features not in requirements
- Consistent: Match style of existing codebase
- Secure: No XSS, SQL injection, command injection, or OWASP vulnerabilities
- Tested: Code should be testable per backlog test plan
-
What NOT to do:
- Don't add extra features beyond requirements
- Don't over-abstract or create unnecessary helpers
- Don't add comments to code you didn't change
- Don't refactor code outside scope of backlog
- Don't add hypothetical error handling
- Don't create backwards-compatibility hacks
-
For different backlog types:
Feature (new functionality):
- Create new files/components
- Integrate with existing system
- Follow established patterns
Change (modify existing feature):
- Update existing code
- Maintain compatibility where needed
- Update related code if necessary
Bug (fix defect):
- Fix the specific issue
- Avoid changing unrelated code
- Verify fix matches test plan
Improve (optimize existing code):
- Refactor/optimize as specified
- Maintain same functionality
- Document performance improvements
Step 3: Create Implementation Documentation
After code is complete, create implementation documentation:
-
Create
features/impl/{feature-name}.mdFiles Changed:
- List all files created or modified
- For each file, note key changes
- Use file paths, function names as keywords (NOT line numbers)
Implementation Details:
- Describe how the feature was implemented
- Key functions/components created
- Integration points with other features
- Any important implementation decisions
Code Structure:
- Directory organization
- Module/component breakdown
- Dependencies added
Key Functions/APIs:
- List important functions with descriptions
- Document key API endpoints
- Note important classes/components
Reference for Developers:
- Quick keywords for code search
- How to find relevant code
- Common use patterns
-
Update
if neededfeatures/{feature-name}.md- Add any insights discovered during implementation
- Note if actual implementation differs from design (explain why)
- Keep it synchronized with current code
-
Update
if neededfeatures/features-index.md -
Update or create
(Project Documentation):src/README.md- IMPORTANT: Developers should maintain project documentation in
, NOT in the root README.mdsrc/README.md - Add or update feature documentation:
- Feature overview and purpose
- Installation and setup instructions
- Usage examples and API documentation
- Configuration options
- Troubleshooting tips
- Keep
as the primary technical reference for developerssrc/README.md - Include links to
documentation for detailed specsfeatures/
- IMPORTANT: Developers should maintain project documentation in
Step 4: Verify Against Test Plan
Before marking complete:
-
Review backlog test plan:
- Ensure code meets all test requirements
- Verify acceptance criteria are met
-
Self-test (if possible):
- Run the code
- Test key functionality
- Verify no obvious errors
-
Document test status:
- Note if manual testing was done
- List any test results
- Flag anything needing QA attention
Step 5: Update Backlog with Development Notes
CRITICAL: Update the backlog.md file to track development progress:
-
Update backlog status:
- Change status from "Not Started" to "In Code Review"
- Add a "Development Notes" section if not present
-
Document development findings:
- Files Created/Modified: List all files changed with brief descriptions
- Implementation Approach: Summarize how requirements were implemented
- Key Decisions: Note any important technical decisions made
- Integration Points: Document how code integrates with other features
- Known Issues: Flag any potential issues for code review
- Test Notes: Any preliminary testing done during development
-
Reference documentation created:
- Link to
features/[feature-name].md - Link to
features/impl/[feature-name].md - Link to source code files in
(locations documented in features/impl/[feature-name].md)src/
- Link to
-
Notify user:
- Summarize what was implemented
- Reference documentation created
- Note any important decisions or tradeoffs
- Suggest next step: "Ready for code review"
-
Update sprint README (README.md) (CRITICAL):
- Update backlog status in the sprint backlog table
- Append a log entry in the sprint progress log for the Development step
These backlog.md and sprint README updates create the audit trail for code review and testing phases.
Expected File Structure
project-root/ ├── 09-sprints/ │ └── SPRINT-XX-descriptive-name/ │ └── [BACKLOG_TYPE]-XX-[feature-name]-<sub-feature>.md # Backlog entry point │ ├── features/ # Features knowledge base │ ├── features-index.md # Index of all features │ ├── [feature-name].md # Feature definition (WHAT/WHY/SCOPE) │ ├── flows/ │ │ └── [feature-name].md # User flows (if needed) │ ├── contracts/ │ │ └── [feature-name].md # API contracts (if needed) │ └── impl/ │ └── [feature-name].md # Implementation notes (code locations) │ └── src/ # Source code ├── README.md # Project documentation (maintained by developers) └── [organized per dev-swarm/docs/source-code-structure.md guidelines]
File Templates
features-index.md
# Features Index - [feature name a](feature-name-a.md) - [feature name b](feature-name-b.md)
- feature.md
# Title ## Description [The overview for this feature's implementation, for approval, codeo review, trouble shooting or further development] ## References The details of this feature's implementation * [flow](flows/feature-name.md) * [contract](contracts/feature-name.md) * [Implement](impl/feature-name.md)
-
- help to understand the code logicflows/feature-name.md- User flow diagrams (mermaid)
- Process flows and sequence diagrams
- State transitions
- Integration flows
-
- the interface between services, pacakges, workflowscontracts/feature-name.md- REST API used or endpoint definitions
- Request/response schemas
- Data models and database schemas
- Event contracts
-
- help to find the code location in the source code file for codeo review, trouble shooting or further developmentimpl/feature-name.md- searchable keywords - function name, class name, even comment text in the file
- file path
- Dependencies and integration details
- Avoid citing line numbers in the code file as any code change will affect the line numbers