@appsforgood/next-supabase-kit 0.1.7 → 0.2.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.
Files changed (49) hide show
  1. package/BEST_PRACTICE_EVIDENCE.md +1 -1
  2. package/CHANGELOG.md +17 -0
  3. package/DOGFOOD.md +12 -1
  4. package/README.md +33 -4
  5. package/REPOSITORY_SETTINGS.md +12 -6
  6. package/SECURITY.md +14 -0
  7. package/SUPPLY_CHAIN.md +15 -14
  8. package/UPGRADE.md +14 -4
  9. package/antigravity/plugin.json +1 -1
  10. package/assistant-adapters/README.md +3 -0
  11. package/assistant-adapters/antigravity.md +2 -0
  12. package/assistant-adapters/claude-code-subagents.md +1 -0
  13. package/assistant-adapters/codex-agents.md +2 -0
  14. package/assistant-adapters/cursor-agent-kit.mdc +2 -0
  15. package/assistant-adapters/cursor-planner.mdc +1 -1
  16. package/assistant-adapters/orchestrator-runtime.md +39 -0
  17. package/checklists/frontend-quality.md +1 -0
  18. package/checklists/ui-detectors.md +6 -0
  19. package/dist/index.js +1813 -713
  20. package/dist/index.js.map +1 -1
  21. package/dist/studio/office/assets/office.css +167 -6
  22. package/dist/studio/office/assets/office.js +298 -4
  23. package/dist/studio/wizard/assets/wizard.js +7 -1
  24. package/examples/next-supabase-installed/.agent-kit/manifest.json +187 -14
  25. package/examples/next-supabase-installed/audit-output.json +405 -380
  26. package/package.json +27 -4
  27. package/prompts/frontend-design-review.md +6 -0
  28. package/prompts/screenshot-review.md +2 -1
  29. package/schemas/audit-report-v2.schema.json +71 -0
  30. package/schemas/audit-report.schema.json +16 -16
  31. package/schemas/orchestrator.schema.json +167 -0
  32. package/schemas/runtime-event.schema.json +66 -0
  33. package/schemas/runtime-run.schema.json +58 -0
  34. package/schemas/session-event.schema.json +2 -0
  35. package/templates/next-supabase/.agent-kit/orchestrator.json +48 -0
  36. package/templates/next-supabase/.agent-kit/runtime/gitignore.template +2 -0
  37. package/templates/next-supabase/AGENTS.md +2 -0
  38. package/templates/next-supabase/ASSISTANT_ADAPTERS.md +20 -0
  39. package/templates/next-supabase/DECISIONS.md +14 -0
  40. package/templates/next-supabase/DEPLOYMENT.md +4 -0
  41. package/templates/next-supabase/DESIGN.md +6 -0
  42. package/templates/next-supabase/DOCS.md +8 -0
  43. package/templates/next-supabase/MODEL_ROUTING.md +9 -0
  44. package/templates/next-supabase/QUALITY_GATES.md +5 -1
  45. package/templates/next-supabase/SECURITY.md +10 -0
  46. package/templates/next-supabase/SPEC.md +3 -1
  47. package/templates/next-supabase/STYLE_GUIDE.md +15 -0
  48. package/templates/next-supabase/TESTING.md +6 -0
  49. package/templates/next-supabase/UPGRADE.md +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsforgood/next-supabase-kit",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "Open agent council, skills, prompts, checklists, and markdown templates for Next.js and Supabase projects.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -69,21 +69,29 @@
69
69
  "node": ">=20"
70
70
  },
71
71
  "packageManager": "npm@11.6.2",
