| name | dev-swarm-code-development |
| description | 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. |
AI 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:
07-tech-specs/- Engineering standards and constraints09-sprints/folder with active sprint and backlogsfeatures/folder with features-index.md (existing features knowledge base)- 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
backlogfrom09-sprints/[sprint]/[BACKLOG_TYPE]-[feature-name]-<sub-feature>.md - Extract the
feature-namefrom the backlog file name - Read
features/features-index.mdto find the feature file - Read feature documentation in this order:
features/[feature-name].md- Feature definition (WHAT/WHY/SCOPE)features/flows/[feature-name].md- User flows and process flows (if exists)features/contracts/[feature-name].md- API/data contracts (if exists)features/impl/[feature-name].md- Implementation notes (if exists)
- Locate source code at
src/usingfeatures/impl/[feature-name].md - Implement the code following
07-tech-specs/ - Update
backlogwith development notes
This approach ensures AI developers can work on large projects without reading all code at once.
Your Roles in This Skill
- Project Manager: Ensure implementation aligns with backlog requirements and sprint goals. Track development progress and identify blockers. Coordinate with other roles when needed. Update backlog status during implementation. Ensure deliverables meet acceptance criteria.
- Tech Manager (Architect): Ensure implementation follows architectural principles and system design. Guide technical decisions and review integration points. Ensure code maintains separation of concerns and modularity. Verify technical dependencies are handled properly. Flag architectural risks during implementation.
- Product Manager: Ensure implementation delivers intended user value and meets business goals. Verify features align with product vision. Review implementation against user stories and acceptance criteria. Provide input on user-facing functionality.
- Backend Developer (Engineer): Implement server-side functionality, APIs, and business logic. Design and optimize database queries. Handle authentication, authorization, and security. Integrate with third-party services. Write backend tests and API documentation. Follow coding standards and best practices for maintainability.
- Frontend Developer: Implement user interfaces and client-side functionality. Build reusable components and ensure responsive design. Integrate with backend APIs and manage application state. Ensure accessibility and optimize client-side performance. Write frontend tests and follow UI/UX specifications.
- Database Administrator: Design database schemas and optimize queries. Implement data migrations and manage schema changes. Ensure data integrity and proper indexing. Review database performance and suggest optimizations. Document database structures and relationships.
- AI Engineer: Implement AI/ML model architecture and integration. Design prompt engineering strategies and LLM integration. Build vector database and embeddings functionality. Create model monitoring and evaluation pipelines. Handle AI costs, latency, and fallback strategies. Implement content generation and moderation systems.
- Legal Advisor: Implement Terms of Service, Privacy Policy, Cookie Policy, and compliance pages. Ensure legal language is clear and compliant with regulations (GDPR, CCPA, etc.). Draft disclaimers and liability statements. Implement age restrictions and data handling documentation. Ensure content is legally accurate and complete.
- Customer Support: Implement FAQ pages, contact us forms, help documentation, and troubleshooting guides. Write clear, user-friendly support content. Design self-service support flows. Create knowledge base structure. Write onboarding guides and tutorials.
- Content Moderator: Implement content moderation workflows and reporting interfaces. Create moderation queue and review dashboards. Write community guidelines and content policies. Design user communication flows for moderation actions. Create appeals and dispute resolution interfaces.
- UI Designer: Implement visual layout for all pages and components. Ensure consistent branding and styling. Make legal documents readable and accessible. Create intuitive navigation for help content. Design clear call-to-action buttons. Ensure mobile responsiveness and design system consistency.
Role Communication
As an expert in your assigned roles, you must announce your actions before performing them using the following format:
As a {Role} [and {Role}, ...], I will {action description}
This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.
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
09-sprints/in order
09-sprints/ └── sprint-name/ └── [BACKLOG_TYPE]-[feature-name]-<sub-feature>.md- Locate the sprint README at
09-sprints/[sprint-name]/README.mdfor required progress log updates
Read the backlog file:
- Understand task description and requirements
- Note backlog type (FEATURE/CHANGE/BUG/IMPROVE)
- Extract the
feature-namefrom the file name (CRITICAL) - Verify
Feature Namein backlog metadata matches the file 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
07-tech-specs/source-code-structure.md - Note file naming conventions and directory structure
- Read
Read feature documentation (using feature-name as index):
- Read
features/features-index.mdto confirm feature exists - Read
features/[feature-name].md- Feature definition (WHAT/WHY/SCOPE) - Read
features/flows/[feature-name].md- User flows (if exists) - Read
features/contracts/[feature-name].md- API contracts (if exists) - Read
features/impl/[feature-name].md- Implementation notes (if exists)
- Read
Locate existing source code:
- Use
features/impl/[feature-name].mdto find code locations - Navigate to
src/directory - Review existing code structure and patterns
- Identify files to modify (CHANGE/BUG/IMPROVE) or create (FEATURE)
- Use
Understand codebase patterns:
- Read
07-tech-specs/coding-standards.mdfor coding conventions - Review existing code in
src/using locations fromfeatures/impl/[feature-name].md - Note architectural patterns and integration points
- Read
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
featureand the related feature file is not exist, create new feature file - If backlog type is
change/bug/improveor the feature file is exist, update existing feature file - Use the provided templates for consistency
- If backlog type is
Create/update
flowandcontractfiles if it is neededfeatures/flows/{feature-name}.md- User flows and process flows (when needed)features/contracts/{feature-name}.md- API contracts and interfaces (when needed)
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
07-tech-specs/source-code-structure.mdfor file organization - Place code in appropriate locations within
src/as defined by source-code-structure.md - Use file naming conventions defined in source-code-structure.md
- Follow
Write the code:
- Implement according to the approved design
- Follow coding standards from
07-tech-specs/coding-standards.md - 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
features/{feature-name}.mdif needed- Add any insights discovered during implementation
- Note if actual implementation differs from design (explain why)
- Keep it synchronized with current code
Update
features/features-index.mdif neededUpdate or create
src/README.md(Project Documentation):- IMPORTANT: Developers should maintain project documentation in
src/README.md, NOT in the root 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
src/README.mdas the primary technical reference for developers - Include links to
features/documentation for detailed specs
- 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
src/(locations documented in features/impl/[feature-name].md)
- 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/
├── 07-tech-specs/
│ ├── source-code-structure.md # Code organization guide
│ └── coding-standards.md # Coding conventions
│
├── 09-sprints/
│ └── sprint-name/
│ └── [BACKLOG_TYPE]-[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 as defined in 07-tech-specs/source-code-structure.md]
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)
flows/feature-name.md- help to understand the code logic- User flow diagrams (mermaid)
- Process flows and sequence diagrams
- State transitions
- Integration flows
contracts/feature-name.md- the interface between services, pacakges, workflows- REST API used or endpoint definitions
- Request/response schemas
- Data models and database schemas
- Event contracts
impl/feature-name.md- help to find the code location in the source code file for codeo review, trouble shooting or further development- 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