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.
- package/.speccrew/agents/speccrew-feature-designer.md +142 -0
- package/.speccrew/agents/speccrew-product-manager.md +61 -0
- package/.speccrew/agents/speccrew-system-designer.md +200 -0
- package/.speccrew/agents/speccrew-system-developer.md +238 -0
- package/.speccrew/agents/speccrew-task-worker.md +80 -0
- package/.speccrew/agents/speccrew-team-leader.md +92 -0
- package/.speccrew/agents/speccrew-test-manager.md +313 -0
- package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
- package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
- package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
- package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
- package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
- package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
- package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
- package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
- package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
- package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
- package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
- package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
- package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
- package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
- package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
- package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
- package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
- package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
- package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
- package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
- package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
- package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
- package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
- package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
- package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
- package/LICENSE +21 -0
- package/README.ar.md +318 -0
- package/README.en.md +318 -0
- package/README.es.md +318 -0
- package/README.md +340 -0
- package/bin/cli.js +62 -0
- package/lib/commands/doctor.js +138 -0
- package/lib/commands/init.js +231 -0
- package/lib/commands/list.js +114 -0
- package/lib/commands/uninstall.js +117 -0
- package/lib/commands/update.js +351 -0
- package/lib/ide-adapters.js +73 -0
- package/lib/utils.js +104 -0
- package/package.json +28 -0
- package/workspace-template/docs/configs/document-templates.json +667 -0
- package/workspace-template/docs/configs/platform-mapping.json +194 -0
- package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
- package/workspace-template/docs/configs/validation-rules.json +87 -0
- package/workspace-template/docs/rules/mermaid-rule.md +114 -0
- 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
- package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
- package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
- package/workspace-template/docs/solutions/harness.md +410 -0
- package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
- package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
- package/workspace-template/docs/solutions/workspace-structure.md +318 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Feature Specification - [Feature Name]
|
|
2
|
+
|
|
3
|
+
> **Applicable Scenario**: System feature specification for a single feature or module
|
|
4
|
+
> **Target Audience**: speccrew-feature-designer, speccrew-designer, speccrew-dev
|
|
5
|
+
> **Source PRD**: [Link to PRD document]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Overview
|
|
10
|
+
|
|
11
|
+
### 1.1 Basic Information
|
|
12
|
+
|
|
13
|
+
| Item | Description |
|
|
14
|
+
|------|-------------|
|
|
15
|
+
| Feature Name | {Feature Name} |
|
|
16
|
+
| Module | {Module Name} |
|
|
17
|
+
| Core Function | {1-3 sentences describing core feature value} |
|
|
18
|
+
| Target Users | {Describe target user groups} |
|
|
19
|
+
| Applicable Scenario | {Describe core applicable business scenarios} |
|
|
20
|
+
|
|
21
|
+
### 1.2 Feature Scope
|
|
22
|
+
|
|
23
|
+
<!-- AI-NOTE: Check all items that this specification covers -->
|
|
24
|
+
|
|
25
|
+
- [ ] {Function 1} - Frontend prototype + Interaction flow + Backend interface + Data definition
|
|
26
|
+
- [ ] {Function 2} - Frontend prototype + Interaction flow + Backend interface + Data definition
|
|
27
|
+
- [ ] {Function 3} - Frontend prototype + Interaction flow + Backend interface + Data definition
|
|
28
|
+
|
|
29
|
+
### 1.3 Relationship to Existing System
|
|
30
|
+
|
|
31
|
+
| Module | Relationship Type | Description |
|
|
32
|
+
|--------|-------------------|-------------|
|
|
33
|
+
| {Module A} | EXISTING | {This module already exists, this feature reads data from it} |
|
|
34
|
+
| {Module B} | MODIFIED | {This module will be modified to support new functionality} |
|
|
35
|
+
| {Module C} | NEW | {This is a new module created for this feature} |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 2. Function Details
|
|
40
|
+
|
|
41
|
+
<!-- AI-NOTE: Repeat Section 2.N for each function in the feature. Each function should include: frontend prototype, interaction flow, backend interface, and data definition. -->
|
|
42
|
+
|
|
43
|
+
### 2.1 Function: {Function Name}
|
|
44
|
+
|
|
45
|
+
#### 2.1.1 Frontend Prototype
|
|
46
|
+
|
|
47
|
+
<!-- AI-NOTE: Use ASCII wireframes to show the UI layout. Choose the appropriate pattern below based on the interface type. -->
|
|
48
|
+
|
|
49
|
+
**Pattern A: List Page**
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
53
|
+
│ [Page Title] {e.g., Product Management List} │
|
|
54
|
+
├─────────────────────────────────────────────────────────────┤
|
|
55
|
+
│ ┌─────────────┬─────────────┬─────────────┬─────────────┐ │
|
|
56
|
+
│ │ Filter Area │ □ Checkbox │ Input □ │ Dropdown ▼ │ │
|
|
57
|
+
│ │ │ Keyword:____|____________ │ Status:_____▼│ │
|
|
58
|
+
│ │ │ [Query] [Reset] [Add] │ │
|
|
59
|
+
│ └─────────────┴─────────────┴─────────────┴─────────────┘ │
|
|
60
|
+
│ │
|
|
61
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
62
|
+
│ │ No. │ Field 1 │ Field 2 │ Field 3 │ Actions │ │
|
|
63
|
+
│ ├──────┼─────────┼─────────┼─────────┼─────────────────┤ │
|
|
64
|
+
│ │ 1 │ {Value} │ {Value} │ {Value} │ [Edit][Delete] │ │
|
|
65
|
+
│ │ 2 │ {Value} │ {Value} │ {Value} │ [Edit][Delete] │ │
|
|
66
|
+
│ │ ... │ ... │ ... │ ... │ ... │ │
|
|
67
|
+
│ └──────┴─────────┴─────────┴─────────┴─────────────────┘ │
|
|
68
|
+
│ │
|
|
69
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
70
|
+
│ │ Pagination: Total {X} records Page [1][2][3] {X}/page ▼│ │
|
|
71
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
72
|
+
└─────────────────────────────────────────────────────────────┘
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Pattern B: Form Page**
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
79
|
+
│ [Page Title] {e.g., Add Product} │
|
|
80
|
+
├─────────────────────────────────────────────────────────────┤
|
|
81
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
82
|
+
│ │ Basic Information Area │ │
|
|
83
|
+
│ │ ┌─────────────┬───────────────────────────────────────┐ │ │
|
|
84
|
+
│ │ │ Label │ Input/Select │ │ │
|
|
85
|
+
│ │ │ Product: │ ____|__________________________________ │ │ │
|
|
86
|
+
│ │ │ Code: │ ____|__________________________________ │ │ │
|
|
87
|
+
│ │ │ Status: │ □ Enable □ Disable │ │ │
|
|
88
|
+
│ │ │ Category: │ ______▼ │ │ │
|
|
89
|
+
│ │ └─────────────┴───────────────────────────────────────┘ │ │
|
|
90
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
91
|
+
│ │
|
|
92
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
93
|
+
│ │ [Save] [Cancel] │ │
|
|
94
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
95
|
+
└─────────────────────────────────────────────────────────────┘
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Pattern C: Modal/Dialog**
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
102
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
103
|
+
│ │ [Modal Title] {e.g., Delete Confirmation} │ │
|
|
104
|
+
│ ├─────────────────────────────────────────────────────────┤ │
|
|
105
|
+
│ │ │ │
|
|
106
|
+
│ │ Message: {e.g., Are you sure to delete this product? │ │
|
|
107
|
+
│ │ This action cannot be undone!} │ │
|
|
108
|
+
│ │ │ │
|
|
109
|
+
│ ├─────────────────────────────────────────────────────────┤ │
|
|
110
|
+
│ │ [Cancel] [Confirm] │ │
|
|
111
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
112
|
+
└─────────────────────────────────────────────────────────────┘
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Interface Element Description:**
|
|
116
|
+
|
|
117
|
+
| Area | Element | Type | Description | Interaction |
|
|
118
|
+
|------|---------|------|-------------|-------------|
|
|
119
|
+
| {Area Name} | {Element Name} | {Input/Button/Link/etc} | {Description of purpose} | {Click/Blur/Change behavior} |
|
|
120
|
+
| {Area Name} | {Element Name} | {Type} | {Description} | {Interaction} |
|
|
121
|
+
|
|
122
|
+
#### 2.1.2 Interaction Flow
|
|
123
|
+
|
|
124
|
+
<!-- AI-NOTE: Use Mermaid sequenceDiagram to show the flow: User → Frontend → Backend API → Data Store. NO style definitions allowed. NO HTML tags. -->
|
|
125
|
+
|
|
126
|
+
```mermaid
|
|
127
|
+
sequenceDiagram
|
|
128
|
+
actor U as User
|
|
129
|
+
participant F as Frontend
|
|
130
|
+
participant A as API
|
|
131
|
+
participant B as Business Logic
|
|
132
|
+
participant D as Data Store
|
|
133
|
+
|
|
134
|
+
U->>F: 1. {User action, e.g., Click Add button}
|
|
135
|
+
F->>F: 2. {Frontend processing, e.g., Open form}
|
|
136
|
+
U->>F: 3. {User input, e.g., Fill form data}
|
|
137
|
+
U->>F: 4. {User action, e.g., Click Save}
|
|
138
|
+
F->>F: 5. {Frontend validation}
|
|
139
|
+
|
|
140
|
+
alt Validation passed
|
|
141
|
+
F->>A: 6. {API call, e.g., POST /api/resource}
|
|
142
|
+
A->>B: 7. {Business validation}
|
|
143
|
+
|
|
144
|
+
alt Business validation passed
|
|
145
|
+
B->>D: 8. {Data operation, e.g., Save data}
|
|
146
|
+
D-->>B: 9. {Return result}
|
|
147
|
+
B-->>A: 10. {Return success}
|
|
148
|
+
A-->>F: 11. {Return success response}
|
|
149
|
+
F->>F: 12. {UI update, e.g., Show success message}
|
|
150
|
+
F->>U: 13. {Final state, e.g., Return to list}
|
|
151
|
+
else Business validation failed
|
|
152
|
+
B-->>A: {Return error}
|
|
153
|
+
A-->>F: {Return error response}
|
|
154
|
+
F->>U: {Show error message}
|
|
155
|
+
end
|
|
156
|
+
else Validation failed
|
|
157
|
+
F->>U: {Show validation error}
|
|
158
|
+
end
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Interaction Rules:**
|
|
162
|
+
|
|
163
|
+
| Trigger | Behavior | API Called | Exception Handling |
|
|
164
|
+
|---------|----------|------------|-------------------|
|
|
165
|
+
| {Trigger event} | {Behavior description} | {API name or -} | {Exception handling} |
|
|
166
|
+
| {Trigger} | {Behavior} | {API} | {Exception} |
|
|
167
|
+
|
|
168
|
+
#### 2.1.3 Backend Interface
|
|
169
|
+
|
|
170
|
+
**Interface List:**
|
|
171
|
+
|
|
172
|
+
| Interface Name | Method | Path Pattern | Description | Caller |
|
|
173
|
+
|----------------|--------|--------------|-------------|--------|
|
|
174
|
+
| {Interface Name} | GET/POST/PUT/DELETE | {/api/path/pattern} | {Description} | {Frontend/Other} |
|
|
175
|
+
| {Interface Name} | {Method} | {Path} | {Description} | {Caller} |
|
|
176
|
+
|
|
177
|
+
**Processing Logic:**
|
|
178
|
+
|
|
179
|
+
<!-- AI-NOTE: Use Mermaid flowchart TD to show the processing logic for each core interface. Show: business validation → data operation → response. NO style definitions allowed. -->
|
|
180
|
+
|
|
181
|
+
```mermaid
|
|
182
|
+
flowchart TD
|
|
183
|
+
Start[Request Received] --> Validation{Business Validation}
|
|
184
|
+
|
|
185
|
+
Validation -->|Failed| ValidationError[Return Validation Error]
|
|
186
|
+
ValidationError --> End1[End]
|
|
187
|
+
|
|
188
|
+
Validation -->|Passed| CheckPermission{Permission Check}
|
|
189
|
+
|
|
190
|
+
CheckPermission -->|Failed| PermissionError[Return Permission Error]
|
|
191
|
+
PermissionError --> End2[End]
|
|
192
|
+
|
|
193
|
+
CheckPermission -->|Passed| DataOperation[Execute Data Operation]
|
|
194
|
+
|
|
195
|
+
DataOperation -->|Failed| OperationError[Return Operation Error]
|
|
196
|
+
OperationError --> End3[End]
|
|
197
|
+
|
|
198
|
+
DataOperation -->|Success| BuildResponse[Build Success Response]
|
|
199
|
+
BuildResponse --> End4[End]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Data Access:**
|
|
203
|
+
|
|
204
|
+
| Operation | Data Structure | Access Type | Description |
|
|
205
|
+
|-----------|----------------|-------------|-------------|
|
|
206
|
+
| {e.g., Query list} | {Structure name} | Read | {Description of access} |
|
|
207
|
+
| {e.g., Create record} | {Structure name} | Create | {Description} |
|
|
208
|
+
| {e.g., Update record} | {Structure name} | Write | {Description} |
|
|
209
|
+
|
|
210
|
+
#### 2.1.4 Data Definition
|
|
211
|
+
|
|
212
|
+
**Fields:**
|
|
213
|
+
|
|
214
|
+
| Field Name | Field Type | Data Format | Constraint Rules | New/Existing | Remarks |
|
|
215
|
+
|------------|------------|-------------|------------------|--------------|---------|
|
|
216
|
+
| {Field Name} | String/Number/Boolean/Date/Enum | {e.g., length ≤32, phone format} | {Required/Optional, Unique, Default value} | NEW/EXISTING | {Additional notes} |
|
|
217
|
+
| {Field Name} | {Type} | {Format} | {Constraints} | NEW/EXISTING | {Remarks} |
|
|
218
|
+
|
|
219
|
+
**Data Source:**
|
|
220
|
+
|
|
221
|
+
| Field Name | Data Source | Update Timing | Description |
|
|
222
|
+
|------------|-------------|---------------|-------------|
|
|
223
|
+
| {Field Name} | User input | On form submission | {Description} |
|
|
224
|
+
| {Field Name} | System generated | On record creation | {e.g., Auto-generated ID} |
|
|
225
|
+
| {Field Name} | Reference from {source} | {Timing} | {Description} |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### 2.2 Function: {Function Name}
|
|
230
|
+
|
|
231
|
+
<!-- AI-NOTE: Repeat the same structure as 2.1 for each additional function -->
|
|
232
|
+
|
|
233
|
+
#### 2.2.1 Frontend Prototype
|
|
234
|
+
|
|
235
|
+
{ASCII wireframe and element description}
|
|
236
|
+
|
|
237
|
+
#### 2.2.2 Interaction Flow
|
|
238
|
+
|
|
239
|
+
{Mermaid sequenceDiagram and interaction rules}
|
|
240
|
+
|
|
241
|
+
#### 2.2.3 Backend Interface
|
|
242
|
+
|
|
243
|
+
{Interface list, processing logic flowchart, data access}
|
|
244
|
+
|
|
245
|
+
#### 2.2.4 Data Definition
|
|
246
|
+
|
|
247
|
+
{Fields and data source}
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## 3. Cross-Function Concerns
|
|
252
|
+
|
|
253
|
+
### 3.1 Shared Data Structures
|
|
254
|
+
|
|
255
|
+
<!-- AI-NOTE: List data structures used across multiple functions -->
|
|
256
|
+
|
|
257
|
+
| Structure Name | Used By Functions | Description |
|
|
258
|
+
|----------------|-------------------|-------------|
|
|
259
|
+
| {Structure Name} | {Function 1}, {Function 2} | {Description} |
|
|
260
|
+
| {Structure Name} | {Functions} | {Description} |
|
|
261
|
+
|
|
262
|
+
### 3.2 Cross-Function Flows
|
|
263
|
+
|
|
264
|
+
<!-- AI-NOTE: Use Mermaid sequenceDiagram for flows that span multiple functions. NO style definitions. NO HTML tags. -->
|
|
265
|
+
|
|
266
|
+
```mermaid
|
|
267
|
+
sequenceDiagram
|
|
268
|
+
actor U as User
|
|
269
|
+
participant F1 as Function A Frontend
|
|
270
|
+
participant A1 as Function A API
|
|
271
|
+
participant F2 as Function B Frontend
|
|
272
|
+
participant A2 as Function B API
|
|
273
|
+
participant D as Data Store
|
|
274
|
+
|
|
275
|
+
U->>F1: Action in Function A
|
|
276
|
+
F1->>A1: API call
|
|
277
|
+
A1->>D: Data operation
|
|
278
|
+
A1-->>F1: Response
|
|
279
|
+
F1->>F2: Navigate to Function B
|
|
280
|
+
F2->>A2: Load related data
|
|
281
|
+
A2->>D: Query data
|
|
282
|
+
A2-->>F2: Return data
|
|
283
|
+
F2->>U: Display Function B
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## 4. Business Rules & Constraints
|
|
289
|
+
|
|
290
|
+
### 4.1 Permission Rules
|
|
291
|
+
|
|
292
|
+
| Operation | Permission Requirement | No Permission Handling |
|
|
293
|
+
|-----------|----------------------|----------------------|
|
|
294
|
+
| {Operation name} | {Role/Permission required} | {How to handle - hide button, show error, etc.} |
|
|
295
|
+
| {Operation} | {Requirement} | {Handling} |
|
|
296
|
+
|
|
297
|
+
### 4.2 Business Logic Rules
|
|
298
|
+
|
|
299
|
+
<!-- AI-NOTE: Numbered list of business rules -->
|
|
300
|
+
|
|
301
|
+
1. **{Rule Name}**: {Detailed description of the rule}
|
|
302
|
+
2. **{Rule Name}**: {Detailed description}
|
|
303
|
+
3. **{Rule Name}**: {Detailed description}
|
|
304
|
+
|
|
305
|
+
### 4.3 Validation Rules
|
|
306
|
+
|
|
307
|
+
| Scenario | Rule | Prompt Message | Validation Timing |
|
|
308
|
+
|----------|------|----------------|-------------------|
|
|
309
|
+
| {Scenario} | {Validation rule} | {Error message to show} | {Frontend/Backend/Both} |
|
|
310
|
+
| {Scenario} | {Rule} | {Message} | {Timing} |
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## 5. API Contract Summary
|
|
315
|
+
|
|
316
|
+
### 5.1 Complete API List
|
|
317
|
+
|
|
318
|
+
| API Name | Method | Path | Description | Related Function |
|
|
319
|
+
|----------|--------|------|-------------|------------------|
|
|
320
|
+
| {API Name} | GET/POST/PUT/DELETE | {/api/path} | {Description} | {Function Name} |
|
|
321
|
+
| {API Name} | {Method} | {Path} | {Description} | {Function Name} |
|
|
322
|
+
|
|
323
|
+
### 5.2 Shared Response Format
|
|
324
|
+
|
|
325
|
+
<!-- AI-NOTE: Standard response JSON structure used across all APIs in this feature -->
|
|
326
|
+
|
|
327
|
+
**Success Response:**
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"code": 0,
|
|
332
|
+
"message": "success",
|
|
333
|
+
"data": {
|
|
334
|
+
"{field1}": "{value1}",
|
|
335
|
+
"{field2}": "{value2}"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**Error Response:**
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"code": {error_code},
|
|
345
|
+
"message": "{error_message}",
|
|
346
|
+
"data": null
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### 5.3 Common Error Codes
|
|
351
|
+
|
|
352
|
+
| Error Code | HTTP Status | Description |
|
|
353
|
+
|------------|-------------|-------------|
|
|
354
|
+
| {Code} | {Status} | {Description} |
|
|
355
|
+
| {Code} | {Status} | {Description} |
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## 6. Notes
|
|
360
|
+
|
|
361
|
+
### 6.1 Pending Confirmations
|
|
362
|
+
|
|
363
|
+
<!-- AI-NOTE: Checklist of items needing confirmation from stakeholders -->
|
|
364
|
+
|
|
365
|
+
- [ ] **{Item 1}**: {Description of what needs confirmation}
|
|
366
|
+
- [ ] **{Item 2}**: {Description}
|
|
367
|
+
|
|
368
|
+
### 6.2 Assumptions & Dependencies
|
|
369
|
+
|
|
370
|
+
<!-- AI-NOTE: List assumptions made and external dependencies -->
|
|
371
|
+
|
|
372
|
+
- **Assumption 1**: {Description of assumption}
|
|
373
|
+
- **Dependency 1**: {External system or module this feature depends on}
|
|
374
|
+
|
|
375
|
+
### 6.3 Extension Notes
|
|
376
|
+
|
|
377
|
+
<!-- AI-NOTE: Notes about future iterations or extensions -->
|
|
378
|
+
|
|
379
|
+
- {Note about potential future enhancements}
|
|
380
|
+
- {Note about scalability considerations}
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
**Document Status:** Draft / In Review / Published
|
|
385
|
+
**Last Updated:** {Date}
|
|
386
|
+
**Source PRD:** [PRD Document](link)
|
|
387
|
+
**Related Module:** [Module Overview](link)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-get-timestamp
|
|
3
|
+
description: Get current timestamp in various formats for file naming and logging. Use when generating dated filenames, report timestamps, or any scenario requiring consistent datetime formatting.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Get Timestamp
|
|
7
|
+
|
|
8
|
+
Get current timestamp in specified format for consistent datetime handling across all skills.
|
|
9
|
+
|
|
10
|
+
## User
|
|
11
|
+
|
|
12
|
+
Any Agent or script requiring timestamp generation
|
|
13
|
+
|
|
14
|
+
## Input
|
|
15
|
+
|
|
16
|
+
- `format` (optional): Timestamp format, default is `YYYY-MM-DD-HHmmss`
|
|
17
|
+
- `YYYY-MM-DD-HHmmss`: Full datetime for filenames (e.g., `2026-03-17-132645`)
|
|
18
|
+
- `YYYY-MM-DD`: Date only (e.g., `2026-03-17`)
|
|
19
|
+
- `HHmm`: Time only 24h format (e.g., `1326`)
|
|
20
|
+
- `ISO`: ISO 8601 format (e.g., `2026-03-17T13:26:45+08:00`)
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
- Timestamp string in specified format (printed to stdout)
|
|
25
|
+
|
|
26
|
+
## Supported Formats
|
|
27
|
+
|
|
28
|
+
| Format | Description | Example |
|
|
29
|
+
|--------|-------------|---------|
|
|
30
|
+
| `YYYY-MM-DD-HHmmss` | Full datetime for filenames | `2026-03-17-132645` |
|
|
31
|
+
| `YYYY-MM-DD` | Date only | `2026-03-17` |
|
|
32
|
+
| `HHmm` | Time only (24h) | `1326` |
|
|
33
|
+
| `ISO` | ISO 8601 format | `2026-03-17T13:26:45+08:00` |
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### Method 1: Direct Script Execution (Node.js - Cross Platform)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Node.js (cross-platform, recommended)
|
|
41
|
+
node scripts/get-timestamp.js "YYYY-MM-DD-HHmmss"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Method 2: Default Format (YYYY-MM-DD-HHmmss)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Without format parameter, returns YYYY-MM-DD-HHmmss
|
|
48
|
+
node scripts/get-timestamp.js
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Integration Examples
|
|
52
|
+
|
|
53
|
+
### For Report Filenames
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
TIMESTAMP=$(node scripts/get-timestamp.js "YYYY-MM-DD-HHmmss")
|
|
57
|
+
FILENAME="diagnosis-report-${TIMESTAMP}.md"
|
|
58
|
+
# Result: diagnosis-report-2026-03-17-132645.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### For Archive Naming
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
TIMESTAMP=$(node scripts/get-timestamp.js "YYYY-MM-DD")
|
|
65
|
+
ARCHIVE_NAME="tech-debt-archived-${TIMESTAMP}.md"
|
|
66
|
+
# Result: tech-debt-archived-2026-03-17.md
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### For Template Variables
|
|
70
|
+
|
|
71
|
+
When filling `{{generated_at}}` in templates:
|
|
72
|
+
```bash
|
|
73
|
+
generated_at=$(node scripts/get-timestamp.js "ISO")
|
|
74
|
+
# Result: 2026-03-17T13:26:45+08:00
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Script Location
|
|
78
|
+
|
|
79
|
+
- **Node.js**: `scripts/get-timestamp.js` (cross-platform, unified implementation)
|
|
80
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Get current timestamp in specified format
|
|
4
|
+
* Usage: node get-timestamp.js [format]
|
|
5
|
+
* Default format: YYYY-MM-DD-HHmmss
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const FORMATS = {
|
|
9
|
+
'YYYY-MM-DD-HHmmss': () => {
|
|
10
|
+
const now = new Date();
|
|
11
|
+
return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}-${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}${String(now.getSeconds()).padStart(2, '0')}`;
|
|
12
|
+
},
|
|
13
|
+
'YYYY-MM-DD': () => {
|
|
14
|
+
const now = new Date();
|
|
15
|
+
return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
|
|
16
|
+
},
|
|
17
|
+
'HHmm': () => {
|
|
18
|
+
const now = new Date();
|
|
19
|
+
return `${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}`;
|
|
20
|
+
},
|
|
21
|
+
'ISO': () => new Date().toISOString()
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function getTimestamp(format = 'YYYY-MM-DD-HHmmss') {
|
|
25
|
+
const formatter = FORMATS[format];
|
|
26
|
+
if (formatter) {
|
|
27
|
+
return formatter();
|
|
28
|
+
}
|
|
29
|
+
// Default fallback
|
|
30
|
+
return FORMATS['YYYY-MM-DD-HHmmss']();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Main execution
|
|
34
|
+
const format = process.argv[2] || 'YYYY-MM-DD-HHmmss';
|
|
35
|
+
console.log(getTimestamp(format));
|