72
+ "workspaces": [
73
+ "packages/runtime"
74
+ ],
72
75
  "scripts": {
73
- "build": "tsup && node scripts/copy-studio-assets.mjs",
76
+ "build": "npm run build --workspace @appsforgood/agent-kit-runtime && tsup && node scripts/copy-studio-assets.mjs",
77
+ "predev": "npm run build --workspace @appsforgood/agent-kit-runtime",
74
78
  "dev": "tsx src/cli/index.ts",
75
- "typecheck": "tsc --noEmit",
79
+ "pretypecheck": "npm run build --workspace @appsforgood/agent-kit-runtime",
80
+ "typecheck": "tsc --noEmit && npm run typecheck --workspace @appsforgood/agent-kit-runtime",
76
81
  "lint": "eslint .",
77
82
  "lint:fix": "eslint . --fix",
78
83
  "format": "prettier --write .",
79
84
  "format:check": "prettier --check .",
85
+ "pretest": "npm run build --workspace @appsforgood/agent-kit-runtime",
80
86
  "test": "vitest run",
87
+ "pretest:coverage": "npm run build --workspace @appsforgood/agent-kit-runtime",
81
88
  "test:coverage": "vitest run --coverage",
82
89
  "test:watch": "vitest",
83
90
  "smoke": "node dist/index.js doctor",
84
91
  "smoke:install": "node scripts/smoke-install.mjs",
85
92
  "smoke:studio": "node scripts/smoke-studio.mjs",
86
93
  "smoke:setup": "node scripts/smoke-setup.mjs",
94
+ "smoke:ui-screens": "node scripts/smoke-ui-screens.mjs",
87
95
  "smoke:audit-gate": "node scripts/smoke-audit-gate.mjs",
88
96
  "package:validate": "node dist/index.js package validate",
89
97
  "examples:check": "node scripts/example-check.mjs",
@@ -92,7 +100,8 @@
92
100
  "sbom:generate": "node scripts/sbom-check.mjs --output sbom.cdx.json",
93
101
  "publish:verify": "node scripts/post-publish-verify.mjs",
94
102
  "changeset": "changeset",
95
- "changeset:version": "changeset version",
103
+ "changeset:check": "node scripts/version-packages.mjs --check",
104
+ "changeset:version": "node scripts/version-packages.mjs",
96
105
  "release:check": "node scripts/release-check.mjs",
97
106
  "pack:check": "npm pack --dry-run",
98
107
  "dogfood:init": "node scripts/dogfood-init.mjs",
@@ -106,6 +115,14 @@
106
115
  "simple-git": "^3.27.0",
107
116
  "zod": "^4.4.3"
108
117
  },
118
+ "peerDependencies": {
119
+ "@appsforgood/agent-kit-runtime": "^0.1.0"
120
+ },
121
+ "peerDependenciesMeta": {
122
+ "@appsforgood/agent-kit-runtime": {
123
+ "optional": true
124
+ }
125
+ },
109
126
  "devDependencies": {
110
127
  "@changesets/cli": "^2.31.0",
111
128
  "@eslint/js": "^9.39.4",
@@ -114,6 +131,7 @@
114
131
  "eslint": "^9.39.4",
115
132
  "eslint-config-prettier": "^10.1.8",
116
133
  "globals": "^17.7.0",
134
+ "playwright": "^1.55.1",
117
135
  "prettier": "^3.9.4",
118
136
  "tsup": "^8.3.5",
119
137
  "tsx": "^4.19.2",
@@ -123,5 +141,10 @@
123
141
  },
124
142
  "overrides": {
125
143
  "esbuild": "0.28.1"
144
+ },
145
+ "allowScripts": {
146
+ "better-sqlite3@12.11.1": true,
147
+ "esbuild@0.28.1": true,
148
+ "fsevents": false
126
149
  }
127
150
  }
@@ -9,9 +9,13 @@ Reject:
9
9
  - Missing frontend product-quality scorecard
10
10
  - Missing visual QA or component-state evidence
11
11
  - Generic AI-site gradients
12
+ - Accent-border cards, glow rails, neon strokes, gradient borders, oversized glass panels, or ornamental icon walls
12
13
  - Vague SaaS copy
13
14
  - Fake metrics
15
+ - Decorative credibility badges or unsupported proof
14
16
  - Card soup
17
+ - Filler sections that replace the requested app or tool workflow
18
+ - Color-only alerts, low-contrast tints, or vague status panels
15
19
  - Missing mobile states
16
20
  - Missing loading, empty, error, disabled, or success states
17
21
 
@@ -23,6 +27,8 @@ Recommend:
23
27
  - Which visual QA tier is appropriate for the change
24
28
  - Task-first layout
25
29
  - Domain-specific hierarchy
