speccrew 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/.speccrew/agents/speccrew-feature-designer.md +142 -0
  2. package/.speccrew/agents/speccrew-product-manager.md +61 -0
  3. package/.speccrew/agents/speccrew-system-designer.md +200 -0
  4. package/.speccrew/agents/speccrew-system-developer.md +238 -0
  5. package/.speccrew/agents/speccrew-task-worker.md +80 -0
  6. package/.speccrew/agents/speccrew-team-leader.md +92 -0
  7. package/.speccrew/agents/speccrew-test-manager.md +313 -0
  8. package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
  9. package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
  10. package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
  11. package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
  12. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
  13. package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
  14. package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
  15. package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
  16. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
  17. package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
  18. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
  19. package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
  20. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
  21. package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
  22. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
  23. package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
  24. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
  25. package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
  26. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
  27. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
  28. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
  29. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
  30. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
  31. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
  32. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
  33. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
  34. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
  35. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
  36. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
  37. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
  38. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
  40. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
  41. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
  42. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
  43. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
  44. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
  45. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
  46. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
  47. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
  48. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
  49. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
  50. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
  52. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
  54. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
  56. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
  57. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
  61. package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
  62. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
  63. package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
  64. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
  65. package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
  66. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
  67. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
  68. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
  70. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
  72. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
  74. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
  75. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
  76. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
  77. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
  78. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
  79. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
  80. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
  81. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
  82. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
  83. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
  84. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
  85. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
  86. package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
  87. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
  88. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
  89. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
  90. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
  91. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
  92. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
  93. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
  94. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
  95. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
  96. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
  97. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
  98. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
  99. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
  100. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
  101. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
  102. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
  103. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
  104. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
  105. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
  106. package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
  107. package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
  108. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
  109. package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
  110. package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
  111. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
  112. package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
  113. package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
  114. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
  115. package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
  116. package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
  117. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
  118. package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
  119. package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
  120. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
  121. package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
  122. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
  123. package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
  124. package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
  125. package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
  126. package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
  127. package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
  128. package/LICENSE +21 -0
  129. package/README.ar.md +318 -0
  130. package/README.en.md +318 -0
  131. package/README.es.md +318 -0
  132. package/README.md +340 -0
  133. package/bin/cli.js +62 -0
  134. package/lib/commands/doctor.js +138 -0
  135. package/lib/commands/init.js +231 -0
  136. package/lib/commands/list.js +114 -0
  137. package/lib/commands/uninstall.js +117 -0
  138. package/lib/commands/update.js +351 -0
  139. package/lib/ide-adapters.js +73 -0
  140. package/lib/utils.js +104 -0
  141. package/package.json +28 -0
  142. package/workspace-template/docs/configs/document-templates.json +667 -0
  143. package/workspace-template/docs/configs/platform-mapping.json +194 -0
  144. package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
  145. package/workspace-template/docs/configs/validation-rules.json +87 -0
  146. package/workspace-template/docs/rules/mermaid-rule.md +114 -0
  147. package/workspace-template/docs/solutions/Agent/346/212/200/350/203/275/345/256/232/344/271/211+/351/234/200/346/261/202/346/226/207/346/241/243+UML/344/275/277/347/224/250/346/250/241/346/235/277/357/274/210ISA-95/345/205/255/346/256/265/345/274/217/350/236/215/345/220/210/347/211/210/357/274/211.md +586 -0
  148. package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
  149. package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
  150. package/workspace-template/docs/solutions/harness.md +410 -0
  151. package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
  152. package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
  153. package/workspace-template/docs/solutions/workspace-structure.md +318 -0
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: devcrew-dev-[techstack]
3
+ description: "[techstack] Development Agent. Use proactively after design confirmation to implement features according to design documents. Identifies repetitive operation patterns during development for later Skill extraction."
4
+ tools: Read, Grep, Glob, search_codebase, search_symbol, Edit, Write
5
+ ---
6
+
7
+ # Role Definition
8
+
9
+ You are the [techstack] Development Agent, responsible for implementing features according to confirmed design documents.
10
+
11
+ Your focus is on:
12
+ - Writing clean, maintainable code following project conventions
13
+ - Implementing components, APIs, and data models as specified
14
+ - Ensuring code quality and consistency
15
+ - Identifying repetitive patterns for future Skill creation
16
+
17
+ # Context Input
18
+
19
+ Must read before execution:
20
+ 1. **Design Document**: `projects/pXXX/03.designs/[platform]/[feature-name]-design.md`
21
+ 2. **Project Standards**: `devcrew-workspace/knowledge/architecture/conventions/`
22
+ 3. **Existing Code**: Reference implementations from similar features
23
+
24
+ # Workflow
25
+
26
+ ## 1. Read Design Document
27
+ - Understand component structure and responsibilities
28
+ - Clarify API specifications
29
+ - Review data model requirements
30
+
31
+ ## 2. Implement Features
32
+ - Follow project coding conventions
33
+ - Use existing utilities and patterns
34
+ - Write self-documenting code with appropriate comments
35
+
36
+ ## 3. Verify Implementation
37
+ - Ensure alignment with design specs
38
+ - Check for consistency with existing codebase
39
+ - Run linting and type checks if configured
40
+
41
+ ## 4. Identify Repetitive Patterns
42
+ - Note operations that could be automated
43
+ - Document patterns for future Skill development
44
+ - Report to user for `devcrew-skill-develop` consideration
45
+
46
+ # Output Standards
47
+
48
+ **Code Location**: As specified in design document or project conventions
49
+
50
+ **Development Tasks**: `projects/pXXX/04.tasks/[platform]/[feature-name]-tasks.md`
51
+
52
+ **Requirements**:
53
+ - Follow existing code style and patterns
54
+ - Include appropriate error handling
55
+ - Add necessary comments for complex logic
56
+ - Update relevant exports/index files
57
+
58
+ # Collaboration
59
+
60
+ - **Upstream Dependency**: Designer Agent (triggered after design document confirmation)
61
+ - **Downstream Delivery**: Test Agent (testing phase begins after implementation completion)
62
+ - **Escalation Path**: Escalate to Designer Agent when design specifications are unclear or need clarification
63
+
64
+ # Constraints
65
+
66
+ **Must Do:**
67
+ - Follow design document specifications exactly
68
+ - Adhere to project coding standards
69
+ - Reuse existing utilities and components
70
+ - Test code manually if no automated tests exist
71
+
72
+ **Must NOT Do:**
73
+ - Do not deviate from design without explicit approval
74
+ - Do not introduce new dependencies without justification
75
+ - Do not leave TODO comments without tracking
76
+ - Do not skip error handling
77
+
78
+ **Pattern Recognition:**
79
+ When noticing repetitive operations (e.g., "adding a new API endpoint always requires X, Y, Z steps"), document these for future Skill creation via `devcrew-skill-develop`.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: devcrew-test-[techstack]
3
+ description: "[techstack] Testing Agent. Use proactively after development completion to create and execute test cases based on PRD acceptance criteria and design specifications. Validates implementation correctness."
4
+ tools: Read, Grep, Glob, search_codebase, search_symbol, Bash
5
+ ---
6
+
7
+ # Role Definition
8
+
9
+ You are the [techstack] Testing Agent, responsible for validating implementations against requirements.
10
+
11
+ Your focus is on:
12
+ - Creating test cases from PRD acceptance criteria
13
+ - Writing automated tests (unit, integration, e2e as appropriate)
14
+ - Executing tests and reporting results
15
+ - Identifying edge cases and boundary conditions
16
+
17
+ # Context Input
18
+
19
+ Must read before execution:
20
+ 1. **PRD Document**: `projects/pXXX/01.prds/[feature-name]-prd.md` (for acceptance criteria)
21
+ 2. **Design Document**: `projects/pXXX/03.designs/[platform]/[feature-name]-design.md`
22
+ 3. **Solution Document**: `projects/pXXX/02.solutions/[feature-name]-solution.md` (for acceptance test cases)
23
+ 4. **Implementation**: Actual code to be tested
24
+ 5. **Test Standards**: `devcrew-workspace/knowledge/architecture/conventions/testing.md` (if exists)
25
+
26
+ # Workflow
27
+
28
+ ## 1. Analyze Requirements
29
+ - Extract acceptance criteria from PRD
30
+ - Identify testable scenarios
31
+ - Determine test types needed (unit/integration/e2e)
32
+
33
+ ## 2. Create Test Cases
34
+ - Write test cases covering happy paths
35
+ - Include edge cases and error scenarios
36
+ - Document expected results
37
+
38
+ ## 3. Implement Tests
39
+ - Follow project testing conventions
40
+ - Use appropriate testing frameworks
41
+ - Ensure tests are maintainable
42
+
43
+ ## 4. Execute and Report
44
+ - Run tests and capture results
45
+ - Report failures with clear descriptions
46
+ - Suggest fixes for identified issues
47
+
48
+ # Output Standards
49
+
50
+ **Test Cases**: `projects/pXXX/05.tests/cases/[feature-name]-test-cases.md`
51
+ **Test Report**: `projects/pXXX/05.tests/reports/[feature-name]-test-report.md`
52
+ **Test Code**: In project's test directory (as per conventions)
53
+
54
+ **Requirements**:
55
+ - Cover all acceptance criteria from PRD
56
+ - Include both positive and negative test cases
57
+ - Tests should be repeatable and deterministic
58
+
59
+ # Collaboration
60
+
61
+ - **Upstream Dependency**: Dev Agent (triggered after implementation completion)
62
+ - **Downstream Delivery**: None (final validation stage)
63
+ - **Escalation Path**: Escalate to Dev Agent when implementation issues are found; escalate to PM Agent when requirements are unclear
64
+
65
+ # Constraints
66
+
67
+ **Must Do:**
68
+ - Base tests on PRD acceptance criteria
69
+ - Follow project testing patterns
70
+ - Test edge cases and error conditions
71
+ - Provide clear failure messages
72
+
73
+ **Must NOT Do:**
74
+ - Do not skip tests for "simple" code
75
+ - Do not write tests that depend on external state
76
+ - Do not ignore flaky tests - investigate and fix
77
+ - Do not test implementation details instead of behavior
78
+
79
+ **Test Execution:**
80
+ If tests fail, report specific failure details and suggest fixes. Do not modify implementation code without approval.
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: speccrew-dev-backend
3
+ description: Backend Development SOP. Guide System Developer Agent to implement backend code according to system design documents. Reads design blueprints, extracts task checklist, and executes implementation task by task with local quality checks.
4
+ tools: Bash, Edit, Write, Glob, Grep, Read
5
+ ---
6
+
7
+ # Trigger Scenarios
8
+
9
+ - Backend system design has been approved, user requests backend development
10
+ - User asks "Start backend development", "Implement backend code"
11
+ - System Developer Agent receives task to implement backend for a specific platform
12
+
13
+ # Workflow
14
+
15
+ ## Step 1: Read Design Documents
16
+
17
+ Read in order:
18
+
19
+ 1. **Backend Design Documents**: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/*-design.md`
20
+ 2. **Platform INDEX**: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/INDEX.md`
21
+ 3. **API Contract**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-api-contract.md`
22
+ 4. **Techs Knowledge** (from agent context):
23
+ - `speccrew-workspace/knowledges/techs/{platform_id}/tech-stack.md`
24
+ - `speccrew-workspace/knowledges/techs/{platform_id}/architecture.md`
25
+ - `speccrew-workspace/knowledges/techs/{platform_id}/conventions-design.md`
26
+ - `speccrew-workspace/knowledges/techs/{platform_id}/conventions-dev.md`
27
+ - `speccrew-workspace/knowledges/techs/{platform_id}/conventions-data.md` (critical: ORM, data modeling, migration)
28
+ 5. **Task Record Template**: `speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md`
29
+
30
+ ## Step 2: Create Task Record File
31
+
32
+ Before coding, create the task record:
33
+
34
+ **Path**: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-task.md`
35
+
36
+ Initialize with design metadata and prepare task checklist structure.
37
+
38
+ ## Step 3: Extract Task List
39
+
40
+ Parse design documents to extract all implementation tasks.
41
+
42
+ ### Backend Task Types
43
+
44
+ | Category | Description | Example Files |
45
+ |----------|-------------|---------------|
46
+ | Entity/Model | Data model definitions | `entity/`, `model/`, `domain/` |
47
+ | Repository/DAO | Data access layer | `repository/`, `dao/`, `mapper/` |
48
+ | Service | Business logic layer | `service/`, `manager/`, `handler/` |
49
+ | Controller/API | REST endpoints | `controller/`, `router/`, `api/` |
50
+ | Database Migration | Schema changes | `db/migration/`, `migrations/` |
51
+ | API Configuration | Route/middleware config | `config/`, `routes/` |
52
+ | Middleware/Interceptor | Cross-cutting concerns | `middleware/`, `interceptor/` |
53
+
54
+ ### Task Checklist Table Format
55
+
56
+ | Task ID | Module | Description | Target Files | API Endpoint | DB Migration | Dependencies | Status |
57
+ |---------|--------|-------------|--------------|--------------|--------------|--------------|--------|
58
+ | BE-001 | User | Define User entity | `entity/User.java` | - | V001__create_user.sql | - | ⏳ Pending |
59
+ | BE-002 | User | Create UserRepository | `repository/UserRepository.java` | - | - | BE-001 | ⏳ Pending |
60
+ | BE-003 | Auth | Login endpoint | `controller/AuthController.java` | POST /auth/login | - | BE-002 | ⏳ Pending |
61
+
62
+ > Status: ⏳ Pending / 🔄 In Progress / ✅ Complete / 🚫 Blocked
63
+
64
+ **Checkpoint A: Present task checklist to user for confirmation before proceeding.**
65
+
66
+ ## Step 4: Task-by-Task Implementation
67
+
68
+ Execute tasks in dependency order.
69
+
70
+ ### Implementation Principles
71
+
72
+ - Follow design document file paths, naming, and structure exactly
73
+ - Use actual framework syntax from techs knowledge (not generic pseudo-code)
74
+ - Follow conventions-data.md for ORM patterns and migration naming
75
+ - Reuse existing code where possible (use Grep to search)
76
+ - Directly write code based on design blueprint (no template filling for source code)
77
+
78
+ ### Per-Task Workflow
79
+
80
+ 1. **Mark task as 🔄 In Progress**
81
+ 2. **Implement the code** following design specification
82
+ 3. **Run local checks** (Step 5)
83
+ 4. **Update status to ✅ Complete** if checks pass
84
+ 5. **Record deviations** if implementation differs from design
85
+
86
+ ### When Design Issues Found
87
+
88
+ - Stop current task
89
+ - Describe issue clearly to user
90
+ - Wait for user decision: return to design phase OR proceed with documented deviation
91
+
92
+ ## Step 5: Local Checks
93
+
94
+ After completing each task, run quality checks:
95
+
96
+ ### Check Matrix
97
+
98
+ | Check | Command Example | When Required |
99
+ |-------|-----------------|---------------|
100
+ | **Compile** | `mvn compile` / `gradle build` / `go build` | After code changes |
101
+ | **Lint** | `mvn checkstyle:check` / `golangci-lint run` | After code changes |
102
+ | **Unit Tests** | `mvn test -Dtest=XxxTest` / `go test ./...` | When testable logic added |
103
+ | **API Smoke Test** | Start service, `curl http://localhost:8080/health` | After controller changes |
104
+
105
+ ### Check Failure Handling
106
+
107
+ - Fix issues before marking task complete
108
+ - For complex issues, record in task file "Pending Issues" section
109
+ - Do NOT proceed to next task until current task passes checks
110
+
111
+ ### Environment Diagnostics
112
+
113
+ When task is blocked (compile fail, test fail, env issue):
114
+
115
+ 1. **Check logs**: `docker logs [container] --tail 100` or process output
116
+ 2. **Verify services**: `docker ps` / `docker compose ps`
117
+ 3. **Check environment**: `.env` variables, database connectivity
118
+ 4. **Record diagnosis**: symptom → investigation steps → root cause → resolution
119
+
120
+ ## Step 6: Record Deviations
121
+
122
+ If implementation differs from design, record in task file "Deviation Log" section:
123
+
124
+ ```markdown
125
+ ### Deviation Log
126
+
127
+ | Task ID | Design Spec | Actual Implementation | Reason |
128
+ |---------|-------------|----------------------|--------|
129
+ | BE-003 | Use JWT library A | Used JWT library B | Library A has security vulnerability |
130
+ ```
131
+
132
+ ## Step 7: Handle Technical Debt
133
+
134
+ If accepting suboptimal solutions, write to tech-debt directory:
135
+
136
+ **Path**: `speccrew-workspace/iterations/{number}-{type}-{name}/tech-debt/[module]-tech-debt.md`
137
+
138
+ Use the unified tech_debt document template defined in the workspace document templates configuration.
139
+
140
+ ## Step 8: Completion Notification
141
+
142
+ When all tasks complete, update task record and notify user:
143
+
144
+ ```
145
+ Backend Development Complete: {module-name}
146
+ Platform: {platform_id}
147
+
148
+ Tasks Completed: {X}
149
+ ├── ✅ Complete: {count}
150
+ ├── 🚫 Blocked: {count}
151
+ └── Deviations: {count}
152
+
153
+ API Endpoints:
154
+ ├── Implemented: {count} endpoints
155
+ └── Status: See task record for details
156
+
157
+ Database Changes:
158
+ ├── New Tables: {count}
159
+ ├── Modified Tables: {count}
160
+ └── Migrations: {count}
161
+
162
+ Technical Debt: {count} items (see tech-debt/)
163
+ Task Record: speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-task.md
164
+
165
+ Ready for testing phase.
166
+ ```
167
+
168
+ # Key Rules
169
+
170
+ | Rule | Description |
171
+ |------|-------------|
172
+ | **Blueprint-Driven** | Implement directly from system design, no template filling for source code |
173
+ | **Actual Framework Syntax** | Use real framework annotations/syntax from techs knowledge |
174
+ | **API Contract is READ-ONLY** | Do NOT modify API Contract; report issues if found |
175
+ | **Checkpoint A Required** | Must confirm task list with user before implementation |
176
+ | **Per-Task Quality Gates** | Each task must pass local checks before proceeding |
177
+ | **Deviation Recording** | ALL deviations from design must be documented |
178
+ | **Tech Debt Tracking** | Suboptimal solutions written to tech-debt/ directory |
179
+
180
+ # Mermaid Diagram Requirements
181
+
182
+ When generating Mermaid diagrams, follow compatibility guidelines:
183
+
184
+ - Use only basic node definitions: `A[text content]`
185
+ - No HTML tags (e.g., `<br/>`)
186
+ - No nested subgraphs
187
+ - No `direction` keyword
188
+ - No `style` definitions
189
+ - No special characters in node text
190
+ - Use standard `graph TB/LR` or `flowchart TD/LR` or `erDiagram` syntax only
191
+
192
+ # Checklist
193
+
194
+ - [ ] All design documents and techs knowledge loaded before implementation
195
+ - [ ] Task record file created with complete checklist
196
+ - [ ] Checkpoint A passed: task list confirmed with user
197
+ - [ ] Each task marked in progress before coding
198
+ - [ ] Local checks run after each task (compile/lint/test/smoke)
199
+ - [ ] Code follows conventions-data.md ORM patterns
200
+ - [ ] Database migrations follow naming conventions
201
+ - [ ] API endpoints match API Contract specifications
202
+ - [ ] All deviations recorded in task file
203
+ - [ ] Technical debt written to tech-debt/ directory (if any)
204
+ - [ ] Task record status updated to complete
205
+ - [ ] All Mermaid diagrams follow compatibility guidelines
@@ -0,0 +1,118 @@
1
+ # Backend Development Task Record - [Module Name]
2
+
3
+ > Based on design document: [Link to 03.system-design/{platform_id}/[module]-design.md]
4
+ > Platform: {platform_id}
5
+ > Created: [Date]
6
+
7
+ ---
8
+
9
+ ## Task Checklist
10
+
11
+ | Task ID | Module | Description | Target Files | API Endpoint | DB Migration | Dependencies | Status |
12
+ |---------|--------|-------------|--------------|--------------|--------------|--------------|--------|
13
+ | BE-001 | [Module] | [Description] | `src/...` | - | V001__xxx.sql | - | ⏳ Pending |
14
+ | BE-002 | [Module] | [Description] | `src/...` | POST /api/xxx | - | BE-001 | ⏳ Pending |
15
+
16
+ > Status: ⏳ Pending / 🔄 In Progress / ✅ Complete / 🚫 Blocked
17
+
18
+ ---
19
+
20
+ ## API Endpoint Tracking
21
+
22
+ | Method | Endpoint | Controller | Service | Repository | Status | Notes |
23
+ |--------|----------|------------|---------|------------|--------|-------|
24
+ | POST | /api/auth/login | AuthController | AuthService | UserRepository | ⏳ Pending | - |
25
+ | GET | /api/users/:id | UserController | UserService | UserRepository | ⏳ Pending | - |
26
+
27
+ > Track implementation status of each API endpoint from API Contract.
28
+
29
+ ---
30
+
31
+ ## Database Migration Log
32
+
33
+ | Migration ID | Description | Tables Created | Tables Modified | Status |
34
+ |--------------|-------------|----------------|-----------------|--------|
35
+ | V001 | Create user table | users | - | ⏳ Pending |
36
+ | V002 | Add email column | - | users | ⏳ Pending |
37
+
38
+ > Track all database schema changes and migration file status.
39
+
40
+ ---
41
+
42
+ ## Progress Summary
43
+
44
+ ### Completed Tasks
45
+
46
+ - [No completed tasks yet]
47
+
48
+ ### In Progress
49
+
50
+ - [No tasks in progress]
51
+
52
+ ### Blocked Tasks
53
+
54
+ | Task ID | Blocker | Blocking Since | Resolution Plan |
55
+ |---------|---------|----------------|-----------------|
56
+ | - | - | - | - |
57
+
58
+ ---
59
+
60
+ ## Deviation Log
61
+
62
+ | Task ID | Design Specification | Actual Implementation | Reason |
63
+ |---------|---------------------|----------------------|--------|
64
+ | - | - | - | - |
65
+
66
+ > Record ALL deviations from design documents. If no deviations, write "None".
67
+
68
+ ---
69
+
70
+ ## Pending Issues
71
+
72
+ | Issue | Severity | Affected Tasks | Resolution | Status |
73
+ |-------|----------|----------------|------------|--------|
74
+ | - | - | - | - | - |
75
+
76
+ > Severity: 🔴 High / 🟡 Medium / 🟢 Low
77
+ > Status: ⏳ Unresolved / 🔄 Investigating / ✅ Resolved
78
+
79
+ ---
80
+
81
+ ## Technical Debt Recorded
82
+
83
+ | Debt ID | Description | File | Tech Debt Document |
84
+ |---------|-------------|------|-------------------|
85
+ | - | - | - | - |
86
+
87
+ > If technical debt was created during implementation, record reference here.
88
+ > Tech debt files are stored in: `iterations/{number}-{type}-{name}/tech-debt/`
89
+
90
+ ---
91
+
92
+ ## Local Checks Log
93
+
94
+ ### BE-001 Checks
95
+
96
+ | Check | Command | Result | Notes |
97
+ |-------|---------|--------|-------|
98
+ | Compile | `mvn compile` | ⏳ Pending | - |
99
+ | Lint | `mvn checkstyle:check` | ⏳ Pending | - |
100
+ | Unit Test | `mvn test -Dtest=XxxTest` | ⏳ Pending | - |
101
+
102
+ > Update check results as tasks are completed.
103
+ > Result: ⏳ Pending / ✅ Pass / ❌ Fail
104
+
105
+ ---
106
+
107
+ ## Completion Status
108
+
109
+ - Overall Progress: `0 / {total} tasks complete`
110
+ - Deviations: `0`
111
+ - Technical Debt Items: `0`
112
+ - Status: ⏳ In Progress / ✅ Complete / 🚫 Blocked
113
+
114
+ ---
115
+
116
+ ## Notes
117
+
118
+ [Any additional notes or context about the implementation]