@haposoft/cafekit 0.8.16 → 0.9.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/README.md +63 -67
- package/bin/install.js +141 -194
- package/bin/lib/copy-utils.js +61 -0
- package/bin/lib/opencode-install.js +866 -0
- package/package.json +4 -1
- package/src/claude/CLAUDE.md +2 -2
- package/src/claude/migration-manifest.json +1 -0
- package/src/claude/rules/skill-domain-routing.md +2 -0
- package/src/claude/rules/skill-workflow-routing.md +3 -1
- package/src/claude/skills/qs/SKILL.md +177 -0
- package/src/claude/skills/qs/templates/qs.md +30 -0
- package/src/opencode/AGENTS.md +140 -0
- package/src/opencode/plugins/docs-sync.ts +181 -0
- package/src/opencode/plugins/inspect-block.ts +164 -0
- package/src/opencode/plugins/privacy-block.ts +182 -0
- package/src/opencode/plugins/rules.ts +163 -0
- package/src/opencode/plugins/session.ts +179 -0
- package/src/opencode/plugins/state.ts +253 -0
- package/src/opencode/plugins/usage.ts +178 -0
- package/src/antigravity/GEMINI.md +0 -162
- package/src/antigravity/workflows/code.md +0 -16
- package/src/antigravity/workflows/docs-init.md +0 -432
- package/src/antigravity/workflows/docs-update.md +0 -245
- package/src/antigravity/workflows/impact-analysis-output-example.md +0 -313
- package/src/antigravity/workflows/impact-analysis.md +0 -730
- package/src/antigravity/workflows/review.md +0 -15
- package/src/antigravity/workflows/spec-design.md +0 -220
- package/src/antigravity/workflows/spec-init.md +0 -78
- package/src/antigravity/workflows/spec-requirements.md +0 -122
- package/src/antigravity/workflows/spec-status.md +0 -95
- package/src/antigravity/workflows/spec-tasks.md +0 -156
- package/src/antigravity/workflows/spec-validate.md +0 -106
- package/src/antigravity/workflows/test.md +0 -13
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate implementation tasks for a specification
|
|
3
|
-
allowed-tools: Glob, Grep, Read, Write, Edit, WebSearch, WebFetch
|
|
4
|
-
argument-hint: <feature-name> [-y] [--sequential]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Implementation Tasks Generator
|
|
8
|
-
|
|
9
|
-
<background_information>
|
|
10
|
-
- **Mission**: Generate detailed, actionable implementation tasks that translate technical design into executable work items
|
|
11
|
-
- **Success Criteria**:
|
|
12
|
-
- All requirements mapped to specific tasks
|
|
13
|
-
- Tasks properly sized (1-3 hours each)
|
|
14
|
-
- Clear task progression with proper hierarchy
|
|
15
|
-
- Natural language descriptions focused on capabilities
|
|
16
|
-
</background_information>
|
|
17
|
-
|
|
18
|
-
<instructions>
|
|
19
|
-
## Core Task
|
|
20
|
-
Generate implementation tasks for feature **$ARGUMENTS** based on approved requirements and design.
|
|
21
|
-
|
|
22
|
-
## Execution Steps
|
|
23
|
-
|
|
24
|
-
### Step 0: Validate Phase State (Plan-Style Gate)
|
|
25
|
-
|
|
26
|
-
- Read `.specs/$ARGUMENTS/spec.json` first
|
|
27
|
-
- If feature directory or `spec.json` is missing: stop and instruct user to run `/spec-init <project-description>`, `/spec-requirements <feature-name>`, and `/spec-design <feature-name>` first
|
|
28
|
-
- If design has not been generated yet (phase before design): stop and instruct user to run `/spec-design $ARGUMENTS`
|
|
29
|
-
- If `phase` is already `tasks-generated`: explain tasks phase already exists and only continue for explicit regeneration/merge intent
|
|
30
|
-
|
|
31
|
-
### Step 1: Load Context
|
|
32
|
-
|
|
33
|
-
**Read all necessary context**:
|
|
34
|
-
- `.specs/$ARGUMENTS/spec.json`, `requirements.md`, `design.md`
|
|
35
|
-
- `.specs/$ARGUMENTS/tasks.md` (if exists, for merge mode)
|
|
36
|
-
- `.specs/$ARGUMENTS/research.md` (if exists, includes validation log)
|
|
37
|
-
- **Entire `.specs/steering/` directory** for complete project memory (if exists)
|
|
38
|
-
- **Load project docs context (Plan-style quality gate)** when available:
|
|
39
|
-
- `docs/codebase-summary.md`
|
|
40
|
-
- `docs/code-standards.md`
|
|
41
|
-
- `docs/system-architecture.md`
|
|
42
|
-
- `docs/project-overview-pdr.md`
|
|
43
|
-
- If any docs file is missing, continue and mention missing context in execution output (do not block generation)
|
|
44
|
-
|
|
45
|
-
**Validate approvals**:
|
|
46
|
-
- If `-y` flag provided: Auto-approve requirements and design in spec.json
|
|
47
|
-
- Otherwise: Verify both approved (stop if not, see Safety & Fallback)
|
|
48
|
-
- **Backward compatibility fallback (older specs):**
|
|
49
|
-
- If `validation` object is missing, treat validation status as `not-run`
|
|
50
|
-
- If `design_context` object is missing, treat `validation_recommended` as `false`
|
|
51
|
-
- If `spec.json.validation.status == "completed"`, treat validation as satisfied
|
|
52
|
-
- If validation is missing and `design_context.validation_recommended == true`, warn user to run `/spec-validate $ARGUMENTS` before continuing (do not hard-block)
|
|
53
|
-
- Determine sequential mode based on presence of `--sequential`
|
|
54
|
-
|
|
55
|
-
### Step 2: Generate Implementation Tasks
|
|
56
|
-
|
|
57
|
-
**Load generation rules and template**:
|
|
58
|
-
- Read `{{SKILLS_DIR}}/specs/rules/tasks-generation.md` for principles
|
|
59
|
-
- If `sequential` is **false**: Read `{{SKILLS_DIR}}/specs/rules/tasks-parallel-analysis.md` for parallel judgement criteria
|
|
60
|
-
- Read `{{SKILLS_DIR}}/specs/templates/tasks.md` for format (supports `(P)` markers)
|
|
61
|
-
|
|
62
|
-
**Generate task list following all rules**:
|
|
63
|
-
- Use language specified in spec.json
|
|
64
|
-
- Map all requirements to tasks
|
|
65
|
-
- When documenting requirement coverage, list numeric requirement IDs only (comma-separated) without descriptive suffixes, parentheses, translations, or free-form labels
|
|
66
|
-
- Ensure all design components included
|
|
67
|
-
- Verify task progression is logical and incremental
|
|
68
|
-
- Collapse single-subtask structures by promoting them to major tasks and avoid duplicating details on container-only major tasks (use template patterns accordingly)
|
|
69
|
-
- Apply `(P)` markers to tasks that satisfy parallel criteria (omit markers in sequential mode)
|
|
70
|
-
- Mark optional test coverage subtasks with `- [ ]*` only when they strictly cover acceptance criteria already satisfied by core implementation and can be deferred post-MVP
|
|
71
|
-
- If existing tasks.md found, merge with new content
|
|
72
|
-
|
|
73
|
-
### Step 3: Finalize
|
|
74
|
-
|
|
75
|
-
**Write and update**:
|
|
76
|
-
- Create/update `.specs/$ARGUMENTS/tasks.md`
|
|
77
|
-
- Update spec.json metadata:
|
|
78
|
-
- Set `phase: "tasks-generated"`
|
|
79
|
-
- Set `approvals.tasks.generated: true, approved: false`
|
|
80
|
-
- Set `approvals.requirements.approved: true`
|
|
81
|
-
- Set `approvals.design.approved: true`
|
|
82
|
-
- Update `updated_at` timestamp
|
|
83
|
-
|
|
84
|
-
## Critical Constraints
|
|
85
|
-
- **Follow rules strictly**: All principles in tasks-generation.md are mandatory
|
|
86
|
-
- **Natural Language**: Describe what to do, not code structure details
|
|
87
|
-
- **Complete Coverage**: ALL requirements must map to tasks
|
|
88
|
-
- **Maximum 2 Levels**: Major tasks and sub-tasks only (no deeper nesting)
|
|
89
|
-
- **Sequential Numbering**: Major tasks increment (1, 2, 3...), never repeat
|
|
90
|
-
- **Task Integration**: Every task must connect to the system (no orphaned work)
|
|
91
|
-
</instructions>
|
|
92
|
-
|
|
93
|
-
## Tool Guidance
|
|
94
|
-
- **Read first**: Load all context, rules, and templates before generation
|
|
95
|
-
- **Write last**: Generate tasks.md only after complete analysis and verification
|
|
96
|
-
|
|
97
|
-
## Output Description
|
|
98
|
-
|
|
99
|
-
Provide brief summary in the language specified in spec.json:
|
|
100
|
-
|
|
101
|
-
1. **Status**: Confirm tasks generated at `.specs/$ARGUMENTS/tasks.md`
|
|
102
|
-
2. **Task Summary**:
|
|
103
|
-
- Total: X major tasks, Y sub-tasks
|
|
104
|
-
- All Z requirements covered
|
|
105
|
-
- Average task size: 1-3 hours per sub-task
|
|
106
|
-
3. **Quality Validation**:
|
|
107
|
-
- ✅ All requirements mapped to tasks
|
|
108
|
-
- ✅ Task dependencies verified
|
|
109
|
-
- ✅ Testing tasks included
|
|
110
|
-
4. **Next Action**: Review tasks and proceed when ready
|
|
111
|
-
|
|
112
|
-
**Format**: Concise (under 200 words)
|
|
113
|
-
|
|
114
|
-
## Safety & Fallback
|
|
115
|
-
|
|
116
|
-
### Error Scenarios
|
|
117
|
-
|
|
118
|
-
**Requirements or Design Not Approved**:
|
|
119
|
-
- **Stop Execution**: Cannot proceed without approved requirements and design
|
|
120
|
-
- **User Message**: "Requirements and design must be approved before task generation"
|
|
121
|
-
- **Suggested Action**: "Run `/spec-tasks $ARGUMENTS -y` to auto-approve both and proceed"
|
|
122
|
-
|
|
123
|
-
**Missing Requirements or Design**:
|
|
124
|
-
- **Stop Execution**: Both documents must exist
|
|
125
|
-
- **User Message**: "Missing requirements.md or design.md at `.specs/$ARGUMENTS/`"
|
|
126
|
-
- **Suggested Action**: "Complete requirements and design phases first"
|
|
127
|
-
|
|
128
|
-
**Incomplete Requirements Coverage**:
|
|
129
|
-
- **Warning**: "Not all requirements mapped to tasks. Review coverage."
|
|
130
|
-
- **User Action Required**: Confirm intentional gaps or regenerate tasks
|
|
131
|
-
|
|
132
|
-
**Template/Rules Missing**:
|
|
133
|
-
- **User Message**: "Template or rules files missing in `{{SKILLS_DIR}}/specs/`"
|
|
134
|
-
- **Fallback**: Use inline basic structure with warning
|
|
135
|
-
- **Suggested Action**: "Check repository setup or restore template files"
|
|
136
|
-
|
|
137
|
-
**Missing Numeric Requirement IDs**:
|
|
138
|
-
- **Stop Execution**: All requirements in requirements.md MUST have numeric IDs. If any requirement lacks a numeric ID, stop and request that requirements.md be fixed before generating tasks.
|
|
139
|
-
|
|
140
|
-
### Next Phase: Implementation
|
|
141
|
-
|
|
142
|
-
**Before Starting Implementation**:
|
|
143
|
-
- **IMPORTANT**: Clear conversation history and free up context before running `/code`
|
|
144
|
-
- This applies when starting first task OR switching between tasks
|
|
145
|
-
- Fresh context ensures clean state and proper task focus
|
|
146
|
-
|
|
147
|
-
**If Tasks Approved**:
|
|
148
|
-
- Execute coding pass from approved spec tasks: `/code $ARGUMENTS`
|
|
149
|
-
- After coding, run `/test` then `/review`
|
|
150
|
-
- Repeat in small passes and clear context between iterations when needed
|
|
151
|
-
|
|
152
|
-
**If Modifications Needed**:
|
|
153
|
-
- Provide feedback and re-run `/spec-tasks $ARGUMENTS`
|
|
154
|
-
- Existing tasks used as reference (merge mode)
|
|
155
|
-
|
|
156
|
-
**Note**: Continue with `/test` then `/review` after `/code` to complete the workflow.
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Validate design decisions with interview questions before task generation
|
|
3
|
-
allowed-tools: Read, Write, Edit, Glob, AskUserQuestion
|
|
4
|
-
argument-hint: <feature-name>
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Specification Validation Interview
|
|
8
|
-
|
|
9
|
-
<background_information>
|
|
10
|
-
- **Mission**: Validate critical design decisions, assumptions, and trade-offs before generating implementation tasks.
|
|
11
|
-
- **Success Criteria**:
|
|
12
|
-
- Ask targeted, concrete questions about high-impact decisions
|
|
13
|
-
- Record answers in spec artifacts for future traceability
|
|
14
|
-
- Update spec metadata to reflect validation status
|
|
15
|
-
</background_information>
|
|
16
|
-
|
|
17
|
-
<instructions>
|
|
18
|
-
## Core Task
|
|
19
|
-
Run a structured interview for feature **$ARGUMENTS** and persist decisions.
|
|
20
|
-
|
|
21
|
-
## Execution Steps
|
|
22
|
-
|
|
23
|
-
### Step 0: Resolve & Validate State
|
|
24
|
-
- Require `$ARGUMENTS` as feature name
|
|
25
|
-
- Read `.specs/$ARGUMENTS/spec.json`
|
|
26
|
-
- Stop with guidance if spec does not exist
|
|
27
|
-
- Ensure `requirements.md` and `design.md` exist before validation
|
|
28
|
-
|
|
29
|
-
### Step 1: Load Validation Context
|
|
30
|
-
Read:
|
|
31
|
-
- `.specs/$ARGUMENTS/spec.json`
|
|
32
|
-
- `.specs/$ARGUMENTS/requirements.md`
|
|
33
|
-
- `.specs/$ARGUMENTS/design.md`
|
|
34
|
-
- `.specs/$ARGUMENTS/research.md` (if exists)
|
|
35
|
-
|
|
36
|
-
Extract decision points around:
|
|
37
|
-
- architecture and boundaries
|
|
38
|
-
- assumptions and defaults
|
|
39
|
-
- integration risks
|
|
40
|
-
- scope and sequencing
|
|
41
|
-
- testing/security/performance trade-offs
|
|
42
|
-
|
|
43
|
-
### Step 2: Determine Question Budget
|
|
44
|
-
Use injected session validation settings when available (`Validation: mode=X, questions=MIN-MAX`).
|
|
45
|
-
- If unavailable, use 3-6 questions
|
|
46
|
-
- Ask only meaningful questions that can change implementation
|
|
47
|
-
- Each question must have 2-4 concrete options
|
|
48
|
-
|
|
49
|
-
### Step 3: Interview User
|
|
50
|
-
Use `AskUserQuestion` in batches (max 4 questions per call).
|
|
51
|
-
Rules:
|
|
52
|
-
- Include one recommended option when a safe default exists
|
|
53
|
-
- Keep options mutually exclusive
|
|
54
|
-
- Do not ask redundant questions
|
|
55
|
-
|
|
56
|
-
### Step 4: Persist Validation Log
|
|
57
|
-
Append to `.specs/$ARGUMENTS/research.md` under `## Validation Log`.
|
|
58
|
-
If section missing, create it.
|
|
59
|
-
|
|
60
|
-
Session format:
|
|
61
|
-
```markdown
|
|
62
|
-
## Validation Log
|
|
63
|
-
|
|
64
|
-
### Session N — YYYY-MM-DD
|
|
65
|
-
- Questions asked: X
|
|
66
|
-
|
|
67
|
-
1. [Category] Question text
|
|
68
|
-
- Options: A | B | C
|
|
69
|
-
- Answer: ...
|
|
70
|
-
- Rationale: why this decision matters
|
|
71
|
-
|
|
72
|
-
#### Confirmed Decisions
|
|
73
|
-
- ...
|
|
74
|
-
|
|
75
|
-
#### Follow-up Actions
|
|
76
|
-
- [ ] ...
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Step 5: Update Metadata
|
|
80
|
-
Update `.specs/$ARGUMENTS/spec.json`:
|
|
81
|
-
- `approvals.requirements.approved: true`
|
|
82
|
-
- `approvals.design.approved: true`
|
|
83
|
-
- `validation.last_validated_at: <ISO timestamp>`
|
|
84
|
-
- `validation.questions_asked: <number>`
|
|
85
|
-
- `validation.status: "completed"`
|
|
86
|
-
- increment `validation.session_count` (initialize to 1 if absent)
|
|
87
|
-
- update `updated_at`
|
|
88
|
-
|
|
89
|
-
## Constraints
|
|
90
|
-
- Keep input/output contract of existing `spec-*` commands unchanged
|
|
91
|
-
- Validation must be traceable and append-only (never overwrite old sessions)
|
|
92
|
-
- Ask fewer questions when artifact is simple; quality over quantity
|
|
93
|
-
</instructions>
|
|
94
|
-
|
|
95
|
-
## Output Description
|
|
96
|
-
Provide concise summary:
|
|
97
|
-
1. Validation status and files updated
|
|
98
|
-
2. Number of questions asked
|
|
99
|
-
3. Top confirmed decisions
|
|
100
|
-
4. Recommended next command:
|
|
101
|
-
- `/spec-tasks $ARGUMENTS` when ready
|
|
102
|
-
|
|
103
|
-
## Safety & Fallback
|
|
104
|
-
- Missing spec/design artifacts: stop and instruct the exact preceding command
|
|
105
|
-
- Empty decision surface: ask only 1-2 high-value confirmation questions
|
|
106
|
-
- Write failure: report exact path and retry guidance
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run project tests and report failures concisely.
|
|
3
|
-
allowed-tools: Bash, Read, Grep
|
|
4
|
-
argument-hint: [scope]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /test
|
|
8
|
-
|
|
9
|
-
Run the project's test command and report:
|
|
10
|
-
- total passed/failed
|
|
11
|
-
- failing test names
|
|
12
|
-
- root cause hints
|
|
13
|
-
- next fix action
|