30
+ - Restrained 1px full-border surfaces, subtle background tint when needed, clear labels, icons, and semantic state text
31
+ - Concrete product nouns, user actions, constraints, real proof, and honest empty or connected-data states
26
32
  - Design tokens
27
33
  - Accessible forms and controls
28
34
  - WCAG 2.1 AA behavior
@@ -9,7 +9,8 @@ Check:
9
9
  - First screen shows the real product, task, object, or workflow.
10
10
  - The selected creative direction is visible in tokens, layout, copy, imagery, density, and interaction tone.
11
11
  - Layout is usable on desktop and mobile without overlapping text or controls.
12
- - Visual direction fits the domain and does not rely on generic AI-site gradients, card soup, vague SaaS copy, or fake metrics.
12
+ - Visual direction fits the domain and does not rely on generic AI-site gradients, accent-border cards, glow rails, neon strokes, gradient borders, card soup, oversized glass panels, ornamental icon walls, vague SaaS copy, decorative credibility badges, filler sections, or fake metrics.
13
+ - Cards, callouts, alerts, panels, and status messages use restrained 1px full-border surfaces, subtle background tint when needed, clear labels, icons, semantic state text, and WCAG AA contrast instead of decorative borders or color-only state.
13
14
  - Design tokens are visible in color, typography, spacing, radius, state color, and focus treatment.
14
15
  - Loading, empty, error, disabled, success, and mobile states are represented or explicitly accounted for.
15
16
  - Visual QA tier is appropriate for the risk: screenshot review, Playwright screenshots, Storybook visual tests, or visual-regression service.
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-skills.dev/schemas/audit-report-v2.schema.json",
4
+ "title": "Agent Kit Audit Report v2",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "generatedAt", "tool", "root", "summary", "readiness", "findings"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schemaVersion": { "const": 2 },
10
+ "generatedAt": { "type": "string", "format": "date-time" },
11
+ "tool": {
12
+ "type": "object",
13
+ "required": ["name", "version"],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "name": { "const": "agent-kit" },
17
+ "version": { "type": "string", "minLength": 1 }
18
+ }
19
+ },
20
+ "root": { "const": "." },
21
+ "summary": {
22
+ "type": "object",
23
+ "required": ["pass", "warn", "fail", "suppressed"],
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "pass": { "type": "integer", "minimum": 0 },
27
+ "warn": { "type": "integer", "minimum": 0 },
28
+ "fail": { "type": "integer", "minimum": 0 },
29
+ "suppressed": { "type": "integer", "minimum": 0 }
30
+ }
31
+ },
32
+ "readiness": { "$ref": "audit-report.schema.json#/$defs/readiness" },
33
+ "findings": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "required": ["level", "area", "message", "ruleId", "ruleVersion", "confidence", "evidence"],
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "level": { "type": "string", "enum": ["pass", "warn", "fail"] },
41
+ "area": { "type": "string", "minLength": 1 },
42
+ "message": { "type": "string", "minLength": 1 },
43
+ "remediation": { "type": "string", "minLength": 1 },
44
+ "ruleId": { "type": "string", "minLength": 1 },
45
+ "ruleVersion": { "type": "string", "minLength": 1 },
46
+ "helpUri": { "type": "string", "format": "uri" },
47
+ "confidence": { "type": "string", "enum": ["low", "medium", "high"] },
48
+ "fixable": { "type": "boolean" },
49
+ "suppressed": { "type": "boolean" },
50
+ "suppressionReason": { "type": "string", "minLength": 1 },
51
+ "evidence": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "required": ["kind", "summary"],
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "kind": { "type": "string", "enum": ["file", "command", "configuration", "runtime"] },
59
+ "summary": { "type": "string", "minLength": 1 },
60
+ "path": { "type": "string", "minLength": 1 },
61
+ "line": { "type": "integer", "minimum": 1 },
62
+ "column": { "type": "integer", "minimum": 1 },
63
+ "observedAt": { "type": "string", "format": "date-time" }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -2,6 +2,21 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://agent-skills.dev/schemas/audit-report.schema.json",
4
4
  "title": "Agent Kit Audit Report",
