@appsforgood/next-supabase-kit 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/DOGFOOD.md +15 -0
- package/LOOP_CODING.md +107 -0
- package/MAINTAINER_RELEASE.md +100 -0
- package/dist/index.js +358 -14
- package/dist/index.js.map +1 -1
- package/dist/studio/office/assets/office.css +79 -1
- package/dist/studio/office/assets/office.js +72 -1
- package/dist/studio/wizard/assets/wizard.css +52 -0
- package/dist/studio/wizard/assets/wizard.js +76 -5
- package/examples/next-supabase-installed/.agent-kit/manifest.json +5 -3
- package/examples/next-supabase-installed/audit-output.json +17 -2
- package/examples/next-supabase-installed/tree.txt +1 -0
- package/package.json +8 -3
- package/research/summaries/agentic-engineering-maturity-levels.md +54 -0
- package/schemas/agentic-level.schema.json +47 -0
- package/schemas/onboarding-state.schema.json +4 -1
- package/templates/next-supabase/DOCS.md +2 -0
- package/templates/next-supabase/LOOP_CODING.md +98 -0
- package/templates/next-supabase/TESTING.md +10 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Loop Coding
|
|
2
|
+
|
|
3
|
+
Loop coding means the agent repeats **plan → act → check → fix** until a stop condition, instead of finishing in one chat turn. The Agent Kit is opinionated about **which loops are safe** and **which checkpoints must stay in place**.
|
|
4
|
+
|
|
5
|
+
This document describes loop types, kit-safe patterns, and limits.
|
|
6
|
+
|
|
7
|
+
## Loop Types
|
|
8
|
+
|
|
9
|
+
| Loop type | What it means | Kit-safe version |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| **Agent loop** | Same agent iterates on feedback until done | Use scoped prompts (for example `.agent-kit/prompts/implement-feature.md`); review each turn; do not remove Security Reviewer or QA gates |
|
|
12
|
+
| **Eval-driven loop** | Code changes until **tests, audit, or evals pass** | `npm test` + `agent-kit audit` + CI |
|
|
13
|
+
| **Self-improving loop** | Agent critiques its own output and revises | Manual: delegate to `@qa-engineer` or run tests between passes; **avoid fully unsupervised self-critique on auth, RLS, or release tooling** |
|
|
14
|
+
| **Council / team loop** | Planner → specialist → Security → QA handoffs | `agent-kit session handoff` + IDE subagents — the kit's core operating model |
|
|
15
|
+
| **Background / overnight loop** | Runs without a human present | **Defer by default** — requires worktree policy, cost caps, kill switches, and stronger eval gates than agent freedom |
|
|
16
|
+
|
|
17
|
+
## Practical Rule
|
|
18
|
+
|
|
19
|
+
Climb maturity by adding **checkpoints** (tests, audit, guards, human review), not by removing them. Unsupervised loops are only healthy when **eval gates are stronger than the agent's freedom**.
|
|
20
|
+
|
|
21
|
+
## Eval-Driven PR Loop (recommended)
|
|
22
|
+
|
|
23
|
+
For feature work:
|
|
24
|
+
|
|
25
|
+
1. **Plan** — Planner classifies scope; Lead Architect maps affected layers when the change is core.
|
|
26
|
+
2. **Implement** — Next.js / Supabase engineers (or general agent with council rules loaded).
|
|
27
|
+
3. **Check** — run the smallest reliable gate set:
|
|
28
|
+
```bash
|
|
29
|
+
npm test
|
|
30
|
+
agent-kit audit --min-readiness baseline-setup
|
|
31
|
+
agent-kit adapter validate all # when IDE surfaces change
|
|
32
|
+
```
|
|
33
|
+
4. **Fix** — repeat implement/check until green or blocked on a documented gap.
|
|
34
|
+
5. **Record** — `agent-kit session render` and mirror summary in `COUNCIL.md` for meaningful multi-agent work.
|
|
35
|
+
|
|
36
|
+
See [TESTING.md](TESTING.md) for CI gate expectations.
|
|
37
|
+
|
|
38
|
+
## Council Loop (multi-agent)
|
|
39
|
+
|
|
40
|
+
The default handoff order lives in `AGENTS.md` and `.agent-kit/agent-roster.json`:
|
|
41
|
+
|
|
42
|
+
1. Planner — scope, workflow, council selection
|
|
43
|
+
2. Lead Architect — core changes
|
|
44
|
+
3. Domain engineers — data, UI, copy as needed
|
|
45
|
+
4. Security Reviewer — auth, mutations, secrets, dependencies, release risk
|
|
46
|
+
5. QA Engineer — behavior evidence
|
|
47
|
+
6. Documentation Maintainer — living docs and council record
|
|
48
|
+
|
|
49
|
+
Use Agent Studio when the CLI is available:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
agent-kit session start --workflow core-change --request "Short title"
|
|
53
|
+
agent-kit session handoff --from planner --to lead-architect --decision "..." --risk "..." --next "..." --evidence "..."
|
|
54
|
+
agent-kit session verify --command "npm test" --result pass
|
|
55
|
+
agent-kit session output phased-checklist --status complete --evidence "..."
|
|
56
|
+
agent-kit session render
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
When CLI tooling is unavailable, append the session template in `COUNCIL.md`.
|
|
60
|
+
|
|
61
|
+
## Hooks And Local Automation (Level 6 enablers)
|
|
62
|
+
|
|
63
|
+
The kit does **not** ship unsupervised orchestration. It documents safe local enablers:
|
|
64
|
+
|
|
65
|
+
| Pattern | Purpose | Starting point |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| Pre-commit test or audit | Catch drift before commit | `.agent-kit/prompts/audit-project-setup.md`, project `npm test` |
|
|
68
|
+
| Post-edit lint/typecheck | Fast feedback on save | Project ESLint / `tsc --noEmit` in editor or CI |
|
|
69
|
+
| PR CI audit gate | Block merge below readiness | `.github/workflows/agent-kit-audit.yml` template |
|
|
70
|
+
| Adapter validate on PR | Prove IDE activation stays valid | `agent-kit adapter validate all` when adapter assets change |
|
|
71
|
+
|
|
72
|
+
For Cursor-specific hook/automation patterns, see Cursor Automations docs and keep Planner-first triage **opt-in** — never as a replacement for Security Reviewer or human release approval.
|
|
73
|
+
|
|
74
|
+
## MCP Routing (delegation hint)
|
|
75
|
+
|
|
76
|
+
Match MCP servers to council roles:
|
|
77
|
+
|
|
78
|
+
| Role | Typical MCP use |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| Supabase/Postgres Engineer | Schema, migrations, RLS, logs, advisors |
|
|
81
|
+
| Security Reviewer | Dependency/advisory checks; no broad production writes without review |
|
|
82
|
+
| Deployment/Observability Engineer | Hosting logs, release status, error tracking |
|
|
83
|
+
| QA Engineer | Test runners, visual diff tools where configured |
|
|
84
|
+
|
|
85
|
+
Record active MCP surfaces in `ASSISTANT_ADAPTERS.md` when they affect council behavior.
|
|
86
|
+
|
|
87
|
+
## What Not To Default
|
|
88
|
+
|
|
89
|
+
- Overnight unsupervised agent runs on auth, RLS, or release tooling
|
|
90
|
+
- Agents managing agents without eval harness and kill switches
|
|
91
|
+
- Removing human review from publish, migration, or security-sensitive paths
|
|
92
|
+
|
|
93
|
+
## Related Docs
|
|
94
|
+
|
|
95
|
+
- `AGENTS.md` — council roles and default handoffs
|
|
96
|
+
- `QUALITY_GATES.md` — Baseline / Strong / Mature evidence tiers
|
|
97
|
+
- `COUNCIL.md` — session evidence template
|
|
98
|
+
- `TESTING.md` — project test and CI gate expectations
|
|
@@ -55,6 +55,16 @@ Recommended baseline:
|
|
|
55
55
|
- Visual QA evidence for high-risk UI changes
|
|
56
56
|
- `agent-kit adapter validate antigravity` and `agent-kit package validate` when adapter/package assets change
|
|
57
57
|
|
|
58
|
+
### Eval-driven PR loop
|
|
59
|
+
|
|
60
|
+
Repeat **implement → check → fix** until tests and audit pass. See the kit's [LOOP_CODING.md](LOOP_CODING.md) for loop types, council handoffs, and safe automation limits. Minimum check commands:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm test
|
|
64
|
+
agent-kit audit --min-readiness baseline-setup
|
|
65
|
+
agent-kit adapter validate all # when IDE or adapter assets change
|
|
66
|
+
```
|
|
67
|
+
|
|
58
68
|
## Security-Focused Tests
|
|
59
69
|
|
|
60
70
|
Prioritize:
|