@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.
- package/index.js +46 -0
- package/package.json +12 -28
- package/.geminiignore +0 -15
- package/.github/workflows/ci.yml +0 -104
- package/.github/workflows/release.yml +0 -51
- package/.golangci.yml +0 -24
- package/.goreleaser.yaml +0 -39
- package/.rgignore +0 -13
- package/.specforce/archive/agents-md-hooks-config/design.md +0 -38
- package/.specforce/archive/agents-md-hooks-config/requirements.md +0 -35
- package/.specforce/archive/agents-md-hooks-config/tasks.md +0 -76
- package/.specforce/config.yaml +0 -32
- package/.specforce/docs/.gitkeep +0 -0
- package/.specforce/docs/architecture.md +0 -98
- package/.specforce/docs/engineering.md +0 -84
- package/.specforce/docs/governance.md +0 -30
- package/.specforce/docs/memorial.md +0 -45
- package/.specforce/docs/principles.md +0 -31
- package/.specforce/docs/security.md +0 -31
- package/.specforce/docs/ui-ux.md +0 -129
- package/.specforce/specs/.gitkeep +0 -0
- package/AGENTS.md +0 -46
- package/CONTRIBUTING.md +0 -81
- package/Makefile +0 -49
- package/assets/logo-header.png +0 -0
- package/assets/logo.png +0 -0
- package/docs/artifacts.md +0 -41
- package/docs/cli.md +0 -73
- package/docs/configuration.md +0 -59
- package/docs/getting-started.md +0 -110
- package/docs/supported-tools.md +0 -28
- package/go.mod +0 -35
- package/go.sum +0 -61
- package/src/cmd/specforce/main.go +0 -23
- package/src/cmd/specforce/main_test.go +0 -7
- package/src/internal/agent/artifacts/constitution/architecture.yaml +0 -70
- package/src/internal/agent/artifacts/constitution/engineering.yaml +0 -52
- package/src/internal/agent/artifacts/constitution/governance.yaml +0 -41
- package/src/internal/agent/artifacts/constitution/memorial.yaml +0 -55
- package/src/internal/agent/artifacts/constitution/principles.yaml +0 -54
- package/src/internal/agent/artifacts/constitution/security.yaml +0 -47
- package/src/internal/agent/artifacts/constitution/ui-ux.yaml +0 -158
- package/src/internal/agent/artifacts/spec/design.yaml +0 -50
- package/src/internal/agent/artifacts/spec/requirements.yaml +0 -48
- package/src/internal/agent/artifacts/spec/tasks.yaml +0 -55
- package/src/internal/agent/compatibility_test.go +0 -120
- package/src/internal/agent/cwd_test.go +0 -9
- package/src/internal/agent/embed.go +0 -19
- package/src/internal/agent/integration_test.go +0 -138
- package/src/internal/agent/kit/agents/product-analyst.yaml +0 -31
- package/src/internal/agent/kit/agents/technical-developer.yaml +0 -28
- package/src/internal/agent/kit/agents/technical-project-planner.yaml +0 -30
- package/src/internal/agent/kit/agents/technical-qa-engineer.yaml +0 -36
- package/src/internal/agent/kit/agents/technical-solution-architect.yaml +0 -32
- package/src/internal/agent/kit/commands/archive.yaml +0 -25
- package/src/internal/agent/kit/commands/constitution.yaml +0 -132
- package/src/internal/agent/kit/commands/implement.yaml +0 -96
- package/src/internal/agent/kit/commands/spec.yaml +0 -94
- package/src/internal/agent/kit/instructions/archive.md +0 -68
- package/src/internal/agent/kit/kit.yaml +0 -111
- package/src/internal/agent/kit/skills/opportunity-framing/SKILL.yaml +0 -56
- package/src/internal/agent/kit/skills/pragmatic-product-owner/SKILL.yaml +0 -58
- package/src/internal/agent/kit/skills/pragmatic-product-owner/references/spec-artifacts.yaml +0 -38
- package/src/internal/agent/kit/skills/spec-clarification-interview/SKILL.yaml +0 -52
- package/src/internal/agent/kit/skills/task-atomic-decomposition/SKILL.yaml +0 -137
- package/src/internal/agent/kit/skills/task-atomic-decomposition/references/roadmap-patterns.yaml +0 -103
- package/src/internal/agent/kit_manifests_test.go +0 -58
- package/src/internal/agent/manifest.go +0 -15
- package/src/internal/agent/registry.go +0 -69
- package/src/internal/agent/registry_test.go +0 -51
- package/src/internal/agent/translator.go +0 -334
- package/src/internal/agent/translator_test.go +0 -734
- package/src/internal/cli/archive.go +0 -91
- package/src/internal/cli/archive_test.go +0 -67
- package/src/internal/cli/cli.go +0 -259
- package/src/internal/cli/cli_test.go +0 -130
- package/src/internal/cli/cobra/archive.go +0 -26
- package/src/internal/cli/cobra/console.go +0 -21
- package/src/internal/cli/cobra/constitution.go +0 -44
- package/src/internal/cli/cobra/dummy_test.go +0 -7
- package/src/internal/cli/cobra/implementation.go +0 -50
- package/src/internal/cli/cobra/init.go +0 -23
- package/src/internal/cli/cobra/install.go +0 -21
- package/src/internal/cli/cobra/root.go +0 -47
- package/src/internal/cli/cobra/spec.go +0 -91
- package/src/internal/cli/console.go +0 -48
- package/src/internal/cli/constitution.go +0 -190
- package/src/internal/cli/constitution_test.go +0 -50
- package/src/internal/cli/implementation.go +0 -153
- package/src/internal/cli/implementation_test.go +0 -165
- package/src/internal/cli/spec.go +0 -369
- package/src/internal/cli/spec_test.go +0 -85
- package/src/internal/constitution/registry.go +0 -139
- package/src/internal/constitution/registry_test.go +0 -97
- package/src/internal/constitution/status.go +0 -70
- package/src/internal/constitution/status_test.go +0 -160
- package/src/internal/core/blueprint.go +0 -49
- package/src/internal/core/blueprint_test.go +0 -58
- package/src/internal/core/config.go +0 -124
- package/src/internal/core/config_test.go +0 -145
- package/src/internal/core/constants.go +0 -13
- package/src/internal/core/errors.go +0 -31
- package/src/internal/core/errors_test.go +0 -48
- package/src/internal/core/hooks.go +0 -89
- package/src/internal/core/hooks_test.go +0 -51
- package/src/internal/core/kit.go +0 -15
- package/src/internal/core/kit_test.go +0 -65
- package/src/internal/core/path.go +0 -115
- package/src/internal/core/path_test.go +0 -101
- package/src/internal/core/ui.go +0 -19
- package/src/internal/installer/dependencies.go +0 -23
- package/src/internal/installer/install.go +0 -89
- package/src/internal/installer/installer.go +0 -45
- package/src/internal/installer/installer_test.go +0 -96
- package/src/internal/project/agents_md.go +0 -155
- package/src/internal/project/agents_md_test.go +0 -147
- package/src/internal/project/bootstrapper.go +0 -64
- package/src/internal/project/bootstrapper_test.go +0 -89
- package/src/internal/project/detector.go +0 -35
- package/src/internal/project/detector_test.go +0 -96
- package/src/internal/project/refresh_integration_test.go +0 -86
- package/src/internal/project/service.go +0 -93
- package/src/internal/project/service_test.go +0 -135
- package/src/internal/spec/archive.go +0 -49
- package/src/internal/spec/archive_test.go +0 -55
- package/src/internal/spec/discovery.go +0 -53
- package/src/internal/spec/discovery_test.go +0 -60
- package/src/internal/spec/implementation.go +0 -296
- package/src/internal/spec/implementation_test.go +0 -253
- package/src/internal/spec/registry.go +0 -142
- package/src/internal/spec/registry_test.go +0 -105
- package/src/internal/spec/scanner.go +0 -219
- package/src/internal/spec/scanner_test.go +0 -243
- package/src/internal/spec/service.go +0 -157
- package/src/internal/spec/service_test.go +0 -238
- package/src/internal/spec/status.go +0 -94
- package/src/internal/spec/status_test.go +0 -146
- package/src/internal/spec/tasks.go +0 -103
- package/src/internal/spec/tasks_test.go +0 -137
- package/src/internal/tui/components.go +0 -132
- package/src/internal/tui/console.go +0 -247
- package/src/internal/tui/console_test.go +0 -19
- package/src/internal/tui/constitution.go +0 -36
- package/src/internal/tui/constitution_test.go +0 -32
- package/src/internal/tui/implementation.go +0 -151
- package/src/internal/tui/logo.go +0 -89
- package/src/internal/tui/multiselect.go +0 -199
- package/src/internal/tui/progressbar.go +0 -37
- package/src/internal/tui/progressbar_test.go +0 -30
- package/src/internal/tui/spec.go +0 -35
- package/src/internal/tui/spinner.go +0 -66
- package/src/internal/tui/terminal.go +0 -18
- package/src/internal/tui/theme.go +0 -125
- package/src/internal/tui/ui.go +0 -52
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# TASK: Specforce Archival & Knowledge Harvesting
|
|
2
|
-
|
|
3
|
-
You are the Specforce Lifecycle Manager. Your mission is to close the lifecycle of a completed feature. You must ensure it is fully implemented, extract any new global standards, update the project's Constitution, and formally archive the specification.
|
|
4
|
-
|
|
5
|
-
**CRITICAL RULE:** Do not archive a specification until you have verified its completion and explicitly checked if it introduces new patterns that must be recorded globally.
|
|
6
|
-
|
|
7
|
-
## The Execution Protocol (The Loop)
|
|
8
|
-
|
|
9
|
-
### 1. Verification of Completion
|
|
10
|
-
- Run the implementation status command to ensure no pending work remains:
|
|
11
|
-
```bash
|
|
12
|
-
specforce implementation status <slug> --json
|
|
13
|
-
```
|
|
14
|
-
- If progress is not 100%, you MUST stop and inform the user that the feature cannot be archived yet.
|
|
15
|
-
|
|
16
|
-
### 2. Dynamic Agent & Skill Discovery
|
|
17
|
-
- Before performing the retrospective, analyze the feature's domain and impact.
|
|
18
|
-
- Search your available skills, capabilities, and sub-agents to adopt the posture of a "Principal Solutions Architect" or "Chief Engineer".
|
|
19
|
-
- **CRITICAL:** You must evaluate the code and design not just as a developer, but as the guardian of the project's global architecture.
|
|
20
|
-
|
|
21
|
-
### 3. Specification Retrospective
|
|
22
|
-
- Operating as the Principal Architect, use your file-reading tools to scan the completed feature's `requirements.md` and `design.md`.
|
|
23
|
-
- Look specifically for "Precedents" - things that are being done for the first time in this project:
|
|
24
|
-
- New architectural patterns (e.g., a new caching strategy).
|
|
25
|
-
- New engineering standards (e.g., a new library adoption, API rule).
|
|
26
|
-
- New global business invariants.
|
|
27
|
-
|
|
28
|
-
### 6. Constitution Impact Analysis
|
|
29
|
-
- For every artifact in the Constitution list (provided above), evaluate: Does this feature introduce a precedent that is NOT yet documented in any of these global standards?
|
|
30
|
-
|
|
31
|
-
### 7. Knowledge Harvesting (Memorial Update)
|
|
32
|
-
- Operating as the Principal Architect, you MUST update the project's memorial:
|
|
33
|
-
```bash
|
|
34
|
-
.specforce/docs/memorial.md
|
|
35
|
-
```
|
|
36
|
-
- Record key lessons learned, architectural precedents established, and any critical "gotchas" discovered during implementation. This ensures cross-session memory and long-term project health.
|
|
37
|
-
|
|
38
|
-
### 8. Information Gathering (Tool Discovery) & Constitution Update
|
|
39
|
-
- If you identify new patterns that should become global standards, you MUST scan your environment tools for the capability to prompt the user (e.g., the "ask user" tool).
|
|
40
|
-
- Ask the user: *"The feature [<slug>] introduced [Pattern X]. Should I update the project's Constitution to reflect this as a new standard before archiving?"*
|
|
41
|
-
- If the user approves, identify the appropriate artifact from the previously executed `constitution status --json` output.
|
|
42
|
-
- Use the exact `path` specified in the JSON to perform the update with your file-writing tools.
|
|
43
|
-
- If the artifact does not yet exist (`"exists": false`), you MUST create it at the provided `path` with the new content.
|
|
44
|
-
- If no updates are required, or the user declines, proceed immediately to Step 9.
|
|
45
|
-
|
|
46
|
-
### 9. Archival Execution
|
|
47
|
-
- Once the Constitution and Memorial are up to date (or bypassed), execute the command to formally archive the specification:
|
|
48
|
-
```bash
|
|
49
|
-
specforce spec archive <slug>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### 10. Verification & Handoff
|
|
53
|
-
- After the archive command is executed successfully, you MUST output a final summary using the exact Markdown format below:
|
|
54
|
-
|
|
55
|
-
**Format:**
|
|
56
|
-
```markdown
|
|
57
|
-
**Archived:** [{FEATURE_NAME}]
|
|
58
|
-
**Constitution Updates:** [Briefly list what was added to the Constitution artifacts, or write "None required"]
|
|
59
|
-
**Memorial Updated:** [Yes/No - List key lessons recorded]
|
|
60
|
-
|
|
61
|
-
Feature successfully archived and lifecycle closed.
|
|
62
|
-
|
|
63
|
-
> The Specforce system is ready for the next feature.
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Guardrails
|
|
67
|
-
- **Zero Bloat:** Do not add feature-specific logic (e.g., "The auth module uses JWT") to the Constitution. Only extract reusable, cross-cutting rules.
|
|
68
|
-
- **Let the CLI Handle Files:** Do not delete or move the specification files manually. Let the CLI command handle the file system operations.
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
tools:
|
|
2
|
-
gemini-cli:
|
|
3
|
-
name: "Gemini CLI"
|
|
4
|
-
description: "Google's Gemini CLI agent."
|
|
5
|
-
target: ".gemini/"
|
|
6
|
-
mappings:
|
|
7
|
-
agents:
|
|
8
|
-
path: "agents"
|
|
9
|
-
ext: ".md"
|
|
10
|
-
commands:
|
|
11
|
-
path: "commands/spf"
|
|
12
|
-
ext: ".toml"
|
|
13
|
-
skills:
|
|
14
|
-
path: "skills"
|
|
15
|
-
ext: ".md"
|
|
16
|
-
claude:
|
|
17
|
-
name: "Claude"
|
|
18
|
-
description: "Anthropic's Claude agent integration."
|
|
19
|
-
target: ".claude/"
|
|
20
|
-
mappings:
|
|
21
|
-
agents:
|
|
22
|
-
path: "agents"
|
|
23
|
-
ext: ".md"
|
|
24
|
-
commands:
|
|
25
|
-
path: "commands/spf"
|
|
26
|
-
ext: ".md"
|
|
27
|
-
skills:
|
|
28
|
-
path: "skills"
|
|
29
|
-
ext: ".md"
|
|
30
|
-
qwen:
|
|
31
|
-
name: "Qwen"
|
|
32
|
-
description: "Alibaba's Qwen agent integration."
|
|
33
|
-
target: ".qwen/"
|
|
34
|
-
mappings:
|
|
35
|
-
agents:
|
|
36
|
-
path: "agents"
|
|
37
|
-
ext: ".md"
|
|
38
|
-
commands:
|
|
39
|
-
path: "commands/spf"
|
|
40
|
-
ext: ".md"
|
|
41
|
-
skills:
|
|
42
|
-
path: "skills"
|
|
43
|
-
ext: ".md"
|
|
44
|
-
open-code:
|
|
45
|
-
name: "OpenCode"
|
|
46
|
-
description: "OpenCode agent integration."
|
|
47
|
-
target: ".opencode/"
|
|
48
|
-
mappings:
|
|
49
|
-
agents:
|
|
50
|
-
path: "agents"
|
|
51
|
-
ext: ".md"
|
|
52
|
-
commands:
|
|
53
|
-
path: "commands"
|
|
54
|
-
ext: ".md"
|
|
55
|
-
skills:
|
|
56
|
-
path: "skills"
|
|
57
|
-
ext: ".md"
|
|
58
|
-
kilo-code:
|
|
59
|
-
name: "KiloCode"
|
|
60
|
-
description: "KiloCode agent integration."
|
|
61
|
-
target: ".kilocode/"
|
|
62
|
-
mappings:
|
|
63
|
-
agents:
|
|
64
|
-
path: "agents"
|
|
65
|
-
ext: ".md"
|
|
66
|
-
commands:
|
|
67
|
-
path: "commands"
|
|
68
|
-
ext: ".md"
|
|
69
|
-
skills:
|
|
70
|
-
path: "skills"
|
|
71
|
-
ext: ".md"
|
|
72
|
-
codex:
|
|
73
|
-
name: "Codex"
|
|
74
|
-
description: "Codex agent integration."
|
|
75
|
-
target: ".codex/"
|
|
76
|
-
mappings:
|
|
77
|
-
commands:
|
|
78
|
-
target: "${CODEX_PROMPTS_DIR:-${CODEX_HOME:-~/.codex}/prompts}"
|
|
79
|
-
path: "."
|
|
80
|
-
name: "spf-*"
|
|
81
|
-
ext: ".md"
|
|
82
|
-
skills:
|
|
83
|
-
path: "skills"
|
|
84
|
-
ext: ".md"
|
|
85
|
-
antigravity:
|
|
86
|
-
name: "Antigravity"
|
|
87
|
-
description: "Antigravity workflow integration."
|
|
88
|
-
target: ".agent/"
|
|
89
|
-
mappings:
|
|
90
|
-
agents:
|
|
91
|
-
path: "agents"
|
|
92
|
-
ext: ".md"
|
|
93
|
-
commands:
|
|
94
|
-
path: "workflows"
|
|
95
|
-
name: "spf-*"
|
|
96
|
-
ext: ".md"
|
|
97
|
-
skills:
|
|
98
|
-
path: "skills"
|
|
99
|
-
ext: ".md"
|
|
100
|
-
kimi-code:
|
|
101
|
-
name: "Kimi Code"
|
|
102
|
-
description: "Moonshot AI's Kimi Code CLI agent."
|
|
103
|
-
target: ".kimi/"
|
|
104
|
-
mappings:
|
|
105
|
-
commands:
|
|
106
|
-
path: "skills/spf-*"
|
|
107
|
-
name: "SKILL"
|
|
108
|
-
ext: ".md"
|
|
109
|
-
skills:
|
|
110
|
-
path: "skills"
|
|
111
|
-
ext: ".md"
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
name: opportunity-framing
|
|
2
|
-
description: Use during discovery and brainstorming to frame the objective, constraints,
|
|
3
|
-
idea directions, tradeoffs, and next-step recommendations before writing a feature
|
|
4
|
-
spec.
|
|
5
|
-
version: 1.0
|
|
6
|
-
priority: HIGH
|
|
7
|
-
content: '# Opportunity Framing
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> **CORE MANDATE:** Turn raw ideas into decision-ready directions, not generic suggestion
|
|
11
|
-
lists.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## When to use this skill
|
|
15
|
-
|
|
16
|
-
Use for discovery, brainstorming, strategic exploration, idea ranking, and pre-spec
|
|
17
|
-
product framing.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## How to use it
|
|
21
|
-
|
|
22
|
-
1. Frame the objective, actor, and outcome clearly.
|
|
23
|
-
|
|
24
|
-
2. Generate a small number of differentiated directions with tradeoffs.
|
|
25
|
-
|
|
26
|
-
3. Rank the best options and recommend the next action.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Checklist
|
|
30
|
-
|
|
31
|
-
- [ ] The problem framing is explicit.
|
|
32
|
-
|
|
33
|
-
- [ ] Idea directions are meaningfully different.
|
|
34
|
-
|
|
35
|
-
- [ ] Tradeoffs and open questions are visible.
|
|
36
|
-
|
|
37
|
-
- [ ] The recommendation includes a concrete next command.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Output Shape
|
|
41
|
-
|
|
42
|
-
- Objective
|
|
43
|
-
|
|
44
|
-
- Constraints
|
|
45
|
-
|
|
46
|
-
- 3-7 idea directions
|
|
47
|
-
|
|
48
|
-
- Top insights
|
|
49
|
-
|
|
50
|
-
- Ranked recommendation
|
|
51
|
-
|
|
52
|
-
- Open questions
|
|
53
|
-
|
|
54
|
-
- Next step
|
|
55
|
-
|
|
56
|
-
'
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
name: pragmatic-product-owner
|
|
2
|
-
description: Use when creating or refining requirements, acceptance criteria, and
|
|
3
|
-
business success metrics. Optimizes clarity, testability, and value-focused scope.
|
|
4
|
-
version: 1.0
|
|
5
|
-
priority: CRITICAL
|
|
6
|
-
content: "# Pragmatic Product Owner\n\n> **CORE MANDATE:** Maximize the value of the\
|
|
7
|
-
\ product. Every requirement must be verifiable through clear Acceptance Criteria.\n\
|
|
8
|
-
\n---\n\n## When to use this skill\nUse for requirements, acceptance criteria, business\
|
|
9
|
-
\ rules, key entities, scope cuts, and measurable outcomes.\n\n## How to use it\n\
|
|
10
|
-
1. Clarify user value, actor, and business constraint first.\n2. Write binary acceptance\
|
|
11
|
-
\ criteria and independent tests.\n3. Check the spec is valuable, testable, and\
|
|
12
|
-
\ free of solution leakage.\n\n## Checklist\n- [ ] Requirements describe outcomes,\
|
|
13
|
-
\ not implementation.\n- [ ] Acceptance criteria are pass/fail and independently\
|
|
14
|
-
\ testable.\n- [ ] Success criteria are measurable and worth building.\n\n## Artifact\
|
|
15
|
-
\ Guidance\n- **For discovery/brainstorming**: frame the problem, constraints, insight\
|
|
16
|
-
\ quality, and decision-ready next steps before turning ideas into features.\n-\
|
|
17
|
-
\ **For `requirements.md`**: define value, persona, entities, golden rules, measurable\
|
|
18
|
-
\ outcomes, and independent tests.\n- **For clarification loops**: resolve ambiguity\
|
|
19
|
-
\ by making business decisions explicit in the source requirement, not in side notes\
|
|
20
|
-
\ only.\n\n## References\n- **Spec artifacts and requirement shaping**: read [spec-artifacts.md](references/spec-artifacts.md)\
|
|
21
|
-
\ when drafting or refining business requirements.\n\n## 1. Triple-Dimension Success\
|
|
22
|
-
\ Metrics\nEvery feature or story must define success across three measurable axes\
|
|
23
|
-
\ to ensure holistic value:\n\n* **Business Metric:** (e.g., \"Increase checkout\
|
|
24
|
-
\ conversion by 5%\" or \"Reduce churn by 2%\").\n* **Performance Target:** (e.g.,\
|
|
25
|
-
\ \"API response SHALL be < 200ms at 95th percentile\").\n* **UX Efficiency:** (e.g.,\
|
|
26
|
-
\ \"The user must complete the KYC flow in < 4 minutes or < 5 screens\").\n\n##\
|
|
27
|
-
\ 2. Key Entities & Domain Integrity\nAvoid \"Anemic Domain Models.\" Define the\
|
|
28
|
-
\ lifecycle and language of the product's core objects.\n\n* **Ubiquitous Language:**\
|
|
29
|
-
\ Entity names (e.g., `Subscription`, `Lead`, `Merchant`) must be identical in the\
|
|
30
|
-
\ UI, the Requirements, and the Database.\n* **State Machine Thinking:** Define\
|
|
31
|
-
\ the **Lifecycle** for complex entities. \n * *Example:* `Draft` ➔ `Pending_Approval`\
|
|
32
|
-
\ ➔ `Active` ➔ `Expired`.\n * Explicitly state prohibited transitions (e.g.,\
|
|
33
|
-
\ \"An `Expired` contract cannot return to `Active`\").\n\n## 3. Golden Rules (Business\
|
|
34
|
-
\ Invariants)\nThese are the \"Laws of the Land\" - immutable logic that governs the\
|
|
35
|
-
\ system regardless of specific UI flows.\n\n* **Logic Constraints:** (e.g., \"\
|
|
36
|
-
A 'Trial' user can never access 'Premium' exports\").\n* **Data Integrity:** (e.g.,\
|
|
37
|
-
\ \"Total order value can never be negative after discounts\").\n* **Safety Guards:**\
|
|
38
|
-
\ (e.g., \"Destructive actions must require a double-confirmation if the entity\
|
|
39
|
-
\ state is `Production`\").\n\n## 4. Acceptance Criteria & Independent Tests\nACs\
|
|
40
|
-
\ must be **binary and testable**. If a machine cannot verify it, the AC is too\
|
|
41
|
-
\ vague.\n\n* **Functional AC:** Specific system behaviors (e.g., \"System sends\
|
|
42
|
-
\ a JWT via the `Authorization` header\").\n* **Negative AC (Edge Cases):** Behavior\
|
|
43
|
-
\ under stress (e.g., \"Return `422 Unprocessable Entity` if the Zip Code does not\
|
|
44
|
-
\ match the State\").\n* **Independent Test (Verification):** Every requirement\
|
|
45
|
-
\ must have a corresponding **Independent Test Case** that can be executed by QA\
|
|
46
|
-
\ or an automated suite without needing the PO's \"interpretation.\"\n\n## 5. Prioritization\
|
|
47
|
-
\ & Scope (The ICE/MoSCoW Hybrid)\n* **ICE Scoring:** Focus on **Impact, Confidence,\
|
|
48
|
-
\ and Ease**. \n* **Aggressive De-scoping:** If an AC doesn't directly support the\
|
|
49
|
-
\ **Success Metric**, move it to the backlog.\n* **Technical Health:** Allocate\
|
|
50
|
-
\ a fixed % (e.g., 20%) of the capacity to resolve Technical Debt and maintain the\
|
|
51
|
-
\ \"Golden Rules.\"\n\n---\n\n## PO Delivery Checklist\n\n- [ ] **Value:** Is the\
|
|
52
|
-
\ \"Problem Statement\" clear and the \"Why\" justified?\n- [ ] **Success Metrics:**\
|
|
53
|
-
\ Are the three dimensions (Business, Perf, UX) defined?\n- [ ] **Key Entities:**\
|
|
54
|
-
\ Is the lifecycle (State Machine) of the entity mapped?\n- [ ] **Golden Rules:**\
|
|
55
|
-
\ Are the immutable business constraints documented?\n- [ ] **Acceptance Criteria:**\
|
|
56
|
-
\ Are they binary? Can a machine verify them?\n- [ ] **Independent Test:** Is there\
|
|
57
|
-
\ a clear test scenario for every \"Happy Path\" and \"Edge Case\"?\n- [ ] **Persona:**\
|
|
58
|
-
\ Is it clear exactly *who* benefits from this change?\n"
|
package/src/internal/agent/kit/skills/pragmatic-product-owner/references/spec-artifacts.yaml
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
content: '# Spec Artifacts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Use this reference when shaping discovery outputs or `requirements.md`.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Before `requirements.md`
|
|
8
|
-
|
|
9
|
-
- Clarify objective, persona, and business outcome.
|
|
10
|
-
|
|
11
|
-
- Identify constraints from constitution docs.
|
|
12
|
-
|
|
13
|
-
- Reduce idea exploration to the highest-value direction and one fallback.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## Inside `requirements.md`
|
|
17
|
-
|
|
18
|
-
- Introduction: state the user problem and value in plain language.
|
|
19
|
-
|
|
20
|
-
- Requirements: write each slice as independently testable value.
|
|
21
|
-
|
|
22
|
-
- Key Entities: define business objects and lifecycle language without leaking implementation.
|
|
23
|
-
|
|
24
|
-
- Success Criteria: make outcomes measurable across business, performance, and UX.
|
|
25
|
-
|
|
26
|
-
- UI Contract: if UI exists, define observable expectations rather than vague taste.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Clarification Standard
|
|
30
|
-
|
|
31
|
-
- Prefer one ambiguity at a time.
|
|
32
|
-
|
|
33
|
-
- Resolve by updating the requirement text itself with SHALL or MUST language.
|
|
34
|
-
|
|
35
|
-
- Keep a short clarification log, but treat the requirement section as the source
|
|
36
|
-
of truth.
|
|
37
|
-
|
|
38
|
-
'
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
name: spec-clarification-interview
|
|
2
|
-
description: Use when a requirements document has ambiguity or [UNCLEAR] markers and
|
|
3
|
-
needs a one-question-at-a-time clarification interview that updates the source requirement
|
|
4
|
-
incrementally.
|
|
5
|
-
version: 1.0
|
|
6
|
-
priority: HIGH
|
|
7
|
-
content: '# Spec Clarification Interview
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> **CORE MANDATE:** Resolve ambiguity directly in the requirement text, one decision
|
|
11
|
-
at a time.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## When to use this skill
|
|
15
|
-
|
|
16
|
-
Use for clarification loops, ambiguity removal, underspecified business rules, and
|
|
17
|
-
incremental updates to `requirements.md`.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## How to use it
|
|
21
|
-
|
|
22
|
-
1. Identify the highest-impact ambiguity first.
|
|
23
|
-
|
|
24
|
-
2. Ask exactly one question with a recommended option and bounded alternatives.
|
|
25
|
-
|
|
26
|
-
3. Update the source requirement immediately after the answer.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Checklist
|
|
30
|
-
|
|
31
|
-
- [ ] Only one question is asked at a time.
|
|
32
|
-
|
|
33
|
-
- [ ] The recommended option is explicit and justified.
|
|
34
|
-
|
|
35
|
-
- [ ] The source requirement is updated after each answer.
|
|
36
|
-
|
|
37
|
-
- [ ] Clarification history is logged without replacing source-of-truth text.
|
|
38
|
-
|
|
39
|
-
- [ ] No more than 5 questions are asked in one session.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Interview Rules
|
|
43
|
-
|
|
44
|
-
- Prioritize lifecycle, security, and error-handling gaps first.
|
|
45
|
-
|
|
46
|
-
- Prefer decision-ready options over open-ended prompts.
|
|
47
|
-
|
|
48
|
-
- Replace `[UNCLEAR]` markers with SHALL or MUST language after the answer.
|
|
49
|
-
|
|
50
|
-
- End with a short coverage summary and the next recommended command.
|
|
51
|
-
|
|
52
|
-
'
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
name: task-atomic-decomposition
|
|
2
|
-
description: Use when converting design into executable tasks. Focuses on 5-20 minute
|
|
3
|
-
task slices, explicit dependencies, verification, rollback, and safe parallel tracks.
|
|
4
|
-
version: 1.0
|
|
5
|
-
priority: HIGH
|
|
6
|
-
content: '# Skill: Task Atomic Decomposition & Dependency Mapping
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## When to use this skill
|
|
10
|
-
|
|
11
|
-
Use when turning design into tasks, splitting large work, sequencing dependencies,
|
|
12
|
-
or defining verify and rollback steps.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## How to use it
|
|
16
|
-
|
|
17
|
-
1. Break work into the smallest meaningful units with one clear outcome.
|
|
18
|
-
|
|
19
|
-
2. Define dependency order, verify command, and rollback per task.
|
|
20
|
-
|
|
21
|
-
3. Confirm the roadmap can be executed without hidden assumptions.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Checklist
|
|
25
|
-
|
|
26
|
-
- [ ] Each task is atomic enough to prove complete quickly.
|
|
27
|
-
|
|
28
|
-
- [ ] Dependencies and parallel tracks are explicit.
|
|
29
|
-
|
|
30
|
-
- [ ] Every task has objective verification and safe rollback.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Artifact Guidance
|
|
34
|
-
|
|
35
|
-
- **For `design.md` consumption**: use the class/file inventory and roadmap as the
|
|
36
|
-
raw material for decomposition.
|
|
37
|
-
|
|
38
|
-
- **For `tasks.md`**: produce 5-20 minute slices with verify, rollback, dependency,
|
|
39
|
-
and `[REQ-X]` context.
|
|
40
|
-
|
|
41
|
-
- **For implementation handoff**: ensure every phase ends in a still-working state.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## References
|
|
45
|
-
|
|
46
|
-
- **Roadmap patterns and decomposition examples**: read [roadmap-patterns.md](references/roadmap-patterns.md)
|
|
47
|
-
when task sizing or rollback quality is unclear.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## 0. Best Practices (Quick Reference)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
| # | Principle | Rule | Why |
|
|
54
|
-
|
|
55
|
-
|---|-----------|------|-----|
|
|
56
|
-
|
|
57
|
-
| 1 | **Task Size** | 5-20 min, one clear outcome | Easy verification & rollback
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
| 2 | **Dependencies** | Explicit blockers only | No hidden failures |
|
|
61
|
-
|
|
62
|
-
| 3 | **Parallel** | Different files/agents OK | Avoid merge conflicts |
|
|
63
|
-
|
|
64
|
-
| 4 | **Verify-First** | Define success before coding | Prevents "done but broken"
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
| 5 | **Rollback** | Every task has recovery path | Tasks fail, prepare for it |
|
|
68
|
-
|
|
69
|
-
| 6 | **Context** | Explain WHY not just WHAT | Better agent decisions |
|
|
70
|
-
|
|
71
|
-
| 7 | **Risks** | Identify before they happen | Prepared responses |
|
|
72
|
-
|
|
73
|
-
| 8 | **Milestones** | Each phase ends with working state | Continuous value |
|
|
74
|
-
|
|
75
|
-
| 9 | **Phase X** | Verification is ALWAYS final | Definition of done |
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## 1. The Micro-Atomic Standard
|
|
79
|
-
|
|
80
|
-
You must break down technical designs into **micro-tasks**. A task is only valid
|
|
81
|
-
if it targets a single logical change that can be verified in isolation.
|
|
82
|
-
|
|
83
|
-
- **Rule of One**: One file, one function, or one configuration entry per task.
|
|
84
|
-
|
|
85
|
-
- **Verify-First**: Every task description must begin with or include the specific
|
|
86
|
-
command or state that confirms success.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
## 2. Dependency & Parallelism Logic
|
|
90
|
-
|
|
91
|
-
- **Explicit Blockers**: Clearly mark tasks that cannot start until another is finished.
|
|
92
|
-
|
|
93
|
-
- **Branching Factor**: Identify tasks that touch different directories or namespaces
|
|
94
|
-
as "Parallel-Ready" to allow multiple agents to work without merge conflicts.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
## 3. The Gravity Rule (Sequencing)
|
|
98
|
-
|
|
99
|
-
Order tasks to build a stable foundation:
|
|
100
|
-
|
|
101
|
-
1. **Infrastructure/Schema**: The "soil" for the code.
|
|
102
|
-
|
|
103
|
-
2. **Contracts/Interfaces**: The "promises" between layers.
|
|
104
|
-
|
|
105
|
-
3. **Core Logic**: The "brain" of the feature.
|
|
106
|
-
|
|
107
|
-
4. **Implementation/UI**: The "skin" and interaction.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## 4. Resilience & Rollback
|
|
111
|
-
|
|
112
|
-
For every complex task, the plan must imply or state a recovery path (e.g., "Keep
|
|
113
|
-
a backup of the original config" or "Revert migration on failure"). This ensures
|
|
114
|
-
the system never stays in a corrupted state.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
## 5. Contextual Intelligence
|
|
118
|
-
|
|
119
|
-
Never plan a task as a blind instruction. Every task must carry a fragment of the
|
|
120
|
-
"Why" (referencing `[REQ-X]`) so the Executor understands the business value and
|
|
121
|
-
can make micro-decisions correctly.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
## 6. Decomposition Quality Checklist
|
|
125
|
-
|
|
126
|
-
Before finalizing, verify the roadmap:
|
|
127
|
-
|
|
128
|
-
- [ ] **Atomicity**: Is every task truly a 5-20 minute effort?
|
|
129
|
-
|
|
130
|
-
- [ ] **Verification**: Does every task have a "Success State" defined?
|
|
131
|
-
|
|
132
|
-
- [ ] **Independence**: Can parallel tasks be executed in any order?
|
|
133
|
-
|
|
134
|
-
- [ ] **Working State**: Does every milestone (end of phase) result in a codebase
|
|
135
|
-
that still passes core tests?
|
|
136
|
-
|
|
137
|
-
'
|
package/src/internal/agent/kit/skills/task-atomic-decomposition/references/roadmap-patterns.yaml
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
content: '# Roadmap Patterns
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Use this reference when a design is hard to decompose cleanly.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Good Atomic Task Shape
|
|
8
|
-
|
|
9
|
-
- One clear outcome.
|
|
10
|
-
|
|
11
|
-
- One obvious verification path.
|
|
12
|
-
|
|
13
|
-
- One safe rollback path.
|
|
14
|
-
|
|
15
|
-
- Minimal file and dependency surface.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## Preferred Sequence
|
|
19
|
-
|
|
20
|
-
1. Infrastructure or schema.
|
|
21
|
-
|
|
22
|
-
2. Contracts and interfaces.
|
|
23
|
-
|
|
24
|
-
3. Core logic.
|
|
25
|
-
|
|
26
|
-
4. Delivery layer or UI.
|
|
27
|
-
|
|
28
|
-
5. Verification and polish.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## Scenario Patterns
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### UI-Heavy / Redesign
|
|
35
|
-
|
|
36
|
-
1. Surface shell or layout boundary.
|
|
37
|
-
|
|
38
|
-
2. Route/menu/shell integration when the surface introduces a new access path.
|
|
39
|
-
|
|
40
|
-
3. Surface-specific implementation.
|
|
41
|
-
|
|
42
|
-
4. UI polish.
|
|
43
|
-
|
|
44
|
-
5. A11y / responsive verification.
|
|
45
|
-
|
|
46
|
-
6. Contract verification when backend behavior is consumed.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Backend-Heavy / Domain
|
|
50
|
-
|
|
51
|
-
1. Contract or interface.
|
|
52
|
-
|
|
53
|
-
2. Domain rule or use case.
|
|
54
|
-
|
|
55
|
-
3. Persistence / infrastructure.
|
|
56
|
-
|
|
57
|
-
4. API exposure.
|
|
58
|
-
|
|
59
|
-
5. Verification.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Integration-Heavy
|
|
63
|
-
|
|
64
|
-
1. External contract assumptions.
|
|
65
|
-
|
|
66
|
-
2. Adapter or gateway.
|
|
67
|
-
|
|
68
|
-
3. Failure handling / fallback.
|
|
69
|
-
|
|
70
|
-
4. Observability.
|
|
71
|
-
|
|
72
|
-
5. Verification.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
### Migration / Rollout
|
|
76
|
-
|
|
77
|
-
1. Prepare compatibility.
|
|
78
|
-
|
|
79
|
-
2. Rollout-compatible implementation.
|
|
80
|
-
|
|
81
|
-
3. Verification.
|
|
82
|
-
|
|
83
|
-
4. Cleanup / deprecation removal.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
## Parallelism Rule
|
|
87
|
-
|
|
88
|
-
- Parallelize tasks that touch different files or modules and do not share a hidden
|
|
89
|
-
blocker.
|
|
90
|
-
|
|
91
|
-
- Do not parallelize tasks whose verify steps depend on unfinished upstream contract
|
|
92
|
-
work.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## Rollback Examples
|
|
96
|
-
|
|
97
|
-
- Restore one config file from the previous content.
|
|
98
|
-
|
|
99
|
-
- Revert one migration file or disable one flag.
|
|
100
|
-
|
|
101
|
-
- Remove one newly introduced route, job, or component.
|
|
102
|
-
|
|
103
|
-
'
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
package agent
|
|
2
|
-
|
|
3
|
-
import (
|
|
4
|
-
"testing"
|
|
5
|
-
)
|
|
6
|
-
|
|
7
|
-
func TestKitManifests(t *testing.T) {
|
|
8
|
-
kitFS, err := GetKitFS()
|
|
9
|
-
if err != nil {
|
|
10
|
-
t.Fatalf("failed to get kit FS: %v", err)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
registry := &Registry{}
|
|
14
|
-
err = registry.Initialize(kitFS)
|
|
15
|
-
if err != nil {
|
|
16
|
-
t.Fatalf("failed to initialize registry with kit FS: %v", err)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Check open-code
|
|
20
|
-
opencode, ok := registry.GetAgent("open-code")
|
|
21
|
-
if !ok {
|
|
22
|
-
t.Error("expected to find 'open-code' agent in kit")
|
|
23
|
-
} else {
|
|
24
|
-
if opencode.DirName != ".opencode/" {
|
|
25
|
-
t.Errorf("expected open-code DirName '.opencode/', got '%s'", opencode.DirName)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Check kilo-code
|
|
30
|
-
kilocode, ok := registry.GetAgent("kilo-code")
|
|
31
|
-
if !ok {
|
|
32
|
-
t.Error("expected to find 'kilo-code' agent in kit")
|
|
33
|
-
} else {
|
|
34
|
-
if kilocode.DirName != ".kilocode/" {
|
|
35
|
-
t.Errorf("expected kilo-code DirName '.kilocode/', got '%s'", kilocode.DirName)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Check antigravity (to be sure)
|
|
40
|
-
antigravity, ok := registry.GetAgent("antigravity")
|
|
41
|
-
if !ok {
|
|
42
|
-
t.Error("expected to find 'antigravity' agent in kit")
|
|
43
|
-
} else {
|
|
44
|
-
if antigravity.DirName != ".agent/" {
|
|
45
|
-
t.Errorf("expected antigravity DirName '.agent/', got '%s'", antigravity.DirName)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Check kimi-code
|
|
50
|
-
kimicode, ok := registry.GetAgent("kimi-code")
|
|
51
|
-
if !ok {
|
|
52
|
-
t.Error("expected to find 'kimi-code' agent in kit")
|
|
53
|
-
} else {
|
|
54
|
-
if kimicode.DirName != ".kimi/" {
|
|
55
|
-
t.Errorf("expected kimi-code DirName '.kimi/', got '%s'", kimicode.DirName)
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|