@jeancodogno/specforce-kit 0.1.5 → 0.1.7

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 (154) hide show
  1. package/index.js +46 -0
  2. package/package.json +12 -28
  3. package/.geminiignore +0 -15
  4. package/.github/workflows/ci.yml +0 -104
  5. package/.github/workflows/release.yml +0 -51
  6. package/.golangci.yml +0 -24
  7. package/.goreleaser.yaml +0 -39
  8. package/.rgignore +0 -13
  9. package/.specforce/archive/agents-md-hooks-config/design.md +0 -38
  10. package/.specforce/archive/agents-md-hooks-config/requirements.md +0 -35
  11. package/.specforce/archive/agents-md-hooks-config/tasks.md +0 -76
  12. package/.specforce/config.yaml +0 -32
  13. package/.specforce/docs/.gitkeep +0 -0
  14. package/.specforce/docs/architecture.md +0 -98
  15. package/.specforce/docs/engineering.md +0 -84
  16. package/.specforce/docs/governance.md +0 -30
  17. package/.specforce/docs/memorial.md +0 -45
  18. package/.specforce/docs/principles.md +0 -31
  19. package/.specforce/docs/security.md +0 -31
  20. package/.specforce/docs/ui-ux.md +0 -129
  21. package/.specforce/specs/.gitkeep +0 -0
  22. package/AGENTS.md +0 -46
  23. package/CONTRIBUTING.md +0 -81
  24. package/Makefile +0 -49
  25. package/assets/logo-header.png +0 -0
  26. package/assets/logo.png +0 -0
  27. package/docs/artifacts.md +0 -41
  28. package/docs/cli.md +0 -73
  29. package/docs/configuration.md +0 -59
  30. package/docs/getting-started.md +0 -110
  31. package/docs/supported-tools.md +0 -28
  32. package/go.mod +0 -35
  33. package/go.sum +0 -61
  34. package/src/cmd/specforce/main.go +0 -23
  35. package/src/cmd/specforce/main_test.go +0 -7
  36. package/src/internal/agent/artifacts/constitution/architecture.yaml +0 -70
  37. package/src/internal/agent/artifacts/constitution/engineering.yaml +0 -52
  38. package/src/internal/agent/artifacts/constitution/governance.yaml +0 -41
  39. package/src/internal/agent/artifacts/constitution/memorial.yaml +0 -55
  40. package/src/internal/agent/artifacts/constitution/principles.yaml +0 -54
  41. package/src/internal/agent/artifacts/constitution/security.yaml +0 -47
  42. package/src/internal/agent/artifacts/constitution/ui-ux.yaml +0 -158
  43. package/src/internal/agent/artifacts/spec/design.yaml +0 -50
  44. package/src/internal/agent/artifacts/spec/requirements.yaml +0 -48
  45. package/src/internal/agent/artifacts/spec/tasks.yaml +0 -55
  46. package/src/internal/agent/compatibility_test.go +0 -120
  47. package/src/internal/agent/cwd_test.go +0 -9
  48. package/src/internal/agent/embed.go +0 -19
  49. package/src/internal/agent/integration_test.go +0 -138
  50. package/src/internal/agent/kit/agents/product-analyst.yaml +0 -31
  51. package/src/internal/agent/kit/agents/technical-developer.yaml +0 -28
  52. package/src/internal/agent/kit/agents/technical-project-planner.yaml +0 -30
  53. package/src/internal/agent/kit/agents/technical-qa-engineer.yaml +0 -36
  54. package/src/internal/agent/kit/agents/technical-solution-architect.yaml +0 -32
  55. package/src/internal/agent/kit/commands/archive.yaml +0 -25
  56. package/src/internal/agent/kit/commands/constitution.yaml +0 -132
  57. package/src/internal/agent/kit/commands/implement.yaml +0 -96
  58. package/src/internal/agent/kit/commands/spec.yaml +0 -94
  59. package/src/internal/agent/kit/instructions/archive.md +0 -68
  60. package/src/internal/agent/kit/kit.yaml +0 -111
  61. package/src/internal/agent/kit/skills/opportunity-framing/SKILL.yaml +0 -56
  62. package/src/internal/agent/kit/skills/pragmatic-product-owner/SKILL.yaml +0 -58
  63. package/src/internal/agent/kit/skills/pragmatic-product-owner/references/spec-artifacts.yaml +0 -38
  64. package/src/internal/agent/kit/skills/spec-clarification-interview/SKILL.yaml +0 -52
  65. package/src/internal/agent/kit/skills/task-atomic-decomposition/SKILL.yaml +0 -137
  66. package/src/internal/agent/kit/skills/task-atomic-decomposition/references/roadmap-patterns.yaml +0 -103
  67. package/src/internal/agent/kit_manifests_test.go +0 -58
  68. package/src/internal/agent/manifest.go +0 -15
  69. package/src/internal/agent/registry.go +0 -69
  70. package/src/internal/agent/registry_test.go +0 -51
  71. package/src/internal/agent/translator.go +0 -334
  72. package/src/internal/agent/translator_test.go +0 -734
  73. package/src/internal/cli/archive.go +0 -91
  74. package/src/internal/cli/archive_test.go +0 -67
  75. package/src/internal/cli/cli.go +0 -259
  76. package/src/internal/cli/cli_test.go +0 -130
  77. package/src/internal/cli/cobra/archive.go +0 -26
  78. package/src/internal/cli/cobra/console.go +0 -21
  79. package/src/internal/cli/cobra/constitution.go +0 -44
  80. package/src/internal/cli/cobra/dummy_test.go +0 -7
  81. package/src/internal/cli/cobra/implementation.go +0 -50
  82. package/src/internal/cli/cobra/init.go +0 -23
  83. package/src/internal/cli/cobra/install.go +0 -21
  84. package/src/internal/cli/cobra/root.go +0 -47
  85. package/src/internal/cli/cobra/spec.go +0 -91
  86. package/src/internal/cli/console.go +0 -48
  87. package/src/internal/cli/constitution.go +0 -190
  88. package/src/internal/cli/constitution_test.go +0 -50
  89. package/src/internal/cli/implementation.go +0 -153
  90. package/src/internal/cli/implementation_test.go +0 -165
  91. package/src/internal/cli/spec.go +0 -369
  92. package/src/internal/cli/spec_test.go +0 -85
  93. package/src/internal/constitution/registry.go +0 -139
  94. package/src/internal/constitution/registry_test.go +0 -97
  95. package/src/internal/constitution/status.go +0 -70
  96. package/src/internal/constitution/status_test.go +0 -160
  97. package/src/internal/core/blueprint.go +0 -49
  98. package/src/internal/core/blueprint_test.go +0 -58
  99. package/src/internal/core/config.go +0 -124
  100. package/src/internal/core/config_test.go +0 -145
  101. package/src/internal/core/constants.go +0 -13
  102. package/src/internal/core/errors.go +0 -31
  103. package/src/internal/core/errors_test.go +0 -48
  104. package/src/internal/core/hooks.go +0 -89
  105. package/src/internal/core/hooks_test.go +0 -51
  106. package/src/internal/core/kit.go +0 -15
  107. package/src/internal/core/kit_test.go +0 -65
  108. package/src/internal/core/path.go +0 -115
  109. package/src/internal/core/path_test.go +0 -101
  110. package/src/internal/core/ui.go +0 -19
  111. package/src/internal/installer/dependencies.go +0 -23
  112. package/src/internal/installer/install.go +0 -89
  113. package/src/internal/installer/installer.go +0 -45
  114. package/src/internal/installer/installer_test.go +0 -96
  115. package/src/internal/project/agents_md.go +0 -155
  116. package/src/internal/project/agents_md_test.go +0 -147
  117. package/src/internal/project/bootstrapper.go +0 -64
  118. package/src/internal/project/bootstrapper_test.go +0 -89
  119. package/src/internal/project/detector.go +0 -35
  120. package/src/internal/project/detector_test.go +0 -96
  121. package/src/internal/project/refresh_integration_test.go +0 -86
  122. package/src/internal/project/service.go +0 -93
  123. package/src/internal/project/service_test.go +0 -135
  124. package/src/internal/spec/archive.go +0 -49
  125. package/src/internal/spec/archive_test.go +0 -55
  126. package/src/internal/spec/discovery.go +0 -53
  127. package/src/internal/spec/discovery_test.go +0 -60
  128. package/src/internal/spec/implementation.go +0 -296
  129. package/src/internal/spec/implementation_test.go +0 -253
  130. package/src/internal/spec/registry.go +0 -142
  131. package/src/internal/spec/registry_test.go +0 -105
  132. package/src/internal/spec/scanner.go +0 -219
  133. package/src/internal/spec/scanner_test.go +0 -243
  134. package/src/internal/spec/service.go +0 -157
  135. package/src/internal/spec/service_test.go +0 -238
  136. package/src/internal/spec/status.go +0 -94
  137. package/src/internal/spec/status_test.go +0 -146
  138. package/src/internal/spec/tasks.go +0 -103
  139. package/src/internal/spec/tasks_test.go +0 -137
  140. package/src/internal/tui/components.go +0 -132
  141. package/src/internal/tui/console.go +0 -247
  142. package/src/internal/tui/console_test.go +0 -19
  143. package/src/internal/tui/constitution.go +0 -36
  144. package/src/internal/tui/constitution_test.go +0 -32
  145. package/src/internal/tui/implementation.go +0 -151
  146. package/src/internal/tui/logo.go +0 -89
  147. package/src/internal/tui/multiselect.go +0 -199
  148. package/src/internal/tui/progressbar.go +0 -37
  149. package/src/internal/tui/progressbar_test.go +0 -30
  150. package/src/internal/tui/spec.go +0 -35
  151. package/src/internal/tui/spinner.go +0 -66
  152. package/src/internal/tui/terminal.go +0 -18
  153. package/src/internal/tui/theme.go +0 -125
  154. package/src/internal/tui/ui.go +0 -52
