@donotdev/cli 0.0.29 → 0.0.30

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.
@@ -17,73 +17,73 @@
17
17
  "@donotdev/auth": {
18
18
  "description": "Authentication package",
19
19
  "packages": {
20
- "@donotdev/auth": "^0.0.19"
20
+ "@donotdev/auth": "^0.0.20"
21
21
  }
22
22
  },
23
23
  "@donotdev/billing": {
24
24
  "description": "Billing package",
25
25
  "packages": {
26
- "@donotdev/billing": "^0.0.16"
26
+ "@donotdev/billing": "^0.0.17"
27
27
  }
28
28
  },
29
29
  "@donotdev/components": {
30
30
  "description": "UI components package",
31
31
  "packages": {
32
- "@donotdev/components": "^0.0.27"
32
+ "@donotdev/components": "^0.0.28"
33
33
  }
34
34
  },
35
35
  "@donotdev/core": {
36
36
  "description": "Core framework package",
37
37
  "packages": {
38
- "@donotdev/core": "^0.0.37"
38
+ "@donotdev/core": "^0.0.38"
39
39
  }
40
40
  },
41
41
  "@donotdev/crud": {
42
42
  "description": "CRUD operations package",
43
43
  "packages": {
44
- "@donotdev/crud": "^0.0.25"
44
+ "@donotdev/crud": "^0.0.26"
45
45
  }
46
46
  },
47
47
  "@donotdev/firebase": {
48
48
  "description": "Firebase provider package",
49
49
  "packages": {
50
- "@donotdev/firebase": "^0.0.21"
50
+ "@donotdev/firebase": "^0.0.22"
51
51
  }
52
52
  },
53
53
  "@donotdev/functions": {
54
54
  "description": "Firebase Functions package",
55
55
  "packages": {
56
- "@donotdev/functions": "^0.0.19"
56
+ "@donotdev/functions": "^0.0.20"
57
57
  }
58
58
  },
59
59
  "@donotdev/oauth": {
60
60
  "description": "OAuth package",
61
61
  "packages": {
62
- "@donotdev/oauth": "^0.0.16"
62
+ "@donotdev/oauth": "^0.0.17"
63
63
  }
64
64
  },
65
65
  "@donotdev/templates": {
66
66
  "description": "Page templates package",
67
67
  "packages": {
68
- "@donotdev/templates": "^0.0.18"
68
+ "@donotdev/templates": "^0.0.19"
69
69
  }
70
70
  },
71
71
  "@donotdev/ui": {
72
72
  "description": "UI and routing package",
73
73
  "packages": {
74
- "@donotdev/ui": "^0.0.24"
74
+ "@donotdev/ui": "^0.0.25"
75
75
  }
76
76
  },
77
77
  "@donotdev/expo": {
78
78
  "description": "Expo/React Native components package",
79
79
  "packages": {
80
- "@donotdev/expo": "^0.0.10"
80
+ "@donotdev/expo": "^0.0.11"
81
81
  }
82
82
  },
83
83
  "@donotdev/supabase": {
84
84
  "description": "Supabase provider package",
85
85
  "packages": {
86
- "@donotdev/supabase": "^0.0.10"
86
+ "@donotdev/supabase": "^0.0.12"
87
87
  }
88
88
  },
