@haposoft/cafekit 0.9.0 → 0.9.1
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 +5 -5
- package/bin/lib/opencode-install.js +4 -4
- package/package.json +1 -1
- package/src/claude/CLAUDE.md +2 -2
- package/src/claude/migration-manifest.json +1 -1
- package/src/claude/rules/skill-domain-routing.md +2 -2
- package/src/claude/rules/skill-workflow-routing.md +5 -3
- package/src/claude/skills/question/SKILL.md +162 -0
- package/src/claude/skills/question/templates/question.md +32 -0
- package/src/opencode/AGENTS.md +3 -3
- package/src/claude/skills/qs/SKILL.md +0 -177
- package/src/claude/skills/qs/templates/qs.md +0 -30
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Claude Code-first spec-driven workflow and runtime bundle for AI coding assistants.
|
|
4
4
|
|
|
5
|
-
[](https://github.com/haposoft/cafekit)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://claude.ai/code)
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
CafeKit installs a structured workflow so an AI coding agent can move cleanly from:
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
|
-
|
|
14
|
+
Question -> Question answer -> Brainstorm -> Spec -> Design -> Task Files -> Implementation -> Test -> Review
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Claude Code install support:
|
|
@@ -102,7 +102,7 @@ cat .opencode/cafekit.json
|
|
|
102
102
|
|
|
103
103
|
CafeKit ships many skills, but the main release surface is:
|
|
104
104
|
|
|
105
|
-
- `/hapo:
|
|
105
|
+
- `/hapo:question <question> [--repo|--web|--both|--brief|--deep]`: answer questions using repo evidence first, then external/current sources when local evidence is insufficient
|
|
106
106
|
- `/hapo:brainstorm <idea-or-problem>`: scout the repo, clarify exact requirements, compare approaches, and hand off to specs
|
|
107
107
|
- `/hapo:specs <feature-description>`: create or resume a structured spec workflow
|
|
108
108
|
- `/hapo:develop <feature-name>`: implement from approved spec artifacts
|
|
@@ -126,7 +126,7 @@ node .claude/scripts/generate-skill-catalog.cjs --skills
|
|
|
126
126
|
Claude Code:
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
|
-
/hapo:
|
|
129
|
+
/hapo:question "Which files define the current CafeKit install/runtime behavior?" --repo
|
|
130
130
|
/hapo:brainstorm Explore approaches for a Google Meet transcript extension
|
|
131
131
|
/hapo:specs Build a Google Meet transcript extension with AI summaries
|
|
132
132
|
/hapo:develop meet-transcript-mvp
|
|
@@ -137,7 +137,7 @@ Claude Code:
|
|
|
137
137
|
OpenCode uses the generated command names without the Claude `hapo:` prefix:
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
|
-
/
|
|
140
|
+
/question "Which files define the current CafeKit install/runtime behavior?" --repo
|
|
141
141
|
/brainstorm Explore approaches for a Google Meet transcript extension
|
|
142
142
|
/specs Build a Google Meet transcript extension with AI summaries
|
|
143
143
|
/develop meet-transcript-mvp
|
|
@@ -32,11 +32,11 @@ const OPENCODE_COMMAND_TEMPLATES = [
|
|
|
32
32
|
description: 'Explore and narrow an idea before writing a CafeKit spec.'
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
fileName: '
|
|
36
|
-
skillName: '
|
|
37
|
-
agent: '
|
|
35
|
+
fileName: 'question.md',
|
|
36
|
+
skillName: 'question',
|
|
37
|
+
agent: 'inspector',
|
|
38
38
|
subtask: true,
|
|
39
|
-
description: '
|
|
39
|
+
description: 'Answer questions using repo evidence first, then external sources when needed.'
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
fileName: 'specs.md',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haposoft/cafekit",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Claude Code-first spec-driven workflow for AI coding assistants. Bundles CafeKit hapo: skills, runtime hooks, agents, and installer scaffolding.",
|
|
5
5
|
"author": "Haposoft <nghialt@haposoft.com>",
|
|
6
6
|
"license": "MIT",
|
package/src/claude/CLAUDE.md
CHANGED
|
@@ -15,7 +15,7 @@ These rules reduce common agent coding failures: hidden assumptions, overbuilt s
|
|
|
15
15
|
- Do not assume silently. State assumptions when they affect the work.
|
|
16
16
|
- If multiple interpretations are plausible, surface them before implementation.
|
|
17
17
|
- If the simpler option is likely better, say so and push back.
|
|
18
|
-
- If the
|
|
18
|
+
- If the user asks a question about the project, use `/hapo:question` to answer from source evidence before planning.
|
|
19
19
|
- Before feature planning or coding, read `./README.md` for project context.
|
|
20
20
|
|
|
21
21
|
### 2. Simplicity First
|
|
@@ -46,7 +46,7 @@ These rules reduce common agent coding failures: hidden assumptions, overbuilt s
|
|
|
46
46
|
Use this loop for non-trivial work:
|
|
47
47
|
|
|
48
48
|
1. **Understand** — read README, relevant docs, active spec/task, and existing code.
|
|
49
|
-
2. **Plan** — choose the smallest coherent path; use `/hapo:
|
|
49
|
+
2. **Plan** — choose the smallest coherent path; use `/hapo:question` for evidence-backed project questions and `/hapo:specs` for feature specs when ready.
|
|
50
50
|
3. **Execute** — implement only the active task/scope; no placeholder completion.
|
|
51
51
|
4. **Verify** — run exact task commands first, then repo-level lint/test/build as needed.
|
|
52
52
|
5. **Sync** — mark task state only after proof exists.
|
|
@@ -29,7 +29,7 @@ User wants to...
|
|
|
29
29
|
|
|
30
30
|
```text
|
|
31
31
|
User wants to...
|
|
32
|
-
├──
|
|
32
|
+
├── answer questions from source code/docs/specs/config -> /hapo:question
|
|
33
33
|
├── find files, locate code, scan project structure -> /hapo:inspect
|
|
34
34
|
├── diagnose an error or failing check -> /hapo:debug
|
|
35
35
|
├── understand possible side effects -> /hapo:impact-analysis
|
|
@@ -42,7 +42,7 @@ Local source truth comes from `/hapo:inspect`; external/current knowledge comes
|
|
|
42
42
|
|
|
43
43
|
```text
|
|
44
44
|
User wants to...
|
|
45
|
-
├──
|
|
45
|
+
├── ask/answer documentation questions from source -> /hapo:question
|
|
46
46
|
├── create missing project docs -> /hapo:docs --init
|
|
47
47
|
├── update docs after source changes -> /hapo:docs --update
|
|
48
48
|
├── summarize codebase quickly -> /hapo:docs --summarize
|
|
@@ -7,12 +7,13 @@ Do not inject or force a skill when the user explicitly asks for a direct answer
|
|
|
7
7
|
## Core Specification Workflow
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
/hapo:
|
|
10
|
+
/hapo:question -> /hapo:brainstorm -> /hapo:specs -> /hapo:develop -> /hapo:test -> /hapo:code-review -> /hapo:git
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
| User intent | Suggested start |
|
|
14
14
|
|---|---|
|
|
15
|
-
|
|
|
15
|
+
| ask about source code, docs, specs, config, dependencies, or external/current technical facts | `/hapo:question` |
|
|
16
|
+
| vague request, missing acceptance criteria, unclear scope, stakeholder questions | ask one clarification or use `/hapo:brainstorm` |
|
|
16
17
|
| unclear idea, possible approaches, scope tradeoffs | `/hapo:brainstorm` |
|
|
17
18
|
| create requirements, design, task breakdown, validate spec | `/hapo:specs` |
|
|
18
19
|
| implement an approved spec or a specific task file | `/hapo:develop` |
|
|
@@ -82,5 +83,6 @@ Use `/hapo:research` for external knowledge. Use `/hapo:inspect` for local sourc
|
|
|
82
83
|
- Add a secondary skill only when it materially changes execution.
|
|
83
84
|
- Prefer explicit user commands over this table.
|
|
84
85
|
- If two workflows conflict, ask one concise clarification.
|
|
85
|
-
- If
|
|
86
|
+
- If the user asks a factual or project question before workflow selection, use `/hapo:question`.
|
|
87
|
+
- If missing information blocks workflow selection, ask one concise clarification or use `/hapo:brainstorm`.
|
|
86
88
|
- If the user asks to "fix" and root cause is unknown, start with `/hapo:debug` unless the issue is trivial and local.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hapo:question
|
|
3
|
+
description: "Answer questions with evidence. Use when the user asks about project behavior, source code, specs, docs, configuration, dependencies, or external technical information; inspect the repo first, use internet/current docs when repo evidence is insufficient, and ask back only when the question cannot be answered safely."
|
|
4
|
+
argument-hint: "<question> [--repo|--web|--both|--brief|--deep]"
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Question Skill
|
|
9
|
+
|
|
10
|
+
`hapo:question` is an evidence-backed question-answering skill. It answers user questions by checking the local project first, then external/current sources when the repository cannot answer the question.
|
|
11
|
+
|
|
12
|
+
## Core Stance
|
|
13
|
+
|
|
14
|
+
- Answer the question; do not turn every question into a spec or planning session.
|
|
15
|
+
- Source-first: prefer README, docs, specs, code, config, tests, logs, and package metadata before assumptions.
|
|
16
|
+
- Use external/current sources when the local repo is missing the answer, the topic is version-sensitive, or the user asks about outside tools, libraries, APIs, laws, pricing, or best practices.
|
|
17
|
+
- Ask back only when the question is too broad, has no target, needs credentials/private context, or any answer would be misleading.
|
|
18
|
+
- Do not edit files, implement code, create specs, or change project state.
|
|
19
|
+
|
|
20
|
+
<ANSWER-ONLY-GATE>
|
|
21
|
+
Do NOT implement, scaffold, refactor, modify files, generate full specs, or make final architecture decisions.
|
|
22
|
+
The output is an answer, evidence, confidence, and a follow-up only when needed.
|
|
23
|
+
</ANSWER-ONLY-GATE>
|
|
24
|
+
|
|
25
|
+
## When To Use
|
|
26
|
+
|
|
27
|
+
Use `hapo:question` when the user asks:
|
|
28
|
+
- "Trong hệ thống này X làm gì?"
|
|
29
|
+
- "Luồng này đang xử lý ở đâu?"
|
|
30
|
+
- "Config/version/package hiện tại là gì?"
|
|
31
|
+
- "Có dùng thư viện/công nghệ/cách làm nào không?"
|
|
32
|
+
- "Requirement/spec này có khớp code không?"
|
|
33
|
+
- "Tool/library/framework này nên dùng thế nào?"
|
|
34
|
+
- "Theo best practice/current docs thì sao?"
|
|
35
|
+
- "Tôi nên hiểu phần này như thế nào?"
|
|
36
|
+
|
|
37
|
+
Do not use it when:
|
|
38
|
+
- The user asks to implement, fix, debug, test, commit, or publish.
|
|
39
|
+
- The user wants ideation/tradeoff exploration; use `hapo:brainstorm`.
|
|
40
|
+
- The user wants a formal spec; use `hapo:specs`.
|
|
41
|
+
- The user wants full legacy documentation reconstruction; use `hapo:docs --reconstruct`.
|
|
42
|
+
- The user wants root-cause diagnosis for a failure; use `hapo:debug`.
|
|
43
|
+
|
|
44
|
+
## Modes
|
|
45
|
+
|
|
46
|
+
- Default: repo-first answer. Use external sources only if local evidence is insufficient.
|
|
47
|
+
- `--repo`: answer from local source only. If not enough evidence, say so and do not use web.
|
|
48
|
+
- `--web`: answer from external/current sources. Still read local context if the question mentions this project.
|
|
49
|
+
- `--both`: explicitly combine local source evidence and external/current evidence.
|
|
50
|
+
- `--brief`: short answer, minimal evidence.
|
|
51
|
+
- `--deep`: broader evidence scan, include trace and tradeoffs.
|
|
52
|
+
|
|
53
|
+
If modes conflict, prefer the most explicit source mode in this order: `--both`, `--repo`, `--web`, then default. Apply `--brief` or `--deep` as output depth modifiers.
|
|
54
|
+
|
|
55
|
+
## Workflow
|
|
56
|
+
|
|
57
|
+
### 1. Classify The Question
|
|
58
|
+
|
|
59
|
+
Pick one primary answer type:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
source-code behavior | config/version | spec/docs consistency | dependency/library | workflow/process | external/current knowledge | unclear
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If `unclear`, ask one focused follow-up with the minimum choices needed.
|
|
66
|
+
|
|
67
|
+
### 2. Gather Evidence
|
|
68
|
+
|
|
69
|
+
Repo evidence priority:
|
|
70
|
+
1. `README.md`, `AGENTS.md`, `CLAUDE.md`
|
|
71
|
+
2. relevant `docs/`, `specs/`, `.claude/`, `.opencode/`
|
|
72
|
+
3. source files, tests, scripts, package manifests, config files
|
|
73
|
+
4. git history only when the question asks about changes or provenance
|
|
74
|
+
|
|
75
|
+
Use focused search (`rg`, targeted file reads) instead of broad scans. Use `hapo:inspect` when the user asks where something lives or the source surface is unclear.
|
|
76
|
+
|
|
77
|
+
External evidence:
|
|
78
|
+
- Use external/current docs when repo evidence is absent, stale, or not authoritative.
|
|
79
|
+
- Prefer official docs, standards, source repositories, or primary vendor docs.
|
|
80
|
+
- State clearly when an answer is inferred from external docs rather than confirmed in the repo.
|
|
81
|
+
|
|
82
|
+
### 3. Decide Whether To Answer Or Ask Back
|
|
83
|
+
|
|
84
|
+
Answer directly when at least one of these is true:
|
|
85
|
+
- repo evidence answers the question,
|
|
86
|
+
- external/current evidence answers the non-project part,
|
|
87
|
+
- a cautious answer can separate known facts from inference.
|
|
88
|
+
|
|
89
|
+
Ask back when:
|
|
90
|
+
- the target system/module is not named and multiple targets are plausible,
|
|
91
|
+
- the needed file/source is blocked or private,
|
|
92
|
+
- the question requires business/domain judgment not present in source,
|
|
93
|
+
- the answer would require guessing customer intent,
|
|
94
|
+
- the question bundles multiple unrelated topics.
|
|
95
|
+
|
|
96
|
+
Ask only one follow-up question. Include 2-3 concrete options if helpful.
|
|
97
|
+
|
|
98
|
+
### 4. Output Contract
|
|
99
|
+
|
|
100
|
+
Default output:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
**Answer**
|
|
104
|
+
...
|
|
105
|
+
|
|
106
|
+
**Evidence**
|
|
107
|
+
- `path/to/file`: what it proves
|
|
108
|
+
- External: source name/link, what it proves
|
|
109
|
+
|
|
110
|
+
**Confidence**
|
|
111
|
+
high | medium | low
|
|
112
|
+
|
|
113
|
+
**Gaps**
|
|
114
|
+
- ...
|
|
115
|
+
|
|
116
|
+
**Next**
|
|
117
|
+
...
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Use `templates/question.md` when the user asks to save or document the answer.
|
|
121
|
+
|
|
122
|
+
## Answer Style
|
|
123
|
+
|
|
124
|
+
- Lead with the answer, not the research process.
|
|
125
|
+
- Use file paths and line references when local evidence is used.
|
|
126
|
+
- Separate "confirmed by source" from "inferred".
|
|
127
|
+
- Keep the answer proportional: concise for simple questions, structured for complex ones.
|
|
128
|
+
- If external sources were used, include source links or names.
|
|
129
|
+
- If no evidence exists, say "không thấy bằng chứng trong source hiện tại" and explain what was checked.
|
|
130
|
+
|
|
131
|
+
## Examples
|
|
132
|
+
|
|
133
|
+
### Source Question
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
/hapo:question "Trong hệ thống này cafekit dùng file nào để bật/tắt skill routing?"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Expected behavior:
|
|
140
|
+
- read runtime/config/install files,
|
|
141
|
+
- answer with exact config file and relevant keys,
|
|
142
|
+
- say whether it is runtime-driven or hard-coded.
|
|
143
|
+
|
|
144
|
+
### Mixed Source + Web Question
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
/hapo:question "Dự án này đang dùng React version nào, và version đó có còn phù hợp theo best practice hiện tại không?" --both
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Expected behavior:
|
|
151
|
+
- read `package.json` or lockfile,
|
|
152
|
+
- check current React docs/release info if needed,
|
|
153
|
+
- separate local version from external recommendation.
|
|
154
|
+
|
|
155
|
+
### Ask Back
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
/hapo:question "Hệ thống này có ổn không?"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Expected behavior:
|
|
162
|
+
- ask one narrowing question because "ổn" could mean architecture, security, performance, UX, tests, or deploy readiness.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Question Answer: {{TITLE}}
|
|
2
|
+
|
|
3
|
+
## Question
|
|
4
|
+
{{QUESTION}}
|
|
5
|
+
|
|
6
|
+
## Answer
|
|
7
|
+
{{ANSWER}}
|
|
8
|
+
|
|
9
|
+
## Evidence
|
|
10
|
+
| Source | Finding | Confidence |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| {{SOURCE}} | {{FINDING}} | {{CONFIDENCE}} |
|
|
13
|
+
|
|
14
|
+
## Source Trace
|
|
15
|
+
- Repo files checked: {{REPO_FILES}}
|
|
16
|
+
- External/current sources checked: {{EXTERNAL_SOURCES}}
|
|
17
|
+
- Search terms or commands: {{SEARCH_TRACE}}
|
|
18
|
+
|
|
19
|
+
## Confirmed Facts
|
|
20
|
+
- {{FACT}}
|
|
21
|
+
|
|
22
|
+
## Inferences
|
|
23
|
+
- {{INFERENCE}}
|
|
24
|
+
|
|
25
|
+
## Gaps / Unknowns
|
|
26
|
+
- {{GAP}}
|
|
27
|
+
|
|
28
|
+
## Follow-up Question
|
|
29
|
+
{{FOLLOW_UP_OR_NONE}}
|
|
30
|
+
|
|
31
|
+
## Next
|
|
32
|
+
{{NEXT_STEP}}
|
package/src/opencode/AGENTS.md
CHANGED
|
@@ -16,7 +16,7 @@ Primary operating instructions for OpenCode using the CafeKit runtime.
|
|
|
16
16
|
Use these OpenCode commands:
|
|
17
17
|
|
|
18
18
|
- `/brainstorm <idea-or-problem>`: scout and narrow an unclear idea before specs.
|
|
19
|
-
- `/
|
|
19
|
+
- `/question <question> [--repo|--web|--both|--brief|--deep]`: answer questions using repo evidence first, then external/current sources when needed.
|
|
20
20
|
- `/specs <feature-or-spec-command>`: create, update, validate, or approve specs.
|
|
21
21
|
- `/develop <feature> [task-file] [--flash]`: implement approved spec tasks.
|
|
22
22
|
- `/test [scope|--full]`: verify implementation and collect evidence.
|
|
@@ -42,7 +42,7 @@ These rules reduce common agent coding failures: hidden assumptions, overbuilt s
|
|
|
42
42
|
- Do not assume silently. State assumptions when they affect the work.
|
|
43
43
|
- If multiple interpretations are plausible, surface them before implementation.
|
|
44
44
|
- If the simpler option is likely better, say so and push back.
|
|
45
|
-
- If the
|
|
45
|
+
- If the user asks a question about the project, use `/question` to answer from source evidence before planning.
|
|
46
46
|
- Before feature planning or coding, read `./README.md` for project context.
|
|
47
47
|
|
|
48
48
|
### 2. Simplicity First
|
|
@@ -73,7 +73,7 @@ These rules reduce common agent coding failures: hidden assumptions, overbuilt s
|
|
|
73
73
|
Use this loop for non-trivial work:
|
|
74
74
|
|
|
75
75
|
1. Understand: read README, relevant docs, active spec/task, and existing code.
|
|
76
|
-
2. Plan: choose the smallest coherent path; use `/
|
|
76
|
+
2. Plan: choose the smallest coherent path; use `/question` for evidence-backed project questions and `/specs` for feature specs when ready.
|
|
77
77
|
3. Execute: implement only the active task/scope; no placeholder completion.
|
|
78
78
|
4. Verify: run exact task commands first, then repo-level lint/test/build as needed.
|
|
79
79
|
5. Sync: mark task state only after proof exists.
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: hapo:qs
|
|
3
|
-
description: "Clarify vague requests before planning or implementation. Use when requirements, acceptance criteria, scope, constraints, stakeholder decisions, or next workflow readiness are unclear."
|
|
4
|
-
argument-hint: "<request_or_context> [--batch|--spec-ready|--stakeholder]"
|
|
5
|
-
version: 1.0.0
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# QS Skill
|
|
9
|
-
|
|
10
|
-
`hapo:qs` turns unclear intent into answerable questions and a readiness verdict. It is a clarification gate before `hapo:brainstorm`, `hapo:specs`, `hapo:docs --reconstruct`, `hapo:debug`, or `hapo:develop`.
|
|
11
|
-
|
|
12
|
-
## Core Stance
|
|
13
|
-
|
|
14
|
-
- Context before questions. Read the useful project/spec/docs/source context before asking.
|
|
15
|
-
- Questions are work products. Make them specific, prioritized, and easy to answer.
|
|
16
|
-
- One thing at a time in interactive mode.
|
|
17
|
-
- Prefer multiple-choice options with a recommended default when the context supports it.
|
|
18
|
-
- Do not design the solution unless the user explicitly moves to `hapo:brainstorm`.
|
|
19
|
-
- Do not create specs or write code from this skill.
|
|
20
|
-
|
|
21
|
-
<CLARIFICATION-ONLY-GATE>
|
|
22
|
-
Do NOT implement, scaffold, edit product code, generate full specs, or make architecture decisions as final.
|
|
23
|
-
The output is questions, assumptions, readiness, and next-step guidance.
|
|
24
|
-
</CLARIFICATION-ONLY-GATE>
|
|
25
|
-
|
|
26
|
-
## When To Use
|
|
27
|
-
|
|
28
|
-
Use `hapo:qs` when:
|
|
29
|
-
- The request is too vague to verify.
|
|
30
|
-
- Acceptance criteria are missing.
|
|
31
|
-
- Scope boundary is unclear.
|
|
32
|
-
- Stakeholder/customer input is needed before specs.
|
|
33
|
-
- The user asks "what should I ask?", "what is missing?", "can this go to specs?", or "is this clear enough?"
|
|
34
|
-
- A spec/task has ambiguity that would make `hapo:develop` risky.
|
|
35
|
-
- A legacy reconstruction or bug report lacks enough scope to start the correct workflow.
|
|
36
|
-
|
|
37
|
-
Do not use it when:
|
|
38
|
-
- The user asks for a direct factual answer that can be answered safely.
|
|
39
|
-
- The user already gave exact output, acceptance criteria, scope, constraints, and target files.
|
|
40
|
-
- The right action is clearly `hapo:debug`, `hapo:inspect`, `hapo:research`, or `hapo:docs --reconstruct`.
|
|
41
|
-
|
|
42
|
-
## Modes
|
|
43
|
-
|
|
44
|
-
- Default interactive mode: ask one highest-value question, then wait.
|
|
45
|
-
- `--batch`: produce a grouped question list for a stakeholder/customer/team.
|
|
46
|
-
- `--spec-ready`: audit whether the request can move to `hapo:specs`.
|
|
47
|
-
- `--stakeholder`: write business-friendly questions with minimal implementation jargon.
|
|
48
|
-
|
|
49
|
-
If multiple modes appear, use the most restrictive mode in this order: `--spec-ready`, `--batch`, `--stakeholder`, default.
|
|
50
|
-
|
|
51
|
-
## Workflow
|
|
52
|
-
|
|
53
|
-
### 1. Context Scout
|
|
54
|
-
|
|
55
|
-
Read only enough context to make the questions concrete:
|
|
56
|
-
- `README.md`
|
|
57
|
-
- relevant `docs/`
|
|
58
|
-
- relevant `specs/`
|
|
59
|
-
- relevant source files when the request names a feature, module, API, UI, or bug
|
|
60
|
-
|
|
61
|
-
Use `hapo:inspect` or focused search when the location is unclear. Do not scan the whole repo unless the question is about the whole repo.
|
|
62
|
-
|
|
63
|
-
### 2. Build The Clarification Map
|
|
64
|
-
|
|
65
|
-
Create a private map with these fields:
|
|
66
|
-
|
|
67
|
-
```text
|
|
68
|
-
Known facts:
|
|
69
|
-
Assumptions:
|
|
70
|
-
Missing decisions:
|
|
71
|
-
Blocking unknowns:
|
|
72
|
-
Non-blocking unknowns:
|
|
73
|
-
Possible next workflow:
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Classify each unknown:
|
|
77
|
-
- `P0`: blocks correct next action.
|
|
78
|
-
- `P1`: high-risk ambiguity; should answer before implementation.
|
|
79
|
-
- `P2`: useful detail; can defer.
|
|
80
|
-
|
|
81
|
-
### 3. Ask Or Report
|
|
82
|
-
|
|
83
|
-
Default interactive mode:
|
|
84
|
-
- Ask exactly one `P0` question.
|
|
85
|
-
- Make it concrete and grounded in observed context.
|
|
86
|
-
- If possible, provide 2-3 options.
|
|
87
|
-
- Put the recommended option first and explain the tradeoff in one sentence.
|
|
88
|
-
|
|
89
|
-
`--batch` or `--stakeholder`:
|
|
90
|
-
- Produce grouped questions by priority.
|
|
91
|
-
- Keep each question answerable.
|
|
92
|
-
- Include recommended options only when they are justified by context.
|
|
93
|
-
|
|
94
|
-
`--spec-ready`:
|
|
95
|
-
- Return a readiness checklist and verdict.
|
|
96
|
-
- Do not ask a long question list unless verdict is `not-ready`.
|
|
97
|
-
|
|
98
|
-
### 4. Readiness Verdict
|
|
99
|
-
|
|
100
|
-
End with one of:
|
|
101
|
-
- `not-ready`: missing P0 decisions.
|
|
102
|
-
- `brainstorm-ready`: enough to explore solution options, but not enough for specs.
|
|
103
|
-
- `specs-ready`: enough to run `/hapo:specs <request>`.
|
|
104
|
-
- `develop-ready`: an approved spec/task exists and no blocking ambiguity remains.
|
|
105
|
-
|
|
106
|
-
### 5. Next Step
|
|
107
|
-
|
|
108
|
-
Suggest exactly one next command:
|
|
109
|
-
- `/hapo:qs ...` when another clarification round is required.
|
|
110
|
-
- `/hapo:brainstorm ...` when design/options are still open.
|
|
111
|
-
- `/hapo:specs ...` when requirements are clear enough.
|
|
112
|
-
- `/hapo:debug ...` when the issue is a bug with unknown root cause.
|
|
113
|
-
- `/hapo:docs --reconstruct <scope>` when the task is legacy/as-is docs.
|
|
114
|
-
- `/hapo:develop <feature>` only when an approved spec/task is already clear.
|
|
115
|
-
|
|
116
|
-
## Output Formats
|
|
117
|
-
|
|
118
|
-
### Default Interactive Output
|
|
119
|
-
|
|
120
|
-
```markdown
|
|
121
|
-
**Context Read**
|
|
122
|
-
- ...
|
|
123
|
-
|
|
124
|
-
**Known**
|
|
125
|
-
- ...
|
|
126
|
-
|
|
127
|
-
**Blocking Unknown**
|
|
128
|
-
- P0: ...
|
|
129
|
-
|
|
130
|
-
**Question**
|
|
131
|
-
...
|
|
132
|
-
|
|
133
|
-
**Options**
|
|
134
|
-
- A. ... (Recommended) - ...
|
|
135
|
-
- B. ... - ...
|
|
136
|
-
- C. ... - ...
|
|
137
|
-
|
|
138
|
-
**Readiness**
|
|
139
|
-
not-ready | brainstorm-ready | specs-ready | develop-ready
|
|
140
|
-
|
|
141
|
-
**Next**
|
|
142
|
-
/hapo:qs ...
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Batch Output
|
|
146
|
-
|
|
147
|
-
Use `templates/qs.md` when the user asks to save or document the question set.
|
|
148
|
-
|
|
149
|
-
```markdown
|
|
150
|
-
**Question Set**
|
|
151
|
-
|
|
152
|
-
**P0 - Must Answer**
|
|
153
|
-
1. ...
|
|
154
|
-
|
|
155
|
-
**P1 - Should Answer**
|
|
156
|
-
1. ...
|
|
157
|
-
|
|
158
|
-
**P2 - Can Defer**
|
|
159
|
-
1. ...
|
|
160
|
-
|
|
161
|
-
**Assumptions To Confirm**
|
|
162
|
-
- ...
|
|
163
|
-
|
|
164
|
-
**Readiness**
|
|
165
|
-
...
|
|
166
|
-
|
|
167
|
-
**Next**
|
|
168
|
-
...
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Quality Bar
|
|
172
|
-
|
|
173
|
-
- Every P0 question must explain what decision it unlocks.
|
|
174
|
-
- No generic "please clarify" questions.
|
|
175
|
-
- No more than one interactive question per response.
|
|
176
|
-
- No implementation plan unless the next command is `hapo:brainstorm` or `hapo:specs`.
|
|
177
|
-
- If no P0/P1 unknown exists, do not invent questions. Say it is ready and name the next command.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Question Set: {{TITLE}}
|
|
2
|
-
|
|
3
|
-
## Context Read
|
|
4
|
-
- {{CONTEXT_ITEM}}
|
|
5
|
-
|
|
6
|
-
## Known Facts
|
|
7
|
-
- {{KNOWN_FACT}}
|
|
8
|
-
|
|
9
|
-
## Assumptions
|
|
10
|
-
- {{ASSUMPTION}}
|
|
11
|
-
|
|
12
|
-
## P0 - Must Answer
|
|
13
|
-
1. **Question:** {{P0_QUESTION}}
|
|
14
|
-
- **Why it matters:** {{WHY_IT_MATTERS}}
|
|
15
|
-
- **Recommended answer:** {{RECOMMENDED_ANSWER}}
|
|
16
|
-
- **Other options:** {{OTHER_OPTIONS}}
|
|
17
|
-
|
|
18
|
-
## P1 - Should Answer
|
|
19
|
-
1. **Question:** {{P1_QUESTION}}
|
|
20
|
-
- **Risk if unanswered:** {{RISK}}
|
|
21
|
-
|
|
22
|
-
## P2 - Can Defer
|
|
23
|
-
1. **Question:** {{P2_QUESTION}}
|
|
24
|
-
- **Can defer until:** {{DEFER_POINT}}
|
|
25
|
-
|
|
26
|
-
## Readiness Verdict
|
|
27
|
-
`not-ready | brainstorm-ready | specs-ready | develop-ready`
|
|
28
|
-
|
|
29
|
-
## Next Command
|
|
30
|
-
`/hapo:qs ... | /hapo:brainstorm ... | /hapo:specs ... | /hapo:debug ... | /hapo:docs --reconstruct ... | /hapo:develop ...`
|