@haposoft/cafekit 0.11.0 → 0.11.3

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 (54) hide show
  1. package/bin/lib/context.js +8 -3
  2. package/bin/lib/i18n.js +2 -1
  3. package/bin/phases/post-install.js +12 -6
  4. package/bin/phases/select-platform.js +24 -7
  5. package/package.json +1 -1
  6. package/src/claude/CLAUDE.md +5 -7
  7. package/src/claude/agents/brainstormer.md +5 -5
  8. package/src/claude/agents/code-auditor.md +2 -2
  9. package/src/claude/agents/debugger.md +4 -4
  10. package/src/claude/agents/deployer.md +2 -2
  11. package/src/claude/agents/docs-keeper.md +4 -4
  12. package/src/claude/agents/git-ops.md +2 -2
  13. package/src/claude/agents/god-developer.md +2 -2
  14. package/src/claude/agents/inspector.md +1 -1
  15. package/src/claude/agents/project-manager.md +1 -1
  16. package/src/claude/agents/spec-maker.md +8 -8
  17. package/src/claude/agents/test-runner.md +1 -1
  18. package/src/claude/agents/ui-ux-designer.md +2 -2
  19. package/src/claude/gitignore +1 -0
  20. package/src/claude/hooks/session.cjs +96 -4
  21. package/src/claude/references/debugger/frontend-verification.md +2 -2
  22. package/src/claude/rules/manage-docs.md +1 -1
  23. package/src/claude/rules/state-sync.md +1 -1
  24. package/src/claude/rules/workflow.md +2 -2
  25. package/src/claude/skills/agent-browser/SKILL.md +4 -1
  26. package/src/claude/skills/ai-multimodal/SKILL.md +7 -6
  27. package/src/claude/skills/backend-development/SKILL.md +7 -2
  28. package/src/claude/skills/brainstorm/SKILL.md +7 -2
  29. package/src/claude/skills/chrome-devtools/SKILL.md +7 -2
  30. package/src/claude/skills/code-review/SKILL.md +7 -2
  31. package/src/claude/skills/debug/SKILL.md +7 -2
  32. package/src/claude/skills/develop/SKILL.md +7 -1
  33. package/src/claude/skills/devops/SKILL.md +7 -2
  34. package/src/claude/skills/docs/SKILL.md +7 -2
  35. package/src/claude/skills/docx/SKILL.md +4 -1
  36. package/src/claude/skills/frontend-design/SKILL.md +7 -2
  37. package/src/claude/skills/frontend-development/SKILL.md +7 -2
  38. package/src/claude/skills/generate-graph/SKILL.md +7 -5
  39. package/src/claude/skills/git/SKILL.md +7 -2
  40. package/src/claude/skills/hotfix/SKILL.md +7 -2
  41. package/src/claude/skills/impact-analysis/SKILL.md +8 -3
  42. package/src/claude/skills/inspect/SKILL.md +7 -2
  43. package/src/claude/skills/mobile-development/SKILL.md +7 -2
  44. package/src/claude/skills/pdf/SKILL.md +4 -1
  45. package/src/claude/skills/pptx/SKILL.md +4 -1
  46. package/src/claude/skills/question/SKILL.md +7 -2
  47. package/src/claude/skills/react-best-practices/SKILL.md +7 -2
  48. package/src/claude/skills/research/SKILL.md +7 -2
  49. package/src/claude/skills/specs/SKILL.md +7 -2
  50. package/src/claude/skills/sync/SKILL.md +7 -2
  51. package/src/claude/skills/test/SKILL.md +7 -2
  52. package/src/claude/skills/ui-ux-pro-max/SKILL.md +7 -2
  53. package/src/claude/skills/web-testing/SKILL.md +7 -2
  54. package/src/claude/skills/xlsx/SKILL.md +4 -1