@@ -1,54 +0,0 @@
1
- description: "Core values, philosophy, and non-negotiable cultural or technical axioms."
2
- instruction: |
3
- Generate the Principles document strictly using the provided template. You are filling in a blueprint for a Spec-Driven Development (SDD) framework. Do not output any placeholder text; replace all sections with concrete project decisions.
4
-
5
- Adhere to the following rules for each section:
6
-
7
- 1. Mission:
8
- - Define a clear, single-paragraph statement of the core problem being solved and the primary value proposition.
9
-
10
- 2. User Personas:
11
- - Define the primary users of the system.
12
- - For each persona, explicitly state their Role, Primary Goal, and Key Pain Point.
13
- - Note: These personas MUST dictate authorization and UX design rules in future specs.
14
-
15
- 3. Golden Rules (The Tie-Breakers):
16
- - List 3 to 5 non-negotiable axioms (e.g., "Data privacy is prioritized over feature speed," or "The UI must remain fully functional without JavaScript").
17
- - Instruct the AI that these rules are absolute tie-breakers for any architectural or design disputes.
18
-
19
- 4. Product Boundaries:
20
- - In Scope: List 3-4 core capabilities the product MUST have.
21
- - Out of Scope (Anti-Goals): List explicitly what the product MUST NOT do to prevent AI hallucination and feature creep.
22
-
23
- CRITICAL AI DIRECTIVE: The LLM MUST use this document as the ultimate source of truth. If a user prompt or a draft Spec contradicts the Golden Rules or Out of Scope boundaries, the AI MUST refuse the change and cite this document.
24
-
25
- CRITICAL: The final output must be pure Markdown, ready to be saved as `principles.md`.
26
- template: |
27
- # Principles
28
-
29
- ## Mission
30
-
31
- ## User Personas
32
- - **Persona 1:**
33
- - **Role:**
34
- - **Goal:**
35
- - **Pain Point:**
36
- - **Persona 2:**
37
- - **Role:**
38
- - **Goal:**
39
- - **Pain Point:**
40
-
41
- ## Golden Rules
42
- 1. **Rule 1:**
43
- 2. **Rule 2:**
44
- 3. **Rule 3:**
45
-
46
- ## Product Boundaries
47
-
48
- ### In Scope
49
- -
50
- -
51
-
52
- ### Out of Scope (Anti-Goals)
53
- -
54
- -
@@ -1,47 +0,0 @@
1
- description: "Authentication, authorization, roles, permissions, privacy, and data protection rules."
2
- instruction: |
3
- Generate the Security document strictly using the provided template. You are filling in a blueprint for a Spec-Driven Development (SDD) framework. Do not output any placeholder text; replace all sections with concrete project decisions.
4
-
5
- Adhere to the following rules for each section:
6
-
7
- 1. Identity & Access Control:
8
- - Define the exact Authentication strategy (e.g., JWT with RS256, Session cookies, OAuth2).
9
- - Define the token/session lifecycle (e.g., Access tokens expire in 15m, Refresh in 7d).
10
- - Specify the Authorization model (e.g., RBAC, ABAC) and the strict rule for tenant isolation to prevent IDOR (Insecure Direct Object Reference).
11
-
12
- 2. Data Protection & Cryptography:
13
- - Specify encryption standards for Data at Rest (e.g., AES-256) and Data in Transit (e.g., TLS 1.3).
14
- - Explicitly define how application secrets MUST be managed (e.g., strictly via environment variables or a Secret Manager).
15
-
16
- 3. Auditing & Logging:
17
- - List the specific events that MUST trigger a security audit log (e.g., authentication failures, permission modifications, data exports).
18
- - Define the masking policy to ensure PII (Personally Identifiable Information) or passwords never leak into logs.
19
-
20
- 4. AI Security Constraints (CRITICAL FOR SDD):
21
- - Mandate that the AI MUST NEVER hardcode passwords, API keys, or dummy tokens in any generated file.
22
- - Mandate that the AI MUST ALWAYS use parameterized queries or the official project ORM to prevent SQL Injection. No raw string concatenation for SQL is allowed.
23
- - Mandate that all inputs MUST be validated at the boundary and all outputs encoded to prevent XSS.
24
-
25
- CRITICAL: The final output must be pure Markdown, ready to be saved as `security.md`.
26
- template: |
27
- # Security Posture
28
-
29
- ## Identity & Access Control
30
- - **Authentication Strategy:**
31
- - **Token/Session Lifecycle:**
32
- - **Authorization Model:**
33
- - **Tenant Isolation (IDOR Prevention):**
34
-
35
- ## Data Protection & Cryptography
36
- - **Data in Transit:**
37
- - **Data at Rest:**
38
- - **Secret Management:**
39
-
40
- ## Auditing & Logging
41
- - **Auditable Events:**
42
- - **Log Sanitization & PII:**
43
-
44
- ## AI Security Constraints
45
- - The AI MUST NEVER hardcode passwords, tokens, or API keys in the source code. All secrets MUST be mocked via environment variables.
46
- - The AI MUST ALWAYS use parameterized queries or the framework's native ORM/QueryBuilder. Raw SQL string concatenation is strictly forbidden.
47
- - The AI MUST strictly validate all API and Controller inputs using the framework's validator before any domain logic execution.
@@ -1,158 +0,0 @@
1
- description: "Visual direction, interaction patterns, accessibility posture, and aesthetic DNA."
2
- instruction: |
3
- Generate the UI/UX document strictly using the provided template. You are filling in a blueprint for a Spec-Driven Development (SDD) framework. Do not output any placeholder text; replace all sections with concrete project decisions.
4
-
5
- Adhere to the following rules for each section:
6
-
7
- 1. Visual Theme:
8
- - Explicitly define the primary UI/CSS framework (e.g., Tailwind CSS, custom Vue components, or Bubbletea for TUI) to ground the design.
9
- - Define the mood, density, and design philosophy without vague adjectives.
10
-
11
- 2. Color Palette & Roles:
12
- - Provide EXACT, valid Hex codes.
13
- - CRITICAL: The AI MUST ensure WCAG AA minimum contrast between Text colors and Canvas/Surface colors.
14
-
15
- 3. Typography Rules:
16
- - Specify real, web-safe, or modern Google fonts (e.g., Inter, Roboto, Fira Code).
17
- - Fill the hierarchy table with exact CSS values (e.g., rem or px, explicit font weights).
18
-
19
- 4. Component Stylings:
20
- - Describe stylings using the terminology of the chosen CSS framework (e.g., using Tailwind utility concepts like `rounded-md`, `shadow-sm`).
21
-
22
- 5 & 6. Layout & Depth:
23
- - Define exact spacing scales (e.g., 4px baseline grid).
24
- - Define shadow and elevation rules logically (e.g., Modals have highest z-index and shadow-2xl).
25
-
26
- 7. Do's and Don'ts:
27
- - Provide 3 strict actionable rules for "Do" and 3 for "Don't" to prevent AI hallucination in UI generation.
28
-
29
- 8. Responsive Behavior:
30
- - Fill the exact pixel ranges for breakpoints. Define strict collapsing strategies for mobile (e.g., "Sidebar becomes a hamburger menu").
31
-
32
- 9. Agent Prompt Guide (CRITICAL FOR SDD):
33
- - Generate concise, reusable system prompts that will instruct an LLM on how to build a component (e.g., Vue 3) matching this exact visual DNA.
34
-
35
- CRITICAL: The final output must be pure Markdown, ready to be saved as `ui-ux.md`.
36
- template: |
37
- # UI/UX
38
-
39
- ## 1. Visual Theme & Atmosphere
40
- - **Framework/Base:** [e.g., Tailwind CSS, custom SCSS, etc.]
41
- - **Theme:** [e.g., Industrial Mission Control / Editorial Luxury / Quiet Utility]
42
- - **Atmosphere:** [How the product should feel emotionally and operationally]
43
- - **Density Posture:** [airy / balanced / compact / high-density]
44
- - **Design Philosophy:** [What the interface optimizes for and what it deliberately avoids]
45
- - **Signature Moves:** [1-3 recurring visual behaviors or motifs]
46
-
47
- ## 2. Color Palette & Roles
48
- ### Brand & Accent
49
- - **Primary Brand:** `#` | [Usage]
50
- - **Secondary Brand:** `#` | [Usage]
51
-
52
- ### Text & Feedback
53
- - **Primary Text:** `#` | [Usage]
54
- - **Secondary Text:** `#` | [Usage]
55
- - **Error:** `#` | [Usage]
56
- - **Success:** `#` | [Usage]
57
- - **Warning:** `#` | [Usage]
58
- - **Info:** `#` | [Usage]
59
-
60
- ### Surface & Border
61
- - **Canvas:** `#` | [Usage]
62
- - **Surface:** `#` | [Usage]
63
- - **Muted Surface:** `#` | [Usage]
64
- - **Border:** `#` | [Usage]
65
-
66
- ## 3. Typography Rules
67
- ### Font Family
68
- - **Primary:**
69
- - **Secondary:**
70
- - **Usage Logic:**
71
-
72
- ### Hierarchy
73
- | Role | Font | Size | Weight | Line Height | Letter Spacing | Notes |
74
- |---|---|---|---|---|---|---|
75
- | Display | | | | | | |
76
- | Heading | | | | | | |
77
- | Subheading | | | | | | |
78
- | Body | | | | | | |
79
- | UI Label | | | | | | |
80
- | Caption | | | | | | |
81
-
82
- ### Content Voice
83
- - **Headlines:**
84
- - **Buttons & Actions:**
85
- - **Form Guidance:**
86
-
87
- ## 4. Component Stylings
88
- ### Buttons
89
- - **Primary:**
90
- - **Secondary:**
91
- - **Destructive:**
92
-
93
- ### Cards & Panels
94
- - **Container Style:**
95
- - **State Behavior:**
96
-
97
- ### Inputs & Forms
98
- - **Input Baseline:**
99
- - **Focus Style:**
100
- - **Error Style:**
101
-
102
- ### Navigation
103
- - **Primary Navigation:**
104
- - **Active State:**
105
- - **Secondary Navigation:**
106
-
107
- ## 5. Layout Principles
108
- - **Spacing Scale:**
109
- - **Grid Logic:**
110
- - **Whitespace Philosophy:**
111
- - **Page Structure Bias:**
112
- - **Navigation Distribution:**
113
-
114
- ## 6. Depth & Elevation
115
- | Level | Treatment | Use |
116
- |---|---|---|
117
- | Flat | | backgrounds, passive surfaces |
118
- | Raised | | cards, popovers, controls |
119
- | Interactive Hover | | buttons, cards, nav items |
120
- | Modal / Priority | | dialogs, overlays, blocking UI |
121
-
122
- - **Shadow Philosophy:**
123
- - **Surface Hierarchy:**
124
-
125
- ## 7. Do's and Don'ts
126
- ### Do
127
- -
128
- -
129
- -
130
-
131
- ### Don't
132
- -
133
- -
134
- -
135
-
136
- ## 8. Responsive Behavior
137
- | Breakpoint | Width | Key Changes |
138
- |---|---|---|
139
- | Mobile | | |
140
- | Tablet | | |
141
- | Desktop | | |
142
- | Large Desktop | | |
143
-
144
- - **Touch Targets:**
145
- - **Collapsing Strategy:**
146
- - **Responsive Priority:**
147
-
148
- ## 9. Agent Prompt Guide
149
- ### Quick Reference
150
- - **Theme Summary:**
151
- - **Primary Colors:**
152
- - **Typography Summary:**
153
- - **Key Surface Rules:**
154
-
155
- ### Example Prompts
156
- - "Build a component using..."
157
- - "Build a form using..."
158
- - "When making this responsive, ensure that..."
@@ -1,50 +0,0 @@
1
- description: "Technical blueprint, data models, API contracts, and file inventory."
2
- dependency: requirements
3
- instruction: |
4
- Generate a deterministic technical blueprint based on the Requirements document. Adhere strictly to the following execution rules:
5
-
6
- 1. **Zero Philosophy:** DO NOT write architectural rationale or debate alternatives. Your output must be a strict, actionable blueprint.
7
- 2. **Visual Architecture:** You MUST generate a Mermaid.js diagram (`graph TB` or `erDiagram`) representing the data flow or persistence model.
8
- 3. **Strict API Contracts:** API Contracts MUST be exact, including HTTP methods, JSON payload structures, and expected HTTP status codes. This is critical for downstream Developer TDD.
9
- 4. **Standardized Inventory:** The File & Component Inventory must use explicit file paths and map core responsibilities clearly.
10
- 5. **Conditional Omission:** If the `lens` is "UI-heavy" and requires no backend changes, you MUST completely delete the `Persistence` and `API` sections. Do not leave placeholders.
11
- template: |
12
- ---
13
- slug: {FEATURE_SLUG}
14
- lens: [UI-heavy | Backend-heavy | Integration | Migration | Balanced full-stack]
15
- ---
16
-
17
- # Technical Design: {FEATURE_NAME}
18
-
19
- ## 1. Architecture Blueprint
20
- *A visual representation of the data flow or entity relationships for this feature.*
21
-
22
- ```mermaid
23
- graph TB
24
- User((User)) --> UI[Frontend]
25
- UI --> API[API Layer]
26
- API --> Domain[Domain Logic]
27
- Domain --> DB[(Database)]
28
- ```
29
-
30
- ## 2. Persistence & Data Modeling
31
- *(Render this section ONLY if the database schema is changing. Otherwise, omit entirely).*
32
- - **Schema Changes:** [e.g., Add `status` column to `users` table].
33
- - **Indexes & Constraints:** [e.g., Unique index on `email`].
34
-
35
- ## 3. API & Interfaces (The Contract)
36
- *(Render this section ONLY if new APIs or external contracts are created/modified. Otherwise, omit entirely).*
37
- - **Endpoint:** `[METHOD] /api/path`
38
- - **AuthZ / Roles:** [Who can access this endpoint?]
39
- - **Request Payload:** [JSON structure or Query Params]
40
- - **Response (200 OK):** [JSON structure]
41
- - **Response (4xx/5xx):** [Error mapping]
42
-
43
- ## 4. File & Component Inventory
44
- *The exact files that the Developer must create or modify. Map the core responsibility.*
45
-
46
- **Backend:**
47
- - `[src/Domain/Path/File.ext]` -> [Core responsibility]
48
-
49
- **Frontend:**
50
- - `[src/components/Path/File.ext]` -> [Core responsibility]
@@ -1,48 +0,0 @@
1
- description: "Functional requirements, business rules, and strict BDD acceptance criteria."
2
- instruction: |
3
- Generate a high-fidelity business specification focusing entirely on the "What" and "Why", never the "How". Adhere strictly to the following execution rules:
4
-
5
- 1. **Zero Code Mandate:** DO NOT write technical implementation details, JSON payloads, or database schemas. Stick to pure business domain and user value.
6
- 2. **BDD Rigor:** Acceptance Criteria MUST follow the strict GIVEN/WHEN/THEN syntax. For every requirement, you MUST define at least one "Edge Case" or failure state.
7
- 3. **Scope Containment:** Pay heavy attention to the "Out of Scope" section. Explicitly list features or edge cases that downstream agents MUST NOT build.
8
- 4. **Conditional Omission:** If the `lens` is "Backend-heavy" or "Integration", you MUST completely delete the `## 5. UI/UX Contract` section. Do not leave placeholders or write "Not applicable".
9
- 5. **YAML Frontmatter:** Ensure the top YAML block is correctly populated with the `slug` and the correct `lens`.
10
- template: |
11
- ---
12
- slug: {FEATURE_SLUG}
13
- lens: [UI-heavy | Backend-heavy | Integration | Migration | Balanced full-stack]
14
- ---
15
-
16
- # Feature: {FEATURE_NAME}
17
-
18
- ## 1. Context & Value
19
- [Briefly describe the business value and the core problem being solved. Max 3 sentences.]
20
-
21
- ## 2. Out of Scope (Anti-Goals)
22
- *Explicitly state what MUST NOT be built in this specific feature to prevent scope creep.*
23
- - [e.g., Do not implement the email notification flow in this spec]
24
- - [e.g., Do not build the admin panel UI yet]
25
-
26
- ## 3. Acceptance Criteria (BDD)
27
- *Every requirement MUST be testable. Define success and failure.*
28
-
29
- ### [REQ-1] {Title}
30
- **User Story:** AS A [persona], I WANT TO [action], SO THAT [value].
31
-
32
- **Scenarios:**
33
- 1. **[Happy Path]** GIVEN [context] WHEN [action] THEN [outcome].
34
- 2. **[Edge Case]** GIVEN [context] WHEN [exception/error] THEN [fallback/behavior].
35
- 3. **[Ambiguity]** [Explicitly state what is unclear, or define the ASSUMPTION made].
36
-
37
- ### [REQ-2] {Title}
38
- *(Repeat structure as needed)*
39
-
40
- ## 4. Business Invariants
41
- *Strict domain rules that the system must never violate, regardless of the user story. These must be technically testable.*
42
- - [e.g., A user cannot be deleted if they have active invoices].
43
-
44
- ## 5. UI/UX Contract
45
- *(Render this section ONLY if the lens includes UI. Otherwise, omit entirely).*
46
- - **Visual Posture:** [e.g., High-density data table, minimal modal].
47
- - **State Behavior:** [Rules for loading, empty, error, and recovery states].
48
- - **Accessibility:** [Expected standard, e.g., ARIA labels, tab navigation].
@@ -1,55 +0,0 @@
1
- description: "Atomic, sequential implementation roadmap and TDD verification steps in a strict, CLI-scannable format."
2
- dependency: design
3
- instruction: |
4
- Generate the Tasks/Implementation Roadmap for the feature based on the Design and Requirements.
5
-
6
- 1. DO NOT write actual implementation code. You write the INTENT and the ACTION.
7
- 2. Tasks MUST be strictly sequential. Do not use parallel execution flags.
8
- 3. **Phases**: Group tasks into logical phases using `### Phase {N}: [Phase Name]` headers.
9
- 4. STRICT FORMATTING: Use `#### T{Phase}.{Task}:` as the header for EVERY task. The immediate next line MUST be the state tracker.
10
- - ENUM CONSTRAINT: The state MUST be exactly `**State:** [PENDING]`.
11
- - DO NOT invent new states. DO NOT use [TODO], [IN_PROGRESS], or [WAITING].
12
- 5. Target Flexibility: If a task is a global operation, set the Target to the CLI command (e.g., `CLI (npm run lint)`) or `Global Scope`.
13
- template: |
14
- ---
15
- slug: {FEATURE_SLUG}
16
- lens: [UI-heavy | Backend-heavy | Integration | Migration | Balanced full-stack]
17
- ---
18
-
19
- # Implementation Roadmap: {FEATURE_NAME}
20
-
21
- ## 1. Execution Strategy
22
- - **Gravity Order:** [Briefly explain the sequence, e.g., DB Migration -> Domain Logic -> API Controllers -> UI]
23
-
24
- ## 2. Tasks
25
-
26
- ### Phase 1: [Phase Name]
27
-
28
- #### T1.1: [SCAFFOLD/CLI] {Task Title}
29
- **State:** `[PENDING]`
30
- **Target:** `{Exact/File/Path.ext | CLI Command | Global Scope}`
31
- **Context:** [REQ-X]
32
-
33
- **Action Steps:**
34
- - [Step 1: Concrete change]
35
- - [Step 2: Concrete change]
36
-
37
- **Verification (TDD):**
38
- [MANDATORY: Define the exact test scenario or CLI command the developer MUST write/run to prove this task works.]
39
-
40
- ### Phase 2: [Phase Name]
41
-
42
- #### T2.1: [CODE] {Task Title}
43
- **State:** `[PENDING]`
44
- **Target:** `{Exact/File/Path.ext | CLI Command | Global Scope}`
45
- **Context:** [REQ-X]
46
-
47
- **Action Steps:**
48
- - [Step 1: Concrete change]
49
-
50
- **Verification (TDD):**
51
- [Explicit test scenario or CLI command]
52
-
53
- ## 3. Pre-emptive Mitigations
54
- *(Render this section ONLY if there are high-impact execution risks, otherwise omit).*
55
- - **Risk:** [e.g., Concurrent DB writes] -> **Mitigation:** [e.g., Use pessimistic locking].
@@ -1,120 +0,0 @@
1
- package agent
2
-
3
- import (
4
- "context"
5
- "io/fs"
6
- "os"
7
- "path/filepath"
8
- "testing"
9
-
10
- "github.com/jeancodogno/specforce-kit/src/internal/core"
11
- "github.com/jeancodogno/specforce-kit/src/internal/installer"
12
- )
13
-
14
- func getTestKitConfig() *core.KitConfig {
15
- return &core.KitConfig{
16
- Tools: map[string]core.ToolRoute{
17
- "qwen": {
18
- Target: ".qwen",
19
- Mappings: map[string]core.MappingConfig{
20
- "agents": {Path: "agents", Ext: ".md"},
21
- "skills": {Path: "skills", Ext: ".md"},
22
- "commands": {Path: "commands/spf", Ext: ".md"},
23
- },
24
- },
25
- "open-code": {
26
- Target: ".opencode",
27
- Mappings: map[string]core.MappingConfig{
28
- "agents": {Path: "agents", Ext: ".md"},
29
- "skills": {Path: "skills", Ext: ".md"},
30
- "commands": {Path: "commands", Ext: ".md"},
31
- },
32
- },
33
- "kilo-code": {
34
- Target: ".kilocode",
35
- Mappings: map[string]core.MappingConfig{
36
- "agents": {Path: "agents", Ext: ".md"},
37
- "skills": {Path: "skills", Ext: ".md"},
38
- "commands": {Path: "commands", Ext: ".md"},
39
- },
40
- },
41
- "codex": {
42
- Target: ".codex",
43
- Mappings: map[string]core.MappingConfig{
44
- "agents": {Path: "agents", Ext: ".md"},
45
- "skills": {Path: "skills", Ext: ".md"},
46
- "commands": {Path: "commands/spf", Ext: ".md"},
47
- },
48
- },
49
- },
50
- }
51
- }
52
-
53
- func TestNewAgentMappings(t *testing.T) {
54
- tmpDir, err := os.MkdirTemp("", "specforce-test-compat-*")
55
- if err != nil {
56
- t.Fatalf("failed to create temp dir: %v", err)
57
- }
58
- defer func() { _ = os.RemoveAll(tmpDir) }()
59
-
60
- projectRoot := filepath.Join(tmpDir, "project")
61
- kitFS, err := GetKitFS()
62
- if err != nil {
63
- t.Fatalf("failed to get kit FS: %v", err)
64
- }
65
-
66
- kitConfig := getTestKitConfig()
67
- agents := []struct {
68
- id string
69
- folder string
70
- }{
71
- {"qwen", ".qwen"},
72
- {"open-code", ".opencode"},
73
- {"kilo-code", ".kilocode"},
74
- {"codex", ".codex"},
75
- }
76
-
77
- for _, agent := range agents {
78
- t.Run(agent.id, func(t *testing.T) {
79
- testAgentMappings(t, projectRoot, kitFS, kitConfig, agent.id, agent.folder)
80
- })
81
- }
82
- }
83
-
84
- func testAgentMappings(t *testing.T, projectRoot string, kitFS fs.FS, kitConfig *core.KitConfig, agentID, folder string) {
85
- // Test agent mapping
86
- err := processBlueprint(context.Background(), projectRoot, kitFS, kitConfig, "agents/technical-developer.yaml", agentID, installer.Options{})
87
- if err != nil {
88
- t.Fatalf("processBlueprint failed for %s: %v", agentID, err)
89
- }
90
-
91
- expectedPath := filepath.Join(projectRoot, folder, "agents/technical-developer.md")
92
- if _, err := os.Stat(expectedPath); os.IsNotExist(err) {
93
- t.Errorf("expected file %s to exist", expectedPath)
94
- }
95
-
96
- // Test skill mapping
97
- err = processBlueprint(context.Background(), projectRoot, kitFS, kitConfig, "skills/task-atomic-decomposition/SKILL.yaml", agentID, installer.Options{})
98
- if err != nil {
99
- t.Fatalf("processBlueprint failed for skill on %s: %v", agentID, err)
100
- }
101
- expectedSkillPath := filepath.Join(projectRoot, folder, "skills/task-atomic-decomposition/SKILL.md")
102
- if _, err := os.Stat(expectedSkillPath); os.IsNotExist(err) {
103
- t.Errorf("expected skill file %s to exist", expectedSkillPath)
104
- }
105
-
106
- // Test command mapping
107
- err = processBlueprint(context.Background(), projectRoot, kitFS, kitConfig, "commands/archive.yaml", agentID, installer.Options{})
108
- if err != nil {
109
- t.Fatalf("processBlueprint failed for command on %s: %v", agentID, err)
110
- }
111
-
112
- expectedCmdPath := filepath.Join(projectRoot, folder, "commands/spf/archive.md")
113
- if agentID == "open-code" || agentID == "kilo-code" {
114
- expectedCmdPath = filepath.Join(projectRoot, folder, "commands/spf.archive.md")
115
- }
116
-
117
- if _, err := os.Stat(expectedCmdPath); os.IsNotExist(err) {
118
- t.Errorf("expected command file %s to exist", expectedCmdPath)
119
- }
120
- }
@@ -1,9 +0,0 @@
1
- package agent
2
- import (
3
- "os"
4
- "testing"
5
- )
6
- func TestCWD(t *testing.T) {
7
- cwd, _ := os.Getwd()
8
- t.Logf("CWD: %s", cwd)
9
- }
@@ -1,19 +0,0 @@
1
- package agent
2
-
3
- import (
4
- "embed"
5
- "io/fs"
6
- )
7
-
8
- //go:embed kit/* artifacts/*
9
- var EmbeddedResources embed.FS
10
-
11
- // GetKitFS returns a sub-filesystem rooted at kit.
12
- func GetKitFS() (fs.FS, error) {
13
- return fs.Sub(EmbeddedResources, "kit")
14
- }
15
-
16
- // GetArtifactsFS returns a sub-filesystem rooted at artifacts.
17
- func GetArtifactsFS() (fs.FS, error) {
18
- return fs.Sub(EmbeddedResources, "artifacts")
19
- }