@xhulz/nina 0.30.0 → 0.32.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/README.md +5 -4
- package/bin/nina.mjs +4 -0
- package/package.json +2 -1
- package/releases/0.31.0/core/GAPS.md +125 -0
- package/releases/0.31.0/core/answered.json +29 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/architect.md +1 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/dba.md +3 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/devops.md +1 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/implementer.md +1 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/integration-tester.md +3 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/qa.md +2 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/reviewer.md +3 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/secops.md +3 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/solidity-auditor.md +3 -0
- package/releases/0.31.0/core/defaults/tree/.claude/agents/solidity-dev.md +3 -0
- package/releases/0.31.0/core/tree/.claude/agents/architect.md +126 -0
- package/releases/0.31.0/core/tree/.claude/agents/dba.md +110 -0
- package/releases/0.31.0/core/tree/.claude/agents/devops.md +114 -0
- package/releases/0.31.0/core/tree/.claude/agents/implementer.md +155 -0
- package/releases/0.31.0/core/tree/.claude/agents/integration-tester.md +168 -0
- package/releases/0.31.0/core/tree/.claude/agents/planner.md +132 -0
- package/releases/0.31.0/core/tree/.claude/agents/qa.md +148 -0
- package/releases/0.31.0/core/tree/.claude/agents/reviewer.md +183 -0
- package/releases/0.31.0/core/tree/.claude/agents/secops.md +121 -0
- package/releases/0.31.0/core/tree/.claude/agents/solidity-auditor.md +126 -0
- package/releases/0.31.0/core/tree/.claude/agents/solidity-dev.md +123 -0
- package/releases/0.31.0/core/tree/.claude/agents-overview.md +64 -0
- package/releases/0.31.0/core/tree/.claude/frontend.md +10 -0
- package/releases/0.31.0/core/tree/.claude/graph.md +75 -0
- package/releases/0.31.0/core/tree/.claude/patterns.md +213 -0
- package/releases/0.31.0/core/tree/.claude/pills/README.md +145 -0
- package/releases/0.31.0/core/tree/.claude/pipeline.md +101 -0
- package/releases/0.31.0/core/tree/.claude/retrieval.md +103 -0
- package/releases/0.31.0/core/tree/.claude/router.md +195 -0
- package/releases/0.31.0/core/tree/.claude/templates/integration.md +45 -0
- package/releases/0.31.0/core/tree/CLAUDE.md +160 -0
- package/releases/0.31.0/core/tree/scripts/edit-guard.mjs +16 -0
- package/releases/0.31.0/core/tree/scripts/harness-check.mjs +71 -0
- package/releases/0.31.0/core/tree/scripts/loop-gate.mjs +19 -0
- package/releases/0.31.0/core/vocabulary.json +12 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/agents/architect.md +5 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/agents/devops.md +5 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/agents/reviewer.md +5 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/agents/solidity-auditor.md +18 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/agents/solidity-dev.md +16 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/agents-overview.md +6 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/graph.md +11 -0
- package/releases/0.31.0/surfaces/blockchain/tree/.claude/router.md +6 -0
- package/releases/0.31.0/surfaces/blockchain/tree/CLAUDE.md +12 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/architect.md +5 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/dba.md +50 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/devops.md +5 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/implementer.md +2 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/integration-tester.md +10 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/planner.md +2 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/reviewer.md +22 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents/secops.md +2 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/agents-overview.md +5 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/graph.md +8 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/patterns.md +19 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/pipeline.md +13 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/retrieval.md +5 -0
- package/releases/0.31.0/surfaces/db/tree/.claude/router.md +4 -0
- package/releases/0.31.0/surfaces/db/tree/CLAUDE.md +17 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/architect.md +14 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/dba.md +2 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/devops.md +32 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/implementer.md +14 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/integration-tester.md +11 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/qa.md +3 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/reviewer.md +8 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/agents/secops.md +8 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/patterns.md +17 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/.claude/retrieval.md +8 -0
- package/releases/0.31.0/surfaces/edge-cf/tree/CLAUDE.md +27 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/agents/architect.md +20 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/agents/devops.md +28 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/agents/implementer.md +25 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/agents/qa.md +17 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/agents/reviewer.md +56 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/patterns.md +8 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/retrieval.md +2 -0
- package/releases/0.31.0/surfaces/frontend/tree/.claude/router.md +14 -0
- package/releases/0.31.0/surfaces/frontend/tree/CLAUDE.md +5 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents/architect.md +16 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents/implementer.md +12 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents/integration-tester.md +20 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents/planner.md +2 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents/reviewer.md +21 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents/secops.md +2 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/agents-overview.md +8 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/graph.md +10 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/patterns.md +38 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/pipeline.md +16 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/retrieval.md +16 -0
- package/releases/0.31.0/surfaces/integrations/tree/.claude/router.md +6 -0
- package/releases/0.31.0/surfaces/integrations/tree/CLAUDE.md +17 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/architect.md +12 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/dba.md +14 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/implementer.md +11 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/integration-tester.md +3 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/reviewer.md +23 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/secops.md +5 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/solidity-auditor.md +4 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/agents/solidity-dev.md +4 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/graph.md +2 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/patterns.md +49 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/pipeline.md +2 -0
- package/releases/0.31.0/surfaces/money/tree/.claude/retrieval.md +2 -0
- package/releases/0.31.0/surfaces/money/tree/CLAUDE.md +11 -0
- package/releases/0.31.0/surfaces/pii/tree/.claude/agents/dba.md +2 -0
- package/releases/0.31.0/surfaces/pii/tree/.claude/agents/devops.md +8 -0
- package/releases/0.31.0/surfaces/pii/tree/.claude/agents/reviewer.md +8 -0
- package/releases/0.31.0/surfaces/pii/tree/.claude/agents/secops.md +2 -0
- package/releases/0.31.0/surfaces/pii/tree/.claude/agents/solidity-auditor.md +5 -0
- package/releases/0.31.0/surfaces/pii/tree/CLAUDE.md +5 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/agents/architect.md +2 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/agents/dba.md +39 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/agents/devops.md +11 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/agents/implementer.md +2 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/agents/integration-tester.md +2 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/agents/reviewer.md +2 -0
- package/releases/0.31.0/surfaces/prisma/tree/.claude/patterns.md +15 -0
- package/releases/0.31.0/surfaces/prisma/tree/CLAUDE.md +5 -0
- package/releases/0.32.0/core/GAPS.md +125 -0
- package/releases/0.32.0/core/answered.json +29 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/architect.md +1 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/dba.md +3 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/devops.md +1 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/implementer.md +1 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/integration-tester.md +3 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/qa.md +2 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/reviewer.md +3 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/secops.md +3 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/solidity-auditor.md +3 -0
- package/releases/0.32.0/core/defaults/tree/.claude/agents/solidity-dev.md +3 -0
- package/releases/0.32.0/core/tree/.claude/agents/architect.md +126 -0
- package/releases/0.32.0/core/tree/.claude/agents/dba.md +110 -0
- package/releases/0.32.0/core/tree/.claude/agents/devops.md +114 -0
- package/releases/0.32.0/core/tree/.claude/agents/implementer.md +155 -0
- package/releases/0.32.0/core/tree/.claude/agents/integration-tester.md +168 -0
- package/releases/0.32.0/core/tree/.claude/agents/planner.md +132 -0
- package/releases/0.32.0/core/tree/.claude/agents/qa.md +148 -0
- package/releases/0.32.0/core/tree/.claude/agents/reviewer.md +183 -0
- package/releases/0.32.0/core/tree/.claude/agents/secops.md +121 -0
- package/releases/0.32.0/core/tree/.claude/agents/solidity-auditor.md +126 -0
- package/releases/0.32.0/core/tree/.claude/agents/solidity-dev.md +123 -0
- package/releases/0.32.0/core/tree/.claude/agents-overview.md +64 -0
- package/releases/0.32.0/core/tree/.claude/frontend.md +10 -0
- package/releases/0.32.0/core/tree/.claude/graph.md +75 -0
- package/releases/0.32.0/core/tree/.claude/patterns.md +213 -0
- package/releases/0.32.0/core/tree/.claude/pills/README.md +146 -0
- package/releases/0.32.0/core/tree/.claude/pipeline.md +101 -0
- package/releases/0.32.0/core/tree/.claude/retrieval.md +103 -0
- package/releases/0.32.0/core/tree/.claude/router.md +195 -0
- package/releases/0.32.0/core/tree/.claude/templates/integration.md +45 -0
- package/releases/0.32.0/core/tree/CLAUDE.md +160 -0
- package/releases/0.32.0/core/tree/scripts/cost-watch.mjs +18 -0
- package/releases/0.32.0/core/tree/scripts/edit-guard.mjs +16 -0
- package/releases/0.32.0/core/tree/scripts/harness-check.mjs +71 -0
- package/releases/0.32.0/core/tree/scripts/loop-gate.mjs +19 -0
- package/releases/0.32.0/core/vocabulary.json +13 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/agents/architect.md +5 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/agents/devops.md +5 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/agents/reviewer.md +5 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/agents/solidity-auditor.md +18 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/agents/solidity-dev.md +16 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/agents-overview.md +6 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/graph.md +11 -0
- package/releases/0.32.0/surfaces/blockchain/tree/.claude/router.md +6 -0
- package/releases/0.32.0/surfaces/blockchain/tree/CLAUDE.md +12 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/architect.md +5 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/dba.md +50 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/devops.md +5 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/implementer.md +2 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/integration-tester.md +10 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/planner.md +2 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/reviewer.md +22 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents/secops.md +2 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/agents-overview.md +5 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/graph.md +8 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/patterns.md +19 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/pipeline.md +13 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/retrieval.md +5 -0
- package/releases/0.32.0/surfaces/db/tree/.claude/router.md +4 -0
- package/releases/0.32.0/surfaces/db/tree/CLAUDE.md +17 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/architect.md +14 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/dba.md +2 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/devops.md +32 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/implementer.md +14 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/integration-tester.md +11 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/qa.md +3 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/reviewer.md +8 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/agents/secops.md +8 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/patterns.md +17 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/.claude/retrieval.md +8 -0
- package/releases/0.32.0/surfaces/edge-cf/tree/CLAUDE.md +27 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/agents/architect.md +20 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/agents/devops.md +28 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/agents/implementer.md +25 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/agents/qa.md +17 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/agents/reviewer.md +56 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/patterns.md +8 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/retrieval.md +2 -0
- package/releases/0.32.0/surfaces/frontend/tree/.claude/router.md +14 -0
- package/releases/0.32.0/surfaces/frontend/tree/CLAUDE.md +5 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents/architect.md +16 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents/implementer.md +12 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents/integration-tester.md +20 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents/planner.md +2 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents/reviewer.md +21 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents/secops.md +2 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/agents-overview.md +8 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/graph.md +10 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/patterns.md +38 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/pipeline.md +16 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/retrieval.md +16 -0
- package/releases/0.32.0/surfaces/integrations/tree/.claude/router.md +6 -0
- package/releases/0.32.0/surfaces/integrations/tree/CLAUDE.md +17 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/architect.md +12 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/dba.md +14 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/implementer.md +11 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/integration-tester.md +3 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/reviewer.md +23 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/secops.md +5 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/solidity-auditor.md +4 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/agents/solidity-dev.md +4 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/graph.md +2 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/patterns.md +49 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/pipeline.md +2 -0
- package/releases/0.32.0/surfaces/money/tree/.claude/retrieval.md +2 -0
- package/releases/0.32.0/surfaces/money/tree/CLAUDE.md +11 -0
- package/releases/0.32.0/surfaces/pii/tree/.claude/agents/dba.md +2 -0
- package/releases/0.32.0/surfaces/pii/tree/.claude/agents/devops.md +8 -0
- package/releases/0.32.0/surfaces/pii/tree/.claude/agents/reviewer.md +8 -0
- package/releases/0.32.0/surfaces/pii/tree/.claude/agents/secops.md +2 -0
- package/releases/0.32.0/surfaces/pii/tree/.claude/agents/solidity-auditor.md +5 -0
- package/releases/0.32.0/surfaces/pii/tree/CLAUDE.md +5 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/agents/architect.md +2 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/agents/dba.md +39 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/agents/devops.md +11 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/agents/implementer.md +2 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/agents/integration-tester.md +2 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/agents/reviewer.md +2 -0
- package/releases/0.32.0/surfaces/prisma/tree/.claude/patterns.md +15 -0
- package/releases/0.32.0/surfaces/prisma/tree/CLAUDE.md +5 -0
- package/src/commands/check.mjs +38 -6
- package/src/commands/compose.mjs +5 -0
- package/src/commands/init.mjs +11 -12
- package/src/commands/learn.mjs +27 -7
- package/src/commands/pills.mjs +54 -2
- package/src/commands/runs.mjs +124 -0
- package/src/commands/snapshot.mjs +80 -30
- package/src/commands/stats.mjs +35 -21
- package/src/commands/status.mjs +150 -0
- package/src/commands/upgrade.mjs +21 -3
- package/src/cost.mjs +141 -0
- package/src/detectors.mjs +84 -14
- package/src/surfaces.mjs +33 -0
- package/src/wiring.mjs +3 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- nina:slot blockchain.1 -->
|
|
2
|
+
- `solidity-dev` — writes contract code, which cannot be changed once it is live
|
|
3
|
+
- `solidity-auditor` — gate: audits contract code as an attacker before anything deploys
|
|
4
|
+
|
|
5
|
+
<!-- nina:slot blockchain.2 -->
|
|
6
|
+
- `architect` → `solidity-dev` on `SPEC-READY` — the spec changes contract code
|
|
7
|
+
- `solidity-dev` → `solidity-auditor` on `DIFF-READY`
|
|
8
|
+
- `solidity-dev` → `architect` on `BLOCKED` — the change cannot be made safely as specified · max 2
|
|
9
|
+
- `solidity-auditor` → `reviewer` on `APPROVED`
|
|
10
|
+
- `solidity-auditor` → `solidity-dev` on `REJECTED` — a flaw in the contract code · max 2
|
|
11
|
+
- `solidity-auditor` → `architect` on `REJECTED` — a flaw in the design · max 2
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!-- nina:slot blockchain.1 -->
|
|
2
|
+
|
|
3
|
+
### Solidity-auditor is a guardrail for contract changes
|
|
4
|
+
Invoke **solidity-auditor** on any diff that touches `{{CONTRACTS_DIR}}`, a deploy script, or the version of a contracts library — regardless of where you are in the pipeline. No contract change merges without its approval, and none deploys without it. Reviewer verifies it ran; devops verifies it approved.
|
|
5
|
+
|
|
6
|
+
Contract sources are written by **solidity-dev**, not the implementer. Route the work there when the spec's file list reaches `{{CONTRACTS_DIR}}`, and keep the implementer on the off-chain side of the same feature.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- nina:slot blockchain.1 -->
|
|
2
|
+
16. **Every contract change goes through the solidity-auditor gate, and deployed code is never patched in place.** A diff touching a contract source, a deploy script, or the version of a contracts library does not reach the reviewer without `VERDICT: APPROVED` from **solidity-auditor**, and does not reach any network without it. Contract sources are written by **solidity-dev**, not by the implementer — the implementer's rules assume a defect is a patch away, and here it is a redeploy or a proxy upgrade at best. Private keys, mnemonics and funded accounts never enter the repository in any form, test fixtures included.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot blockchain.2 -->
|
|
5
|
+
| **ANY step touching a contract, a deploy script, or a contracts library version** | **architect → solidity-dev → solidity-auditor → reviewer → qa** — the auditor is mandatory and blocks the reviewer |
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot blockchain.3 -->
|
|
8
|
+
- **solidity-dev** → write contract sources and their adversarial tests strictly to spec; never deploys, never widens access control to make a test pass
|
|
9
|
+
- **solidity-auditor** → **mandatory gate** on any contract diff; `APPROVED` required before reviewer and before any deploy
|
|
10
|
+
|
|
11
|
+
<!-- nina:slot blockchain.4 -->
|
|
12
|
+
- **contract code**: a contract source, a deploy script, or the version of a contracts library
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- nina:slot db.2 -->
|
|
2
|
+
- **Tenant-scope impact** — state where `{{TENANT_KEY}}` is enforced. Every new query in app code filters by it, or reaches it through the model's foreign keys; only the auth library's own tables are exempt.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.3 -->
|
|
5
|
+
- **Database flag** — if the schema or a new query is touched, mark **"DBA REQUIRED"** prominently at the top of the spec, and name each new read's cache policy, or **`NO_CACHE`** for a read that feeds a write whose correctness depends on it being fresh — a stale row contaminates every decision made from it.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- nina:slot db.3 -->
|
|
2
|
+
- Any change to the schema.
|
|
3
|
+
- Any new query, or change to one, anywhere in application code.
|
|
4
|
+
- Any migration.
|
|
5
|
+
|
|
6
|
+
<!-- nina:slot db.4 -->
|
|
7
|
+
- The schema diff, and the migration SQL it generates.
|
|
8
|
+
- The application code that uses the new or modified queries.
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot db.5 -->
|
|
11
|
+
**Read `.claude/code-map.md`** when the change touches new query patterns — it lists which services consume which models, so you can spot N+1 risk and consumer-side cache implications without re-grepping. (Before there is code, fall back to `.claude/architecture.md` § *Database* for the planned schema and its cache policies.)
|
|
12
|
+
|
|
13
|
+
<!-- nina:slot db.6 -->
|
|
14
|
+
- **The schema validates, and you read the migration's SQL** — offline, from files, with the project's own schema tooling. A check that seems to need a database URL is one you report as impossible, not one you run.
|
|
15
|
+
|
|
16
|
+
<!-- nina:slot db.8 -->
|
|
17
|
+
- **Migration safety on large tables:**
|
|
18
|
+
- No `ALTER TABLE ... ADD COLUMN NOT NULL` without a safe default (causes lock + rewrite).
|
|
19
|
+
- No operations that hold long locks without an explicit batched strategy.
|
|
20
|
+
- Non-breaking for rolling deploy — old application code and new schema must coexist during the deploy window.
|
|
21
|
+
|
|
22
|
+
<!-- nina:slot db.9 -->
|
|
23
|
+
- **Index coverage.** Every new query pattern (`WHERE`, `ORDER BY`, `JOIN`, `aggregate`) must be backed by an index declared in the schema. Reject queries that would table-scan. The most-used compound index is `(<tenant>, <other>)` or, for models keyed by a parent entity, `(<parentId>, <other>)`; verify the leading column matches the query.
|
|
24
|
+
|
|
25
|
+
<!-- nina:slot db.10 -->
|
|
26
|
+
- **Tenant scope.** Every query in app code filters by `{{TENANT_KEY}}`, or by the foreign-key chain that resolves back to it. The auth library's own tables are the only exemption. Reject any app query missing the scope.
|
|
27
|
+
|
|
28
|
+
<!-- nina:slot db.11 -->
|
|
29
|
+
- **Cache discipline.** A cached read names its policy explicitly — **an implicit cache is a bug: reject it** — checked against the cache policies in `.claude/architecture.md` § *Database*. A read that feeds a write whose correctness depends on it being fresh is never cached.
|
|
30
|
+
|
|
31
|
+
<!-- nina:slot db.12 -->
|
|
32
|
+
- **N+1 patterns.** If the code fetches a list then queries per item, reject with "fetch the related rows with the list, or batch."
|
|
33
|
+
|
|
34
|
+
<!-- nina:slot db.13 -->
|
|
35
|
+
- **Secrets.** The database's connection string comes from `{{SECRETS_LOCAL}}` locally and `{{SECRETS_PROD}}` in production — never a committed `.env`, never a literal in code.
|
|
36
|
+
|
|
37
|
+
<!-- nina:slot db.14 -->
|
|
38
|
+
- **Run anything that can write to a real database.** You are a read-only gate: against a live database you run read-only queries and nothing else. If a check seems to require writing, it does not — report the limitation to the orchestrator instead.
|
|
39
|
+
|
|
40
|
+
<!-- nina:slot db.15 -->
|
|
41
|
+
- Approve without validating the schema and reading the migration's SQL, offline, as *You MUST check* says.
|
|
42
|
+
|
|
43
|
+
<!-- nina:slot db.16 -->
|
|
44
|
+
- Wave through "small" schema changes. Small changes cause the worst production incidents.
|
|
45
|
+
|
|
46
|
+
<!-- nina:slot db.17 -->
|
|
47
|
+
- Approve a query in app code missing its `{{TENANT_KEY}}` scope, or the foreign key that owns it.
|
|
48
|
+
|
|
49
|
+
<!-- nina:slot db.18 -->
|
|
50
|
+
**Final report format:** ≤300 words if approved. Sections: Schema validation result, Migration SQL preview (verbatim if non-trivial), Index analysis, Tenant-scope check, Cache verdict, Privacy check, Final verdict. If rejected, list each issue with required action — no length cap.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- nina:slot db.2 -->
|
|
2
|
+
- **Migrations, in order, against the right database.** Confirm the target is the database you intend, and that the migration is backward-compatible with the code already deployed, because the two are live together during the rollout.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.5 -->
|
|
5
|
+
- **Migrations:** applied / none, with the database they hit.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- nina:slot db.2 -->
|
|
2
|
+
- A new query on a cached read path — verify the cache's behavior live (dba covers the schema; you cover how the cache behaves at runtime)
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.3 -->
|
|
5
|
+
If a query behaves differently against a real database than the dba's static analysis suggested, escalate to **dba** — do not fix it yourself.
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot db.4 -->
|
|
8
|
+
- **The auth library's backing store is a real database** — the development database, the same
|
|
9
|
+
connection the implementer uses from `{{SECRETS_LOCAL}}`. A suite that is green against an
|
|
10
|
+
in-memory stand-in has not exercised the library, which is the whole point of this stage.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- nina:slot db.2 -->
|
|
2
|
+
- **If the schema, a migration or a query was touched anywhere in the diff: name `dba` on your Gates line.** Its approval is what a database change needs; yours does not stand in for it.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.3 -->
|
|
5
|
+
- Check for **tenant scoping** in every new query in app code: it filters by `{{TENANT_KEY}}`, or reaches it through the model's foreign keys. No "global" queries except the auth library's own tables. Missing scope = `REJECTED`.
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot db.4 -->
|
|
8
|
+
- Check for N+1 queries when the DB layer was touched.
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot db.5 -->
|
|
11
|
+
- **tenant-and-privacy** — `{{TENANT_KEY}}` in every app query (the auth library's own tables are the only exemption);
|
|
12
|
+
no PII or secrets in logs; no cross-tenant read
|
|
13
|
+
or write reachable through a route, an MCP tool, a webhook, or an RPC between services.
|
|
14
|
+
|
|
15
|
+
<!-- nina:slot db.6 -->
|
|
16
|
+
- The schema touched (a migration in play)
|
|
17
|
+
|
|
18
|
+
<!-- nina:slot db.7 -->
|
|
19
|
+
- Leave `dba` off your Gates line on a database change "because it seems fine."
|
|
20
|
+
|
|
21
|
+
<!-- nina:slot db.8 -->
|
|
22
|
+
- Schema or query touched and `dba` not dispatched → name it on your Gates line; the orchestrator sends it.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<!-- nina:slot db.1 -->
|
|
2
|
+
- **AuthZ / tenant isolation (Hard Rule #7)** — EVERY query in app code scopes by `{{TENANT_KEY}}` (or its foreign key). Hunt for any query, route, MCP tool, or queue, webhook or background path where another tenant's data could be read or mutated (IDOR). The auth library's own tables are the only allowed unscoped reads — verify nothing else is.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- nina:slot db.1 -->
|
|
2
|
+
- **DBA guardrail** → the database is the surface where a bad change causes hard-to-reverse damage. Schema mistakes, missing indexes, cache on reads that feed a correctness-critical write, missing tenant scope — all caught here.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.2 -->
|
|
5
|
+
| **dba** | Mandatory gate on schema changes, migrations and new queries | `.claude/agents/dba.md` |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- nina:slot db.1 -->
|
|
2
|
+
- `dba` — gate: runs when the schema, a migration or a query is touched
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.2 -->
|
|
5
|
+
- `implementer` → `dba` on `DIFF-READY` — the diff touches the schema, a migration or a query
|
|
6
|
+
- `dba` → `qa` on `APPROVED` — once the reviewer, and every other gate the diff went to, approved too
|
|
7
|
+
- `dba` → `implementer` on `REJECTED` — a query or schema change in the diff is unsafe · max 2
|
|
8
|
+
- `dba` → `architect` on `REJECTED` — the spec's migration or data design is unsafe · max 2
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- nina:slot db.2 -->
|
|
2
|
+
- Routes must NOT import query functions (`list*`, `find*`, `get*`, `upsert*`, `delete*`) from `{{DB_PKG_NAME}}` — only its client and its error classes.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.4 -->
|
|
5
|
+
- **Every service query filters by `{{TENANT_KEY}}` (tenant scope).** Missing scope = automatic `REJECTED`.
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot db.5 -->
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Database conventions (enforced by the dba subagent)
|
|
12
|
+
|
|
13
|
+
- **A cached read names its policy, and a read that feeds a write whose correctness depends on it being fresh is NEVER cached.** A stale row contaminates the decision made from it. Hard reject in dba review.
|
|
14
|
+
- **Every query in app code filters by `{{TENANT_KEY}}`** (or reaches it through the model's foreign keys). Tenant isolation is in the data layer. The auth library's own tables are the only exemption.
|
|
15
|
+
- Migrations reviewed by **dba** for: non-blocking on large tables, index coverage for new query patterns, backward compatibility during rolling deploy.
|
|
16
|
+
- N+1 queries are a bug.
|
|
17
|
+
|
|
18
|
+
<!-- nina:slot db.6 -->
|
|
19
|
+
- A real database, never a mock of its client.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- nina:slot db.1 -->
|
|
2
|
+
|
|
3
|
+
### DBA (mandatory for the database)
|
|
4
|
+
|
|
5
|
+
- **Trigger:** any schema change, any new query, any migration.
|
|
6
|
+
- **Input:** the schema diff and its migration SQL + the application code using the queries.
|
|
7
|
+
- **Output:** `APPROVED`, or `REJECTED` with specific issues.
|
|
8
|
+
- **Tools:** Read, Grep, Glob, Bash (schema validation, an offline migration diff, query-plan checks).
|
|
9
|
+
- **Checks:** schema validates; migration safe on large tables; index coverage; an explicit policy on every cached read; **no cache on a read that feeds a correctness-critical write**; **tenant scope in every query**; no N+1; no raw PII without encryption; the connection secret comes from the environment, never from code.
|
|
10
|
+
- **Position:** beside the reviewer, when a diff touches the schema, a migration or a query; `qa` waits for its `APPROVED`.
|
|
11
|
+
|
|
12
|
+
<!-- nina:slot db.2 -->
|
|
13
|
+
- **If the schema or a query was touched → dba approved.**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- nina:slot db.1 -->
|
|
2
|
+
| Schema change | `.claude/architecture.md` § *Database*, the schema | implementer → reviewer + **dba** (mandatory) → qa |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.2 -->
|
|
5
|
+
| New query in app code | `.claude/patterns.md` § *Database conventions* | implementer → reviewer + **dba** (mandatory) → qa |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- nina:slot db.3 -->
|
|
2
|
+
| **ANY schema change, migration or new query** | **+ dba beside the reviewer** |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot db.4 -->
|
|
5
|
+
- **dba** → mandatory gate on schema changes, migrations, and new queries
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot db.5 -->
|
|
8
|
+
2. **Every schema change, migration and new query goes through the dba subagent.** No exceptions. It runs beside the reviewer, which names it on its Gates line, and `qa` does not go out without its `APPROVED`.
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot db.6 -->
|
|
11
|
+
6. **A cached read names its cache policy, and a read that feeds a write whose correctness depends on it being fresh is never cached.** An implicit cache is a bug, and a stale row contaminates every decision made from it. A write invalidates what it made stale.
|
|
12
|
+
|
|
13
|
+
<!-- nina:slot db.7 -->
|
|
14
|
+
7. **Tenant isolation is enforced in the data layer.** Every query in app code filters by `{{TENANT_KEY}}`, or reaches it through the model's foreign keys. No "global" queries except the auth library's own tables. Reviewer rejects any query missing the scope.
|
|
15
|
+
|
|
16
|
+
<!-- nina:slot db.8 -->
|
|
17
|
+
- **the database**: the schema, a migration, or a query
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
| `cloudflare:workers-best-practices` | `{{API_DIR}}/**` — routes, services, middleware, queue handlers |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot edge-cf.2 -->
|
|
5
|
+
| `cloudflare:durable-objects` | `{{API_DIR}}/src/do/**` or any DO call site |
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.3 -->
|
|
8
|
+
| `cloudflare:cloudflare` | Queues, R2 or KV |
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot edge-cf.4 -->
|
|
11
|
+
| `cloudflare:wrangler` | `wrangler.toml` or any wrangler command |
|
|
12
|
+
|
|
13
|
+
<!-- nina:slot edge-cf.5 -->
|
|
14
|
+
- **Cloudflare skill flag** — if the spec touches `{{API_DIR}}/**` (routes, services, queue handlers), the per-account Durable Object, Queues, R2/KV, or `wrangler` config, name which `cloudflare:*` plugin skill the implementer must consult (`cloudflare:workers-best-practices`, `cloudflare:durable-objects`, `cloudflare:cloudflare`, `cloudflare:wrangler`), or state why none applies. Retrieval beats recall — the reviewer rejects a spec that touches these surfaces without naming the skill.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
- **`cloudflare:wrangler`** — before running ANY `wrangler` command or reading `wrangler.toml`.
|
|
3
|
+
CLI flags and config fields churn between minor versions; pre-trained knowledge is stale.
|
|
4
|
+
|
|
5
|
+
<!-- nina:slot edge-cf.2 -->
|
|
6
|
+
- **`cloudflare:cloudflare`** — when the deploy touches R2, KV, Queues or Durable Object bindings.
|
|
7
|
+
|
|
8
|
+
<!-- nina:slot edge-cf.3 -->
|
|
9
|
+
- **Both targets, or neither.** A change to the API surface needs the **staging Worker** (`wrangler deploy --env staging`) *and*, where the project has one, the frontend's **Pages** deploy (`{{PAGES_PROJECT}}`). Deploying the frontend alone against an old API is the failure that renders new fields as "—". State explicitly which targets this change requires and why.
|
|
10
|
+
|
|
11
|
+
<!-- nina:slot edge-cf.4 -->
|
|
12
|
+
- **Secret and variable parity.** Everything the new code reads via `env.*` exists in the target environment (`wrangler secret list`). A missing secret fails at request time, not at deploy time.
|
|
13
|
+
|
|
14
|
+
<!-- nina:slot edge-cf.5 -->
|
|
15
|
+
|
|
16
|
+
## Pages: which branch, and why it matters
|
|
17
|
+
|
|
18
|
+
`{{PAGES_PROJECT}}` is a **direct-upload** Pages project whose production branch is `main`. `wrangler pages
|
|
19
|
+
deploy` decides production vs preview purely from `--branch`:
|
|
20
|
+
|
|
21
|
+
- **Staging FE** → `--branch staging`. A preview deployment on its own URL. Production is untouched,
|
|
22
|
+
and this is the FE half of the staging pair with `{{API_STAGING}}`.
|
|
23
|
+
- **Production FE** → `--branch main`. Only with an explicit go from {{OWNER}}, per the rule above.
|
|
24
|
+
|
|
25
|
+
Deploying staging with `--branch=main` is a production deploy wearing a staging label — the
|
|
26
|
+
permission classifier is right to stop it. Use the staging branch and the block disappears, because
|
|
27
|
+
the block was correct.
|
|
28
|
+
|
|
29
|
+
**A variable the bundle reads must be in the environment of the build command.** `[vars]` and
|
|
30
|
+
`[env.*.vars]` in `{{APP_DIR}}/wrangler.toml` do NOT reach the build — a bundler inlines them at build
|
|
31
|
+
time, and Pages vars apply at runtime to a project that has no server. A missing one ships a blank page
|
|
32
|
+
with no error.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
| `cloudflare:workers-best-practices` | anything under `{{API_DIR}}/**` |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot edge-cf.2 -->
|
|
5
|
+
| `cloudflare:durable-objects` | anything under `{{API_DIR}}/src/do/**` or a DO call site |
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.3 -->
|
|
8
|
+
| `cloudflare:cloudflare` | a queue consumer, or R2 / KV access |
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot edge-cf.4 -->
|
|
11
|
+
| `cloudflare:wrangler` | a change to `wrangler.toml` |
|
|
12
|
+
|
|
13
|
+
<!-- nina:slot edge-cf.5 -->
|
|
14
|
+
- Respect Workers conventions: secrets in `{{SECRETS_LOCAL}}` for local dev (never commit), `compatibility_flags = ["nodejs_compat"]` in `wrangler.toml`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
| `cloudflare:durable-objects` | DO lifecycle, alarms, RPC, storage — the API surface drifts fast |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot edge-cf.2 -->
|
|
5
|
+
| `cloudflare:cloudflare` | Queues, R2 or KV bindings |
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.3 -->
|
|
8
|
+
| `cloudflare:wrangler` | anything you run through the wrangler CLI |
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot edge-cf.4 -->
|
|
11
|
+
- Any new Cloudflare binding read/write: R2, KV, Queues, Durable Objects — drive the binding via Miniflare and observe real I/O
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
| `cloudflare:workers-best-practices` | `{{API_DIR}}/**` |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot edge-cf.2 -->
|
|
5
|
+
| `cloudflare:durable-objects` | `{{API_DIR}}/src/do/**` or a DO call site |
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.3 -->
|
|
8
|
+
- `{{API_DIR}}/src/do/`, a queue consumer, or a webhook receiver touched (serialization + idempotency surface)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
- **Secrets & config exposure** — no secrets in committed files, logs, error messages, or generated artifacts (`worker-configuration.d.ts` must contain only types, never values). `{{SECRETS_LOCAL}}`/`.env` gitignored. `wrangler secret`/`[vars]` split correct. No secret echoed in a response or thrown error.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot edge-cf.2 -->
|
|
5
|
+
- **Dependency & binding posture** — obviously risky dependency usage; Cloudflare binding scoping (R2 bucket names, Queue, DO) — nothing over-privileged or world-exposed; `nodejs_compat` and compatibility flags sane.
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.3 -->
|
|
8
|
+
- Prefer retrieval over recall for Cloudflare/{{AUTH_LIB}} specifics: consult the `cloudflare:*` skills and the installed `node_modules` source / `.claude/integrations/*.md` rather than assuming.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Secrets
|
|
6
|
+
|
|
7
|
+
- **Wrangler secrets** for Workers (`{{SECRETS_PROD}} X`). Never `.env` committed.
|
|
8
|
+
- **Local dev:** `{{SECRETS_LOCAL}}` (gitignored).
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot edge-cf.2 -->
|
|
11
|
+
- `compatibility_flags = ["nodejs_compat"]` in `wrangler.toml` is required for a database client that runs at the edge.
|
|
12
|
+
|
|
13
|
+
<!-- nina:slot edge-cf.3 -->
|
|
14
|
+
- **Miniflare** for Worker integration tests.
|
|
15
|
+
|
|
16
|
+
<!-- nina:slot edge-cf.4 -->
|
|
17
|
+
- **Miniflare** for Worker tests — the real Cloudflare runtime, no mocks.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
| New Durable Object behavior | `.claude/architecture.md` § *Durable Objects*, existing `{{API_DIR}}/src/do/` | architect → implementer → reviewer + the integration gate, where there is one → qa |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot edge-cf.2 -->
|
|
5
|
+
| New Queue handler | `.claude/architecture.md` § *Processing pipeline*, `{{API_DIR}}/src/queues/` | architect → implementer → reviewer + the integration gate, where there is one → qa |
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.3 -->
|
|
8
|
+
| Wrangler / deploy / config | `CLAUDE.md` § *Common commands*, `{{API_DIR}}/wrangler.toml`, `.claude/patterns.md` § *Secrets* | implementer → reviewer → qa → devops |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- nina:slot edge-cf.1 -->
|
|
2
|
+
|
|
3
|
+
### Cloudflare plugin skills — USE THEM
|
|
4
|
+
|
|
5
|
+
The `cloudflare@cloudflare` plugin is installed at user scope and exposes skills that retrieve the **current** Cloudflare docs at invocation time. Pre-trained knowledge of Workers / Wrangler / DO / Queues / Cron APIs is stale — prefer the skill over recalling from memory.
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot edge-cf.2 -->
|
|
8
|
+
| Write or review code under `{{API_DIR}}/**` (routes, services, middleware, webhook receivers, queue consumers) | `cloudflare:workers-best-practices` | catches floating promises, global-state misuse, missing `waitUntil`, streaming pitfalls |
|
|
9
|
+
|
|
10
|
+
<!-- nina:slot edge-cf.3 -->
|
|
11
|
+
| Touch `{{API_DIR}}/src/do/**` or any Durable Object call site | `cloudflare:durable-objects` | covers RPC, alarms, WebSocket, SQLite storage, lifecycle — DO API surface drifts fast |
|
|
12
|
+
|
|
13
|
+
<!-- nina:slot edge-cf.4 -->
|
|
14
|
+
| Touch `{{API_DIR}}/src/queues/**`, R2/KV usage | `cloudflare:cloudflare` | Queues, R2, KV decision tree |
|
|
15
|
+
|
|
16
|
+
<!-- nina:slot edge-cf.5 -->
|
|
17
|
+
| Author or modify `wrangler.toml` / `wrangler.jsonc` / run any `wrangler` CLI command | `cloudflare:wrangler` | CLI flags + config fields churn between minor versions |
|
|
18
|
+
|
|
19
|
+
<!-- nina:slot edge-cf.6 -->
|
|
20
|
+
| Run the **devops** deploy stage | `cloudflare:wrangler` (+ `cloudflare:cloudflare` for R2/KV/Queues/DO bindings) | deploy flags and binding config churn between versions |
|
|
21
|
+
|
|
22
|
+
<!-- nina:slot edge-cf.7 -->
|
|
23
|
+
|
|
24
|
+
The plugin's other skills — `cloudflare:agents-sdk`, `cloudflare:sandbox-sdk`, `cloudflare:cloudflare-email-service` — apply only where {{PROJECT}} adopts what they cover: an agent runtime, untrusted code execution, sending mail.
|
|
25
|
+
|
|
26
|
+
<!-- nina:slot edge-cf.8 -->
|
|
27
|
+
10. **Secrets in `{{SECRETS_LOCAL}}` for local dev, `{{SECRETS_PROD}}` for production.** Never `.env` committed. `compatibility_flags = ["nodejs_compat"]` is required in `wrangler.toml` for any database client that runs at the edge.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- nina:slot frontend.1 -->
|
|
2
|
+
| `cloudflare:web-perf` | a page-load performance question in `{{APP_DIR}}` |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot frontend.2 -->
|
|
5
|
+
|
|
6
|
+
## Visual acceptance — required in any spec touching `{{APP_DIR}}/**`
|
|
7
|
+
|
|
8
|
+
A frontend spec that describes only structure produces a diff that only structure can verify, and
|
|
9
|
+
structure is exactly what jsdom checks while being blind to the result. So state, as a short
|
|
10
|
+
checklist, what must be TRUE ON THE SCREEN at **1440** and at **375**:
|
|
11
|
+
|
|
12
|
+
- what is visible, and what must not be
|
|
13
|
+
- what sits beside what, and what wraps or stacks at 375
|
|
14
|
+
- the empty, loading and error states, if the change can produce them
|
|
15
|
+
- anything that must not overflow, clip or overlap
|
|
16
|
+
|
|
17
|
+
Each line must be checkable from a screenshot by someone who did not write the code — the **reviewer**
|
|
18
|
+
checks the render against this list, and rejects on a mismatch. "Follows the design system" is not a
|
|
19
|
+
criterion. A spec that touches `{{APP_DIR}}/**` without this section is incomplete, and the reviewer
|
|
20
|
+
rejects it back to you.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- nina:slot frontend.1 -->
|
|
2
|
+
- Playwright is **not** a skill — it is an MCP server, and its `browser_*` tools are granted to you
|
|
3
|
+
directly in `tools:` above. Use them; there is nothing to invoke via `Skill`.
|
|
4
|
+
|
|
5
|
+
<!-- nina:slot frontend.2 -->
|
|
6
|
+
- **Build-time env.** A bundler inlines the variables the app reads at build time, so one the deploy platform supplies at RUNTIME never reaches the bundle — it is not late, it is absent. Verify every variable the app reads is present in the build environment — a missing one ships a blank page, not an error.
|
|
7
|
+
|
|
8
|
+
<!-- nina:slot frontend.3 -->
|
|
9
|
+
|
|
10
|
+
## Render smoke — for any diff touching `{{APP_DIR}}/**`
|
|
11
|
+
|
|
12
|
+
You are not the visual gate; the **reviewer** is, and it judges the render against the spec before
|
|
13
|
+
the code ever reaches you. Your question is narrower and different: **did the deployed thing come up
|
|
14
|
+
at all?** That is not the same failure — a build that renders perfectly on a reviewer's localhost
|
|
15
|
+
still ships a blank page when the API's address was missing from the deploy build, which is exactly
|
|
16
|
+
what happened here once.
|
|
17
|
+
|
|
18
|
+
So on the preview URL, not localhost: `browser_navigate`, one screenshot at 1440, and
|
|
19
|
+
`browser_console_messages`. You are checking that the page renders and the console is clean — not
|
|
20
|
+
whether the layout is right. A blank page or a console error is `VERDICT: BLOCKED`.
|
|
21
|
+
|
|
22
|
+
<!-- nina:slot frontend.4 -->
|
|
23
|
+
|
|
24
|
+
If the changed path genuinely cannot be smoked without authenticating, do NOT authenticate: say so,
|
|
25
|
+
report what you could verify, and hand the authenticated check to a human.
|
|
26
|
+
|
|
27
|
+
<!-- nina:slot frontend.5 -->
|
|
28
|
+
, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_resize, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_console_messages, mcp__plugin_playwright_playwright__browser_close
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- nina:slot frontend.1 -->
|
|
2
|
+
| `frontend-design:frontend-design` | new UI in `{{APP_DIR}}` — a page or component that did not exist |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot frontend.2 -->
|
|
5
|
+
|
|
6
|
+
## Look at the screen you built
|
|
7
|
+
|
|
8
|
+
When you change anything under `{{APP_DIR}}/**`, open it in the browser before you hand off — the dev
|
|
9
|
+
server or a local build, with `browser_navigate` plus a screenshot at 1440 and 375. Your test suite
|
|
10
|
+
runs in jsdom, which has no layout engine and cannot tell you whether the thing renders.
|
|
11
|
+
|
|
12
|
+
This is a self-check, not a gate: you are the author, and an author reviewing their own work catches
|
|
13
|
+
the obvious and misses the rest. **reviewer** is the gate. The point of doing it here is that the
|
|
14
|
+
obvious defects are cheap to fix now and expensive after review, qa and a deploy.
|
|
15
|
+
|
|
16
|
+
Report what you saw. "Rendered at both widths, matches the spec's Visual acceptance" — or what
|
|
17
|
+
differed.
|
|
18
|
+
|
|
19
|
+
jsdom is also why a component test must assert content, not presence: `toHaveTextContent('4 matched')`,
|
|
20
|
+
not `toBeInTheDocument()` on the badge that shows it, and never `toHaveClass` as proof that something
|
|
21
|
+
looks right — it passes whether or not a pixel landed. A test that pins a removal renders the tab or
|
|
22
|
+
route where the removed thing used to appear; rendering the default one proves nothing about another.
|
|
23
|
+
|
|
24
|
+
<!-- nina:slot frontend.3 -->
|
|
25
|
+
, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_resize, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_console_messages, mcp__plugin_playwright_playwright__browser_close
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- nina:slot frontend.1 -->
|
|
2
|
+
|
|
3
|
+
## What your green does not mean
|
|
4
|
+
|
|
5
|
+
Your suite runs in jsdom, which has **no layout engine**. `toHaveClass('flex')` passes whether or not
|
|
6
|
+
anything was laid out; nothing you run can tell you the screen is right. When you report PASS on a
|
|
7
|
+
diff touching `{{APP_DIR}}/**`, say so — the rendering is checked by the **reviewer**, against the
|
|
8
|
+
spec's Visual acceptance criteria. A PASS read as "the screen works" is how frontend
|
|
9
|
+
defects reached staging through every gate.
|
|
10
|
+
|
|
11
|
+
## When a failure arrives labelled "pre-existing"
|
|
12
|
+
|
|
13
|
+
On this surface the cause is usually the test harness rather than the feature — a text query matching
|
|
14
|
+
several elements at once, a missing router context for a link, a `vi.mock` hoisted above the value it
|
|
15
|
+
closes over, jsdom without `showModal`, a hardcoded origin. Every one of them is fixable in the test
|
|
16
|
+
without weakening the assertion, and every one of them stays invisible for exactly as long as the
|
|
17
|
+
failure keeps the label.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- nina:slot frontend.2 -->
|
|
2
|
+
- **If the diff touches `{{APP_DIR}}/**`: the spec — or the dispatch, in a chain with no architect — must carry a Visual acceptance section, and you check the render against it — see *Visual gate* below.** No section → REJECT upstream to whoever wrote it.
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot frontend.3 -->
|
|
5
|
+
- `{{BUILD_CMD}}` for the affected frontend packages (`{{APP_DIR}}`)
|
|
6
|
+
|
|
7
|
+
<!-- nina:slot frontend.4 -->
|
|
8
|
+
## Visual gate — you are the stage that looks at the screen
|
|
9
|
+
|
|
10
|
+
Deciding whether a screen is right is review, not operations, and it belongs here. qa runs vitest in
|
|
11
|
+
jsdom, which has **no layout engine**: `toHaveClass('flex')` passes whether or not a single pixel
|
|
12
|
+
landed anywhere. Every gate before you reads text. This is why backend work lands first time through
|
|
13
|
+
this pipeline and frontend work does not — the frontend defects were never expressible as a test.
|
|
14
|
+
|
|
15
|
+
For any diff touching `{{APP_DIR}}/**`:
|
|
16
|
+
|
|
17
|
+
1. Build and serve it. Every protected screen redirects to the login without a session, so a plain
|
|
18
|
+
static server screenshots the login page: this project serves the build beside a canned API, from
|
|
19
|
+
one origin, with no auth, database or backend —
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
{{VISUAL_SERVE}}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The API's address is fixed at build time, and one that does not match the fixture's origin ships a
|
|
26
|
+
screen that renders but fetches nothing. A request the fixture does not answer is a gap in it: add
|
|
27
|
+
the handler rather than screenshot a broken screen. It must also reach the empty and error states the
|
|
28
|
+
change has; a state you cannot reach is a state nobody reviewed.
|
|
29
|
+
2. `browser_navigate` to the changed screen. Screenshot at **1440** and at **375**
|
|
30
|
+
(`browser_resize` first — the viewport resets to a narrow default across navigations, so
|
|
31
|
+
resize AFTER navigating and confirm the width in the screenshot before you judge it).
|
|
32
|
+
|
|
33
|
+
Many screens are not reachable by URL: a tab kept in component state is never in the route, so
|
|
34
|
+
`browser_click` is the ONLY way in — a navigate-and-screenshot lands on the default tab and proves
|
|
35
|
+
nothing about the changed one.
|
|
36
|
+
3. **Measure, do not squint.** `browser_evaluate` turns "looks fine" into a number, and an
|
|
37
|
+
overflow you can measure is one you can attribute. To decide whether horizontal scroll is
|
|
38
|
+
yours or pre-existing, measure `document.documentElement.scrollWidth` vs `clientWidth` on
|
|
39
|
+
the changed screen AND on an untouched one — and, when it matters, build `HEAD` into a second
|
|
40
|
+
dist from a worktree (Hard Rule #18) and measure both. Reporting a pre-existing app-wide defect
|
|
41
|
+
as a regression wastes a cycle; excusing a real one as "probably pre-existing" ships it.
|
|
42
|
+
4. Check each screenshot against the spec's **Visual acceptance** list, item by item. Not "looks
|
|
43
|
+
fine" — the specific claims the spec made.
|
|
44
|
+
5. `browser_console_messages`. An error there is a defect even when the page renders.
|
|
45
|
+
|
|
46
|
+
A screen that contradicts the spec is `REJECTED`, with the screenshot and what is wrong in it. Say in
|
|
47
|
+
your report which widths you looked at; a frontend approval that does not mention having looked is
|
|
48
|
+
the failure this section exists to end.
|
|
49
|
+
|
|
50
|
+
<!-- nina:slot frontend.1 -->
|
|
51
|
+
, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_resize, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_console_messages, mcp__plugin_playwright_playwright__browser_click, mcp__plugin_playwright_playwright__browser_evaluate, mcp__plugin_playwright_playwright__browser_close
|
|
52
|
+
|
|
53
|
+
<!-- nina:slot frontend.5 -->
|
|
54
|
+
- **visual** — the spec's Visual acceptance section exists and the render matches it (see *Visual gate*).
|
|
55
|
+
A reviewer checking only another dimension skips it, so it is its own: owned by **patterns-and-scope**
|
|
56
|
+
when no visual reviewer is dispatched, and never nobody's.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- nina:slot frontend.1 -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Frontend conventions
|
|
6
|
+
|
|
7
|
+
This project's own — its framework, where server state lives, how it styles, and what it shares between
|
|
8
|
+
apps — are in `.claude/frontend.md`. Read them before writing or reviewing code under `{{APP_DIR}}`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- nina:slot frontend.2 -->
|
|
2
|
+
|
|
3
|
+
### Nothing before devops can see the screen
|
|
4
|
+
The reviewer reads a diff. qa runs vitest in jsdom, which has **no layout engine** — `toHaveClass('flex')`
|
|
5
|
+
passes whether or not a pixel landed anywhere. Every backend invariant is checkable in text, which is why
|
|
6
|
+
the same pipeline lands backend work first time and lets frontend defects through every gate: they were
|
|
7
|
+
never expressible as a test.
|
|
8
|
+
|
|
9
|
+
So any diff touching `{{APP_DIR}}/**` carries a visual contract: the **architect** writes a *Visual acceptance*
|
|
10
|
+
checklist (what must be true on screen at 1440 and 375), the **reviewer** rejects an FE spec without one, the
|
|
11
|
+
**implementer** looks at its own screen before handing off, and the **reviewer** builds, serves and screenshots it,
|
|
12
|
+
rejecting on a mismatch — judging the screen is review, not operations. **devops** only smokes the
|
|
13
|
+
deployed preview for a blank page. Browser access is granted through the Playwright MCP `browser_*` tools in those agents'
|
|
14
|
+
`tools:` lists — it is not a skill, and an agent without those tools in its list cannot see anything.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- nina:slot frontend.1 -->
|
|
2
|
+
| Audit page-load perf on `{{APP_DIR}}` — LCP, INP, CLS, bundle size | `cloudflare:web-perf` | Core Web Vitals + Chrome DevTools MCP integration |
|
|
3
|
+
|
|
4
|
+
<!-- nina:slot frontend.2 -->
|
|
5
|
+
| **ANY diff touching `{{APP_DIR}}/**`** | architect writes a **Visual acceptance** checklist (the dispatch carries it in a chain with no architect); the **reviewer builds, serves and screenshots at 1440 and 375** and rejects on a mismatch; devops smokes the deployed preview for a blank page. jsdom has no layout engine — a green suite says nothing about the screen |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- nina:slot integrations.1 -->
|
|
2
|
+
- **Integration premises (MANDATORY when an integration boundary is in scope)** — list every behavior of the dependency the implementation depends on. Each premise is a one-sentence claim followed by the evidence its kind requires:
|
|
3
|
+
- `installed-library` → `node_modules/.pnpm/<lib>@<version>/.../<file>:<line>`, from the version installed here
|
|
4
|
+
- `live-api` → a contract-test case, or a response observed against the service and captured verbatim
|
|
5
|
+
- `platform-binding` → behavior observed under the local emulator, plus the platform's installed types
|
|
6
|
+
- or a `P<n>` reference into `.claude/integrations/<slug>.md`, which itself carries one of the above
|
|
7
|
+
|
|
8
|
+
A premise without a citation is an **assumption**, not a fact. The integration-tester rejects the spec if a cited line does not validate at runtime, and rejects it outright if it lists uncited premises. When in doubt: read the source. A live service you have no way to read is observed for you: report `BLOCKED` with an `ISSUES` id per premise to observe, the integration-tester records each as a `P<n>` with the response it got, and you are resumed with them. Integration regressions ship precisely when a premise is assumed instead of cited.
|
|
9
|
+
|
|
10
|
+
Also mark **"INTEGRATION-TESTER REQUIRED"** prominently at the top of the spec when this section is present.
|
|
11
|
+
|
|
12
|
+
<!-- nina:slot integrations.3 -->
|
|
13
|
+
- **For every integration behavior the implementation will rely on, get the evidence its kind requires** — open the installed source and cite `file:line`, or, for a live service, have it observed first (report `BLOCKED` naming what to observe). Library docs and editor autocomplete are not citations. This is the single most important rule for avoiding integration regressions.
|
|
14
|
+
|
|
15
|
+
<!-- nina:slot integrations.4 -->
|
|
16
|
+
- **State an integration's behavior as fact without the evidence its kind requires.** Uncited premises are assumptions, and assumptions are what ship integration bugs to prod. If you cannot find the citation, the answer is to read more source or escalate — not to write the spec anyway.
|