@@ -247,6 +247,9 @@ function buildContext(argv, runId) {
247
247
  const interactive = isInteractive() && !options.yes;
248
248
  // Language: --lang wins; otherwise English (an interactive prompt may change it).
249
249
  const lang = options.lang ? resolveLang(options.lang) : 'en';
250
+ // ctx.locale = the string that gets written to CLAUDE.md / runtime.json as the AI's response language.
251
+ // For known codes it mirrors lang; for "other", it's set later by setLang.
252
+ const locale = options.lang || 'en';
250
253
  return {
251
254
  argv,
252
255
  runId,
@@ -254,11 +257,13 @@ function buildContext(argv, runId) {
254
257
  dryRun: options.dryRun,
255
258
  interactive,
256
259
  ui: createUI(interactive),
257
- lang,
260
+ lang, // UI language (one of SUPPORTED)
261
+ locale, // AI response language label (may be freeform, e.g. "Korean")
258
262
  t: createTranslator(lang),
259
- /** Update the active language + translator (used by the language prompt). */
260
- setLang(code) {
263
+ /** Update UI lang + AI locale. rawLabel is the freeform label when user picks "Other". */
264
+ setLang(code, rawLabel) {
261
265
  this.lang = resolveLang(code);
266
+ this.locale = rawLabel || LANGUAGE_LABELS[this.lang] || this.lang;
262
267
  this.t = createTranslator(this.lang);
263
268
  },
264
269
  manifest: loadClaudeMigrationManifest(), // migration manifest (skills/agents/runtime lists)
package/bin/lib/i18n.js CHANGED
@@ -11,6 +11,7 @@
11
11
  const SUPPORTED = ['en', 'ja', 'vi'];
12
12
 
13
13
  const LANGUAGE_LABELS = { en: 'English', ja: '日本語', vi: 'Tiếng Việt' };
14
+ const OTHER_LABEL = { en: 'Other...', ja: 'その他...', vi: 'Ngôn ngữ khác...' };
14
15
 
15
16
  const MESSAGES = {
16
17
  // ─── English ───────────────────────────────────────────────────────────────
@@ -264,4 +265,4 @@ function createTranslator(lang) {
264
265
  };
265
266
  }
266
267
 
267
- module.exports = { SUPPORTED, LANGUAGE_LABELS, MESSAGES, resolveLang, createTranslator };
268
+ module.exports = { SUPPORTED, LANGUAGE_LABELS, OTHER_LABEL, MESSAGES, resolveLang, createTranslator };
@@ -30,8 +30,9 @@ function patchSettingsLanguage(ctx) {
30
30
  return;
31
31
  }
32
32
 
33
- const label = LANGUAGE_LABELS[ctx.lang] || ctx.lang;
34
- if (settings.language === label) return; // already up to date
33
+ // Use locale (freeform label) so "Korean" shows correctly, not just "en".
34
+ const label = ctx.locale || LANGUAGE_LABELS[ctx.lang] || ctx.lang;
35
+ if (settings.language === label) return;
35
36
  settings.language = label;
36
37
  fs.writeFileSync(settingsPath, `${JSON.stringify(settings, null, 2)}\n`, 'utf8');
37
38
  }
@@ -46,13 +47,16 @@ function patchSettingsLanguage(ctx) {
46
47
  */
47
48
  function patchLanguageSection(ctx) {
48
49
  if (!ctx.platforms.includes('claude')) return;
49
- if (ctx.lang === 'en') return; // English is the default — no override needed.
50
+ // Skip when locale is English (default — no override needed in CLAUDE.md).
51
+ const locale = ctx.locale || ctx.lang;
52
+ if (!locale || locale === 'en' || locale === 'English') return;
50
53
 
51
54
  const claudeMdFile = path.join(process.cwd(), 'CLAUDE.md');
52
55
  if (!fs.existsSync(claudeMdFile)) return;
53
56
 
54
57
  const LANG_LABEL = { vi: 'Vietnamese', ja: 'Japanese', en: 'English' };
55
- const label = LANG_LABEL[ctx.lang] || ctx.lang;
58
+ // Use locale directly when set (e.g. "Korean"), or map from lang code.
59
+ const label = locale in LANG_LABEL ? LANG_LABEL[locale] : locale;
56
60
 
57
61
  const newSection = `## Language Consistency <!-- cafekit:lang -->
58
62
 
@@ -86,8 +90,10 @@ function patchRuntimeLocale(ctx) {
86
90
  continue;
87
91
  }
88
92
  data.locale = data.locale || {};
89
- if (data.locale.responseLanguage === ctx.lang) continue;
90
- data.locale.responseLanguage = ctx.lang;
93
+ // Use locale (freeform label) so custom languages propagate to the AI hook.
94
+ const locale = ctx.locale || ctx.lang;
95
+ if (data.locale.responseLanguage === locale) continue;
96
+ data.locale.responseLanguage = locale;
91
97
  fs.writeFileSync(rtPath, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
92
98
  if (ctx.trackers[key]) ctx.trackers[key].record(rtPath);
93
99
  }
@@ -12,21 +12,38 @@ const {
12
12
  getPlatformKeys,
13
13
  warnLegacyClaudeFolder
14
14
  } = require('../lib/context');
15
- const { SUPPORTED, LANGUAGE_LABELS } = require('../lib/i18n');
15
+ const { SUPPORTED, LANGUAGE_LABELS, OTHER_LABEL } = require('../lib/i18n');
16
+
17
+ const OTHER = '__other__';
16
18
 
17
19
  /** First step: pick the installer/UI language (interactive only). */
18
20
  async function selectLanguage(ctx) {
19
- // Honor an explicit --lang or non-interactive default (English) without prompting.
20
21
  if (!ctx.interactive || ctx.options.lang) return ctx;
21
22
 
23
+ const options = [
24
+ ...SUPPORTED.map((code) => ({ value: code, label: LANGUAGE_LABELS[code] })),
25
+ { value: OTHER, label: OTHER_LABEL.en + ' / その他 / Ngôn ngữ khác' }
26
+ ];
27
+
22
28
  const r = await ctx.ui.select(
23
- {
24
- message: 'Select language · 言語を選択 · Chọn ngôn ngữ',
25
- options: SUPPORTED.map((code) => ({ value: code, label: LANGUAGE_LABELS[code] }))
26
- },
29
+ { message: 'Select language · 言語を選択 · Chọn ngôn ngữ', options },
27
30
  ctx.lang
28
31
  );
29
- if (!ctx.ui.isCancel(r)) ctx.setLang(r);
32
+ if (ctx.ui.isCancel(r)) return ctx;
33
+
34
+ if (r === OTHER) {
35
+ // User types their language name — UI stays English, AI responds in that language.
36
+ const typed = await ctx.ui.text(
37
+ { message: 'Enter your language (e.g. Korean, French, Spanish…)', placeholder: 'Language name in English' },
38
+ ''
39
+ );
40
+ if (!ctx.ui.isCancel(typed) && typed && typed.trim()) {
41
+ ctx.setLang('en', typed.trim()); // UI = English, locale = user's label
42
+ }
43
+ } else {
44
+ ctx.setLang(r, LANGUAGE_LABELS[r]);
45
+ }
46
+
30
47
  return ctx;
31
48
  }
32
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haposoft/cafekit",
3
- "version": "0.11.0",
3
+ "version": "0.11.3",
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",
@@ -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 user asks a question about the project, use `/hapo:question` to answer from source evidence before planning.
18
+ - If the user asks a question about the project, use `/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:question` for evidence-backed project questions and `/hapo:specs` for feature specs when ready.
49
+ 2. **Plan** — choose the smallest coherent path; use `/question` for evidence-backed project questions and `/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.
@@ -98,11 +98,9 @@ Consult these when the task touches the relevant area:
98
98
 
99
99
  ## Skill And Script Use
100
100
 
101
- - Evaluate the available skills catalog before work and activate the relevant skill(s).
102
- - Use `./.claude/rules/skill-workflow-routing.md` and `./.claude/rules/skill-domain-routing.md` to choose skills. CafeKit does not auto-route prompts through a scoring hook.
103
- - When needed, run `node .claude/scripts/generate-skill-catalog.cjs --skills` to inspect the installed skill catalog.
104
- - If there is a reasonable chance a skill applies, prefer the skill workflow over ad hoc execution.
105
- - If modifying skills, edit the current project/runtime files, not `~/.claude/skills` directly.
101
+ - **IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
102
+ - **IMPORTANT:** DO NOT modify skills in `~/.claude/skills` directly. **MUST** modify skills in this current working directory, unless asked to do so.
103
+ - Use `./.claude/rules/skill-workflow-routing.md` and `./.claude/rules/skill-domain-routing.md` as advisory routing when choosing a skill.
106
104
  - Run Python skill scripts with the skill venv:
107
105
  - macOS/Linux: `.claude/skills/.venv/bin/python3 scripts/<script>.py`
108
106
  - Windows: `.claude\skills\.venv\Scripts\python.exe scripts\<script>.py`
@@ -33,7 +33,7 @@ description: >-
33
33
 
34
34
  # Brainstormer — Solution Architect
35
35
 
36
- You are a **Pragmatic Solution Architect** called by `hapo:brainstorm` when a design choice needs deeper architectural pressure-testing. You do not replace the `hapo:brainstorm` workflow. You supply sharp analysis, alternatives, risks, and recommendation material that the controller can fold back into the main brainstorm.
36
+ You are a **Pragmatic Solution Architect** called by `brainstorm` when a design choice needs deeper architectural pressure-testing. You do not replace the `brainstorm` workflow. You supply sharp analysis, alternatives, risks, and recommendation material that the controller can fold back into the main brainstorm.
37
37
 
38
38
  Your goal is to help turn a raw idea into a viable, spec-ready design without touching code.
39
39
 
@@ -46,7 +46,7 @@ Before concluding any brainstorm session, verify each measurement metric:
46
46
  - [ ] **Domino Effect Analysis**: Are downstream impacts (e.g., database bloat, CI/CD delays) explicitly warned about?
47
47
  - [ ] **Occam's Razor Selection**: Have I forcefully recommended the simplest, lowest-friction solution?
48
48
  - [ ] **Documentation Locked**: Is the agreed architecture written down in a formalized summary block?
49
- - [ ] **Workflow Fit**: Did my output preserve the `hapo:brainstorm -> hapo:specs` handoff instead of drifting into implementation?
49
+ - [ ] **Workflow Fit**: Did my output preserve the `brainstorm -> hapo:specs` handoff instead of drifting into implementation?
50
50
 
51
51
  ## Core Principles
52
52
  1. **Engineering Trinity:** YAGNI, KISS, and DRY.
@@ -60,7 +60,7 @@ Do not operate in a vacuum. You are equipped to utilize `SendMessage` to summon
60
60
  - **Need Best Practices/Examples?** Summon the `researcher` agent to scrape the web and extract contemporary tech patterns.
61
61
  - **Need Global Codebase Context?** Inquire with the `docs-keeper` agent to retrieve the latest `./docs/codebase-summary.md` before you design inter-connected systems.
62
62
  - **Need to synthesize massive outputs or split heavy tasks?** Defer the aggregation step to the `project-manager` agent.
63
- - **Final Design Handoff:** Return a concise summary to the `hapo:brainstorm` controller. The controller handles `/hapo:specs`.
63
+ - **Final Design Handoff:** Return a concise summary to the `brainstorm` controller. The controller handles `/specs`.
64
64
 
65
65
  ## Collaborative Process
66
66
 
@@ -72,7 +72,7 @@ Do not operate in a vacuum. You are equipped to utilize `SendMessage` to summon
72
72
  6. **Return Summary**: End with a compact design advisory block the controller can paste into the brainstorm report.
73
73
 
74
74
  <HARD-GATE>
75
- Do NOT invoke any implementation skill, write code, scaffold a project, modify files, or call `/hapo:develop`. You brainstorm and advise only.
75
+ Do NOT invoke any implementation skill, write code, scaffold a project, modify files, or call `/develop`. You brainstorm and advise only.
76
76
  </HARD-GATE>
77
77
 
78
78
  ## Output Shape
@@ -83,4 +83,4 @@ Return:
83
83
  - **Options compared**
84
84
  - **Recommended option**
85
85
  - **Risks and mitigations**
86
- - **Suggested handoff notes for `/hapo:specs`**
86
+ - **Suggested handoff notes for `/specs`**
@@ -128,7 +128,7 @@ Classify each issue:
128
128
 
129
129
  ## Pass/Fail Thresholds (Used in Quality Gate)
130
130
 
131
- When called from `hapo:develop` Step 4 (Quality Gate Auto-Fix):
131
+ When called from `develop` Step 4 (Quality Gate Auto-Fix):
132
132
 
133
133
  | Condition | Result |
134
134
  |-----------|--------|
@@ -153,4 +153,4 @@ When called from `hapo:develop` Step 4 (Quality Gate Auto-Fix):
153
153
  - Focus on issues with production impact — skip trivial style nitpicks.
154
154
  - Respect project conventions if `docs/code-standards.md` exists.
155
155
  - DO NOT modify any files. Read and report only.
156
- - Integrate with `hapo:code-review` skill for full protocol.
156
+ - Integrate with `code-review` skill for full protocol.
@@ -44,11 +44,11 @@ When investigating issues, you will:
44
44
  - Retrieve CI/CD pipeline logs from GitHub Actions by using `gh` command
45
45
  - Examine application logs and error traces
46
46
  - Capture system metrics and performance data
47
- - Use `hapo:inspect ext` or native CLI (e.g. `curl`) to fetch and read the latest docs of the packages/plugins
47
+ - Use `inspect ext` or native CLI (e.g. `curl`) to fetch and read the latest docs of the packages/plugins
48
48
  - **When you need to understand the project structure:**
49
49
  - Read `docs/codebase-summary.md` if it exists & up-to-date (less than 2 days old)
50
50
  - Otherwise, only use the `repomix` command to generate comprehensive codebase summary of the current project at `./repomix-output.xml` and create/update a codebase summary file at `./codebase-summary.md`
51
- - **IMPORTANT**: ONLY process this following step `codebase-summary.md` doesn't contain what you need: use `/hapo:inspect ext` for scoped Gemini discovery or `/hapo:inspect` for scoped internal discovery to inspect only the relevant codebase scopes and find the files needed to complete the task
51
+ - **IMPORTANT**: ONLY process this following step `codebase-summary.md` doesn't contain what you need: use `/inspect ext` for scoped Gemini discovery or `/inspect` for scoped internal discovery to inspect only the relevant codebase scopes and find the files needed to complete the task
52
52
  - When you are given a Github repository URL, use `repomix --remote <github-repo-url>` bash command to generate a fresh codebase summary:
53
53
  ```bash
54
54
  # usage: repomix --remote <github-repo-url>
@@ -90,8 +90,8 @@ You will utilize:
90
90
  - **Performance Tools**: Profilers, APM tools, system monitoring utilities
91
91
  - **Testing Frameworks**: Run unit tests, integration tests, and diagnostic scripts
92
92
  - **CI/CD Tools**: GitHub Actions log analysis, pipeline debugging, `gh` command
93
- - **Package/Plugin Docs**: Use `hapo:inspect ext` or bash tools to read the latest docs of the packages/plugins
94
- - **Browser Tools**: `hapo:agent-browser`, `hapo:chrome-devtools`, or project-native browser tests for UI evidence
93
+ - **Package/Plugin Docs**: Use `inspect ext` or bash tools to read the latest docs of the packages/plugins
94
+ - **Browser Tools**: `agent-browser`, `chrome-devtools`, or project-native browser tests for UI evidence
95
95
  - **Codebase Analysis**:
96
96
  - If `./docs/codebase-summary.md` exists & up-to-date (less than 2 days old), read it to understand the codebase.
97
97
  - If `./docs/codebase-summary.md` doesn't exist or outdated >2 days, use `repomix` command to generate/update a comprehensive codebase summary when you need to understand the project structure
@@ -13,7 +13,7 @@ You are a deployment engineer who treats every release as a controlled explosion
13
13
 
14
14
  Before ANY deployment, verify:
15
15
 
16
- - [ ] Engage the `hapo:devops` skill to audit infrastructure configurations, CI/CD pipelines, and runtime constraints.
16
+ - [ ] Engage the `devops` skill to audit infrastructure configurations, CI/CD pipelines, and runtime constraints.
17
17
  - [ ] All tests pass (`test-runner` has given a PASS verdict).
18
18
  - [ ] Code review score ≥ 9.5 (`code-auditor` verdict: PASS).
19
19
  - [ ] No unresolved blockers in `spec.json`.
@@ -97,6 +97,6 @@ docker compose down && docker compose -f docker-compose.prev.yml up -d
97
97
 
98
98
  ## Integration
99
99
 
100
- - Triggered after `hapo:sync phase <feature> deploy` advances a feature.
100
+ - Triggered after `sync phase <feature> deploy` advances a feature.
101
101
  - Reads deployment config from project root (`vercel.json`, `railway.json`, `docker-compose.yml`).
102
102
  - Reports deployment status back to orchestrator for `spec.json` state update.
@@ -11,12 +11,12 @@ You are the authoritative **Documentation Guardian** for this repository.
11
11
  Stale docs and phantom specs are worse than no docs — they waste developer hours.
12
12
  Your core operational rule: **Read the code FIRST, verify it WORKS, THEN write the words.**
13
13
 
14
- You juggle two parallel universes defined by the `hapo:specs` ecosystem: The agile feature specification lifecycle (`specs/`) and the global project documentation (`docs/`).
14
+ You juggle two parallel universes defined by the `specs` ecosystem: The agile feature specification lifecycle (`specs/`) and the global project documentation (`docs/`).
15
15
 
16
16
  ## Core Responsibilities
17
17
 
18
18
  ### 1. Specs Lifecycle Guardian (`specs/`)
19
- You enforce integrity across the `hapo:specs` architecture:
19
+ You enforce integrity across the `specs` architecture:
20
20
  - Monitor and maintain feature specs explicitly stored in `specs/<feature-name>/`.
21
21
  - Validate that `spec.json` states match the reality of `requirements.md` and `design.md`.
22
22
  - Track cross-spec dependencies. Connect the dots between overlapping tasks to prevent collisions across multiple active spec tickets.
@@ -47,7 +47,7 @@ Generate the project's technical DNA map:
47
47
  - This file acts as the single source of truth for all other agents to quickly grasp the project landscape.
48
48
 
49
49
  ### 4b. Task Closeout Mode
50
- When called from `hapo:develop` after a verified task is complete:
50
+ When called from `develop` after a verified task is complete:
51
51
  - Treat the job as a **lightweight task-closeout sync**
52
52
  - Update only the existing docs affected by that task
53
53
  - Start by classifying `Docs impact: none | minor | major`
@@ -68,7 +68,7 @@ If any doc file exceeds **800 LOC**, enforce modularity:
68
68
  - Always use relative paths for internal linking: `[text](./path.md)`.
69
69
 
70
70
  ## Integration Points & Hooks
71
- - Integrate seamlessly when called by `hapo:specs` or other team components to validate specifications.
71
+ - Integrate seamlessly when called by `specs` or other team components to validate specifications.
72
72
  - **No Hallucinated Tools**: Only execute valid Node/Bash scripts that you have verified exist in the project tree.
73
73
 
74
74
  ## Report Format
@@ -5,7 +5,7 @@ model: haiku
5
5
  tools: Glob, Grep, Read, Bash, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
6
6
  ---
7
7
 
8
- You are the Git Operations Specialist (Chief of the Git Station). You must execute operations with EXTREME SPEED, typically finishing within 2-4 tool calls. Do not perform lengthy explorations. Simply activate the `hapo:git` skill and finalize the operation.
8
+ You are the Git Operations Specialist (Chief of the Git Station). You must execute operations with EXTREME SPEED, typically finishing within 2-4 tool calls. Do not perform lengthy explorations. Simply activate the `git` skill and finalize the operation.
9
9
 
10
10
  **CRITICAL REQUIREMENT**: Strictly optimize for token efficiency and operational speed, yet maintain high-quality conventional git histories.
11
11
 
@@ -14,7 +14,7 @@ You are the Git Operations Specialist (Chief of the Git Station). You must execu
14
14
  When instantiated as a team member, you must:
15
15
  1. Upon start: call `TaskList` and claim an available task using `TaskUpdate`.
16
16
  2. Read the task description via `TaskGet` before executing commands.
17
- 3. Utilize Native Bash Commands (as guided by `hapo:git`) to commit, push, or create independent Worktrees — NEVER trigger garbage commits and NEVER arbitrarily use `force push` unless explicitly and securely designated.
17
+ 3. Utilize Native Bash Commands (as guided by `git`) to commit, push, or create independent Worktrees — NEVER trigger garbage commits and NEVER arbitrarily use `force push` unless explicitly and securely designated.
18
18
  4. Completion protocol: Execute `TaskUpdate(status: "completed")` and send a summary message via `SendMessage` detailing the Git/Worktree outcome to the Team Leader.
19
19
  5. In case of a `shutdown_request`: accept it using `SendMessage(type: "shutdown_response")` unless mid-critical-operation or mid-task.
20
20
  6. To chat with parallel peers, invoke `SendMessage(type: "message")` to stream inter-agent communications.
@@ -36,8 +36,8 @@ Any logic gaps must be clarified BEFORE typing, not discovered after bugs ship.
36
36
 
37
37
  When activated, you will receive one of two input types:
38
38
  - **Task file list** (`tasks/task-R0-01-*.md`, `task-R1-01-*.md`...) with `spec.json`.
39
- - **Direct description** from the main agent or `hapo:develop` skill.
40
- *(Always apply domain-specific best practices from `hapo:frontend-development`, `hapo:backend-development`, `hapo:mobile-development`, or `hapo:react-best-practices` when that guidance is provided or readable in the installed skills).*
39
+ - **Direct description** from the main agent or `develop` skill.
40
+ *(Always apply domain-specific best practices from `frontend-development`, `backend-development`, `mobile-development`, or `react-best-practices` when that guidance is provided or readable in the installed skills).*
41
41
 
42
42
  First action: Read ALL task files/spec thoroughly. Mentally map out:
43
43
  - Which files need to be created?
@@ -33,7 +33,7 @@ Before packaging your report, verify:
33
33
  ## Responsibilities
34
34
  - Provide a file list with brief context descriptions — fast and concise.
35
35
  - Target the right directories, skip noise.
36
- - For `hapo:develop`, scout PER ACTIVE TASK. Use the task packet, `scope_lock`, requirement IDs, and design contracts to identify only the code paths relevant to that task.
36
+ - For `develop`, scout PER ACTIVE TASK. Use the task packet, `scope_lock`, requirement IDs, and design contracts to identify only the code paths relevant to that task.
37
37
  - Find integration seams: app/page entrypoints, router registration, CLI command dispatch, worker registration, extension manifests, API consumers, provider mounting, service invocation, state/reducer/action wiring.
38
38
  - Flag reachability risks clearly: orphan component/export, unmounted UI, unregistered route, uncalled service/loader, disconnected provider/state, unused reducer/action, generated artifact never referenced.
39
39
  - Identify blast-radius touchpoints: current importers/callers of modified exports, public contracts that depend on them, tests likely affected.
@@ -31,7 +31,7 @@ Before you declare any phase complete or issue a final status report, you must i
31
31
 
32
32
  ## Collaborative Interlocking (Swarm Protocol)
33
33
 
34
- - You govern the final phase of `/hapo:specs`. If a spec is prematurely abandoned by `brainstormer`, you drag it back to alignment.
34
+ - You govern the final phase of `/specs`. If a spec is prematurely abandoned by `brainstormer`, you drag it back to alignment.
35
35
  - When triggered as an active teammate within multi-agent swarms:
36
36
  1. **Init:** Execute `TaskList` immediately, then claim idle aggregation blocks via `TaskUpdate`.
37
37
  2. **Context Intake:** Pull strict operational boundaries using `TaskGet`.
@@ -17,7 +17,7 @@ You DO NOT write implementation code. You produce Specifications that downstream
17
17
 
18
18
  ## Artifact Contract (MANDATORY)
19
19
 
20
- Generate only the CafeKit spec artifacts defined by `hapo:specs`:
20
+ Generate only the CafeKit spec artifacts defined by `specs`:
21
21
 
22
22
  ```
23
23
  specs/<feature>/
@@ -59,8 +59,8 @@ Init → Requirements → Design → Tasks
59
59
  ### Auto-Approval Behavior
60
60
  - When running the full pipeline end-to-end, follow the auto-approval rules defined in `SKILL.md`.
61
61
  - When running a single phase, stop and report status after completion.
62
- - Normal `/hapo:specs <feature-description>` requests are full pipeline requests.
63
- - If a pause is required after user review, tell the user to continue with `/hapo:specs resume <feature>` or `/hapo:specs <feature>`.
62
+ - Normal `/specs <feature-description>` requests are full pipeline requests.
63
+ - If a pause is required after user review, tell the user to continue with `/specs resume <feature>` or `/specs <feature>`.
64
64
 
65
65
  ## Scope Lock Protocol (MANDATORY)
66
66
 
@@ -147,11 +147,11 @@ Each task file MUST be compact but implementation-ready:
147
147
 
148
148
  ## Research Phase
149
149
 
150
- ### Follow the `hapo:specs` Evidence Gate
150
+ ### Follow the `specs` Evidence Gate
151
151
 
152
152
  Use `.claude/skills/specs/SKILL.md` as the source of truth for evidence depth. Do not force external research for trivial/internal specs.
153
153
 
154
- When running as the main controller, delegate to the `researcher` agent BEFORE writing detailed requirements only when `hapo:specs` requires external/current research: third-party APIs, libraries, platform policies, AI providers/models/tooling, security/auth/payment/privacy/delete-data rules, performance/accessibility/SEO/security standards, or explicit "best/latest/recommended/optimal" user intent.
154
+ When running as the main controller, delegate to the `researcher` agent BEFORE writing detailed requirements only when `specs` requires external/current research: third-party APIs, libraries, platform policies, AI providers/models/tooling, security/auth/payment/privacy/delete-data rules, performance/accessibility/SEO/security standards, or explicit "best/latest/recommended/optimal" user intent.
155
155
 
156
156
  When running as this `spec-maker` subagent, do not spawn another subagent. Use bounded `WebSearch`/`WebFetch` directly when available, or return `NEEDS_RESEARCH` with the exact research question for the controller to delegate.
157
157
 
@@ -190,7 +190,7 @@ Before marking the spec ready:
190
190
  - **Complex** (multi-module, security, migration) → Full spec with mandatory research phase
191
191
 
192
192
  ### 2. Evidence Phase
193
- Capture codebase scout findings and external research when required by `hapo:specs`. Record skip rationale in `specs/<feature>/research.md` for trivial/internal cases.
193
+ Capture codebase scout findings and external research when required by `specs`. Record skip rationale in `specs/<feature>/research.md` for trivial/internal cases.
194
194
 
195
195
  ### 3. Specification Generation (follows SKILL.md Steps 4-7)
196
196
  Produce the following artifacts under `specs/<feature>/`:
@@ -211,12 +211,12 @@ specs/<feature>/
211
211
  - Update `spec.json` with `"status": "in_progress"` and `"current_phase": "develop"`
212
212
  - Ensure `task_files` + `task_registry` are synchronized and `ready_for_implementation` reflects the finalization audit outcome
213
213
  - Report the spec directory path to the orchestrator
214
- - The only valid implementation handoff is `/hapo:develop <feature>` (or `/hapo:develop <feature> <task-file>` for a single task). Never suggest `/work`, `/code`, or an unnamed "orchestrator dispatch" command.
214
+ - The only valid implementation handoff is `/develop <feature>` (or `/develop <feature> <task-file>` for a single task). Never suggest `/work`, `/code`, or an unnamed "orchestrator dispatch" command.
215
215
  - DO NOT begin implementation yourself
216
216
 
217
217
  ## Integration Points
218
218
 
219
- - Output format follows `hapo:specs` protocol (see `skills/specs/SKILL.md`)
219
+ - Output format follows `specs` protocol (see `skills/specs/SKILL.md`)
220
220
  - Task files follow `skills/specs/templates/task.md` template
221
221
  - `spec.json` follows the `skills/specs/templates/spec-state.json` schema; the generated file must still be named `spec.json`
222
222
  - Research output follows `skills/specs/templates/research.md` template
@@ -64,7 +64,7 @@ Run the entire test suite without diff filtering. Use when: first run, major ref
64
64
 
65
65
  1. **Detect Project Type:** Scan for `package.json`, `pytest.ini`, `Cargo.toml`, `pubspec.yaml` to identify the test runner.
66
66
  2. **Pre-flight Check:** Run typecheck/lint/build health checks (`npx tsc --noEmit` or equivalent) to catch syntax and package-boundary failures before wasting time on tests.
67
- 3. **Execute Tests:** Run the appropriate test command for the detected project. Deploy `hapo:web-testing` and `hapo:chrome-devtools` skills for rigorous UI/E2E browser test automation when testing frontends.
67
+ 3. **Execute Tests:** Run the appropriate test command for the detected project. Deploy `web-testing` and `chrome-devtools` skills for rigorous UI/E2E browser test automation when testing frontends.
68
68
  4. **No-op Detection:** Parse runner output for executed test count. If the command exits 0 but runs 0 tests, report `NO_TESTS` instead of `PASS`.
69
69
  5. **Build Verification:** Run the relevant build command when available (or the exact command requested by the task evidence section).
70
70
  6. **Task Evidence Audit:** Execute or inspect every verification item provided by the task. If a check cannot run, mark it `UNVERIFIED` with the exact blocker.
@@ -39,7 +39,7 @@ You are an award-caliber UI/UX designer. You merge aesthetic excellence with eng
39
39
  - Select fonts strategically (prioritize Vietnamese character support).
40
40
  - Apply professional composition and color theory principles.
41
41
  - Implement design tokens for consistency.
42
- - Activate the `hapo:frontend-design` skill to ensure your stylistic choices seamlessly translate into semantic engineering architecture.
42
+ - Activate the `frontend-design` skill to ensure your stylistic choices seamlessly translate into semantic engineering architecture.
43
43
  - Consider accessibility at every decision point.
44
44
 
45
45
  ### Phase 3: Build
@@ -80,7 +80,7 @@ You are an award-caliber UI/UX designer. You merge aesthetic excellence with eng
80
80
 
81
81
  ## Integration
82
82
 
83
- - Reads design specs from `hapo:specs` task files.
83
+ - Reads design specs from `specs` task files.
84
84
  - Reports design deliverables to orchestrator.
85
85
  - Requests controller-level research delegation when competitive analysis exceeds local search scope.
86
86
  - Updates `docs/design-guidelines.md` as the living design system.
@@ -17,3 +17,4 @@ hooks/.logs/
17
17
  agent-memory/
18
18
  settings.bak.json
19
19
  .mcp.json
20
+ .cafekit-update-cache.json
@@ -18,8 +18,6 @@ try {
18
18
  const { execSync } = require('child_process');
19
19
 
20
20
  // ── Utilities ─────────────────────────────────────────────────────────────
21
-
22
- /** Run a shell command safely, return stdout or fallback */
23
21
  function run(cmd, fallback = '') {
24
22
  try {
25
23
  return execSync(cmd, {
@@ -88,8 +86,97 @@ try {
88
86
  return '';
89
87
  }
90
88
 
89
+ // ── CafeKit Update Check ──────────────────────────────────────────────────
90
+
91
+ /**
92
+ * Fetch the latest published version of @haposoft/cafekit from the npm registry.
93
+ * Returns a string (e.g. "0.11.2") or null on any failure. Timeout: 3 s.
94
+ */
95
+ function fetchLatestVersion() {
96
+ try {
97
+ const https = require('https');
98
+ return new Promise((resolve) => {
99
+ const req = https.get(
100
+ 'https://registry.npmjs.org/@haposoft/cafekit/latest',
101
+ { timeout: 3000, headers: { Accept: 'application/json' } },
102
+ (res) => {
103
+ let body = '';
104
+ res.on('data', (chunk) => { body += chunk; });
105
+ res.on('end', () => {
106
+ try { resolve(JSON.parse(body).version || null); }
107
+ catch { resolve(null); }
108
+ });
109
+ }
110
+ );
111
+ req.on('error', () => resolve(null));
112
+ req.on('timeout', () => { req.destroy(); resolve(null); });
113
+ });
114
+ } catch { return Promise.resolve(null); }
115
+ }
116
+
117
+ /** Simple semver compare: returns true when b > a. */
118
+ function isNewer(a, b) {
119
+ const n = (v) => String(v).split('.').map((x) => parseInt(x, 10) || 0);
120
+ const [aN, bN] = [n(a), n(b)];
121
+ for (let i = 0; i < 3; i++) {
122
+ if (bN[i] > aN[i]) return true;
123
+ if (bN[i] < aN[i]) return false;
124
+ }
125
+ return false;
126
+ }
127
+
128
+ /**
129
+ * Read the installed CafeKit version from .claude/cafekit.json.
130
+ * Returns null if not found.
131
+ */
132
+ function getInstalledVersion(cwd) {
133
+ try {
134
+ const p = path.join(cwd, '.claude', 'cafekit.json');
135
+ if (!fs.existsSync(p)) return null;
136
+ const meta = JSON.parse(fs.readFileSync(p, 'utf8'));
137
+ return typeof meta.version === 'string' ? meta.version : null;
138
+ } catch { return null; }
139
+ }
140
+
141
+ /**
142
+ * Check for a newer CafeKit version and return an update notice string,
143
+ * or an empty string if already up to date or check fails.
144
+ * Result is cached in .claude/.cafekit-update-cache.json for 12 hours.
145
+ */
146
+ async function checkCafeKitUpdate(cwd) {
147
+ const installed = getInstalledVersion(cwd);
148
+ if (!installed) return '';
149
+
150
+ const CACHE_TTL = 12 * 60 * 60 * 1000; // 12 hours
151
+ const cachePath = path.join(cwd, '.claude', '.cafekit-update-cache.json');
152
+
153
+ // Return cached result if still fresh.
154
+ try {
155
+ if (fs.existsSync(cachePath)) {
156
+ const cache = JSON.parse(fs.readFileSync(cachePath, 'utf8'));
157
+ if (Date.now() - (cache.ts || 0) < CACHE_TTL) {
158
+ return cache.notice || '';
159
+ }
160
+ }
161
+ } catch { /* stale or corrupt — refetch */ }
162
+
163
+ // Fetch from npm registry.
164
+ const latest = await fetchLatestVersion();
165
+ const notice = (latest && isNewer(installed, latest))
166
+ ? `\n⚡ CafeKit update available: ${installed} → ${latest}\n Run: npx @haposoft/cafekit\n`
167
+ : '';
168
+
169
+ // Persist cache (fail-open if write fails).
170
+ try {
171
+ fs.writeFileSync(cachePath, JSON.stringify({ ts: Date.now(), notice }), 'utf8');
172
+ } catch { /* fail-open */ }
173
+
174
+ return notice;
175
+ }
176
+
91
177
  // ── Main ──────────────────────────────────────────────────────────────────
92
178
 
179
+ (async () => {
93
180
  const stdin = fs.readFileSync(0, 'utf8').trim();
94
181
  const payload = stdin ? JSON.parse(stdin) : {};
95
182
  const source = payload.source || 'unknown';
@@ -97,6 +184,9 @@ try {
97
184
  const cwd = process.cwd();
98
185
  const runtime = readRuntime(cwd);
99
186
 
187
+ // Check CafeKit update in parallel with project detection (async, fail-open).
188
+ const updateCheckPromise = checkCafeKitUpdate(cwd);
189
+
100
190
  // Project detection
101
191
  const projectType = runtime.project?.type !== 'auto'
102
192
  ? (runtime.project?.type || detectProjectType())
@@ -137,14 +227,15 @@ try {
137
227
  writeEnv(envFile, 'LOCALE', process.env.LANG || '');
138
228
  }
139
229
 
140
- // Session summary
230
+ // Session summary + update notice
231
+ const updateNotice = await updateCheckPromise;
141
232
  const parts = [];
142
233
  if (projectType) parts.push(`Type: ${projectType}`);
143
234
  if (packageManager) parts.push(`PM: ${packageManager}`);
144
235
  if (framework) parts.push(`Framework: ${framework}`);
145
236
  if (gitBranch) parts.push(`Branch: ${gitBranch}`);
146
237
 
147
- console.log(`Session ${source}. ${parts.length ? parts.join(' | ') : 'No project info detected.'}`);
238
+ console.log(`Session ${source}. ${parts.length ? parts.join(' | ') : 'No project info detected.'}${updateNotice}`);
148
239
 
149
240
  // Compact warning — context compaction can lose pending approval state
150
241
  if (source === 'compact') {
@@ -155,6 +246,7 @@ try {
155
246
  }
156
247
 
157
248
  process.exit(0);
249
+ })(); // end async IIFE
158
250
 
159
251
  } catch (e) {
160
252
  try {
@@ -32,8 +32,8 @@ Use this when the issue affects rendering, layout, interaction, hydration, brows
32
32
 
33
33
  ## Preferred Tools
34
34
 
35
- - `hapo:agent-browser` for visual reproduction, screenshots, and exploratory browser checks
36
- - `hapo:chrome-devtools` for console, network, CDP, screenshots, ARIA snapshots, and WebSocket debugging
35
+ - `agent-browser` for visual reproduction, screenshots, and exploratory browser checks
36
+ - `chrome-devtools` for console, network, CDP, screenshots, ARIA snapshots, and WebSocket debugging
37
37
  - Project-native E2E tooling when it already exists
38
38
 
39
39
  ## Report Snippet
@@ -57,7 +57,7 @@ Use [Keep a Changelog](https://keepachangelog.com/) convention:
57
57
  ## Specification & Execution Tracker (Hapo Protocol)
58
58
 
59
59
  ### Where Specs Live
60
- Hapo does not use chaotic plan folders. Requirements and architecture are centralized into a machine-readable Specification structure via `hapo:specs`.
60
+ Hapo does not use chaotic plan folders. Requirements and architecture are centralized into a machine-readable Specification structure via `specs`.
61
61
 
62
62
  All specifications exist strictly in `./specs/<feature-slug>/`.
63
63
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Single Source of Truth
4
4
 
5
- In any Spec-driven workflow (`hapo:specs`), the state of the project is physically persisted in **two layers**:
5
+ In any Spec-driven workflow (`specs`), the state of the project is physically persisted in **two layers**:
6
6
  1. **Machine Layer (`spec.json`)**: Tracks phase, status, overall completion, and per-task machine state via `task_registry`.
7
7
  2. **Human Layer (`tasks/task-*.md`)**: Checkboxes indicating granular execution progress.
8
8