complete-code
Complete all TODO-marked code in specified area with test-first approach. Use when finishing incomplete implementations, converting TODO placeholders to working code, or completing test-driven development cycles.
What this skill does
# Complete Code Implementation
Completes all TODO-marked code in the specified area using a test-first approach (TDD Green Phase), scanning for TODO, FIXME, and HACK comments and implementing the missing functionality with minimal code to make tests pass — Step 2 of the TDD lifecycle. **Coherence Mandate.** Every edit must produce one continuous, deliberate work. Rewrite over restructure, restructure over integrate, never append. New content must dissolve into existing structure so a reader cannot tell which parts are new and which are original. Visible patch seams, parallel code paths, addendum sections, vestigial helpers, and "also note that…" tack-ons are the failure mode this rule forbids — in prose and in code alike. A completed TODO must therefore replace the placeholder rather than crouch beside it: the implementation has to take the shape the skeleton promised, with no leftover comment scaffolds, no parallel "new" helpers duplicating an existing one, and no marker that this region was ever incomplete.
## Purpose & Scope
**What this command does NOT do**:
- Create new features not mentioned in TODOs
- Refactor existing working code (use `/coding:refactor`)
- Modify configuration files
- Change project architecture
**When to REJECT**:
- No TODOs found in specified area
- Area path is invalid
- TODOs require external dependencies not installed
- TODOs involve security-sensitive operations without clear requirements
## Applicable Standards
When executing this skill, the following standards apply:
| Standard | Purpose |
|---|---|
| `documentation/write` | JSDoc and inline comments for new implementations |
| `function/write` | Function design, error handling, complexity |
| `observability/write` | Logging, metrics, and tracing for new code |
| `testing/write` | Test-first implementation, coverage requirements |
| `typescript/write` | Type safety, no `any`, proper generics |
| `universal/write` | General code authoring conventions |
## Workflow
ultrathink: you'd perform the following steps
### Step 1: Discovery
1. **Scan for TODOs**
- Use Grep to find TODO, FIXME, HACK comments in the area from $ARGUMENTS
- Classify by type and priority
- Determine if running as standalone or as part of composite (`--from-composite`)
2. **Analyze Dependencies**
- Read files containing TODOs
- Identify related test files
- Map implementation dependencies
3. **Plan Completion Order**
- Prioritize by dependency order
- Group related TODOs
- Estimate complexity
### Step 2: Test-First Implementation
Follow TDD Green Phase principles: write only enough code to make tests pass.
1. **For Each TODO Group**:
- Read existing tests to understand expected behavior
- Write failing tests for missing functionality (if tests do not exist yet)
- Implement minimal code to pass tests
- Replace TODO placeholders with simplest working implementation
- Apply proper error handling per standards
- Ensure type safety throughout
- Run tests after each implementation increment to verify progress
2. **Handle --test-only Flag**:
- If set, only write tests without implementation
- Mark implementation as ready for next phase
3. **CODE DRAFTING PATTERNS** for any remaining incomplete sections:
- Use `// TODO:` comments to mark sections still incomplete
- For incomplete code where a return is expected:
- Throw `new Error('IMPLEMENTATION: <description>')`
- This prevents TypeScript type errors
### Step 3: Validation
1. **Run Test Suite**
- Execute all related tests
- Verify Green phase achievement (all tests passing)
- Ensure no existing tests are broken
- Confirm tests pass for correct reasons
2. **Code Quality**
- Run linting via `npm run lint` or equivalent
- Run type checking via `npx tsc --noEmit` or equivalent
- Verify coding standards compliance
### Step 4: Reporting
**Output Format**:
```
[OK/FAIL] Command: complete-code $ARGUMENTS
## Summary
- Area: [path]
- TODOs found: [count]
- TODOs completed: [count]
- Tests added: [count]
- Tests passing: [count]
## Actions Taken
1. Discovered [N] TODOs in [area]
2. Created [M] tests
3. Implemented [K] functions
4. Verified all tests pass (Green phase)
## Completed TODOs
- [file:line] - [description]
- [file:line] - [description]
## Remaining TODOs (if any)
- [file:line] - [reason not completed]
## Validation Results
- Tests: PASS/FAIL ([X] passing, [Y] failing)
- Types: PASS/FAIL ([N] errors)
- Lint: PASS/FAIL ([N] warnings)
## Next Steps
1. Review implementations
2. Fix any remaining issues with /coding:fix
3. Refactor with /coding:refactor
```
## Examples
### Complete All TODOs in Area
```bash
/complete-code "src/services/"
# Finds and completes all TODOs in services directory
```
### Test-Only Mode
```bash
/complete-code "src/utils/" --test-only
# Only writes tests for TODOs, no implementation
```
### Single File
```bash
/complete-code "src/auth/login.ts"
# Completes TODOs in specific file
```
### Error Case
```bash
/complete-code "src/nonexistent/"
# Error: Path not found
# Suggestion: Check path exists with 'ls src/'
```
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.