5
+ "$defs": {
6
+ "readiness": {
7
+ "type": "object",
8
+ "required": ["level", "summary", "nextActions"],
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "level": {
12
+ "type": "string",
13
+ "enum": ["needs-setup", "baseline-setup", "needs-improvement", "best-practice-candidate"]
14
+ },
15
+ "summary": { "type": "string", "minLength": 1 },
16
+ "nextActions": { "type": "array", "items": { "type": "string" } }
17
+ }
18
+ }
19
+ },
5
20
  "type": "object",
6
21
  "required": ["summary", "readiness", "findings"],
7
22
  "additionalProperties": false,
@@ -16,22 +31,7 @@
16
31
  "fail": { "type": "integer", "minimum": 0 }
17
32
  }
18
33
  },
19
- "readiness": {
20
- "type": "object",
21
- "required": ["level", "summary", "nextActions"],
22
- "additionalProperties": false,
23
- "properties": {
24
- "level": {
25
- "type": "string",
26
- "enum": ["needs-setup", "baseline-setup", "needs-improvement", "best-practice-candidate"]
27
- },
28
- "summary": { "type": "string", "minLength": 1 },
29
- "nextActions": {
30
- "type": "array",
31
- "items": { "type": "string" }
32
- }
33
- }
34
- },
34
+ "readiness": { "$ref": "#/$defs/readiness" },
35
35
  "findings": {
36
36
  "type": "array",
37
37
  "items": {
@@ -0,0 +1,167 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-skills.dev/schemas/orchestrator.schema.json",
4
+ "title": "Agent Kit Orchestrator Configuration",
5
+ "type": "object",
6
+ "required": ["schemaVersion"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schemaVersion": { "const": 1 },
10
+ "enabled": { "type": "boolean", "default": false },
11
+ "defaultWorkflow": { "type": "string", "minLength": 1, "default": "planning" },
12
+ "defaultAlias": { "type": "string", "minLength": 1, "default": "balanced" },
13
+ "databasePath": { "type": "string", "minLength": 1, "default": ".agent-kit/runtime/runtime.sqlite" },
14
+ "providers": {
15
+ "type": "object",
16
+ "additionalProperties": { "$ref": "#/$defs/provider" },
17
+ "default": {}
18
+ },
19
+ "modelAliases": {
20
+ "type": "object",
21
+ "additionalProperties": { "$ref": "#/$defs/modelAlias" },
22
+ "default": {}
23
+ },
24
+ "agentRoutes": {
25
+ "type": "object",
26
+ "additionalProperties": { "type": "string", "minLength": 1 },
27
+ "default": {}
28
+ },
29
+ "agentExecutors": {
30
+ "type": "object",
31
+ "additionalProperties": { "enum": ["model", "cursor"] },
32
+ "default": {}
33
+ },
34
+ "mutationAgents": {
35
+ "type": "array",
36
+ "items": { "type": "string", "minLength": 1 },
37
+ "uniqueItems": true
38
+ },
39
+ "cursor": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "enabled": { "type": "boolean", "default": false },
44
+ "command": { "type": "string", "minLength": 1, "default": "cursor-agent" },
45
+ "args": { "type": "array", "items": { "type": "string" } },
46
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 3600000 }
47
+ }
48
+ },
49
+ "mcpServers": {
50
+ "type": "object",
51
+ "additionalProperties": { "$ref": "#/$defs/mcpServer" },
52
+ "default": {}
53
+ },
54
+ "sandbox": { "$ref": "#/$defs/sandbox" },
55
+ "approvals": { "$ref": "#/$defs/approvals" },
56
+ "limits": { "$ref": "#/$defs/limits" }
57
+ },
58
+ "$defs": {
59
+ "credentialRef": {
60
+ "type": "string",
61
+ "pattern": "^(?:env:[A-Z][A-Z0-9_]*|keychain:[a-zA-Z0-9_.:@/-]+)$"
62
+ },
63
+ "capability": {
64
+ "enum": ["text", "tools", "parallel-tools", "structured-output", "streaming", "vision", "reasoning", "usage"]
65
+ },
66
+ "provider": {
67
+ "type": "object",
68
+ "required": ["kind"],
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "kind": {
72
+ "enum": ["openai", "anthropic", "gemini", "xai", "deepseek", "kimi", "glm", "openrouter", "ollama", "lm-studio", "vllm", "openai-compatible"]
73
+ },
74
+ "baseUrl": { "type": "string", "format": "uri" },
75
+ "credentialRef": { "$ref": "#/$defs/credentialRef" },
76
+ "allowPrivateNetwork": { "type": "boolean", "default": false },
77
+ "capabilities": { "type": "array", "items": { "$ref": "#/$defs/capability" }, "uniqueItems": true },
78
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 600000 }
79
+ }
80
+ },
81
+ "modelAlias": {
82
+ "type": "object",
83
+ "required": ["candidates"],
84
+ "additionalProperties": false,
85
+ "properties": {
86
+ "candidates": {
87
+ "type": "array",
88
+ "minItems": 1,
89
+ "items": {
90
+ "type": "object",
91
+ "required": ["provider", "model"],
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "provider": { "type": "string", "minLength": 1 },
95
+ "model": { "type": "string", "minLength": 1 }
96
+ }
97
+ }
98
+ },
99
+ "requiredCapabilities": { "type": "array", "items": { "$ref": "#/$defs/capability" }, "uniqueItems": true },
100
+ "maxAttempts": { "type": "integer", "minimum": 1, "maximum": 10 }
101
+ }
102
+ },
103
+ "mcpServer": {
104
+ "oneOf": [
105
+ {
106
+ "type": "object",
107
+ "required": ["transport", "command"],
108
+ "additionalProperties": false,
109
+ "properties": {
110
+ "transport": { "const": "stdio" },
111
+ "command": { "type": "string", "minLength": 1 },
112
+ "args": { "type": "array", "items": { "type": "string" } },
113
+ "envRefs": { "type": "object", "additionalProperties": { "$ref": "#/$defs/credentialRef" } },
114
+ "allowHostExecution": { "type": "boolean", "default": false },
115
+ "allowedTools": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
116
+ }
117
+ },
118
+ {
119
+ "type": "object",
120
+ "required": ["transport", "url", "allowedHosts"],
121
+ "additionalProperties": false,
122
+ "properties": {
123
+ "transport": { "const": "streamable-http" },
124
+ "url": { "type": "string", "format": "uri" },
125
+ "authRef": { "$ref": "#/$defs/credentialRef" },
126
+ "allowedHosts": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
127
+ "allowPrivateNetwork": { "type": "boolean", "default": false },
128
+ "allowedTools": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
129
+ }
130
+ }
131
+ ]
132
+ },
133
+ "sandbox": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "provider": { "enum": ["docker", "host-readonly"] },
138
+ "image": { "type": "string", "minLength": 1 },
139
+ "network": { "enum": ["none", "approved"] },
140
+ "allowHostMutations": { "type": "boolean" },
141
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 3600000 },
142
+ "memoryMb": { "type": "integer", "minimum": 128, "maximum": 32768 },
143
+ "cpus": { "type": "number", "exclusiveMinimum": 0, "maximum": 32 }
144
+ }
145
+ },
146
+ "approvals": {
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "properties": {
150
+ "mode": { "const": "risk-tiered" },
151
+ "requirePlan": { "type": "boolean" },
152
+ "requireFinalCommit": { "type": "boolean" }
153
+ }
154
+ },
155
+ "limits": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "properties": {
159
+ "maxSteps": { "type": "integer", "minimum": 1, "maximum": 100 },
160
+ "maxAgentVisits": { "type": "integer", "minimum": 1, "maximum": 10 },
161
+ "maxRetriesPerNode": { "type": "integer", "minimum": 0, "maximum": 5 },
162
+ "maxToolCallsPerAgent": { "type": "integer", "minimum": 0, "maximum": 100 },
163
+ "runTimeoutMs": { "type": "integer", "minimum": 1000, "maximum": 86400000 }
164
+ }
165
+ }
166
+ }
167
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-skills.dev/schemas/runtime-event.schema.json",
4
+ "title": "Agent Kit Runtime Event",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "eventId", "sequence", "runId", "createdAt", "type"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schemaVersion": { "const": 1 },
10
+ "eventId": { "type": "string", "minLength": 1 },
11
+ "sequence": { "type": "integer", "minimum": 1 },
12
+ "runId": { "type": "string", "minLength": 1 },
13
+ "createdAt": { "type": "string", "format": "date-time" },
14
+ "type": {
15
+ "enum": [
16
+ "run_started",
17
+ "run_status_changed",
18
+ "agent_started",
19
+ "agent_completed",
20
+ "handoff",
21
+ "approval_requested",
22
+ "approval_decided",
23
+ "tool_started",
24
+ "tool_completed",
25
+ "provider_selected",
26
+ "artifact",
27
+ "verification",
28
+ "run_error",
29
+ "run_completed"
30
+ ]
31
+ },
32
+ "agentId": { "type": "string", "minLength": 1 },
33
+ "text": { "type": "string" },
34
+ "status": { "enum": ["planned", "running", "awaiting-approval", "blocked", "cancelled", "failed", "complete"] },
35
+ "approval": {
36
+ "oneOf": [
37
+ {
38
+ "type": "object",
39
+ "required": ["approvalId", "runId", "risk", "title", "detail", "requestedAt"],
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "approvalId": { "type": "string", "minLength": 1 },
43
+ "runId": { "type": "string", "minLength": 1 },
44
+ "risk": { "enum": ["plan", "write", "network", "secret", "destructive", "host-mutation", "final-commit"] },
45
+ "title": { "type": "string", "minLength": 1 },
46
+ "detail": { "type": "string" },
47
+ "requestedAt": { "type": "string", "format": "date-time" }
48
+ }
49
+ },
50
+ {
51
+ "type": "object",
52
+ "required": ["approvalId", "decision", "decidedAt"],
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "approvalId": { "type": "string", "minLength": 1 },
56
+ "decision": { "enum": ["approve", "reject"] },
57
+ "decidedAt": { "type": "string", "format": "date-time" },
58
+ "actor": { "type": "string", "minLength": 1 },
59
+ "note": { "type": "string" }
60
+ }
61
+ }
62
+ ]
63
+ },
64
+ "data": { "type": "object", "additionalProperties": true }
65
+ }
66
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-skills.dev/schemas/runtime-run.schema.json",
4
+ "title": "Agent Kit Runtime Run",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "runId", "workflowId", "goal", "status", "createdAt", "updatedAt", "sourceRoot", "baseCommit", "results"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "schemaVersion": { "const": 1 },
10
+ "runId": { "type": "string", "pattern": "^[a-zA-Z0-9_-]+$" },
11
+ "workflowId": { "type": "string", "minLength": 1 },
12
+ "goal": { "type": "string", "minLength": 1 },
13
+ "status": { "$ref": "#/$defs/status" },
14
+ "createdAt": { "type": "string", "format": "date-time" },
15
+ "updatedAt": { "type": "string", "format": "date-time" },
16
+ "sourceRoot": { "type": "string", "minLength": 1 },
17
+ "baseCommit": { "type": "string", "minLength": 1 },
18
+ "worktreePath": { "type": "string", "minLength": 1 },
19
+ "branchName": { "type": "string", "minLength": 1 },
20
+ "activeAgentId": { "type": "string", "minLength": 1 },
21
+ "pendingApproval": { "$ref": "#/$defs/approvalRequest" },
22
+ "commit": { "type": "string", "minLength": 1 },
23
+ "changed": { "type": "string" },
24
+ "results": { "type": "array", "items": { "$ref": "#/$defs/agentResult" } },
25
+ "error": { "type": "string" }
26
+ },
27
+ "$defs": {
28
+ "status": { "enum": ["planned", "running", "awaiting-approval", "blocked", "cancelled", "failed", "complete"] },
29
+ "risk": { "enum": ["plan", "write", "network", "secret", "destructive", "host-mutation", "final-commit"] },
30
+ "approvalRequest": {
31
+ "type": "object",
32
+ "required": ["approvalId", "runId", "risk", "title", "detail", "requestedAt"],
33
+ "additionalProperties": false,
34
+ "properties": {
35
+ "approvalId": { "type": "string", "minLength": 1 },
36
+ "runId": { "type": "string", "minLength": 1 },
37
+ "risk": { "$ref": "#/$defs/risk" },
38
+ "title": { "type": "string", "minLength": 1 },
39
+ "detail": { "type": "string" },
40
+ "requestedAt": { "type": "string", "format": "date-time" }
41
+ }
42
+ },
43
+ "agentResult": {
44
+ "type": "object",
45
+ "required": ["agentId", "summary", "decision", "risk", "artifacts", "verification"],
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "agentId": { "type": "string", "minLength": 1 },
49
+ "summary": { "type": "string" },
50
+ "decision": { "type": "string" },
51
+ "risk": { "type": "string" },
52
+ "artifacts": { "type": "array", "items": { "type": "string" } },
53
+ "verification": { "type": "array", "items": { "type": "string" } },
54
+ "requestedHandoff": { "type": "string", "minLength": 1 }
55
+ }
56
+ }
57
+ }
58
+ }
@@ -6,6 +6,8 @@
6
6
  "required": ["type", "createdAt"],
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
+ "eventId": { "type": "string", "format": "uuid" },
10
+ "sequence": { "type": "integer", "minimum": 1 },
9
11
  "type": {
10
12
  "type": "string",
11
13
  "enum": [
@@ -0,0 +1,48 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "enabled": false,
4
+ "defaultWorkflow": "planning",
5
+ "defaultAlias": "balanced",
6
+ "databasePath": ".agent-kit/runtime/runtime.sqlite",
7
+ "providers": {},
8
+ "modelAliases": {},
9
+ "agentRoutes": {},
10
+ "agentExecutors": {},
11
+ "mutationAgents": [
12
+ "supabase-postgres-engineer",
13
+ "nextjs-engineer",
14
+ "frontend-design-lead",
15
+ "marketing-copy-lead",
16
+ "qa-engineer",
17
+ "docs-maintainer",
18
+ "deployment-observability-engineer"
19
+ ],
20
+ "cursor": {
21
+ "enabled": false,
22
+ "command": "cursor-agent",
23
+ "args": ["--print", "--output-format", "stream-json", "--force"],
24
+ "timeoutMs": 900000
25
+ },
26
+ "mcpServers": {},
27
+ "sandbox": {
28
+ "provider": "docker",
29
+ "image": "node:22-bookworm-slim",
30
+ "network": "none",
31
+ "allowHostMutations": false,
32
+ "timeoutMs": 600000,
33
+ "memoryMb": 2048,
34
+ "cpus": 2
35
+ },
36
+ "approvals": {
37
+ "mode": "risk-tiered",
38
+ "requirePlan": true,
39
+ "requireFinalCommit": true
40
+ },
41
+ "limits": {
42
+ "maxSteps": 24,
43
+ "maxAgentVisits": 2,
44
+ "maxRetriesPerNode": 2,
45
+ "maxToolCallsPerAgent": 20,
46
+ "runTimeoutMs": 3600000
47
+ }
48
+ }
@@ -4,6 +4,8 @@ This project uses explicit agent roles so implementation, security, quality, and
4
4
 
5
5
  Use `.agent-kit/agent-roster.json` as the default council contract. Use `MODEL_ROUTING.md` and `.agent-kit/model-routing.json` to choose model profiles for each agent. Before meaningful work, read `.agent-kit/project-context.json`, `.agent-kit/project-context.md`, and `.agent-kit/agent-briefs.md` when present, then apply active corrections from `.agent-kit/corrections/project-rules.json` and `.agent-kit/corrections/agent-rules.json`. When a request is ambiguous, planning-oriented, or cross-layer, start with Planner and follow the matching workflow in `AGENT_ROSTER.md`. Use `ASSISTANT_ADAPTERS.md` to confirm which AI coding tools load these instructions and how model selection is handled. Record meaningful council sessions in `COUNCIL.md` or the local Agent Studio files under `.agent-kit/council-sessions/`.
6
6
 
7
+ When `.agent-kit/orchestrator.json` is enabled, treat `agent-kit orchestrate validate`, plan/status output, approvals, runtime events, and worktree/commit state as the executable source of truth. IDE delegation is not proof that the graph ran. Never bypass a paused approval, capability mismatch, Docker/host policy, or the runtime rule that forbids automatic merge, push, pull request, deployment, and migration application.
8
+
7
9
  ## Planner
8
10
 
9
11
  Owns planning, scope breakdown, sequencing, and council routing before implementation starts.
@@ -9,6 +9,7 @@ Canonical source of truth:
9
9
  - `.agent-kit/agent-roster.json`
10
10
  - `MODEL_ROUTING.md`
11
11
  - `.agent-kit/model-routing.json`
12
+ - `.agent-kit/orchestrator.json`
12
13
  - `.agent-kit/project-context.json`
13
14
  - `.agent-kit/project-context.md`
14
15
  - `.agent-kit/corrections/project-rules.json`
@@ -20,6 +21,9 @@ Canonical source of truth:
20
21
  - `.agent-kit/schemas/session-event.schema.json`
21
22
  - `.agent-kit/schemas/project-context.schema.json`
22
23
  - `.agent-kit/schemas/correction-rules.schema.json`
24
+ - `.agent-kit/schemas/orchestrator.schema.json`
25
+ - `.agent-kit/schemas/runtime-run.schema.json`
26
+ - `.agent-kit/schemas/runtime-event.schema.json`
23
27
  - `QUALITY_GATES.md`
24
28
 
25
29
  ## Active Tool Surfaces
@@ -31,6 +35,7 @@ Canonical source of truth:
31
35
  | Cursor | `.cursor/rules/*.mdc`, `.cursor/agents/*.md`, `.cursor/skills/*/SKILL.md` | Active on init (rules); subagents on `--activate cursor` | Advisory | Partial | Run `agent-kit init --activate cursor`; verify subagents. | Delegate to `.cursor/agents/` instead of role-playing the council. |
32
36
  | Claude Code | `.claude/agents/*.md` and optional `CLAUDE.md` | TBD | TBD | Partial | TBD | Run `agent-kit init --activate claude` to generate subagents from `.agent-kit/agent-roster.json` and install `CLAUDE.md`. |
33
37
  | Antigravity | `.antigravity/agent-kit/plugin.json`, `.antigravity/agent-kit/commands/*.toml`, `.antigravity/runtime-skills/*/SKILL.md` | TBD | TBD | Advisory | TBD | Run `agent-kit init --activate antigravity`, then `agent-kit adapter validate antigravity`; optional native validation is `agy plugin validate` when available. |
38
+ | Agent Kit Runtime | `.agent-kit/orchestrator.json`, `@appsforgood/agent-kit-runtime`, `agent-kit orchestrate ...` | Disabled by default | Enforced aliases and capability gates when active | Enforced local graph and approval policy | TBD | This is the executable council. IDE adapters above remain instruction surfaces. |
34
39
 
35
40
  ## Model Selection
36
41
 
@@ -51,6 +56,21 @@ Canonical source of truth:
51
56
  - Keep commands concrete and verified. Document known failures or environment prerequisites.
52
57
  - Update this file when a tool is added, removed, or confirmed to load the project instructions.
53
58
  - Record MCP/tool connector setup separately from model-selection setup. Tool access and model choice are different controls.
59
+ - Do not claim an orchestrated run from IDE delegation alone. Require runtime status, events, checkpoint, and scoped commit evidence.
60
+
61
+ ## Executable Runtime
62
+
63
+ Install `@appsforgood/agent-kit-runtime`, configure credential references and deterministic aliases in `.agent-kit/orchestrator.json`, then run:
64
+
65
+ ```bash
66
+ agent-kit orchestrate validate
67
+ agent-kit orchestrate plan "Describe the goal"
68
+ agent-kit orchestrate run "Describe the goal"
69
+ agent-kit orchestrate approve <run-id>
70
+ agent-kit orchestrate status <run-id>
71
+ ```
72
+
73
+ Runs use explicit roster sequences, SQLite checkpoints, risk-tiered approvals, redacted JSONL evidence, an isolated Git worktree, Docker-first mutations, and an optional approved Cursor host executor. The runtime may create one scoped commit; it never merges, pushes, or opens a pull request. See `.agent-kit/assistant-adapters/orchestrator-runtime.md`.
54
74
 
55
75
  ## Cursor Activation
56
76