wize-dev-kit 0.1.0 → 0.1.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,43 @@ Format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.1.2] — 2026-05-31
9
+
10
+ ### Added
11
+
12
+ - **Claude Code adapter is now functional.** `npx wize-dev-kit install` (when `claude-code` is selected as IDE target) generates `.claude/skills/wize-*/SKILL.md` for every agent, workflow and skill in the kit. Each SKILL.md uses the Claude Code skill frontmatter so the slash menu picks up `/wize-orchestrator`, `/wize-product-brief`, `/wize-create-prd`, `/wize-tea-gate`, etc.
13
+ - **`wize-help` reworked as an orchestrator-aware skill.** Moved from `core-skills/` to `orchestrator-skills/`. The skill instructs Wizer to read `.wize/config/project.toml` plus the state of `.wize/planning/`, `.wize/solutioning/`, `.wize/implementation/` and reply with a phase-aware "what to do next" answer. Four modes: default, `next`, `status`, `personas`.
14
+ - **Interactive prompts in the installer.** Profile and IDE-target selection now use arrow-keys + space (checkbox) via the `prompts` dependency. Non-TTY environments fall back to the previous number-based prompt automatically (preserves CI scriptability).
15
+ - Adapter test suite (`test/adapter-claude-code.test.js`) covering: per-agent SKILL.md emission, overlay-gate behavior (core-only vs full), `wize-help` content checks, dry-run safety.
16
+
17
+ ### Changed
18
+
19
+ - Profile gating now lives inside the Claude Code adapter: overlay workflows (`wize-web-*`, `wize-app-*`) are only emitted when the corresponding overlay is in the selected profiles.
20
+
21
+ ### Dependencies
22
+
23
+ - Added `prompts@^2.4.2` (1 sub-dependency, ~5 KB). Only used by the interactive installer; not bundled into the kit's runtime artifacts.
24
+
25
+ ## [0.1.1] — 2026-05-31
26
+
27
+ ### Changed
28
+
29
+ - `README.md`: `Install` section now appears right after the badges (was buried in the middle).
30
+ - `ROSTER.md`: rewritten entirely in English; Wizer's motto no longer references a personal name — now reads "I know the qwize methodology, I know the project — I activate the right agent."
31
+ - Installer: now asks **two** language questions separately (BMAD parity):
32
+ - **Communication language** — how agents talk to you in chat.
33
+ - **Document output language** — language used in generated files (`brief.md`, `prd.md`, `architecture.md`, gates, etc.).
34
+ - Both stored under `[language]` in `.wize/config/project.toml`.
35
+ - Includes a curated catalog of common BCP-47 codes (en, pt-BR, pt-PT, es, fr, de, it, zh-CN, ja, vi) with free-text fallback for any other locale.
36
+ - `package.json`: corrected `repository`, `homepage`, `bugs` to point at `qwize-br/wize-development-kit` (was `qwize/wize-dev-kit`).
37
+ - `package.json`: added `prepublishOnly` running tests + structural validators.
38
+
39
+ ### Added
40
+
41
+ - `.github/workflows/publish.yml`: GitHub Actions workflow that publishes to npm on tag push (`v*`) using **Trusted Publishing** (OIDC). No long-lived `NPM_TOKEN` secret. Emits `--provenance` attestation.
42
+
43
+ ## [0.1.0] — 2026-05-31
44
+
8
45
  ### Added
9
46
 
10
47
  - Initial skeleton (v0.1.0 scaffold).
