Prompt file imported from Szantoi/JoineryTech.McpServer (
.github/prompts/backend-developer.dev-c-task-10-08.prompt.md). Copyright stays with the author.
๐ฏ DEV C โ TASK-10-08 Execution Prompt
Phase 2 Context
- Date: 2026-03-09 to 2026-03-11 (8h, parallel with Dev A + B)
- Team: Dev A (error handling, 6h), Dev B (performance, 5h), Dev C (documentation, 8h)
- Standup: 09:00, 12:00, 18:00 UTC daily
- Merge Gate: 12:00 UTC on 2026-03-11 (documentation finalized)
- Critical Path: Dev C (8h) determines final Phase 2 delivery date
๐ฏ Your Mission
Finalize EPIC-10 documentation and knowledge transfer materials:
- Publish bootstrap_agent Tool Guide (API spec + examples + SLA)
- Write Implementation Summaries for Dev A & B (TASK-10-06 + TASK-10-07 recap)
- Author EPIC-10 Architecture Decision Record (5 key design decisions + rationale)
- Create Operations Runbook (SLA monitoring, incident response, disaster recovery)
Outcome: Self-contained, production-ready documentation package for operators + future maintainers.
๐ Acceptance Criteria (AC) โ 8 Deliverables
Deliverable 1: bootstrap_agent Tool Guide (AC-1 through AC-2)
File: Docs/tools/bootstrap_agent.md
-
AC-1: API Specification
- Input schema:
domain,role,intent(enum),context(optional) - Validation rules: domain
/^[a-z-]+$/, role/^[a-z_]+$/ - Output schema:
BootstrapPayloadwith all fields documented - Example valid request + response (JSON)
- Example error responses (3+ scenarios)
- Input schema:
-
AC-2: Usage Examples & SLA
- Happy Path: Identify intent (basic bootstrap)
- Request Task: Get workflow + template content
- Resume Task: Session resumption with context
- Error Cases: Invalid domain, role not found, session expired
- SLA: p95 < 50ms, availability 99.9%, error rate < 0.1%
- Troubleshooting: Common error codes + solutions
Deliverable 2: Implementation Summary โ TASK-10-06 (AC-3)
File: Docs/mcp-context-server/delivery/mcp-maintenance/milestones/milestone_02/epic_10/implementation-summary/TASK-10-06-ErrorHandling-2026-03-10.md
- AC-3: Error Handling Summary
- What built: InputValidator + ErrorResponses standardization + OWASP validation
- AC checklist: 20/20 items verified โ
- Key files:
src/mcp/InputValidator.ts(regex validation)src/mcp/ErrorResponses.ts(error builder + HTTP mapper)src/tests/unit/owasp-injection.test.ts(40+ injection payloads)
- Tests: 20+ unit tests + 5-7 integration tests, โฅ85% coverage
- Technical decisions:
- Why regex (fast + safe for known patterns)
- Why HTTP 400 for client errors (standard, clear)
- Why prepared statements (SQL injection prevention)
- Performance impact: Validation < 5ms per call (negligible)
- Dependencies: None (standalone validation layer)
Deliverable 3: Implementation Summary โ TASK-10-07 (AC-4)
File: Docs/mcp-context-server/delivery/mcp-maintenance/milestones/milestone_02/epic_10/implementation-summary/TASK-10-07-Performance-2026-03-11.md
- AC-4: Performance & Load Testing Summary
- What built: Load test harness + baseline measurement + CI/CD regression gate
- AC checklist: 22/22 items verified โ
- Key files:
src/tests/e2e/load-test.ts(concurrent agent simulation)test-results/performance-baseline.json(SLA baseline).github/workflows/performance-regression.yml(CI/CD gate)
- Tests: 10+ load tests (10/50/100 concurrent), stress testing
- Baseline Results:
- p50: ~4.2ms (median)
- p95: ~35.1ms (SLA target: < 50ms) โ 12x better than target!
- p99: ~71.3ms (quality: < 100ms) โ
- Concurrency: 50 agents, 1000 queries, 100% success
- Performance decisions:
- Why Promise.all() (true parallelism for load sim)
- Why 10% degradation threshold (balance perf + noise)
- Why SQLite WAL mode (read performance under load)
- CI/CD integration: Regression gate fails if p95 > baseline ร 1.1
Deliverable 4: EPIC-10 Architecture Decision Record (AC-5)
File: database/standards/adrs/EPIC-10-ADR.md
-
AC-5: 5 ADR Decisions Documented
Decision 1: Session IDs = UUID v4 (crypto-strong)
- Context: Agents need unique, collision-free session identifiers
- Decision: Use crypto-strength UUID v4 (not sequential)
- Rationale: No central coordination needed, scales to billions
- Trade-off: Not temporally ordered (can sort by timestamp instead)
- Evidence: 10,000 generation tests, 0 collisions
Decision 2: Error Response = Standardized Format
- Context: Different error sources (validation, DB, timeout) need unified handling
- Decision: All errors follow
{ success: false, error_code, error_message, details } - Rationale: Clients parse consistently, reduces error handling complexity
- Trade-off: Minimal overhead on response size
- Implementation: ErrorResponses builder class
Decision 3: Input Validation = Strict Regex
- Context: Prevent injection attacks at input boundary
- Decision: Use regex
/^[a-z-]+$/for domain,/^[a-z_]+$/for role - Rationale: Simple, fast, safe for known patterns; avoids parser complexity
- Trade-off: Limited naming flexibility (no caps, special chars)
- Evidence: OWASP test matrix, 0 injection bypasses
Decision 4: Performance Baseline = 50ms p95
- Context: bootstrap_agent must be fast (entry point for all agents)
- Decision: SLA target p95 < 50ms @ 50 concurrent
- Rationale: User perceives instant (<50ms), scales to 50 agents
- Trade-off: Must optimize queries, indexing, connection pooling
- Evidence: Baseline established, actual p95 โ 35ms (exceeds target)
Decision 5: Graceful Degradation = Cache Fallback
- Context: If optional data (runbook, schema) unavailable, still serve session
- Decision: Return valid but reduced payload instead of error
- Rationale: Higher availability (serve something > serve nothing)
- Trade-off: Agents must handle optional fields
- Future: Implement fallback cache for offline resilience
๐ ๏ธ Implementation Phases
Phase 1: bootstrap_agent Tool Guide (2h)
Goal: Create consumable API documentation
Structure:
# bootstrap_agent Tool Guide
## API Specification
- Input parameters (domain, role, intent, context)
- Input validation rules
- Output payload structure
- Example request + response
## Usage Examples
- Happy path (identify intent)
- Request task (get workflow)
- Resume task (continue)
- Error cases (invalid inputs)
## SLA & Performance
- Latency targets (p95 < 50ms)
- Availability (99.9%)
- Monitoring queries (Prometheus)
- Troubleshooting (common errors)
## Related
- ERROR_CODES.md reference
- PERFORMANCE-SLA.md reference
Deliverable:
-
Docs/tools/bootstrap_agent.mdcreated (~400 lines) - 4+ usage examples (identify, request_task, resume_task, error scenarios)
- SLA section with monitoring guidance
- Cross-references to error codes + performance SLA
Phase 2: Implementation Summaries (Dev A + Dev B recap) (2h)
Goal: Document what Dev A & B built
TASK-10-06 Summary Structure:
# TASK-10-06 Implementation Summary
## What Built
- Input validation (regex)
- Error standardization (builders + HTTP mapper)
- OWASP validation (40+ injection tests)
## Acceptance Criteria Status
- 20/20 AC verified โ
## Key Files
- src/mcp/InputValidator.ts (100 lines)
- src/mcp/ErrorResponses.ts (80 lines)
- src/tests/unit/owasp-injection.test.ts (150 lines)
## Tests Added
- 20+ unit tests
- 5-7 integration tests
- โฅ85% coverage
## Technical Decisions
- Regex for speed + safety
- HTTP 400 for client errors
- Prepared statements for SQL prevention
## Performance Impact
- Validation overhead: < 5ms per call
- No degradation vs baseline
TASK-10-07 Summary Structure:
# TASK-10-07 Implementation Summary
## What Built
- Load test harness (concurrent agent simulation)
- Baseline measurement (p95 โ 35ms)
- CI/CD regression gate (GitHub Actions)
## Acceptance Criteria Status
- 22/22 AC verified โ
## Key Files
- src/tests/e2e/load-test.ts (150 lines)
- test-results/performance-baseline.json (snapshot)
- .github/workflows/performance-regression.yml (workflow)
## Tests Added
- 10+ load tests (10/50/100 concurrent)
- 4+ regression gate tests
- Baseline locked
## Baseline Results
- p50: โ 4.2ms
- p95: โ 35.1ms (target: 50ms) โ
12x better!
- p99: โ 71.3ms (target: 100ms) โ
- 50 concurrent agents, 1000 queries, 100% success
## Technical Decisions
- Promise.all() for true parallelism
- 10% degradation threshold (p95 > baseline ร 1.1 = fail)
- SQLite WAL mode for read perf under load
Deliverable:
- TASK-10-06-ErrorHandling-2026-03-10.md (~200 lines)
- TASK-10-07-Performance-2026-03-11.md (~200 lines)
Phase 3: EPIC-10 Architecture Decision Record (2h)
Goal: Document 5 key design decisions with rationale
Structure:
# ADR-005: EPIC-10 bootstrap_agent Design Decisions
## 1. Context
(Problem we were solving)
## 2. Decisions
### Decision 1: UUID v4 for Session IDs
- Rationale: Collision-free without coordination
- Trade-offs: Not temporally ordered
- Evidence: 10k tests, 0 collisions
### Decision 2: Standardized Error Format
- Rationale: Client-side parsing consistency
- Trade-offs: Minimal overhead
- Evidence: All error cases handled
### Decision 3: Strict Regex Input Validation
- Rationale: Fast + safe for known patterns
- Trade-offs: Limited naming
- Evidence: OWASP 0 bypasses
### Decision 4: 50ms p95 SLA Baseline
- Rationale: Entry point must be fast
- Trade-offs: Requires optimization
- Evidence: Actual p95 โ 35ms (exceeds target)
### Decision 5: Graceful Degradation Fallback
- Rationale: Availability > Freshness
- Trade-offs: Agents must handle optional fields
- Evidence: Tested with missing runbook
## 3. Rationale
(Why these together make sense)
## 4. Consequences
(What follows from these decisions)
## 5. Review & Approval
(Tech Lead sign-off)
Deliverable:
-
database/standards/adrs/EPIC-10-ADR.md(~300 lines) - 5 decisions documented with context + rationale + trade-offs + evidence
Phase 4: Operations Runbook (2h)
Goal: Create production operations guide
Structure:
# EPIC-10 Operational Runbook
## 1. SLA Definition
- Latency (p95 < 50ms, p99 < 100ms)
- Availability (99.9%)
- Error rate (< 0.1%)
## 2. Monitoring Setup
- Prometheus query for p95 latency
- Prometheus query for error rate
- Dashboard setup (optional)
## 3. SLA Breach Response
- Is this a deployment issue? (Rollback?)
- Is this a database latency issue? (Indexes?)
- Is this high concurrency? (Scale?)
## 4. Regression Detection
- CI/CD gate checks p95 vs baseline
- Fail if p95 > baseline ร 1.1
- How to update baseline (if optimization justified)
## 5. Disaster Recovery
- Database corruption: Restore from backup
- Service failure: Restart MCP server
- Rollback: Use git to revert
## 6. Maintenance
- Monthly VACUUM (SQLite fragmentation)
- Quarterly role cleanup (remove unused roles)
- Annual review of SLA targets
Deliverable:
-
Docs/EPIC-10-OPERATIONS.md(~250 lines) - Monitoring setup (Prometheus queries)
- Incident response checklist
- Disaster recovery procedures
๐ฆ Files to Create/Modify
| File | Type | Lines | Purpose |
|---|---|---|---|
Docs/tools/bootstrap_agent.md |
NEW | ~400 | API guide + examples + SLA |
...epic_10/.../TASK-10-06-ErrorHandling-2026-03-10.md |
NEW | ~200 | Dev A recap + decisions |
...epic_10/.../TASK-10-07-Performance-2026-03-11.md |
NEW | ~200 | Dev B recap + baseline |
database/standards/adrs/EPIC-10-ADR.md |
NEW | ~300 | 5 architecture decisions |
Docs/EPIC-10-OPERATIONS.md |
NEW | ~250 | Operations runbook |
Total: ~1350 lines of documentation
๐งช Verification Checklist (Not Tests, But Editorial)
- All cross-references working (links to ERROR_CODES.md, PERFORMANCE-SLA.md)
- All file paths correct (git paths, not filesystem paths)
- No typos or grammatical errors
- Code examples valid (JSON, YAML, markdown syntax correct)
- All claims backed by evidence (p95 โ 35ms verified)
- Audience appropriate (operators, developers, architects)
- Formatting consistent (headers, tables, code blocks)
๐ Daily Standups
Day 1 (2026-03-09)
Goal: Tool Guide + 25% implementation summaries
Standup at 09:00 UTC:
- Today: bootstrap_agent Tool Guide (API spec + examples)
- Read: TASK-10-06.md + TASK-10-07.md to understand what Dev A/B built
- Blockers: None expected
Standup at 12:00 UTC:
- Progress: Tool Guide structure done (input/output schema, examples)
- Next: SLA section + troubleshooting
Standup at 18:00 UTC:
- Status: Tool Guide complete (~400 lines) โ
- Next: Start implementation summaries (Dev A recap)
Day 2 (2026-03-10)
Goal: Implementation Summaries + ADR 50% done
Standup at 09:00 UTC:
- Yesterday: Tool Guide complete
- Today: TASK-10-06 Summary + TASK-10-07 Summary (both ~200 lines each)
- Blockers: Waiting on final test coverage numbers from Dev A/B (if not done)
Standup at 12:00 UTC:
- Progress: Both summaries drafted (~400 lines total)
- Next: ADR architecture decisions (5 decisions with rationale)
Standup at 18:00 UTC:
- Status: Tool Guide + 2 Summaries complete โ
- Tomorrow: ADR + Operations Runbook
Day 3 (2026-03-11)
Goal: ADR + Operations Runbook finalized, all 4 deliverables
Standup at 09:00 UTC:
- Yesterday: Summaries complete
- Today: EPIC-10-ADR.md (5 decisions) + Operations Runbook
- Blockers: None expected
Standup at 12:00 UTC (FINAL MERGE):
- Status: ALL 4 DELIVERABLES COMPLETE โ
- Tool Guide: โ 400 lines
- TASK-10-06 Summary: โ 200 lines
- TASK-10-07 Summary: โ 200 lines
- EPIC-10 ADR: โ 300 lines
- Operations Runbook: โ 250 lines
- Total: 1350 lines of production documentation โ
- Cross-references validated
- Ready for merge? YES โ Create PR, link to TASK-10-08
๐ฌ Quick Start Checklist (Copy-Paste Ready)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
DEV C โ TASK-10-08 QUICK START (8h, 4 deliverables)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ ] 09:00 Day 1: Read this prompt + review TASK-10-08.md
[ ] 09:30 Day 1: Read TASK-10-06.md + EPIC-10-ADR.md (context)
[ ] 10:00 Day 1: Read TASK-10-07.md + LOAD-TEST-RESULTS.md (baseline)
[ ] 11:00 Day 1: Start bootstrap_agent.md (API spec)
[ ] 12:00 Day 1: STANDUP (context check)
[ ] 12:30 Day 1: Continue Tool Guide (examples + SLA)
[ ] 14:30 Day 1: Tool Guide complete (~400 lines)
[ ] 18:00 Day 1: STANDUP (Tool Guide checkpoint)
[ ] 09:00 Day 2: Start TASK-10-06 Summary (Dev A recap)
[ ] 10:30 Day 2: TASK-10-06 Summary complete (~200 lines)
[ ] 11:00 Day 2: Start TASK-10-07 Summary (Dev B recap)
[ ] 12:00 Day 2: STANDUP (summaries check)
[ ] 12:30 Day 2: TASK-10-07 Summary complete (~200 lines)
[ ] 14:00 Day 2: Start ADR (5 decisions)
[ ] 18:00 Day 2: STANDUP (ADR progress)
[ ] 09:00 Day 3: ADR completion (all 5 decisions + evidence)
[ ] 11:00 Day 3: Start Operations Runbook (SLA + monitoring)
[ ] 11:30 Day 3: Runbook completion (incident response + DR)
[ ] 12:00 Day 3: FINAL STANDUP (delivery checkpoint)
[ ] 12:30 Day 3: Validate all cross-references
[ ] 13:00 Day 3: Final editorial check (no typos, formatting)
[ ] 13:30 Day 3: Create PR + merge request
[ ] 14:00 Day 3: READY FOR MERGE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ How to Execute
Step 1: Branch Creation
git checkout -b dev-c/task-10-08-documentation
Step 2: Skeleton Files
touch Docs/tools/bootstrap_agent.md
touch database/standards/adrs/EPIC-10-ADR.md
touch Docs/EPIC-10-OPERATIONS.md
touch Docs/mcp-context-server/delivery/mcp-maintenance/milestones/milestone_02/epic_10/implementation-summary/TASK-10-06-ErrorHandling-2026-03-10.md
touch Docs/mcp-context-server/delivery/mcp-maintenance/milestones/milestone_02/epic_10/implementation-summary/TASK-10-07-Performance-2026-03-11.md
Step 3: Implementation Order (Phase by phase)
- bootstrap_agent Tool Guide (API spec, examples, SLA)
- TASK-10-06 Implementation Summary (Dev A recap)
- TASK-10-07 Implementation Summary (Dev B recap)
- EPIC-10 ADR (5 design decisions + rationale)
- Operations Runbook (monitoring, incidents, DR)
Step 4: Cross-Reference Validation
# Check all markdown links work
grep -r "ERROR_CODES.md\|PERFORMANCE-SLA.md" Docs/tools/bootstrap_agent.md
# Should find references to both files
Step 5: Pre-Merge
# Verify no broken links
# Verify formatting (no syntax errors in markdown)
# Verify code examples are valid (JSON, YAML, etc.)
Step 6: Create PR
- Title:
docs(TASK-10-08): EPIC-10 documentation & knowledge transfer - Description: Link to TASK-10-08.md, deliverables checklist, line count
- Request review from: Tech Lead
๐ Content Guidance
Tool Guide: Tone
- Audience: DevOps engineers, backend developers using the tool
- Style: Clear, concise, API-documentation style
- Structure: API spec โ examples โ SLA โ troubleshooting
Implementation Summaries: Tone
- Audience: Tech leads, architects reviewing work
- Style: Executive summary + technical details
- Structure: What built โ AC status โ key decisions โ implications
ADR: Tone
- Audience: Future maintainers, architects
- Style: Formal, neutral (pros + cons of each decision)
- Structure: Context โ Decision โ Rationale โ Trade-offs โ Evidence
Operations Runbook: Tone
- Audience: On-call operators, SREs
- Style: Action-oriented, practical, checklist-based
- Structure: SLA โ Monitoring โ Incident response โ DR โ Maintenance
โฑ๏ธ Time Budget (8 hours, Day 1-3)
| Phase | Day | Time | Actual |
|---|---|---|---|
| Phase 1: Tool Guide | Day 1 | 2.0h | [ ] |
| Phase 2: Summaries | Day 2 | 2.0h | [ ] |
| Phase 3: ADR | Day 3 | 2.0h | [ ] |
| Phase 4: Runbook | Day 3 | 2.0h | [ ] |
| TOTAL | Day 1-3 | 8.0h | [ ] |
โ Final Checklist Before Merge
-
bootstrap_agent.md complete (~400 lines) โ
- Input/output schema documented
- 4+ usage examples
- SLA section
- Troubleshooting section
- Cross-references to ERROR_CODES.md + PERFORMANCE-SLA.md
-
TASK-10-06 Summary complete (~200 lines) โ
- What built (validator, error standardization, OWASP)
- 20/20 AC verified
- Key files listed
- Tests: 20+ unit + 5-7 integration
- Technical decisions documented
-
TASK-10-07 Summary complete (~200 lines) โ
- What built (load test, baseline, CI/CD)
- 22/22 AC verified
- Baseline results (p95 โ 35ms)
- 10+ load tests
- Technical decisions documented
-
EPIC-10-ADR.md complete (~300 lines) โ
- 5 decisions with full context
- Each: Decision + Rationale + Trade-offs + Evidence
- Tech Lead sign-off ready
-
EPIC-10-OPERATIONS.md complete (~250 lines) โ
- SLA definition
- Monitoring setup (Prometheus queries)
- Incident response checklist
- Disaster recovery procedures
- Maintenance schedule
-
All cross-references validated โ
-
No broken links โ
-
Formatting consistent โ
-
No typos or grammar errors โ
-
PR created with clear description โ
-
Tech Lead notified for review โ
๐ Bonus: Knowledge Transfer
After merging, consider:
- Tech walkthrough with team (30 min)
- Q&A session on architecture decisions (30 min)
- Operational runbook training (30 min)
- Update team wiki with links to new docs
Ready to start documenting? Copy this file and execute! ๐
Last Updated: 2026-03-06