wize-dev-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCH.md +341 -0
- package/CHANGELOG.md +24 -0
- package/DECISIONS.md +141 -0
- package/LICENSE +31 -0
- package/README.md +113 -0
- package/ROSTER.md +25 -0
- package/adapters/README.md +26 -0
- package/adapters/antigravity/README.md +9 -0
- package/adapters/antigravity/adapter.yaml +8 -0
- package/adapters/antigravity/render.js +15 -0
- package/adapters/claude-code/README.md +9 -0
- package/adapters/claude-code/adapter.yaml +8 -0
- package/adapters/claude-code/render.js +15 -0
- package/adapters/codex/README.md +9 -0
- package/adapters/codex/adapter.yaml +8 -0
- package/adapters/codex/render.js +15 -0
- package/adapters/continue/README.md +9 -0
- package/adapters/continue/adapter.yaml +8 -0
- package/adapters/continue/render.js +15 -0
- package/adapters/cursor/README.md +9 -0
- package/adapters/cursor/adapter.yaml +8 -0
- package/adapters/cursor/render.js +15 -0
- package/adapters/generic/README.md +9 -0
- package/adapters/generic/adapter.yaml +8 -0
- package/adapters/generic/render.js +15 -0
- package/adapters/kimi-code/README.md +9 -0
- package/adapters/kimi-code/adapter.yaml +8 -0
- package/adapters/kimi-code/render.js +15 -0
- package/adapters/opencode/README.md +9 -0
- package/adapters/opencode/adapter.yaml +8 -0
- package/adapters/opencode/render.js +15 -0
- package/adapters/windsurf/README.md +9 -0
- package/adapters/windsurf/adapter.yaml +8 -0
- package/adapters/windsurf/render.js +15 -0
- package/package.json +52 -0
- package/schemas/agent.schema.json +37 -0
- package/schemas/module.schema.json +18 -0
- package/schemas/skill.schema.json +14 -0
- package/schemas/workflow.schema.json +19 -0
- package/src/app-overlay/module.yaml +40 -0
- package/src/app-overlay/wize-app-release-channels/workflow.md +21 -0
- package/src/app-overlay/wize-app-scaffold/workflow.md +27 -0
- package/src/app-overlay/wize-app-store-listing/workflow.md +22 -0
- package/src/builder-skills/module.yaml +23 -0
- package/src/builder-skills/wize-create-agent/workflow.md +40 -0
- package/src/builder-skills/wize-create-skill/workflow.md +25 -0
- package/src/builder-skills/wize-create-workflow/workflow.md +26 -0
- package/src/core-skills/module.yaml +27 -0
- package/src/core-skills/wize-advanced-elicitation/skill.md +22 -0
- package/src/core-skills/wize-brainstorming/skill.md +20 -0
- package/src/core-skills/wize-help/skill.md +18 -0
- package/src/core-skills/wize-review-adversarial/skill.md +19 -0
- package/src/core-skills/wize-shard-doc/skill.md +18 -0
- package/src/method-skills/1-analysis/wize-agent-analyst/agent.yaml +39 -0
- package/src/method-skills/1-analysis/wize-agent-analyst/persona.md +33 -0
- package/src/method-skills/1-analysis/wize-agent-tech-writer/agent.yaml +28 -0
- package/src/method-skills/1-analysis/wize-agent-tech-writer/persona.md +30 -0
- package/src/method-skills/1-analysis/wize-document-project/workflow.md +36 -0
- package/src/method-skills/1-analysis/wize-prfaq/workflow.md +27 -0
- package/src/method-skills/1-analysis/wize-product-brief/workflow.md +60 -0
- package/src/method-skills/1-analysis/wize-research/workflow.md +24 -0
- package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +40 -0
- package/src/method-skills/2-plan-workflows/wize-agent-pm/agent.yaml +33 -0
- package/src/method-skills/2-plan-workflows/wize-agent-pm/persona.md +33 -0
- package/src/method-skills/2-plan-workflows/wize-agent-ux-designer/agent.yaml +39 -0
- package/src/method-skills/2-plan-workflows/wize-agent-ux-designer/persona.md +33 -0
- package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +57 -0
- package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +66 -0
- package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +48 -0
- package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +27 -0
- package/src/method-skills/3-solutioning/wize-agent-architect/agent.yaml +35 -0
- package/src/method-skills/3-solutioning/wize-agent-architect/persona.md +29 -0
- package/src/method-skills/3-solutioning/wize-agent-solution-strategist/agent.yaml +30 -0
- package/src/method-skills/3-solutioning/wize-agent-solution-strategist/persona.md +31 -0
- package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +22 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +64 -0
- package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +48 -0
- package/src/method-skills/3-solutioning/wize-design-system/workflow.md +36 -0
- package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +33 -0
- package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +43 -0
- package/src/method-skills/4-implementation/wize-agent-dev/agent.yaml +34 -0
- package/src/method-skills/4-implementation/wize-agent-dev/persona.md +33 -0
- package/src/method-skills/4-implementation/wize-code-review/workflow.md +24 -0
- package/src/method-skills/4-implementation/wize-create-story/workflow.md +27 -0
- package/src/method-skills/4-implementation/wize-dev-story/workflow.md +33 -0
- package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +33 -0
- package/src/method-skills/4-implementation/wize-retrospective/workflow.md +36 -0
- package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +24 -0
- package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +25 -0
- package/src/method-skills/module.yaml +105 -0
- package/src/orchestrator-skills/module.yaml +21 -0
- package/src/orchestrator-skills/wize-onboarding/workflow.md +28 -0
- package/src/orchestrator-skills/wize-orchestrator/agent.yaml +37 -0
- package/src/orchestrator-skills/wize-orchestrator/persona.md +22 -0
- package/src/orchestrator-skills/wize-party-mode/workflow.md +25 -0
- package/src/tea-skills/module.yaml +45 -0
- package/src/tea-skills/wize-agent-test-architect/agent.yaml +47 -0
- package/src/tea-skills/wize-agent-test-architect/persona.md +38 -0
- package/src/tea-skills/wize-tea-design/workflow.md +38 -0
- package/src/tea-skills/wize-tea-gate/workflow.md +51 -0
- package/src/tea-skills/wize-tea-nfr/workflow.md +37 -0
- package/src/tea-skills/wize-tea-review/workflow.md +35 -0
- package/src/tea-skills/wize-tea-risk/workflow.md +39 -0
- package/src/tea-skills/wize-tea-trace/workflow.md +36 -0
- package/src/web-overlay/module.yaml +41 -0
- package/src/web-overlay/wize-web-deploy/workflow.md +26 -0
- package/src/web-overlay/wize-web-scaffold/workflow.md +32 -0
- package/src/web-overlay/wize-web-seo-audit/workflow.md +22 -0
- package/tools/installer/detect.js +43 -0
- package/tools/installer/onboarding.js +32 -0
- package/tools/installer/sync.js +29 -0
- package/tools/installer/validators/run-all.js +82 -0
- package/tools/installer/validators/walk.js +40 -0
- package/tools/installer/wize-cli.js +346 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-tea-gate
|
|
3
|
+
name: TEA Gate Decision
|
|
4
|
+
gate: gate
|
|
5
|
+
owner: wize-agent-test-architect # Hawkeye
|
|
6
|
+
when: story-final
|
|
7
|
+
status: stub
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TEA — Gate Decision
|
|
11
|
+
|
|
12
|
+
**Goal.** Final per-story gate. PASS / CONCERNS / FAIL / WAIVED with documented rationale.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
- `design.md`, `trace.md`, `review.md` for the story
|
|
16
|
+
- `nfr/{epic}.md` if applicable
|
|
17
|
+
- Story file
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
- `.wize/implementation/tea/{epic}/{story}/gate.md`
|
|
21
|
+
|
|
22
|
+
## YAML frontmatter (canonical)
|
|
23
|
+
```yaml
|
|
24
|
+
---
|
|
25
|
+
gate: gate
|
|
26
|
+
story_id: …
|
|
27
|
+
status: PASS | CONCERNS | FAIL | WAIVED
|
|
28
|
+
score: 0-100
|
|
29
|
+
policy: advisory | enforcing
|
|
30
|
+
inputs:
|
|
31
|
+
- design.md: …
|
|
32
|
+
- trace.md: …
|
|
33
|
+
- review.md: …
|
|
34
|
+
- nfr/{epic}.md: …
|
|
35
|
+
findings:
|
|
36
|
+
- id: G-1
|
|
37
|
+
severity: low | medium | high
|
|
38
|
+
summary: …
|
|
39
|
+
recommendation: …
|
|
40
|
+
waived_by: null | "wizer"
|
|
41
|
+
waived_reason: null | "…"
|
|
42
|
+
created_at: ISO-8601
|
|
43
|
+
---
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Body
|
|
47
|
+
Narrative explanation; structured data is the YAML.
|
|
48
|
+
|
|
49
|
+
## Policy
|
|
50
|
+
- **advisory** (default): FAIL is a warning. Merge proceeds.
|
|
51
|
+
- **enforcing**: FAIL blocks merge via CI. Configured in `.wize/config/tea.toml`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-tea-nfr
|
|
3
|
+
name: TEA NFR Assessment
|
|
4
|
+
gate: nfr
|
|
5
|
+
owner: wize-agent-test-architect # Hawkeye
|
|
6
|
+
when: pre-merge-per-epic
|
|
7
|
+
status: stub
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TEA — NFR Assessment
|
|
11
|
+
|
|
12
|
+
**Goal.** Verify the epic meets Fury's NFR principles: performance, security, reliability, maintainability, accessibility, cost.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
- `.wize/planning/nfr-principles.md`
|
|
16
|
+
- Code from all stories in the epic
|
|
17
|
+
- Telemetry/benchmark output
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
- `.wize/implementation/tea/nfr/{epic}.md`
|
|
21
|
+
|
|
22
|
+
## YAML frontmatter
|
|
23
|
+
```yaml
|
|
24
|
+
---
|
|
25
|
+
gate: nfr
|
|
26
|
+
epic: …
|
|
27
|
+
status: PASS | CONCERNS | FAIL | WAIVED
|
|
28
|
+
scores:
|
|
29
|
+
performance: …
|
|
30
|
+
security: …
|
|
31
|
+
reliability: …
|
|
32
|
+
maintainability: …
|
|
33
|
+
accessibility: …
|
|
34
|
+
cost: …
|
|
35
|
+
findings: [...]
|
|
36
|
+
---
|
|
37
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-tea-review
|
|
3
|
+
name: TEA Story Review
|
|
4
|
+
gate: review
|
|
5
|
+
owner: wize-agent-test-architect # Hawkeye
|
|
6
|
+
when: story-end
|
|
7
|
+
status: stub
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TEA — Story Review
|
|
11
|
+
|
|
12
|
+
**Goal.** Structured story review (separate from Shuri's `wize-code-review`).
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
- Story file (ACs)
|
|
16
|
+
- Test results
|
|
17
|
+
- Trace doc
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
- `.wize/implementation/tea/{epic}/{story}/review.md`
|
|
21
|
+
|
|
22
|
+
## YAML frontmatter
|
|
23
|
+
```yaml
|
|
24
|
+
---
|
|
25
|
+
gate: review
|
|
26
|
+
story_id: …
|
|
27
|
+
status: PASS | CONCERNS | FAIL
|
|
28
|
+
ac_check:
|
|
29
|
+
- id: AC-1
|
|
30
|
+
met: true|partial|false
|
|
31
|
+
evidence: …
|
|
32
|
+
findings: [...]
|
|
33
|
+
recommendations: [...]
|
|
34
|
+
---
|
|
35
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-tea-risk
|
|
3
|
+
name: TEA Risk Profile
|
|
4
|
+
gate: risk
|
|
5
|
+
owner: wize-agent-test-architect # Hawkeye
|
|
6
|
+
when: once-after-architecture
|
|
7
|
+
status: stub
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TEA — Risk Profile
|
|
11
|
+
|
|
12
|
+
**Goal.** Build the probability × impact matrix that prioritizes the rest of TEA's work.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
- `.wize/solutioning/architecture.md`
|
|
16
|
+
- `.wize/solutioning/epics/`
|
|
17
|
+
|
|
18
|
+
## Output
|
|
19
|
+
- `.wize/implementation/tea/risk-profile.md`
|
|
20
|
+
|
|
21
|
+
## YAML frontmatter (canonical)
|
|
22
|
+
```yaml
|
|
23
|
+
---
|
|
24
|
+
gate: risk
|
|
25
|
+
status: PASS | CONCERNS | FAIL | WAIVED
|
|
26
|
+
score: 0-100
|
|
27
|
+
created_at: ISO-8601
|
|
28
|
+
findings:
|
|
29
|
+
- id: R-1
|
|
30
|
+
area: …
|
|
31
|
+
probability: low | medium | high
|
|
32
|
+
impact: low | medium | high
|
|
33
|
+
rationale: …
|
|
34
|
+
mitigation: …
|
|
35
|
+
---
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Body
|
|
39
|
+
Narrative summary; the structured data is the YAML.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-tea-trace
|
|
3
|
+
name: TEA Traceability
|
|
4
|
+
gate: trace
|
|
5
|
+
owner: wize-agent-test-architect # Hawkeye
|
|
6
|
+
when: during-or-after-implementation
|
|
7
|
+
status: stub
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TEA — Traceability
|
|
11
|
+
|
|
12
|
+
**Goal.** Map every Acceptance Criterion to one or more concrete tests in the repo.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
- Story file (ACs)
|
|
16
|
+
- Test files produced by Shuri
|
|
17
|
+
|
|
18
|
+
## Output
|
|
19
|
+
- `.wize/implementation/tea/{epic}/{story}/trace.md`
|
|
20
|
+
|
|
21
|
+
## YAML frontmatter
|
|
22
|
+
```yaml
|
|
23
|
+
---
|
|
24
|
+
gate: trace
|
|
25
|
+
story_id: …
|
|
26
|
+
status: PASS | CONCERNS | FAIL
|
|
27
|
+
coverage:
|
|
28
|
+
- ac_id: AC-1
|
|
29
|
+
tests:
|
|
30
|
+
- path/to/test.spec.ts::case-name
|
|
31
|
+
status: covered | partial | missing
|
|
32
|
+
---
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Body
|
|
36
|
+
For any `missing` or `partial`, propose what to write.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
code: web-overlay
|
|
2
|
+
name: "Wize Web Dev (overlay)"
|
|
3
|
+
description: "Web-stack extension: scaffolds (Next/Vue/Astro/Laravel/SvelteKit), SEO audit, deploy flows, WCAG playbook for Mantis, Playwright/Vitest playbook for Hawkeye."
|
|
4
|
+
default_selected: false
|
|
5
|
+
required: false
|
|
6
|
+
overlay_of: method
|
|
7
|
+
|
|
8
|
+
# Stack catalog (referenced by Tony during architecture interview):
|
|
9
|
+
stack_catalog:
|
|
10
|
+
- Next.js + React + Tailwind
|
|
11
|
+
- Vue / Nuxt + Tailwind
|
|
12
|
+
- SvelteKit
|
|
13
|
+
- Astro
|
|
14
|
+
- Remix
|
|
15
|
+
- Laravel + Vue / Inertia
|
|
16
|
+
- Supabase backends
|
|
17
|
+
- Drizzle / Prisma ORMs
|
|
18
|
+
|
|
19
|
+
# Extra artifacts:
|
|
20
|
+
artifacts:
|
|
21
|
+
- ".wize/planning/web/seo-strategy.md"
|
|
22
|
+
- ".wize/planning/web/analytics-plan.md"
|
|
23
|
+
- ".wize/planning/ux/design-tokens.json"
|
|
24
|
+
|
|
25
|
+
skills:
|
|
26
|
+
- code: wize-web-scaffold
|
|
27
|
+
description: "Scaffold a web app skeleton per chosen stack (Next/Vue/etc)."
|
|
28
|
+
- code: wize-web-seo-audit
|
|
29
|
+
description: "Audit SEO basics: sitemap, meta tags, structured data, Core Web Vitals."
|
|
30
|
+
- code: wize-web-deploy
|
|
31
|
+
description: "Generate deploy playbook (Vercel, Cloudflare, Fly, Coolify, etc)."
|
|
32
|
+
|
|
33
|
+
# Playbooks added to existing agents:
|
|
34
|
+
agent_playbooks:
|
|
35
|
+
wize-agent-ux-designer:
|
|
36
|
+
- "playbooks/wcag-aa.md"
|
|
37
|
+
- "playbooks/responsive-breakpoints.md"
|
|
38
|
+
- "playbooks/semantic-html.md"
|
|
39
|
+
wize-agent-test-architect:
|
|
40
|
+
- "playbooks/playwright-vitest.md"
|
|
41
|
+
- "playbooks/web-perf-budgets.md"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-web-deploy
|
|
3
|
+
name: Web Deploy Playbook
|
|
4
|
+
overlay: web
|
|
5
|
+
owner: wize-agent-architect # Tony
|
|
6
|
+
status: stub
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web Deploy Playbook
|
|
10
|
+
|
|
11
|
+
**Goal.** Document the deploy path: provider, environments, secrets, rollback.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
- `.wize/solutioning/architecture.md`
|
|
15
|
+
- `.wize/planning/nfr-principles.md` (cost, reliability)
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
- `.wize/solutioning/deploy/web-deploy.md`
|
|
19
|
+
|
|
20
|
+
## Sections
|
|
21
|
+
- Provider (Vercel / Cloudflare / Fly / self-hosted Coolify / etc.)
|
|
22
|
+
- Environments (dev / preview / prod)
|
|
23
|
+
- Secrets management
|
|
24
|
+
- Build/deploy commands
|
|
25
|
+
- Smoke checks
|
|
26
|
+
- Rollback procedure
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-web-scaffold
|
|
3
|
+
name: Web Scaffold
|
|
4
|
+
overlay: web
|
|
5
|
+
owner: wize-agent-architect # Tony executes; Fury approves stack family
|
|
6
|
+
status: stub
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web Scaffold
|
|
10
|
+
|
|
11
|
+
**Goal.** Scaffold an empty-but-runnable web app per chosen stack.
|
|
12
|
+
|
|
13
|
+
## Supported stacks (catalog)
|
|
14
|
+
- Next.js + React + Tailwind
|
|
15
|
+
- Vue / Nuxt + Tailwind
|
|
16
|
+
- SvelteKit
|
|
17
|
+
- Astro
|
|
18
|
+
- Remix
|
|
19
|
+
- Laravel + Vue (Inertia)
|
|
20
|
+
- Supabase backends
|
|
21
|
+
- Drizzle / Prisma ORMs
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
1. Stack interview (Tony asks; Fury approves).
|
|
25
|
+
2. Run `npx create-{stack}` or the equivalent.
|
|
26
|
+
3. Wire up design tokens from `.wize/solutioning/design-system/tokens.json`.
|
|
27
|
+
4. Configure linter, formatter, and test runner.
|
|
28
|
+
5. Generate baseline routes from `.wize/planning/ux/ux-design/`.
|
|
29
|
+
6. Commit "initial scaffold (story E00-S01)".
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
- A bootable app + first commit.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: wize-web-seo-audit
|
|
3
|
+
name: Web SEO Audit
|
|
4
|
+
overlay: web
|
|
5
|
+
owner: wize-agent-pm # Maria Hill commissions; Mantis + Tony execute
|
|
6
|
+
status: stub
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web SEO Audit
|
|
10
|
+
|
|
11
|
+
**Goal.** Audit SEO fundamentals before launch.
|
|
12
|
+
|
|
13
|
+
## Checks
|
|
14
|
+
- Sitemap + robots.txt
|
|
15
|
+
- Per-page meta (title, description, OG, Twitter card)
|
|
16
|
+
- Structured data (JSON-LD)
|
|
17
|
+
- Core Web Vitals: LCP, INP, CLS
|
|
18
|
+
- Hreflang (if multilingual)
|
|
19
|
+
- 404 / 500 pages
|
|
20
|
+
|
|
21
|
+
## Output
|
|
22
|
+
- `.wize/planning/web/seo-audit-{YYYY-MM-DD}.md` with findings + actions.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Project detection — distinguishes greenfield from brownfield repos.
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const fs = require('node:fs');
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
|
|
9
|
+
const SIGNALS = [
|
|
10
|
+
{ file: 'package.json', weight: 3, kind: 'js' },
|
|
11
|
+
{ file: 'pubspec.yaml', weight: 3, kind: 'flutter' },
|
|
12
|
+
{ file: 'Cargo.toml', weight: 3, kind: 'rust' },
|
|
13
|
+
{ file: 'go.mod', weight: 3, kind: 'go' },
|
|
14
|
+
{ file: 'composer.json', weight: 3, kind: 'php' },
|
|
15
|
+
{ file: 'pyproject.toml',weight: 3, kind: 'python' },
|
|
16
|
+
{ file: 'Gemfile', weight: 3, kind: 'ruby' },
|
|
17
|
+
{ file: 'src', weight: 2, kind: 'src-dir', isDir: true },
|
|
18
|
+
{ file: 'app', weight: 2, kind: 'app-dir', isDir: true },
|
|
19
|
+
{ file: 'lib', weight: 2, kind: 'lib-dir', isDir: true },
|
|
20
|
+
{ file: 'README.md', weight: 1, kind: 'docs' },
|
|
21
|
+
{ file: 'docs', weight: 1, kind: 'docs-dir', isDir: true }
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
function detect(rootDir = process.cwd()) {
|
|
25
|
+
const found = [];
|
|
26
|
+
let score = 0;
|
|
27
|
+
for (const s of SIGNALS) {
|
|
28
|
+
const p = path.join(rootDir, s.file);
|
|
29
|
+
const exists = fs.existsSync(p);
|
|
30
|
+
if (!exists) continue;
|
|
31
|
+
if (s.isDir && !fs.statSync(p).isDirectory()) continue;
|
|
32
|
+
found.push(s);
|
|
33
|
+
score += s.weight;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
brownfield: score >= 3,
|
|
37
|
+
score,
|
|
38
|
+
signals: found.map(s => s.file),
|
|
39
|
+
kinds: [...new Set(found.map(s => s.kind))]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
module.exports = { detect };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Onboarding handoff — Wizer-driven triage after install.
|
|
3
|
+
*
|
|
4
|
+
* Stub: in v0.1 this just prints the first action Wizer would take.
|
|
5
|
+
* In a real run this would be a workflow executed by the active IDE adapter.
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
function compose(detection, profiles) {
|
|
10
|
+
const lines = [
|
|
11
|
+
'',
|
|
12
|
+
'╭─ Wizer ─────────────────────────────────────╮',
|
|
13
|
+
'│ Welcome back. What are we working on? │',
|
|
14
|
+
'╰─────────────────────────────────────────────╯'
|
|
15
|
+
];
|
|
16
|
+
if (detection.brownfield) {
|
|
17
|
+
lines.push('');
|
|
18
|
+
lines.push('I see this repo already has code. I can ask Pepper and Peggy to baseline it before we plan.');
|
|
19
|
+
lines.push(' → /wize-document-project');
|
|
20
|
+
}
|
|
21
|
+
lines.push('');
|
|
22
|
+
lines.push('When ready, name the next step:');
|
|
23
|
+
lines.push(' → /wize-product-brief (Pepper)');
|
|
24
|
+
lines.push(' → /wize-create-prd (Maria Hill, if brief exists)');
|
|
25
|
+
lines.push(' → /wize-create-architecture (Tony, if PRD exists)');
|
|
26
|
+
lines.push(' → /wize-quick-dev (Shuri, for small fixes)');
|
|
27
|
+
if (profiles.find(p => p.code === 'web-overlay')) lines.push(' → /wize-web-scaffold (overlay)');
|
|
28
|
+
if (profiles.find(p => p.code === 'app-overlay')) lines.push(' → /wize-app-scaffold (overlay)');
|
|
29
|
+
return lines.join('\n');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
module.exports = { compose };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Adapter sync — regenerates IDE adapter files for each active target.
|
|
3
|
+
*
|
|
4
|
+
* Stub: in v0.1 this iterates the adapters/ folder and prints what would
|
|
5
|
+
* be generated. Actual file emission per IDE is a v0.2+ deliverable.
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
const fs = require('node:fs');
|
|
10
|
+
const path = require('node:path');
|
|
11
|
+
|
|
12
|
+
function syncAll(kitRoot, projectConfig) {
|
|
13
|
+
const adaptersDir = path.join(kitRoot, 'adapters');
|
|
14
|
+
if (!fs.existsSync(adaptersDir)) {
|
|
15
|
+
console.log('(skip) adapters/ not found');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const active = projectConfig?.install?.ide_targets || ['claude-code', 'generic'];
|
|
19
|
+
for (const target of active) {
|
|
20
|
+
const dir = path.join(adaptersDir, target);
|
|
21
|
+
if (!fs.existsSync(dir)) {
|
|
22
|
+
console.log(`(warn) adapter "${target}" not found in adapters/`);
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
console.log(`→ would sync ${target} adapter (stub)`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = { syncAll };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Validators — schema + lint + dry-run for kit assets.
|
|
3
|
+
*
|
|
4
|
+
* v0.1 scaffold: minimal structural checks. Real schema validation should
|
|
5
|
+
* use Ajv (json-schema) once a dependency budget is approved.
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
const fs = require('node:fs');
|
|
10
|
+
const path = require('node:path');
|
|
11
|
+
const { walkAgents, walkWorkflows, walkSkills } = require('./walk.js');
|
|
12
|
+
|
|
13
|
+
function checkAgent(file) {
|
|
14
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
15
|
+
const errs = [];
|
|
16
|
+
if (!/^code:\s+wize-/m.test(content)) errs.push('missing or invalid "code:" prefix');
|
|
17
|
+
if (!/^name:/m.test(content)) errs.push('missing "name:"');
|
|
18
|
+
if (!/^title:/m.test(content)) errs.push('missing "title:"');
|
|
19
|
+
if (!/^description:/m.test(content)) errs.push('missing "description:"');
|
|
20
|
+
return errs;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function checkWorkflow(file) {
|
|
24
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
25
|
+
const errs = [];
|
|
26
|
+
if (!/^---\s*$/m.test(content)) errs.push('missing YAML frontmatter');
|
|
27
|
+
if (!/^code:\s+wize-/m.test(content)) errs.push('missing or invalid "code:" prefix');
|
|
28
|
+
if (!/^name:/m.test(content)) errs.push('missing "name:"');
|
|
29
|
+
if (!/^owner:/m.test(content) && !/^module:/m.test(content)) errs.push('missing "owner:" or "module:"');
|
|
30
|
+
return errs;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function runAll(kitRoot) {
|
|
34
|
+
const KIT = kitRoot || path.resolve(__dirname, '..', '..', '..');
|
|
35
|
+
let failures = 0, checked = 0;
|
|
36
|
+
|
|
37
|
+
console.log('\nValidating agents...');
|
|
38
|
+
for (const file of walkAgents(KIT)) {
|
|
39
|
+
checked++;
|
|
40
|
+
const errs = checkAgent(file);
|
|
41
|
+
if (errs.length) {
|
|
42
|
+
failures += errs.length;
|
|
43
|
+
console.log(` ✖ ${path.relative(KIT, file)}`);
|
|
44
|
+
errs.forEach(e => console.log(` - ${e}`));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
console.log('\nValidating workflows...');
|
|
49
|
+
for (const file of walkWorkflows(KIT)) {
|
|
50
|
+
checked++;
|
|
51
|
+
const errs = checkWorkflow(file);
|
|
52
|
+
if (errs.length) {
|
|
53
|
+
failures += errs.length;
|
|
54
|
+
console.log(` ✖ ${path.relative(KIT, file)}`);
|
|
55
|
+
errs.forEach(e => console.log(` - ${e}`));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.log('\nValidating skills...');
|
|
60
|
+
for (const file of walkSkills(KIT)) {
|
|
61
|
+
checked++;
|
|
62
|
+
const errs = checkWorkflow(file); // same minimal shape
|
|
63
|
+
if (errs.length) {
|
|
64
|
+
failures += errs.length;
|
|
65
|
+
console.log(` ✖ ${path.relative(KIT, file)}`);
|
|
66
|
+
errs.forEach(e => console.log(` - ${e}`));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
console.log(`\nChecked ${checked} files.`);
|
|
71
|
+
if (failures) {
|
|
72
|
+
console.log(`✖ ${failures} issue(s) found.`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
console.log('✓ All structural checks passed.');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (require.main === module) {
|
|
79
|
+
runAll();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = runAll;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shallow walkers for kit assets — used by validators.
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const fs = require('node:fs');
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
|
|
9
|
+
function* walk(rootDir, predicate) {
|
|
10
|
+
if (!fs.existsSync(rootDir)) return;
|
|
11
|
+
const stack = [rootDir];
|
|
12
|
+
while (stack.length) {
|
|
13
|
+
const dir = stack.pop();
|
|
14
|
+
let entries;
|
|
15
|
+
try { entries = fs.readdirSync(dir, { withFileTypes: true }); } catch { continue; }
|
|
16
|
+
for (const entry of entries) {
|
|
17
|
+
const full = path.join(dir, entry.name);
|
|
18
|
+
if (entry.isDirectory()) {
|
|
19
|
+
if (entry.name === 'node_modules' || entry.name.startsWith('.')) continue;
|
|
20
|
+
stack.push(full);
|
|
21
|
+
} else if (entry.isFile() && predicate(entry.name, full)) {
|
|
22
|
+
yield full;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function walkAgents(kitRoot) {
|
|
29
|
+
return walk(path.join(kitRoot, 'src'), name => name === 'agent.yaml');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function walkWorkflows(kitRoot) {
|
|
33
|
+
return walk(path.join(kitRoot, 'src'), name => name === 'workflow.md');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function walkSkills(kitRoot) {
|
|
37
|
+
return walk(path.join(kitRoot, 'src'), name => name === 'skill.md');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = { walk, walkAgents, walkWorkflows, walkSkills };
|