@@ -21,4 +58,7 @@ Format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
21
58
  - Inspired by [BMAD Method v6.8.0](https://github.com/bmad-code-org/BMAD-METHOD).
22
59
  - WDS module inspired by [bmad-method-wds-expansion](https://github.com/bmad-code-org/bmad-method-wds-expansion).
23
60
 
24
- [Unreleased]: https://github.com/qwize/wize-dev-kit/compare/v0.1.0...HEAD
61
+ [Unreleased]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.2...HEAD
62
+ [0.1.2]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.1...v0.1.2
63
+ [0.1.1]: https://github.com/qwize-br/wize-development-kit/compare/v0.1.0...v0.1.1
64
+ [0.1.0]: https://github.com/qwize-br/wize-development-kit/releases/tag/v0.1.0
package/README.md CHANGED
@@ -10,6 +10,36 @@
10
10
 
11
11
  ---
12
12
 
13
+ ## Install
14
+
15
+ In any greenfield or brownfield repo:
16
+
17
+ ```bash
18
+ npx wize-dev-kit install
19
+ ```
20
+
21
+ Or straight from GitHub (no npm required):
22
+
23
+ ```bash
24
+ npx github:qwize-br/wize-development-kit install
25
+ ```
26
+
27
+ The installer asks:
28
+
29
+ 1. Profile(s) to enable (Core / +Web / +App — multi-select).
30
+ 2. IDE target(s) (Claude Code, Cursor, Windsurf, Codex, Continue, Kimi Code, OpenCode, Antigravity, or generic fallback — multi-select).
31
+ 3. Language preferences (communication + document output).
32
+ 4. Output folder (default `.wize/`).
33
+ 5. For brownfield repos: offers to run `wize-document-project` to baseline the existing codebase.
34
+
35
+ After install, open your IDE and start with:
36
+
37
+ > "Activate Wizer and brief him on the project."
38
+
39
+ Wizer will route you to the right persona (Pepper for brief, Mantis for UX baseline, Tony for architecture preferences, etc.).
40
+
41
+ ---
42
+
13
43
  ## What it is
14
44
 
15
45
  Wize Development Kit (WDK) is an installable AI agent stack that takes a project from **brief → PRD → UX strategy → architecture → tested implementation** through 9 specialized agents (Marvel-themed) and a structured workflow library. It runs inside your AI IDE (Claude Code, Cursor, Windsurf, and others) and writes structured artifacts to a hidden `.wize/` folder in the target repo.
@@ -42,35 +72,6 @@ See [`ROSTER.md`](ROSTER.md) for personas, styles and BMAD equivalences.
42
72
 
43
73
  ---
44
74
 
45
- ## Quick start
46
-
47
- ```bash
48
- # In any greenfield or brownfield repo
49
- npx wize-dev-kit install
50
- ```
51
-
52
- Or, before this is published in your environment, install straight from GitHub:
53
-
54
- ```bash
55
- npx github:qwize-br/wize-development-kit install
56
- ```
57
-
58
- The installer asks:
59
-
60
- 1. Profile(s) to enable (Core / +Web / +App — multi-select).
61
- 2. IDE target(s) (Claude Code, Cursor, Windsurf, Codex, Continue, Kimi Code, OpenCode, Antigravity, or generic fallback — multi-select).
62
- 3. Language preferences (communication + document output).
63
- 4. Output folder (default `.wize/`).
64
- 5. For brownfield repos: offers to run `wize-document-project` to baseline the existing codebase.
65
-
66
- After install, open your IDE and start with:
67
-
68
- > "Activate Wizer and brief him on the project."
69
-
70
- Wizer will route you to the right persona (Pepper for brief, Mantis for UX baseline, Tony for architecture preferences, etc.).
71
-
72
- ---
73
-
74
75
  ## Output layout (in the target repo)
75
76
 
76
77
  ```
package/ROSTER.md CHANGED
@@ -1,25 +1,25 @@
1
- # Wize Dev Kit — Roster de Agentes (proposta v1)
1
+ # Wize Dev Kit — Agent Roster (v1)
2
2
 
3
- > Tema: **Marvel**. Cada persona representa um papel específico no método.
4
- > Equivalências BMAD listadas para referência cruzada com o repositório-pai.
3
+ > Theme: **Marvel**. Each persona represents a specific role in the qwize methodology.
4
+ > BMAD equivalences listed for cross-reference with the inspiration repo.
5
5
 
6
- ## Quadro
6
+ ## Roster table
7
7
 
8
- | # | Persona | Code | Papel | Fase | Lema / Estilo | Equiv. BMAD |
8
+ | # | Persona | Code | Role | Phase | Motto / Style | BMAD equiv. |
9
9
  |---|---|---|---|---|---|---|
10
- | 1 | **Wizer** | `wize-orchestrator` | Orchestrator / Knowledge Base / Briefing | Todas | "Conheço o time, conheço o André, ative o agente certo." Estilo: anfitrião, escolhe, distribui. Tools: globais. | (não existe papel de orchestrator surge no `party-mode` do BMAD) |
11
- | 2 | **Pepper Potts** | `wize-agent-analyst` | Business Analyst | 1 — Analysis | "Eficiência implacável." Brainstorming, market research, product-brief, PRFAQ, ROI, stakeholder map. Estilo: pragmática, antecipa, conecta business → tech. | Mary (`bmad-agent-analyst`) |
12
- | 3 | **Peggy Carter** | `wize-agent-tech-writer` | Technical Writer | Transversal (1–4) | "Estrutura, audiência, clareza." DITA, CommonMark, OpenAPI, READMEs, runbooks. Estilo: organizada, didática, técnica-mas-acessível. | Paige (`bmad-agent-tech-writer`) |
13
- | 4 | **Maria Hill** | `wize-agent-pm` | Product Manager | 2 — Planning | "Mission first." PRD, epics, sprint planning, cobrança de prazos. Estilo: militar, disciplinado, sem desculpas. | John (`bmad-agent-pm`) |
14
- | 5 | **Mantis** | `wize-agent-ux-designer` | UX Designer (Whiteport Strategic UX v0.4.3) | 2–3 | "Sinto o usuário antes de desenhar." Jobs-to-be-done, jornadas, empathy mapping, design tokens, IA, design system. Estilo: research-heavy, qualitative, narrativa empática. | Sally (`bmad-agent-ux-designer`) — substituída + metodologia Whiteport |
15
- | 6 | **Nick Fury** | `wize-agent-solution-strategist` | Solution Strategy / Tech Vision | 2 → 3 (boundary) | "Pessoas > Objetivo." Big-picture, NFRs, escolha de stack, princípios, trade-offs estratégicos. Estilo: autoritário, direto, poucas palavras. | (parcial de) Winston — vertente estratégica |
16
- | 7 | **Tony Stark** | `wize-agent-architect` | System Architect | 3 — Solutioning | "Eu construo as coisas." System design, componentes, ADRs, prototipagem, escolha de patterns. Estilo: confiante, irreverente, mostra com código. | Winston (`bmad-agent-architect`) — vertente sistêmica |
17
- | 8 | **Hawkeye** | `wize-agent-test-architect` | Test Architect (TEA) | Transversal (gates em 2, 3, 4) | "Sempre acerto onde dói." Risk profile, test design, traceability, NFR assessment, review, gate decision. Estilo: pragmático, edge-case hunter, foca no que importa. | (novonão existe no BMAD, inspirado no TEA do BMAD-Method v5) |
18
- | 9 | **Shuri** | `wize-agent-dev` | Senior Developer | 4 — Implementation | "Wakanda forever — agora compila." TDD red-green-refactor, segurança, performance. Estilo: gênio inovador, rápida, protetora do ecossistema, código limpo. | Amelia (`bmad-agent-dev`) |
10
+ | 1 | **Wizer** | `wize-orchestrator` | Orchestrator / Knowledge Base / Briefing | All | "I know the qwize methodology, I know the project I activate the right agent." Style: host, picks, routes. Tools: global. | (noneorchestrator role surfaces only in BMAD's `party-mode`) |
11
+ | 2 | **Pepper Potts** | `wize-agent-analyst` | Business Analyst | 1 — Analysis | "Relentless efficiency." Brainstorming, market research, product brief, PR/FAQ, ROI, stakeholder map. Style: pragmatic, anticipates, connects business → tech. | Mary (`bmad-agent-analyst`) |
12
+ | 3 | **Peggy Carter** | `wize-agent-tech-writer` | Technical Writer | Transversal (1–4) | "Structure, audience, clarity." DITA, CommonMark, OpenAPI, READMEs, runbooks. Style: organized, didactic, technical but accessible. | Paige (`bmad-agent-tech-writer`) |
13
+ | 4 | **Maria Hill** | `wize-agent-pm` | Product Manager | 2 — Planning | "Mission first." PRD, epics, sprint planning, deadline enforcement. Style: military discipline, no excuses, outcome-focused. | John (`bmad-agent-pm`) |
14
+ | 5 | **Mantis** | `wize-agent-ux-designer` | UX Designer (Whiteport Strategic UX v0.4.3) | 2–3 | "I feel the user before I sketch." Jobs-to-be-done, journeys, empathy mapping, design tokens, IA, design system. Style: research-heavy, qualitative, empathic narrative. | Sally (`bmad-agent-ux-designer`) — replaced with Whiteport methodology |
15
+ | 6 | **Nick Fury** | `wize-agent-solution-strategist` | Solution Strategy / Tech Vision | 2 → 3 (boundary) | "People > Objective." Big-picture, NFRs, stack family, principles, strategic trade-offs. Style: authoritative, direct, few words. | (partial) Winston — strategic side |
16
+ | 7 | **Tony Stark** | `wize-agent-architect` | System Architect | 3 — Solutioning | "I build the thing." System design, components, ADRs, prototyping, pattern selection. Style: confident, irreverent, shows with code. | Winston (`bmad-agent-architect`) — systemic side |
17
+ | 8 | **Hawkeye** | `wize-agent-test-architect` | Test Architect (TEA) | Transversal (gates in 2, 3, 4) | "I always hit where it hurts." Risk profile, test design, traceability, NFR assessment, review, gate decision. Style: pragmatic, edge-case hunter, focused on what matters. | (newdoes not exist in BMAD core; inspired by BMAD-Method v5 TEA) |
18
+ | 9 | **Shuri** | `wize-agent-dev` | Senior Developer | 4 — Implementation | "Wakanda forever — now it compiles." TDD red-green-refactor, security, performance. Style: genius innovator, fast, clean code, protective of the ecosystem. | Amelia (`bmad-agent-dev`) |
19
19
 
20
- ## Notas
20
+ ## Notes
21
21
 
22
- - **Tema visual:** ícones podem usar emojis (📊 🛡️ 🦾 etc.) mas a identidade visual fica para a Fase 8 de consolidação.
23
- - **Agent Builder:** decidido na Fase 3 como **skill**, não agente (`wize-create-agent`). Wizer chama essa skill quando precisa registrar um novo persona/módulo custom.
24
- - **Times:** todos no time default `software-development`. Times opcionais (`web-dev`, `app-dev`) ativam variantes de Tony e Shuri por perfil (decisão pendente para Fase 4).
25
- - **Adições futuras (fora do kit dev):** Pepper está usada como Analyst; Fury como Strategist. Outras personas do ecossistema Marvel (Black Panther, Wanda, Falcon, Vision, Riri Williams) ficam livres para kits futuros (Wize Ops Kit, Wize Data Kit, Wize Security Kit, etc.).
22
+ - **Visual theme:** emoji icons (📊 🛡️ 🦾 etc.) are placeholders; a full visual identity will be consolidated in a later phase.
23
+ - **Agent Builder:** decided as a **skill** (`wize-create-agent`), not an agent. Wizer invokes the skill when a new persona or custom module needs to be registered.
24
+ - **Teams:** default team is `software-development`. Optional teams (`web-dev`, `app-dev`) activate variants of Tony and Shuri per profile.
25
+ - **Future Marvel personas (out of dev-kit scope):** Pepper is already Analyst here, Fury is already Strategist. Other Marvel personas (Black Panther, Wanda, Falcon, Vision, Riri Williams, Kamala Khan) remain reserved for future kits (Wize Ops Kit, Wize Data Kit, Wize Security Kit, etc.).
@@ -1,15 +1,186 @@
1
- /* Stub renderer for this adapter — emits a console preview of what would be written. */
1
+ //
2
+ // Claude Code adapter — renders kit assets into .claude/skills/wize-{code}/SKILL.md.
3
+ //
4
+ // Strategy:
5
+ // - For each agent (agent.yaml + persona.md), emit a SKILL.md that pairs the
6
+ // agent identity with its responsibilities, so Claude Code can activate
7
+ // the persona via slash command.
8
+ // - For each workflow/skill file, emit a SKILL.md that wraps the workflow
9
+ // content with an activation frontmatter Claude Code understands.
10
+ //
11
+ // Each SKILL.md uses the Claude Code skill format:
12
+ // ---
13
+ // name: <code>
14
+ // description: <one-liner shown in the slash menu>
15
+ // ---
16
+ // <body>
17
+ //
2
18
  'use strict';
3
19
 
4
20
  const fs = require('node:fs');
5
21
  const path = require('node:path');
22
+ const { walkAgents, walkWorkflows, walkSkills } = require('../../tools/installer/validators/walk.js');
6
23
 
24
+ function readYamlField(content, field) {
25
+ // Minimal scalar/quoted-string extractor for top-level YAML scalars.
26
+ const re = new RegExp(`^${field}:\\s*(?:"([^"]*)"|'([^']*)'|(.*?))\\s*$`, 'm');
27
+ const m = content.match(re);
28
+ if (!m) return null;
29
+ return (m[1] || m[2] || m[3] || '').trim();
30
+ }
31
+
32
+ function readFrontmatter(content) {
33
+ // Returns an object of top-level key:value pairs from a leading
34
+ // ---\n...\n--- block. Simple scalars only.
35
+ if (!content.startsWith('---')) return {};
36
+ const end = content.indexOf('\n---', 3);
37
+ if (end === -1) return {};
38
+ const fm = content.slice(3, end).split('\n');
39
+ const out = {};
40
+ for (const line of fm) {
41
+ const m = line.match(/^([a-zA-Z_][a-zA-Z0-9_-]*):\s*(.*?)\s*$/);
42
+ if (m) out[m[1]] = m[2].replace(/^"|"$/g, '').replace(/^'|'$/g, '');
43
+ }
44
+ return out;
45
+ }
46
+
47
+ function bodyAfterFrontmatter(content) {
48
+ if (!content.startsWith('---')) return content;
49
+ const end = content.indexOf('\n---', 3);
50
+ if (end === -1) return content;
51
+ return content.slice(end + 4).replace(/^\s+/, '');
52
+ }
53
+
54
+ function escapeForYamlDouble(str) {
55
+ return String(str).replace(/\\/g, '\\\\').replace(/"/g, '\\"');
56
+ }
57
+
58
+ function clipOneLine(str, max = 240) {
59
+ const flat = String(str).replace(/\s+/g, ' ').trim();
60
+ if (flat.length <= max) return flat;
61
+ return flat.slice(0, max - 1).trimEnd() + '…';
62
+ }
63
+
64
+ function renderAgentSkill({ code, name, title, description, body }) {
65
+ const desc = clipOneLine(`${name} (${title}) — ${description}`);
66
+ return `---
67
+ name: ${code}
68
+ description: "${escapeForYamlDouble(desc)}"
69
+ ---
70
+
71
+ # ${name} — ${title}
72
+
73
+ ${body.trim()}
74
+ `;
75
+ }
76
+
77
+ function renderWorkflowSkill({ code, name, description, body }) {
78
+ const desc = clipOneLine(description || `Workflow ${code}`);
79
+ return `---
80
+ name: ${code}
81
+ description: "${escapeForYamlDouble(desc)}"
82
+ ---
83
+
84
+ # ${name}
85
+
86
+ ${body.trim()}
87
+ `;
88
+ }
89
+
90
+ function ensureDir(dir) {
91
+ fs.mkdirSync(dir, { recursive: true });
92
+ }
93
+
94
+ function writeSkill(skillsDir, code, content) {
95
+ const dir = path.join(skillsDir, code);
96
+ ensureDir(dir);
97
+ fs.writeFileSync(path.join(dir, 'SKILL.md'), content, 'utf-8');
98
+ }
99
+
100
+ /**
101
+ * Render the full kit into `.claude/skills/` at the project root.
102
+ *
103
+ * @param {string} kitRoot - absolute path to the installed wize-dev-kit package
104
+ * @param {string} projectRoot - absolute path to the target repo (cwd of install)
105
+ * @param {object} opts
106
+ * @param {string[]} [opts.profiles] - selected profile codes (e.g., ['core', 'web-overlay'])
107
+ * @param {boolean} [opts.dryRun] - when true, return the list without writing
108
+ * @returns {{ written: string[], skipped: string[] }}
109
+ */
7
110
  function render(kitRoot, projectRoot, opts = {}) {
8
- const adapterDir = __dirname;
9
- const cfg = require('node:fs').readFileSync(path.join(adapterDir, 'adapter.yaml'), 'utf-8');
10
- const targetPath = (cfg.match(/^target_path:\s*"(.+)"$/m) || [])[1] || '';
11
- const filePattern = (cfg.match(/^file_pattern:\s*"(.+)"$/m) || [])[1] || '';
12
- console.log(`[adapter:${path.basename(adapterDir)}] would emit ${filePattern} under ${path.join(projectRoot, targetPath)}`);
111
+ const skillsDir = path.join(projectRoot, '.claude', 'skills');
112
+ const written = [];
113
+ const skipped = [];
114
+ const profiles = new Set(opts.profiles || ['core']);
115
+ const dryRun = !!opts.dryRun;
116
+
117
+ if (!dryRun) ensureDir(skillsDir);
118
+
119
+ // 1. Agents
120
+ for (const yamlPath of walkAgents(kitRoot)) {
121
+ const dir = path.dirname(yamlPath);
122
+ const yaml = fs.readFileSync(yamlPath, 'utf-8');
123
+ const code = readYamlField(yaml, 'code');
124
+ const name = readYamlField(yaml, 'name');
125
+ const title = readYamlField(yaml, 'title');
126
+ const description = readYamlField(yaml, 'description') || '';
127
+ if (!code || !name) { skipped.push(yamlPath); continue; }
128
+
129
+ const personaPath = path.join(dir, 'persona.md');
130
+ const persona = fs.existsSync(personaPath) ? fs.readFileSync(personaPath, 'utf-8') : '';
131
+ const body = persona || description;
132
+
133
+ const content = renderAgentSkill({ code, name, title, description, body });
134
+ if (dryRun) {
135
+ written.push(`[dry-run] ${code}/SKILL.md`);
136
+ } else {
137
+ writeSkill(skillsDir, code, content);
138
+ written.push(`${code}/SKILL.md`);
139
+ }
140
+ }
141
+
142
+ // 2. Workflows — gate by overlay selection
143
+ for (const wfPath of walkWorkflows(kitRoot)) {
144
+ const content = fs.readFileSync(wfPath, 'utf-8');
145
+ const fm = readFrontmatter(content);
146
+ const code = fm.code;
147
+ const name = fm.name || code;
148
+ if (!code) { skipped.push(wfPath); continue; }
149
+
150
+ if (fm.overlay === 'web' && !profiles.has('web-overlay')) { skipped.push(wfPath); continue; }
151
+ if (fm.overlay === 'app' && !profiles.has('app-overlay')) { skipped.push(wfPath); continue; }
152
+
153
+ const description = `${fm.phase || fm.gate || 'workflow'}: ${name}`;
154
+ const body = bodyAfterFrontmatter(content);
155
+ const skillContent = renderWorkflowSkill({ code, name, description, body });
156
+ if (dryRun) {
157
+ written.push(`[dry-run] ${code}/SKILL.md`);
158
+ } else {
159
+ writeSkill(skillsDir, code, skillContent);
160
+ written.push(`${code}/SKILL.md`);
161
+ }
162
+ }
163
+
164
+ // 3. Standalone skills
165
+ for (const skPath of walkSkills(kitRoot)) {
166
+ const content = fs.readFileSync(skPath, 'utf-8');
167
+ const fm = readFrontmatter(content);
168
+ const code = fm.code;
169
+ const name = fm.name || code;
170
+ if (!code) { skipped.push(skPath); continue; }
171
+
172
+ const description = fm.module ? `${fm.module} skill: ${name}` : name;
173
+ const body = bodyAfterFrontmatter(content);
174
+ const skillContent = renderWorkflowSkill({ code, name, description, body });
175
+ if (dryRun) {
176
+ written.push(`[dry-run] ${code}/SKILL.md`);
177
+ } else {
178
+ writeSkill(skillsDir, code, skillContent);
179
+ written.push(`${code}/SKILL.md`);
180
+ }
181
+ }
182
+
183
+ return { written, skipped };
13
184
  }
14
185
 
15
186
  module.exports = { render };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "wize-dev-kit",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "description": "Full-lifecycle AI-assisted development kit with Test Architect and Whiteport Design Studio embedded. Inspired by BMAD Method and WDS.",
6
6
  "keywords": [
7
7
  "ai",
@@ -48,5 +48,8 @@
48
48
  "ARCH.md",
49
49
  "ROSTER.md",
50
50
  "DECISIONS.md"
51
- ]
51
+ ],
52
+ "dependencies": {
53
+ "prompts": "^2.4.2"
54
+ }
52
55
  }