89
89
  "supabase-js": {
@@ -424,7 +424,7 @@
424
424
  "@donotdev/cli": {
425
425
  "description": "Cli package",
426
426
  "packages": {
427
- "@donotdev/cli": "^0.0.29"
427
+ "@donotdev/cli": "^0.0.30"
428
428
  }
429
429
  },
430
430
  "@donotdev/mcp-server": {
@@ -456,7 +456,7 @@
456
456
  "@donotdev/security": {
457
457
  "description": "Security package",
458
458
  "packages": {
459
- "@donotdev/security": "^0.0.10"
459
+ "@donotdev/security": "^0.0.11"
460
460
  }
461
461
  },
462
462
  "xterm": {
@@ -732,7 +732,6 @@
732
732
  "dependencies": [
733
733
  "@donotdev/components",
734
734
  "@donotdev/core",
735
- "@donotdev/crud",
736
735
  "@donotdev/ui",
737
736
  "forms",
738
737
  "forms-resolvers",
@@ -742,6 +741,7 @@
742
741
  "react",
743
742
  "@donotdev/auth",
744
743
  "@donotdev/billing",
744
+ "@donotdev/crud",
745
745
  "@donotdev/oauth",
746
746
  "validation",
747
747
  "lucide-react"
@@ -753,6 +753,9 @@
753
753
  "@donotdev/billing": {
754
754
  "optional": true
755
755
  },
756
+ "@donotdev/crud": {
757
+ "optional": true
758
+ },
756
759
  "@donotdev/oauth": {
757
760
  "optional": true
758
761
  }
package/dist/bin/dndev.js CHANGED
@@ -950,7 +950,7 @@ function registerCommand(program2, def, action) {
950
950
  }
951
951
 
952
952
  // packages/cli/src/bin/dndev.mjs
953
- var CLI_VERSION = true ? "0.0.29" : "0.0.0";
953
+ var CLI_VERSION = true ? "0.0.30" : "0.0.0";
954
954
  var args = process.argv.slice(2);
955
955
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
956
956
  console.log(CLI_VERSION);
@@ -950,7 +950,7 @@ function registerCommand(program2, def, action) {
950
950
  }
951
951
 
952
952
  // packages/cli/src/bin/dndev.mjs
953
- var CLI_VERSION = true ? "0.0.29" : "0.0.0";
953
+ var CLI_VERSION = true ? "0.0.30" : "0.0.0";
954
954
  var args = process.argv.slice(2);
955
955
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
956
956
  console.log(CLI_VERSION);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/cli",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "Command-line interface for DoNotDev Framework",
5
5
  "type": "module",
6
6
  "private": false,
@@ -6,6 +6,7 @@ import { configureProviders } from '@donotdev/core';
6
6
  import {
7
7
  createClient,
8
8
  SupabaseAuth,
9
+ SupabaseCallableProvider,
9
10
  SupabaseCrudAdapter,
10
11
  SupabaseStorageAdapter,
11
12
  } from '@donotdev/supabase';
@@ -30,5 +31,6 @@ if (!url || !publicKey) {
30
31
  crud: new SupabaseCrudAdapter(supabase),
31
32
  auth: new SupabaseAuth(supabase),
32
33
  storage: new SupabaseStorageAdapter(supabase),
34
+ callable: new SupabaseCallableProvider(supabase),
33
35
  });
34
36
  }
@@ -6,6 +6,7 @@ import { configureProviders } from '@donotdev/core';
6
6
  import {
7
7
  createClient,
8
8
  SupabaseAuth,
9
+ SupabaseCallableProvider,
9
10
  SupabaseCrudAdapter,
10
11
  SupabaseStorageAdapter,
11
12
  } from '@donotdev/supabase';
@@ -28,5 +29,6 @@ if (!url || !publicKey) {
28
29
  crud: new SupabaseCrudAdapter(supabase),
29
30
  auth: new SupabaseAuth(supabase),
30
31
  storage: new SupabaseStorageAdapter(supabase),
32
+ callable: new SupabaseCallableProvider(supabase),
31
33
  });
32
34
  }
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: brainstorm
3
+ description: Extract requirements and generate complete HLD through interactive conversation. First step in the WAI-WAY workflow.
4
+ argument-hint: [app idea or requirement]
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Brainstorm — Requirements Extraction
9
+
10
+ **WORKFLOW:** `/brainstorm` → `/design` → `/build` → `/polish`
11
+
12
+ ## Step 0 — Start Phase (MANDATORY)
13
+
14
+ ```
15
+ start_phase(0)
16
+ ```
17
+ Do NOT proceed without this call.
18
+
19
+ ## Step 1 — Extract
20
+
21
+ **Input:** $ARGUMENTS
22
+
23
+ Ask probing questions **one at a time**. Use MCP to discover framework capabilities.
24
+
25
+ | Extract | Questions |
26
+ |---------|-----------|
27
+ | **Vision** | What is this app? Who uses it? |
28
+ | **Users** | Roles? Permissions? |
29
+ | **Entities** | What "things" exist? Fields? Relations? |
30
+ | **Features** | What can users DO? MVP vs V2? |
31
+ | **Pages** | Screens? Routes? Access levels? |
32
+ | **Constraints** | Platform? Languages? Auth? Integrations? |
33
+ | **Native vs Custom** | What uses framework defaults? What needs custom? |
34
+
35
+ Rules:
36
+ - One question at a time — wait for answer
37
+ - Probe vague answers: "What does 'manage' mean?"
38
+ - Challenge scope: "What's the minimum to launch?"
39
+ - Summarize progress every 3-4 exchanges
40
+ - Never guess — ask
41
+
42
+ ## Step 2 — Generate HLD
43
+
44
+ When all targets extracted, write to `docs/HLD.md` with: Vision, Users, Entities (fields + types + access), Features (MVP/V2), Pages (routes + access), Constraints, Native vs Custom, Open Questions.
45
+
46
+ **Validation before completing:**
47
+ - [ ] No empty sections or TBDs
48
+ - [ ] All entities have fields, states, permissions
49
+ - [ ] All business rules documented
50
+ - [ ] User has validated
51
+
52
+ ## Step 3 — Complete Phase
53
+
54
+ ```
55
+ complete_phase({ files: ["docs/HLD.md"], summary: "HLD complete — N entities, N pages, N features" })
56
+ ```
57
+
58
+ Wait for user `approve_phase()` → then proceed to `/design`.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: build
3
+ description: Implement features using framework defaults. Use AFTER /design. Activates WAI-WAY Phase 3 COMPOSE.
4
+ argument-hint: [requirement or LLD reference]
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Build — Compose the App
9
+
10
+ **WORKFLOW:** `/brainstorm` → `/design` → `/build` → `/polish`
11
+
12
+ ## Step 0 — Start Phase (MANDATORY)
13
+
14
+ ```
15
+ start_phase(3)
16
+ ```
17
+ Do NOT write code without this call.
18
+
19
+ ## Step 1 — Prepare
20
+
21
+ **Input:** $ARGUMENTS (LLD from `/design` or direct requirement)
22
+
23
+ 1. Read LLD if it exists
24
+ 2. **STOP before every `@donotdev` import** → call `lookup_symbol({ symbol: "Name" })`. No exceptions. Do NOT guess props, hooks, or APIs.
25
+ 3. Import convention: always `@donotdev/<package>` — never sub-paths. Only exceptions: `@donotdev/core/server`, `@donotdev/core/vite`, `@donotdev/core/next`, `@donotdev/core/functions`.
26
+
27
+ ## Step 2 — Build in phases
28
+
29
+ 1. **Entities** — create entity files
30
+ 2. **Routes** — create route config
31
+ 3. **Auth** — if needed
32
+ 4. **Pages** — using framework defaults only (no styling, no customization)
33
+ 5. **Custom components** — if any
34
+ 6. **Integration** — wire everything together
35
+
36
+ Rules:
37
+ - Framework defaults ONLY — styling deferred to `/polish`
38
+ - Hardcode all strings — i18n deferred to `/polish`
39
+ - Run `dndev tc` after every file change — fix errors immediately
40
+ - Validate each phase before proceeding
41
+
42
+ ## Step 3 — Complete Phase
43
+
44
+ When all pages built and `dndev tc` passes:
45
+
46
+ ```
47
+ complete_phase({ files: ["src/pages/...all files..."], summary: "N pages composed, all type-checking" })
48
+ ```
49
+
50
+ Wait for user `approve_phase()` → then proceed to `/polish`.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: design
3
+ description: Architecture and design workflow. Creates technical plan / LLD. Use BEFORE /build, AFTER /brainstorm. Activates WAI-WAY Phase 1-2.
4
+ argument-hint: [requirement or question]
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Design — Architecture & Planning
9
+
10
+ **WORKFLOW:** `/brainstorm` → `/design` → `/build` → `/polish`
11
+
12
+ ## Step 0 — Start Phase (MANDATORY)
13
+
14
+ ```
15
+ start_phase(1) # SCAFFOLD (routes, page stubs)
16
+ start_phase(2) # ENTITIES (data models, fields, access)
17
+ ```
18
+ Pick the appropriate phase. Do NOT proceed without this call.
19
+
20
+ ## Step 1 — Analyze
21
+
22
+ **Input:** $ARGUMENTS
23
+
24
+ 1. Read constraints from `CLAUDE.md` and framework docs
25
+ 2. Search codebase for existing patterns
26
+ 3. **Always `lookup_symbol`** when referencing @donotdev components — verify API exists before planning
27
+ 4. Import convention: always `@donotdev/<package>` top-level, never sub-paths
28
+
29
+ ## Step 2 — Design
30
+
31
+ Produce a design document. For the output template, see [output-template.md](output-template.md).
32
+
33
+ Rules:
34
+ - **NEVER write code** — only design and plan
35
+ - **ALWAYS analyze existing patterns** — don't reinvent
36
+ - **ALWAYS consider trade-offs** — no solution is perfect
37
+ - **ALWAYS identify impacts** — what breaks if we change this?
38
+ - **ALWAYS prepare for /build** — design must be actionable
39
+
40
+ ## Step 3 — Complete Phase
41
+
42
+ ```
43
+ complete_phase({ files: ["...affected files..."], summary: "Description of what was designed" })
44
+ ```
45
+
46
+ Wait for user `approve_phase()` → then proceed to `/build`.
@@ -0,0 +1,35 @@
1
+ # Design Document Template
2
+
3
+ Use this format for `/design` output:
4
+
5
+ ```
6
+ DESIGN DOCUMENT:
7
+
8
+ REQUIREMENT:
9
+ [Clear statement of what needs to be designed]
10
+
11
+ ANALYSIS:
12
+ - Current state: [what exists]
13
+ - Problem: [what needs solving]
14
+ - Constraints: [framework rules, patterns, etc.]
15
+
16
+ DESIGN:
17
+ [Architecture/solution design]
18
+
19
+ TRADE-OFFS:
20
+ - Option A: [pros/cons]
21
+ - Option B: [pros/cons]
22
+ - Recommendation: [which and why]
23
+
24
+ IMPLEMENTATION PLAN:
25
+ - Files to create/modify: [list]
26
+ - Changes needed: [detailed breakdown]
27
+ - Dependencies: [what depends on this]
28
+ - Testing: [how to validate]
29
+
30
+ READY FOR /build:
31
+ [Summary of what will be built]
32
+
33
+ UNRESOLVED:
34
+ - [Any open questions]
35
+ ```
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: grill
3
+ description: Critical staff-engineer code review — flags problems before shipping. Blocking review with high-signal findings only.
4
+ disable-model-invocation: true
5
+ argument-hint: [files, areas, or "full"]
6
+ ---
7
+
8
+ **Phase gate: only use after Phase 3 (COMPOSE) is complete.**
9
+
10
+ Skeptical staff engineer doing a blocking code review. Find things that will **break, lose data, or mislead**.
11
+
12
+ ## Step 0 — Situational Awareness
13
+
14
+ 1. Read `.dndev/grill-report.json` — last run's SHA, target, items
15
+ 2. Read `.dndev/grill-ignore.json` — accepted deviations (SSOT for exclusions)
16
+ 3. Check current `git rev-parse --short HEAD`
17
+
18
+ **No-op:** Same perimeter + same SHA as last run → skip. Nothing changed.
19
+
20
+ **If `$ARGUMENTS` provided** — use as perimeter.
21
+ **If empty** — check what changed since last grill. Propose and proceed unless ambiguous.
22
+
23
+ ## Step 1 — Archive
24
+
25
+ If `.dndev/grill-report.json` has resolved items (`fixed`, `resolved`, `rejected`):
26
+ - Archive to `.dndev/grill-history.json`
27
+ - Keep surviving items for merge
28
+
29
+ ## Step 2 — Scan
30
+
31
+ Review target files for:
32
+ - **BLOCKER** — breaks in production, loses data, security issues, breaking API changes
33
+ - **WARN** — real problems users will hit (missing edge cases, misleading dead code)
34
+ - **NOTE** — sparingly, genuine gotchas only
35
+
36
+ What NOT to flag:
37
+ - Optimization suggestions, style, formatting
38
+ - Hypothetical edge cases against TypeScript types
39
+ - Dev-only code, harmless dead code
40
+ - Over-engineering suggestions
41
+
42
+ **Self-test:** "Would I block a PR for this?" No → skip.
43
+
44
+ Also check: @donotdev component usage without `lookup_symbol` verification.
45
+
46
+ ## Step 3 — Filter + Write
47
+
48
+ 1. Filter out `grill-ignore.json` matches (fuzzy on issue text)
49
+ 2. Deduplicate against carried items
50
+ 3. Merge and write to `.dndev/grill-report.json`:
51
+
52
+ ```json
53
+ {
54
+ "generated": "<ISO>",
55
+ "gitSha": "<short HEAD>",
56
+ "target": "<what was reviewed>",
57
+ "verdict": "SHIP | DO NOT SHIP",
58
+ "items": [{ "id": 1, "severity": "...", "file": "...", "line": 0, "issue": "...", "category": "...", "status": "pending", "verified": true }]
59
+ }
60
+ ```
61
+
62
+ If any blocker → DO NOT SHIP.
63
+
64
+ ## Fixing (on demand, not during scan)
65
+
66
+ When asked to fix: apply fix, set `status: "fixed"`, set `lastReviewed`.
67
+
68
+ **Quality > quantity. 15 real issues >>> 60 padded items.**
69
+
70
+ Print: `Cleaned N → history. Carried M. Added K. Total: T.` + verdict.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: polish
3
+ description: Generate tests, database rules, CI/CD, config, fix bugs, i18n (Phase 4). Use AFTER /build when the app works and needs production-readiness.
4
+ argument-hint: [task]
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Polish — Production-Ready
9
+
10
+ **WORKFLOW:** `/brainstorm` → `/design` → `/build` → `/polish`
11
+
12
+ ## Step 0 — Start Phase (MANDATORY)
13
+
14
+ ```
15
+ start_phase(4)
16
+ ```
17
+ Do NOT proceed without this call.
18
+
19
+ ## Step 1 — Read Context
20
+
21
+ - `guides/wai-way/spec_template.md` — validated spec (test plan)
22
+ - `entities/index.ts` — all entity definitions
23
+ - `src/pages/` — all page files
24
+
25
+ ## Steps 2-5 — Parallel-capable
26
+
27
+ These steps are independent. Launch them in parallel when possible:
28
+
29
+ ### Tests
30
+ Call `get_guide("TESTING")` for patterns.
31
+ - Entity tests → `tests/entities/[Entity].test.ts`
32
+ - Page tests → `tests/pages/[Page].test.tsx`
33
+ - Access control → `tests/access/access-rules.test.ts`
34
+
35
+ ### Database Rules
36
+ Auto-detect provider (Firestore or Supabase RLS). Generate rules from entity access definitions.
37
+
38
+ ### CI/CD
39
+ Create `.github/workflows/ci.yml` — type-check → test → build → deploy.
40
+
41
+ ### Config
42
+ - `src/config/app.ts` — APP_NAME, preset, footer
43
+ - `src/config/legal.ts` — company, contacts, jurisdiction
44
+ - `.env` — provider config, license key
45
+
46
+ ## Step 6 — Validate
47
+
48
+ ```bash
49
+ bun test
50
+ ```
51
+ All tests must pass. Fix failures.
52
+
53
+ ## Step 7 — Mobile Check
54
+
55
+ DevTools → 375px → navigation, forms, text, buttons (44px min).
56
+
57
+ ## Step 8 — i18n (Optional)
58
+
59
+ Extract strings to `src/locales/`, replace with `useTranslation()`.
60
+
61
+ ## Ship Readiness
62
+
63
+ - `dndev tc` passes
64
+ - `bun test` passes
65
+ - Database rules generated
66
+ - CI/CD created
67
+ - No critical bugs
68
+ - Mobile works at 375px
69
+
70
+ ## Complete Phase
71
+
72
+ ```
73
+ complete_phase({ files: ["...all test/config files..."], summary: "Tests passing, config complete, ready to ship" })
74
+ ```
75
+
76
+ Wait for user `approve_phase()`. Then → `dndev deploy`.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: techdebt
3
+ description: End-of-session tech debt sweep. Scans modified files for duplicates, dead exports, missing JSDoc, broken imports, unused deps. Reports only, does NOT fix.
4
+ disable-model-invocation: true
5
+ argument-hint: [files/areas or blank for session diff]
6
+ ---
7
+
8
+ **Phase gate: only use after Phase 3 (COMPOSE) is complete.**
9
+
10
+ Scan for tech debt — the slow rot that `/grill` doesn't catch.
11
+
12
+ ## What to scan
13
+
14
+ **If `$ARGUMENTS` provided** — scan those files/areas.
15
+ **If empty** — check git diff for files modified in this session, group by area.
16
+
17
+ ## What to check
18
+
19
+ - Duplicate logic (same pattern in 2+ places)
20
+ - Dead exports (exported symbols with no consumers)
21
+ - Missing JSDoc on public API functions/types
22
+ - Broken imports (type-only used as values, circular deps)
23
+ - Unused dependencies in package.json vs actual imports
24
+ - Hardcoded strings that should be in config or i18n
25
+
26
+ ## What NOT to check
27
+
28
+ - Security (that's `/grill`)
29
+ - Style / formatting
30
+ - node_modules, dist, .d.ts
31
+ - Items in `.dndev/implementation.md` as known TODOs
32
+
33
+ ## Output
34
+
35
+ ```
36
+ ## <area>
37
+ - [HIGH] <description> — <file>:<line>
38
+ - [MED] <description> — <file>:<line>
39
+ - [LOW] <description> — <file>:<line>
40
+ ```
41
+
42
+ Summary: `N items across M areas (H high, M med, L low)`
43
+
44
+ Rules:
45
+ - DO NOT fix anything. Report only.
46
+ - Quality > quantity. 10 real items >>> 40 noise.