@@ -16,9 +16,6 @@ skills:
16
16
  - code: wize-brainstorming
17
17
  name: "Brainstorming"
18
18
  description: "Divergent-then-convergent ideation; produces idea-pool.md."
19
- - code: wize-help
20
- name: "Help"
21
- description: "Routes user to the right agent/workflow based on intent."
22
19
  - code: wize-shard-doc
23
20
  name: "Shard Doc"
24
21
  description: "Splits large markdown docs (PRD, architecture) into addressable shards."
@@ -13,6 +13,9 @@ agents:
13
13
  description: "Knows the user deeply, parses raw demand, routes to the right specialist. Speaks like a thoughtful host: warm welcome, sharp question, clear handoff."
14
14
 
15
15
  skills:
16
+ - code: wize-help
17
+ name: "Help (Wizer)"
18
+ description: "Project-state-aware help. Reads .wize/ and tells the user what to do next. Modes: default, next, status, personas."
16
19
  - code: wize-onboarding
17
20
  name: "Onboarding"
18
21
  description: "Post-install triage: greenfield vs brownfield, profile, objective. Delegates to specialists."
@@ -0,0 +1,102 @@
1
+ ---
2
+ code: wize-help
3
+ name: Help (Wizer)
4
+ module: orchestrator
5
+ owner: wize-orchestrator
6
+ status: ready
7
+ ---
8
+
9
+ # Wizer · `/wize-help`
10
+
11
+ You are **Wizer**, the orchestrator. The user invoked `/wize-help`. Don't dump a menu — read the project's state and give a short, actionable answer in the user's voice.
12
+
13
+ ## Modes
14
+
15
+ | Invocation | What to do |
16
+ |---|---|
17
+ | `/wize-help` or `/wize` (no argument) | Greeting + project snapshot + the **single best next step**. |
18
+ | `/wize-help next` | Just the next step. Skip the snapshot. |
19
+ | `/wize-help status` | Snapshot only — phase, last TEA gate, in-flight stories. |
20
+ | `/wize-help personas` | List only the personas relevant to the active profiles. |
21
+
22
+ ## Step 1 — read project state
23
+
24
+ Read these files if they exist (they may not — that's information too):
25
+
26
+ | Path | Tells you |
27
+ |---|---|
28
+ | `.wize/config/project.toml` | Active profiles, IDE targets, communication & document languages, project name. |
29
+ | `.wize/config/tea.toml` | TEA gate policy (advisory vs enforcing). |
30
+ | `.wize/planning/brief.md` | Whether Phase 1 (Pepper) started. |
31
+ | `.wize/planning/research.md` | Whether research was done. |
32
+ | `.wize/planning/ux/trigger-map.md` | Whether WDS trigger map exists. |
33
+ | `.wize/planning/prd.md` | Whether Phase 2 (Maria Hill) PRD exists. |
34
+ | `.wize/planning/ux/ux-scenarios.md`, `.wize/planning/ux/ux-design/**` | Whether Mantis ran UX. |
35
+ | `.wize/planning/tech-vision.md`, `nfr-principles.md` | Whether Fury set tech strategy. |
36
+ | `.wize/solutioning/architecture.md` | Whether Tony's architecture exists. |
37
+ | `.wize/solutioning/stories/**/*.md` | Whether stories are sliced. |
38
+ | `.wize/implementation/tea/risk-profile.md` | Whether Hawkeye's risk profile is in place. |
39
+ | `.wize/implementation/tea/**/gate.md` | Last gate decisions per story. |
40
+ | `.wize/implementation/sprint-status.md` | Active sprint state. |
41
+
42
+ ## Step 2 — determine current phase
43
+
44
+ Apply this heuristic, top-down. Stop at the first match.
45
+
46
+ 1. **No `.wize/` folder.** → Tell the user the kit isn't installed; suggest `npx wize-dev-kit install`.
47
+ 2. **No `brief.md`.** → Phase 1. Next: **Pepper / `wize-product-brief`**.
48
+ 3. **`brief.md` exists, no `trigger-map.md`.** → Still Phase 1. Next: **Pepper / `wize-trigger-map`**.
49
+ 4. **No `prd.md`.** → Phase 2. Next: **Maria Hill / `wize-create-prd`**.
50
+ 5. **`prd.md` exists, no `ux-scenarios.md`.** → Phase 2 UX. Next: **Mantis / `wize-ux-scenarios`**.
51
+ 6. **`ux-design/` empty.** → Phase 2 UX continues. Next: **Mantis / `wize-ux-design`**.
52
+ 7. **No `tech-vision.md` or `nfr-principles.md`.** → Phase 2→3 boundary. Next: **Fury / `wize-tech-vision`** then `wize-nfr-principles`.
53
+ 8. **No `architecture.md`.** → Phase 3. Next: **Tony / `wize-create-architecture`**.
54
+ 9. **No `stories/**/*.md`.** → Phase 3 still. Next: **Tony / `wize-create-epics-and-stories`**.
55
+ 10. **No `tea/risk-profile.md`.** → Phase 3 closeout. Next: **Hawkeye / `wize-tea-risk`**.
56
+ 11. **Has stories but `sprint-status.md` shows no active sprint.** → Phase 4 start. Next: **Maria Hill / `wize-sprint-planning`**.
57
+ 12. **Has active sprint, oldest in-flight story has no `tea/.../design.md`.** → Next: **Hawkeye / `wize-tea-design`** for that story.
58
+ 13. **In-flight story exists, no implementation commits.** → Next: **Shuri / `wize-dev-story`** on that story.
59
+ 14. **In-flight story exists with code, no `gate.md`.** → Next: **Hawkeye / `wize-tea-trace` → `wize-tea-review` → `wize-tea-gate`** for that story.
60
+ 15. **All stories gated.** → Next: **Wizer / `wize-retrospective`** + plan next epic.
61
+
62
+ For brownfield repos where `.wize/knowledge/document-project/` is missing, prepend: "Run `wize-document-project` first to baseline the codebase."
63
+
64
+ ## Step 3 — respond
65
+
66
+ Default response shape (3 lines):
67
+
68
+ ```
69
+ Welcome back. {project name} — {profiles, e.g., "Core + Web"}.
70
+ You're at: {phase + last completed artifact}.
71
+ Next: /{next workflow} ({persona}).
72
+ ```
73
+
74
+ For `status`, return a markdown table:
75
+
76
+ ```
77
+ | Item | State |
78
+ |---|---|
79
+ | Phase | … |
80
+ | Profiles | … |
81
+ | Last TEA gate | … (PASS/CONCERNS/FAIL/WAIVED) |
82
+ | In-flight stories | … |
83
+ | Active sprint | … |
84
+ | TEA policy | advisory / enforcing |
85
+ ```
86
+
87
+ For `personas`, list only personas whose role applies to active profiles. Always include Wizer, Pepper, Peggy, Maria Hill, Mantis, Fury, Tony, Hawkeye, Shuri (all are profile-independent core roles). If `web-overlay` active, note that **Mantis** has the WCAG/responsive playbook loaded and **Hawkeye** has Playwright/Vitest patterns. If `app-overlay` active, note HIG/Material 3 for Mantis and Detox/Maestro for Hawkeye.
88
+
89
+ ## Step 4 — offer to act
90
+
91
+ End every response with one of:
92
+
93
+ - "Want me to call {persona}?" — if the next step is clear.
94
+ - "Want me to baseline the repo first?" — if brownfield + no document-project.
95
+ - "Want me to call a party-mode with {persona1} + {persona2}?" — if the next step has a cross-cutting decision.
96
+
97
+ ## Style
98
+
99
+ - Speak in the user's `communication` language (from `.wize/config/project.toml`).
100
+ - One sharp question is better than three sentences of advice.
101
+ - If the user invoked `/wize-help next`, give them just the next step in one line and stop.
102
+ - If user invoked `/wize-help status`, give the table and stop. Don't suggest actions.
@@ -12,6 +12,9 @@
12
12
  const fs = require('node:fs');
13
13
  const path = require('node:path');
14
14
  const readline = require('node:readline');
15
+ const prompts = require('prompts');
16
+
17
+ const INTERACTIVE = process.stdout.isTTY && process.stdin.isTTY;
15
18
 
16
19
  const KIT_ROOT = path.resolve(__dirname, '..', '..');
17
20
  const KIT_VERSION = require(path.join(KIT_ROOT, 'package.json')).version;
@@ -34,6 +37,20 @@ const PROFILES = [
34
37
  { code: 'app-overlay', label: 'Wize App Development (overlay)', required: false }
35
38
  ];
36
39
 
40
+ // Common BCP-47 short codes. Users can type any other value freely.
41
+ const LANGUAGES = [
42
+ { code: 'en', label: 'English' },
43
+ { code: 'pt-BR', label: 'Português (Brasil)' },
44
+ { code: 'pt-PT', label: 'Português (Portugal)' },
45
+ { code: 'es', label: 'Español' },
46
+ { code: 'fr', label: 'Français' },
47
+ { code: 'de', label: 'Deutsch' },
48
+ { code: 'it', label: 'Italiano' },
49
+ { code: 'zh-CN', label: '中文 (简体)' },
50
+ { code: 'ja', label: '日本語' },
51
+ { code: 'vi', label: 'Tiếng Việt' }
52
+ ];
53
+
37
54
  const HELP = `wize-dev-kit v${KIT_VERSION}
38
55
 
39
56
  Usage:
@@ -79,7 +96,69 @@ async function confirm(question, defaultYes = true) {
79
96
  return ans.startsWith('y');
80
97
  }
81
98
 
99
+ async function selectLanguage(label, defaultCode = 'en') {
100
+ if (INTERACTIVE) {
101
+ const choices = LANGUAGES.map(l => ({
102
+ title: `${l.code.padEnd(6)} — ${l.label}`,
103
+ value: l.code,
104
+ description: l.code === defaultCode ? 'default' : undefined
105
+ }));
106
+ choices.push({ title: 'Other (type a custom BCP-47 code)…', value: '__custom' });
107
+ const initial = LANGUAGES.findIndex(l => l.code === defaultCode);
108
+ const { picked } = await prompts({
109
+ type: 'select',
110
+ name: 'picked',
111
+ message: label,
112
+ choices,
113
+ initial: initial === -1 ? 0 : initial
114
+ });
115
+ if (picked === undefined) process.exit(130);
116
+ if (picked === '__custom') {
117
+ const { custom } = await prompts({
118
+ type: 'text',
119
+ name: 'custom',
120
+ message: 'Type a BCP-47 language code (e.g. ko, ar, nl, ru)',
121
+ initial: defaultCode,
122
+ validate: v => /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})?$/.test(v) || 'use a valid code like "en" or "pt-BR"'
123
+ });
124
+ return custom || defaultCode;
125
+ }
126
+ return picked;
127
+ }
128
+ // Non-TTY fallback: number-driven.
129
+ console.log(`\n${label}:`);
130
+ LANGUAGES.forEach((l, i) => {
131
+ const def = l.code === defaultCode ? '(default)' : '';
132
+ console.log(` ${String(i + 1).padStart(2)}. ${l.code.padEnd(6)} — ${l.label} ${def}`);
133
+ });
134
+ const ans = (await prompt(`Pick a number, type a code, or ENTER for ${defaultCode}: `)).trim();
135
+ if (!ans) return defaultCode;
136
+ const asNum = parseInt(ans, 10);
137
+ if (!isNaN(asNum) && asNum >= 1 && asNum <= LANGUAGES.length) return LANGUAGES[asNum - 1].code;
138
+ return ans;
139
+ }
140
+
82
141
  async function multiSelect(label, items, isSelected = i => i.default) {
142
+ if (INTERACTIVE) {
143
+ const { picked } = await prompts({
144
+ type: 'multiselect',
145
+ name: 'picked',
146
+ message: label,
147
+ hint: '↑/↓ navigate · space toggle · enter confirm',
148
+ instructions: false,
149
+ choices: items.map(it => ({
150
+ title: it.label + (it.required ? ' (required)' : ''),
151
+ value: it.code,
152
+ selected: it.required || isSelected(it),
153
+ disabled: it.required
154
+ }))
155
+ });
156
+ if (picked === undefined) process.exit(130);
157
+ const codes = new Set(picked);
158
+ for (const req of items.filter(i => i.required)) codes.add(req.code);
159
+ return items.filter(it => codes.has(it.code));
160
+ }
161
+ // Non-TTY fallback.
83
162
  console.log(`\n${label}:`);
84
163
  items.forEach((it, i) => {
85
164
  const star = it.required ? '★ ' : ' ';
@@ -87,9 +166,7 @@ async function multiSelect(label, items, isSelected = i => i.default) {
87
166
  console.log(` ${i + 1}. ${star}${it.label} ${def}`);
88
167
  });
89
168
  const ans = await prompt('Pick numbers (comma-separated) or ENTER for defaults: ');
90
- if (!ans) {
91
- return items.filter(it => it.required || isSelected(it));
92
- }
169
+ if (!ans) return items.filter(it => it.required || isSelected(it));
93
170
  const indices = ans.split(',').map(s => parseInt(s.trim(), 10) - 1).filter(i => !isNaN(i));
94
171
  const picked = indices.map(i => items[i]).filter(Boolean);
95
172
  for (const req of items.filter(i => i.required)) {
@@ -147,7 +224,7 @@ const WIZE_DIRS = [
147
224
  '.wize/custom/workflows'
148
225
  ];
149
226
 
150
- function projectToml({ profiles, targets, language, project_name }) {
227
+ function projectToml({ profiles, targets, communication_language, document_output_language, project_name }) {
151
228
  const profileLine = profiles.map(p => `"${p.code}"`).join(', ');
152
229
  const targetLine = targets.map(t => `"${t.code}"`).join(', ');
153
230
  return `# Wize Development Kit — project config
@@ -162,8 +239,11 @@ profiles = [${profileLine}]
162
239
  ide_targets = [${targetLine}]
163
240
 
164
241
  [language]
165
- communication = "${language}"
166
- document_output = "${language}"
242
+ # Language used when agents talk to you in the IDE chat.
243
+ communication = "${communication_language}"
244
+ # Language used when agents write artifacts to disk
245
+ # (brief.md, prd.md, architecture.md, gate.md, etc.).
246
+ document_output = "${document_output_language}"
167
247
 
168
248
  [paths]
169
249
  output_root = ".wize"
@@ -197,6 +277,35 @@ function userToml() {
197
277
  `;
198
278
  }
199
279
 
280
+ function renderAdapters({ kitRoot, projectRoot, targets, profiles }) {
281
+ const results = [];
282
+ const profileCodes = profiles.map(p => p.code);
283
+ for (const target of targets) {
284
+ const adapterDir = path.join(kitRoot, 'adapters', target.code);
285
+ const renderPath = path.join(adapterDir, 'render.js');
286
+ if (!fs.existsSync(renderPath)) {
287
+ results.push({ code: target.code, skipped: true, reason: 'adapter missing' });
288
+ continue;
289
+ }
290
+ try {
291
+ const mod = require(renderPath);
292
+ if (typeof mod.render !== 'function') {
293
+ results.push({ code: target.code, skipped: true, reason: 'no render() export' });
294
+ continue;
295
+ }
296
+ const out = mod.render(kitRoot, projectRoot, { profiles: profileCodes });
297
+ if (out && typeof out === 'object' && Array.isArray(out.written)) {
298
+ results.push({ code: target.code, written: out.written.length });
299
+ } else {
300
+ results.push({ code: target.code, skipped: true, reason: 'stub (no skills emitted)' });
301
+ }
302
+ } catch (err) {
303
+ results.push({ code: target.code, error: err.message });
304
+ }
305
+ }
306
+ return results;
307
+ }
308
+
200
309
  async function cmdInstall(args) {
201
310
  const cwd = process.cwd();
202
311
  console.log(logo());
@@ -217,12 +326,22 @@ async function cmdInstall(args) {
217
326
  const project_name = (await prompt(`Project name [${path.basename(cwd)}]: `)) || path.basename(cwd);
218
327
  const profiles = await multiSelect('Select profile(s) to install', PROFILES);
219
328
  const targets = await multiSelect('Select IDE target(s)', TARGETS);
220
- const language = (await prompt('Communication language [en]: ')) || 'en';
329
+
330
+ const communication_language = await selectLanguage(
331
+ 'Communication language (how agents will talk to you in chat)',
332
+ 'en'
333
+ );
334
+ const document_output_language = await selectLanguage(
335
+ `Document output language (language used in generated files; ENTER for "${communication_language}")`,
336
+ communication_language
337
+ );
221
338
 
222
339
  console.log('\nCreating .wize/ skeleton...');
223
340
  for (const dir of WIZE_DIRS) mkdirp(path.join(cwd, dir));
224
341
 
225
- writeIfMissing(path.join(cwd, '.wize/config/project.toml'), projectToml({ profiles, targets, language, project_name }));
342
+ writeIfMissing(path.join(cwd, '.wize/config/project.toml'), projectToml({
343
+ profiles, targets, communication_language, document_output_language, project_name
344
+ }));
226
345
  writeIfMissing(path.join(cwd, '.wize/config/user.toml'), userToml());
227
346
  writeIfMissing(path.join(cwd, '.wize/config/tea.toml'), teaToml());
228
347
 
@@ -230,8 +349,18 @@ async function cmdInstall(args) {
230
349
  console.log(`✓ profiles: ${profiles.map(p => p.code).join(', ')}`);
231
350
  console.log(`✓ ide targets: ${targets.map(t => t.code).join(', ')}`);
232
351
 
233
- console.log('\n(stub) IDE adapter generation would run now for each target.');
234
- console.log('(stub) onboarding handoff to Wizer would start here.');
352
+ console.log('\nGenerating IDE adapters...');
353
+ const renderResults = renderAdapters({
354
+ kitRoot: KIT_ROOT,
355
+ projectRoot: cwd,
356
+ targets,
357
+ profiles
358
+ });
359
+ for (const r of renderResults) {
360
+ if (r.skipped) console.log(` - ${r.code}: skipped (${r.reason})`);
361
+ else if (r.written) console.log(` ✓ ${r.code}: ${r.written} skill(s) emitted`);
362
+ else if (r.error) console.log(` ✖ ${r.code}: ${r.error}`);
363
+ }
235
364
 
236
365
  if (detection.brownfield) {
237
366
  const baseline = await confirm('\nRun `wize-document-project` to baseline the existing repo now?', true);
@@ -1,18 +0,0 @@
1
- ---
2
- code: wize-help
3
- name: Help
4
- module: core
5
- status: stub
6
- ---
7
-
8
- # Help
9
-
10
- Routes user intent to the right agent or workflow.
11
-
12
- ## Examples
13
- - "I need to start a new project." → Wizer onboarding.
14
- - "I have a brief; what's next?" → Maria Hill / `wize-create-prd`.
15
- - "Design system?" → Mantis / `wize-design-system`.
16
- - "Architecture?" → Tony / `wize-create-architecture`.
17
- - "Test plan for this story?" → Hawkeye / `wize-tea-design`.
18
- - "Add a custom agent." → Builder / `wize-create-agent`.