@ludecker/aaac 1.0.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 (110) hide show
  1. package/README.md +60 -0
  2. package/package.json +38 -0
  3. package/src/cli.mjs +138 -0
  4. package/src/generators/generate-commands.mjs +165 -0
  5. package/src/generators/generate-graph-commands.mjs +63 -0
  6. package/src/generators/generate-graph.mjs +242 -0
  7. package/src/lib/copy.mjs +36 -0
  8. package/src/lib/install.mjs +76 -0
  9. package/src/lib/paths.mjs +54 -0
  10. package/templates/cursor/aaac/capabilities/registry.json +106 -0
  11. package/templates/cursor/aaac/contract-schema.md +66 -0
  12. package/templates/cursor/aaac/contracts/commands/create-module.yaml +28 -0
  13. package/templates/cursor/aaac/contracts/commands/fix-bug.yaml +32 -0
  14. package/templates/cursor/aaac/contracts/commands/update-module.yaml +28 -0
  15. package/templates/cursor/aaac/contracts/skills/impact-analysis.yaml +17 -0
  16. package/templates/cursor/aaac/contracts/skills/investigation-lite.yaml +17 -0
  17. package/templates/cursor/aaac/contracts/skills/investigation.yaml +17 -0
  18. package/templates/cursor/aaac/contracts/skills/validation.yaml +14 -0
  19. package/templates/cursor/aaac/dependencies.yaml +14 -0
  20. package/templates/cursor/aaac/dispatch.md +135 -0
  21. package/templates/cursor/aaac/fitness-functions.yaml +34 -0
  22. package/templates/cursor/aaac/governance/gates.json +39 -0
  23. package/templates/cursor/aaac/graph.project.yaml +161 -0
  24. package/templates/cursor/aaac/layers.md +93 -0
  25. package/templates/cursor/aaac/lifecycle/lifecycle.json +78 -0
  26. package/templates/cursor/aaac/lifecycle/phases.json +19 -0
  27. package/templates/cursor/aaac/ontology.json +219 -0
  28. package/templates/cursor/aaac/ontology.md +90 -0
  29. package/templates/cursor/aaac/project.config.json +3 -0
  30. package/templates/cursor/aaac/run/RUN.md +72 -0
  31. package/templates/cursor/aaac/run/schema.json +83 -0
  32. package/templates/cursor/aaac/state/checkpoints/README.md +20 -0
  33. package/templates/cursor/agents/boundary-review.md +11 -0
  34. package/templates/cursor/agents/check-capability-trace.md +18 -0
  35. package/templates/cursor/agents/dependency-analysis.md +11 -0
  36. package/templates/cursor/agents/discovery-boundaries.md +11 -0
  37. package/templates/cursor/agents/discovery-inventory.md +14 -0
  38. package/templates/cursor/agents/discovery-ssot.md +11 -0
  39. package/templates/cursor/agents/fallow-check-changed.md +9 -0
  40. package/templates/cursor/agents/impact-analysis.md +22 -0
  41. package/templates/cursor/agents/plan-layer-map.md +11 -0
  42. package/templates/cursor/agents/plan-state-machines.md +11 -0
  43. package/templates/cursor/agents/release-git.md +36 -0
  44. package/templates/cursor/agents/system-decomposition.md +11 -0
  45. package/templates/cursor/agents/unit-test-run.md +19 -0
  46. package/templates/cursor/policies/implementation.md +8 -0
  47. package/templates/cursor/policies/master-rules.md +7 -0
  48. package/templates/cursor/skills/shared/api/SKILL.md +26 -0
  49. package/templates/cursor/skills/shared/architecture/SKILL.md +25 -0
  50. package/templates/cursor/skills/shared/architecture/orchestrator/SKILL.md +21 -0
  51. package/templates/cursor/skills/shared/architecture/refactor-analysis.md +302 -0
  52. package/templates/cursor/skills/shared/check/SKILL.md +47 -0
  53. package/templates/cursor/skills/shared/component/SKILL.md +24 -0
  54. package/templates/cursor/skills/shared/dependency-graph/SKILL.md +38 -0
  55. package/templates/cursor/skills/shared/discovery/SKILL.md +29 -0
  56. package/templates/cursor/skills/shared/documentation/SKILL.md +21 -0
  57. package/templates/cursor/skills/shared/documentation/orchestrator/SKILL.md +26 -0
  58. package/templates/cursor/skills/shared/documentation/orchestrator/contract.yaml +20 -0
  59. package/templates/cursor/skills/shared/documentation/write-arch-doc.md +168 -0
  60. package/templates/cursor/skills/shared/domain/SKILL.md +24 -0
  61. package/templates/cursor/skills/shared/execution/SKILL.md +34 -0
  62. package/templates/cursor/skills/shared/fitness-functions/SKILL.md +42 -0
  63. package/templates/cursor/skills/shared/governance/implementation/SKILL.md +424 -0
  64. package/templates/cursor/skills/shared/impact-analysis/SKILL.md +44 -0
  65. package/templates/cursor/skills/shared/integration/SKILL.md +22 -0
  66. package/templates/cursor/skills/shared/investigation/SKILL.md +46 -0
  67. package/templates/cursor/skills/shared/investigation/orchestrator/SKILL.md +22 -0
  68. package/templates/cursor/skills/shared/investigation-lite/SKILL.md +38 -0
  69. package/templates/cursor/skills/shared/migration/SKILL.md +22 -0
  70. package/templates/cursor/skills/shared/model/SKILL.md +22 -0
  71. package/templates/cursor/skills/shared/module-authoring/SKILL.md +29 -0
  72. package/templates/cursor/skills/shared/module-authoring/authoring-template.md +9 -0
  73. package/templates/cursor/skills/shared/planning/SKILL.md +30 -0
  74. package/templates/cursor/skills/shared/platform-release/SKILL.md +46 -0
  75. package/templates/cursor/skills/shared/platform-release/orchestrator/SKILL.md +51 -0
  76. package/templates/cursor/skills/shared/platform-release/orchestrator/contract.yaml +29 -0
  77. package/templates/cursor/skills/shared/platform-release/ship-procedure.md +31 -0
  78. package/templates/cursor/skills/shared/remove/SKILL.md +28 -0
  79. package/templates/cursor/skills/shared/reporting/SKILL.md +43 -0
  80. package/templates/cursor/skills/shared/rollback/SKILL.md +46 -0
  81. package/templates/cursor/skills/shared/root-cause/SKILL.md +24 -0
  82. package/templates/cursor/skills/shared/run/SKILL.md +64 -0
  83. package/templates/cursor/skills/shared/schema/SKILL.md +24 -0
  84. package/templates/cursor/skills/shared/testing/SKILL.md +24 -0
  85. package/templates/cursor/skills/shared/testing/orchestrator/SKILL.md +22 -0
  86. package/templates/cursor/skills/shared/validation/SKILL.md +56 -0
  87. package/templates/cursor/skills/shared/verbs/_dispatch-utils.md +90 -0
  88. package/templates/cursor/skills/shared/verbs/_lifecycle.md +87 -0
  89. package/templates/cursor/skills/shared/verbs/_object-skills.md +60 -0
  90. package/templates/cursor/skills/shared/verbs/check/orchestrator/SKILL.md +22 -0
  91. package/templates/cursor/skills/shared/verbs/check/orchestrator/contract.yaml +24 -0
  92. package/templates/cursor/skills/shared/verbs/create/orchestrator/SKILL.md +39 -0
  93. package/templates/cursor/skills/shared/verbs/create/orchestrator/contract.yaml +34 -0
  94. package/templates/cursor/skills/shared/verbs/fix/orchestrator/SKILL.md +33 -0
  95. package/templates/cursor/skills/shared/verbs/fix/orchestrator/contract.yaml +38 -0
  96. package/templates/cursor/skills/shared/verbs/release/orchestrator/SKILL.md +29 -0
  97. package/templates/cursor/skills/shared/verbs/release/orchestrator/contract.yaml +25 -0
  98. package/templates/cursor/skills/shared/verbs/remove/orchestrator/SKILL.md +25 -0
  99. package/templates/cursor/skills/shared/verbs/remove/orchestrator/contract.yaml +32 -0
  100. package/templates/cursor/skills/shared/verbs/review/orchestrator/SKILL.md +24 -0
  101. package/templates/cursor/skills/shared/verbs/review/orchestrator/contract.yaml +25 -0
  102. package/templates/cursor/skills/shared/verbs/test/orchestrator/SKILL.md +24 -0
  103. package/templates/cursor/skills/shared/verbs/test/orchestrator/contract.yaml +25 -0
  104. package/templates/cursor/skills/shared/verbs/update/orchestrator/SKILL.md +34 -0
  105. package/templates/cursor/skills/shared/verbs/update/orchestrator/contract.yaml +34 -0
  106. package/templates/cursor/skills/shared/verification/SKILL.md +28 -0
  107. package/templates/cursor/skills/shared/workflow/SKILL.md +25 -0
  108. package/templates/docs/agentic_architecture.md +131 -0
  109. package/templates/docs/architecture.md +5 -0
  110. package/templates/docs/master_rules.md +5 -0
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: shared-investigation-lite
3
+ description: >-
4
+ Lightweight pre-change investigation for create and update. Answers what exists,
5
+ what depends on it, and what constraints apply. Not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Investigation (lite)
10
+
11
+ **When:** create and update verb lifecycle — **before** planning.
12
+
13
+ **Readonly.** Do not edit files.
14
+
15
+ ## Three questions (mandatory)
16
+
17
+ 1. **What exists?** — current files, routes, types, tests for target scope
18
+ 2. **What depends on it?** — use [dependency-graph](../dependency-graph/SKILL.md) + domain inventory
19
+ 3. **What constraints apply?** — inventory Section 2, policies, object maturity
20
+
21
+ ## Output
22
+
23
+ ```yaml
24
+ exists: [bullets with path evidence]
25
+ depends_on: [domains, modules, objects]
26
+ constraints: [from inventory and policies]
27
+ open_questions: [0–3; empty preferred]
28
+ confidence:
29
+ architecture: 0.0–1.0
30
+ requirements: 0.0–1.0
31
+ scope: 0.0–1.0
32
+ ```
33
+
34
+ Pass output to [validation](../validation/SKILL.md). If any confidence below threshold → **STOP, REQUEST CLARIFICATION**.
35
+
36
+ ## Agents
37
+
38
+ Reuse readonly specs: [discovery-inventory.md](../../../agents/discovery-inventory.md), [discovery-ssot.md](../../../agents/discovery-ssot.md), [dependency-analysis.md](../../../agents/dependency-analysis.md) — 2–3 parallel max for lite path.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: shared-migration
3
+ description: >-
4
+ Schema migration files. Object migration (data layer). Not user-facing.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Shared migration
9
+
10
+ ## Scope
11
+
12
+ - `supabase/migrations/` only for DB shape changes
13
+ - One concern per migration; apply via Supabase MCP
14
+
15
+ ## Execution focus
16
+
17
+ - See [schema](schema/SKILL.md) for RLS and type sync
18
+ - Backward-compatible defaults; document breaking changes
19
+
20
+ ## Must not
21
+
22
+ - Edit applied production migrations in place — add new migration
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: shared-model
3
+ description: >-
4
+ Entities, DTOs, shared types, query shapes. Object model (data layer). Not user-facing.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Shared model
9
+
10
+ ## Scope
11
+
12
+ - `shared/` types, Zod schemas, domain entities in code
13
+ - Align with DB schema; derive — do not duplicate SSOT columns in stores
14
+
15
+ ## Execution focus
16
+
17
+ - Centralize invariants in schemas
18
+ - Map API ↔ model ↔ persistence at boundaries only
19
+
20
+ ## Fix / check focus
21
+
22
+ - Nullable vs required, enum coverage, query filters
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: shared-module-authoring
3
+ description: >-
4
+ Scaffolds domains/<slug>/update/ inventory + orchestrator when slug missing
5
+ from graph. Discovery swarm required. Not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Shared module-authoring
10
+
11
+ ## When
12
+
13
+ - `create-feature` for unknown slug
14
+ - Intent `create domain` / greenfield module
15
+ - Graph resolver finds no `domains/<slug>/update/`
16
+
17
+ ## Steps
18
+
19
+ 1. Discovery swarm (4–6 readonly) — inventory + constraints + out-of-scope
20
+ 2. Create `domains/<slug>/update/inventory/SKILL.md` from template in [authoring-template.md](authoring-template.md)
21
+ 3. Create `domains/<slug>/update/orchestrator/SKILL.md` + `contract.yaml` (copy cms pattern)
22
+ 4. Add slug to `graph.yaml` resolvers (`update-module-by-slug`, etc.)
23
+ 5. [reporting](../reporting/SKILL.md) — path to new domain
24
+
25
+ Do not change application code unless a separate code command is active.
26
+
27
+ ## Governance
28
+
29
+ [implementation](../governance/implementation/SKILL.md) applies only if authoring includes code in same run.
@@ -0,0 +1,9 @@
1
+ # Domain inventory template
2
+
3
+ Copy to `domains/<slug>/update/inventory/SKILL.md` and fill from discovery.
4
+
5
+ Sections required: Module identity, Constraints, Module inventory (last synced date), Tests, Anti-patterns.
6
+
7
+ Link `docs/architecture_<slug>.md` when created via `update-doc`.
8
+
9
+ Orchestrator: copy `domains/cms/update/orchestrator/` and set slug in contract.yaml.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: shared-planning
3
+ description: >-
4
+ Plans AAAC changes: SSOT, layers, size budgets, state machines. Readonly until
5
+ orchestrator approves. Invoked by graph — not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Shared planning
10
+
11
+ ## When
12
+
13
+ After `discovery_swarm`. **Does not edit files.**
14
+
15
+ ## Agents
16
+
17
+ Optional parallel readonly:
18
+
19
+ - [plan-layer-map.md](../../../agents/plan-layer-map.md)
20
+ - [plan-state-machines.md](../../../agents/plan-state-machines.md)
21
+
22
+ ## Plan document (internal)
23
+
24
+ - User intent → concrete paths (from domain inventory)
25
+ - SSOT owner for new state
26
+ - Extract before add if any file ≥80% budget
27
+ - Named machine states/events if async coordination added
28
+ - Migration + schema steps if DB changes
29
+
30
+ Orchestrator gates `execute` — no implementation until plan respects domain constraints.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: shared-platform-release
3
+ description: >-
4
+ Phased release swarm coordination for release-app. Wave 1 git (blocking),
5
+ Wave 2 Render deploy. Internal only.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Shared platform release
10
+
11
+ ## Swarm DAG
12
+
13
+ ```text
14
+ Preflight (optional tests)
15
+
16
+ Wave 1: release-git ← BLOCKING
17
+
18
+ Wave 2: release-render
19
+
20
+ Parent: verification + reporting
21
+ ```
22
+
23
+ ## Wave 1 — launch one agent
24
+
25
+ ```
26
+ Task (shell or generalPurpose): release-git
27
+ Read: agents/release-git.md, ship-procedure.md
28
+ Return: commit_sha, commit_message_*
29
+ On failure: abort pipeline
30
+ ```
31
+
32
+ ## Wave 2 — Render deploy
33
+
34
+ Only after Wave 1 `status: success`. Pass `commit_sha` and messages.
35
+
36
+ | Agent spec | Tool |
37
+ |------------|------|
38
+ | [release-render.md](../../../agents/release-render.md) | generalPurpose or render-assistant MCP |
39
+
40
+ ## Preflight
41
+
42
+ If intent contains "test" / "with tests": run `pnpm typecheck` before Wave 1.
43
+
44
+ ## Reference
45
+
46
+ Full step detail: [ship-procedure.md](ship-procedure.md)
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: release-app-orchestrator
3
+ description: >-
4
+ Orchestrates release-app with phased expert subagents: git (blocking),
5
+ then Render deploy verification.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # release-app orchestrator
10
+
11
+ ## Parse
12
+
13
+ - **Domain:** `production` (default) or environment token
14
+ - **Intent:** quoted ship notes (optional) — e.g. `"Ship with tests"`
15
+
16
+ ## Load
17
+
18
+ 1. [../SKILL.md](../SKILL.md) — swarm DAG
19
+ 2. [ship-procedure.md](../ship-procedure.md) — step reference
20
+ 3. [graph.yaml](../../../../aaac/graph.yaml) — `release-app`
21
+ 4. [ludecker-infrastructure](../../../ludecker/infrastructure/SKILL.md)
22
+
23
+ ## Phases
24
+
25
+ ### 0. Preflight
26
+
27
+ If intent requests tests: run `pnpm typecheck` before any git work ([shared/testing](../../testing/SKILL.md) patterns).
28
+
29
+ ### 1. Wave 1 — Git (blocking)
30
+
31
+ Spawn subagent per [agents/release-git.md](../../../../agents/release-git.md).
32
+
33
+ **Do not** start Wave 2 until `commit_sha` is returned.
34
+
35
+ ### 2. Wave 2 — Render
36
+
37
+ Spawn [release-render](../../../../agents/release-render.md) with `commit_sha`, `commit_message_first_line`, `commit_message_body`.
38
+
39
+ If Render `build_failed`, overall status is failed.
40
+
41
+ ### 3. Verify + report
42
+
43
+ - [verification](../../verification/SKILL.md): deploy live, intent met
44
+ - [reporting](../../reporting/SKILL.md): layman summary + technical details table per agent
45
+
46
+ ## Anti-patterns
47
+
48
+ - Starting Render before push completes
49
+ - Single agent doing git + deploy without expert prompts
50
+ - Using `plugin-render-render` MCP
51
+ - Force-pushing `main`
@@ -0,0 +1,29 @@
1
+ name: release-app-orchestrator
2
+ purpose: Ship to main with phased expert subagents (git, then parallel integrations)
3
+ inputs:
4
+ domain:
5
+ required: false
6
+ default: production
7
+ intent:
8
+ required: false
9
+ outputs:
10
+ commit_sha:
11
+ type: string
12
+ deploy_status:
13
+ type: string
14
+ report:
15
+ type: markdown
16
+ success_criteria:
17
+ - git push to main succeeded
18
+ - render deploy reached live or build failure reported with logs
19
+ - posthog and linear agents run after git (parallel wave)
20
+ failure_conditions:
21
+ - git push failed
22
+ - wave 2 started before commit_sha known
23
+ dependencies:
24
+ skills: [platform-release, testing, verification, reporting]
25
+ policies: [master-rules, mcp-and-deploy]
26
+ verification:
27
+ - git_pushed
28
+ - render_polled
29
+ - agent_wave_order_respected
@@ -0,0 +1,31 @@
1
+ # Release ship procedure (reference)
2
+
3
+ Canonical steps migrated from legacy `/ship-ludecker`. Subagents in `agents/release-*.md` own each slice.
4
+
5
+ ## Git (Wave 1 — blocking)
6
+
7
+ 1. Confirm repo: `signalbynoise/ludecker` (or local ludecker monorepo)
8
+ 2. `git status` + `git diff` + `git diff --staged` + `git log -5 --oneline`
9
+ 3. Never stage `.env`, `.env.local`, credentials, or API keys
10
+ 4. Draft 1–2 sentence commit message from diff and user intent
11
+ 5. `git add` intentional paths → `git commit` (HEREDOC message)
12
+ 6. Ensure on `main`: `git checkout main` if needed; `git pull --rebase origin main`
13
+ 7. `git push origin main` — on reject, rebase once more; never force-push main
14
+ 8. Output: `commit_sha`, `commit_message_first_line`, `commit_message_body`
15
+
16
+ **Rules:** No force-push main. On pre-commit hook failure: fix and new commit — never amend unless user asked.
17
+
18
+ ## Render (Wave 2 — after push)
19
+
20
+ MCP: `user-render` only (not `plugin-render-render`).
21
+
22
+ **Service SSOT:** `ludecker-website` (see `render.yaml`, `docs/deployment.md`).
23
+
24
+ 1. `list_services` — find `name === "ludecker-website"`, note `id`
25
+ 2. After push: `list_deploys` (`limit: 5`) — match deploy `commit.id` to `commit_sha`
26
+ 3. Poll up to **15 minutes**, every **30s**, until `status === "live"` or terminal failure
27
+ 4. Smoke check: `curl -fsS -o /dev/null -w "%{http_code}" https://ludecker-website.onrender.com/` — expect **200**
28
+
29
+ ## Preflight (optional, Wave 0)
30
+
31
+ If intent includes "with tests": run `pnpm typecheck` from repo root before git work.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: shared-remove
3
+ description: >-
4
+ Delete or retire code, routes, flags, migrations (with caution). Not user-facing.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Shared remove
9
+
10
+ ## When
11
+
12
+ `remove-*` commands after discovery confirms scope.
13
+
14
+ ## Mandatory before edits
15
+
16
+ 1. List blast radius (imports, routes, tests, docs, feature flags)
17
+ 2. Confirm no production dependency (grep + Fallow if available)
18
+ 3. Prefer feature-flag off before hard delete when rollout risk exists
19
+
20
+ ## Execution focus
21
+
22
+ - Remove dead code paths; update inventory/docs in same change
23
+ - Schema: deprecate column before drop when data may exist
24
+ - Never remove secrets or env from blueprint without render.yaml update
25
+
26
+ ## Must not
27
+
28
+ - Remove `app` shell or auth entry without explicit user confirmation in intent
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: shared-reporting
3
+ description: >-
4
+ AAAC user-facing report template. Plain language first. Not user-facing as a command.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Shared reporting
9
+
10
+ ## Template
11
+
12
+ ```markdown
13
+ ## [Command] — [Short title]
14
+
15
+ **Bottom line:** [One sentence]
16
+
17
+ ### What we did
18
+ - …
19
+
20
+ ### Verification
21
+ - Tests: …
22
+ - Intent: …
23
+ - Confidence: architecture / requirements / scope
24
+ - Fitness: pass/warning/fail summary
25
+ - Impact: blast_radius, affected domains
26
+
27
+ ### Rollback (if applicable)
28
+ - Plan reference or "not required"
29
+
30
+ ### Skill synced
31
+ - [If applicable] domains/<slug>/update/inventory refreshed
32
+
33
+ ### Follow-ups
34
+ - …
35
+
36
+ ---
37
+ <details>
38
+ <summary>Technical details</summary>
39
+
40
+ </details>
41
+ ```
42
+
43
+ Layman sections: no unexplained jargon. Put paths and commit refs in Technical details only.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: shared-rollback
3
+ description: >-
4
+ Rollback plan before execute — files, migrations, deploy. Required for protected
5
+ maturity and high blast_radius. Not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Rollback planning
10
+
11
+ **When:** Verb lifecycle phase `rollback` — before execute.
12
+
13
+ ## Question
14
+
15
+ ```text
16
+ If this fails, how do we undo it?
17
+ ```
18
+
19
+ ## Required when
20
+
21
+ - Object maturity **protected** (schema, migration, architecture)
22
+ - `impact_analysis.blast_radius: high`
23
+ - Database, auth, API, or deployment touch in plan
24
+
25
+ ## Output (mandatory)
26
+
27
+ ```yaml
28
+ rollback:
29
+ files:
30
+ - path/to/revert or "git checkout -- <paths>"
31
+ migrations:
32
+ - reverse_sql: "description or down migration path"
33
+ - note: "apply via Supabase MCP only with user confirm"
34
+ deployments:
35
+ - previous_release: "revert commit sha or Render rollback procedure"
36
+ data:
37
+ - backup_needed: true | false
38
+ - notes: optional
39
+ verified: true | false
40
+ ```
41
+
42
+ If rollback cannot be defined for a protected change → **STOP, REQUEST CLARIFICATION**.
43
+
44
+ ## Execute phase
45
+
46
+ Execution skill references this plan; does not invent rollback during execute.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: shared-root-cause
3
+ description: >-
4
+ Deep root-cause framing after investigation on fix paths. Not user-facing.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Root cause (fix only)
9
+
10
+ **When:** fix verb lifecycle — after [investigation](../investigation/SKILL.md), before planning.
11
+
12
+ ## Output (mandatory)
13
+
14
+ ```yaml
15
+ symptom: one line
16
+ root_cause: hypothesis with evidence (path:line)
17
+ contributing_factors: [optional bullets]
18
+ fix_strategy: minimal correct change (not symptom patch)
19
+ regression_risk: low | medium | high
20
+ ```
21
+
22
+ If root cause confidence &lt; 0.7 → **STOP, REQUEST CLARIFICATION** — do not plan or execute.
23
+
24
+ Feed `fix_strategy` and `regression_risk` into [impact-analysis](../impact-analysis/SKILL.md) and [rollback](../rollback/SKILL.md).
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: shared-run
3
+ description: >-
4
+ Create, update, and resume AAAC Runs. All execution state and observability
5
+ lives on the Run manifest. Not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Run management
10
+
11
+ **SSOT:** [run/schema.json](../../../aaac/run/schema.json), [run/RUN.md](../../../aaac/run/RUN.md)
12
+
13
+ Every AAAC command executes within a Run. No standalone execution-state or markdown logs.
14
+
15
+ ## Create Run
16
+
17
+ At dispatch step 2.5:
18
+
19
+ 1. `run_id` = `run_{YYYYMMDD}_{slug}` from command + object/domain
20
+ 2. Load `verb_runtime.<verb>` from graph → initial `pending`
21
+ 3. Write `state/runs/{run_id}/run.json`
22
+ 4. Set `status: running`, first phase, `phase_kind` from phases.json (`gate: true` → gate)
23
+
24
+ ## Update after each phase
25
+
26
+ 1. Append `log[]` entry (`phase_start` / `phase_complete` / `gate_pass` / `gate_fail`)
27
+ 2. Move phase from `pending` to `completed`
28
+ 3. Write `checkpoints/{phase}.json`
29
+ 4. Store phase outputs in `artifacts/` and reference in `artifacts{}`
30
+ 5. Append routing choices to `decisions[]`
31
+ 6. Update `phase`, `updated_at`; persist manifest
32
+
33
+ ## Gate failure → human approval
34
+
35
+ ```yaml
36
+ status: blocked
37
+ awaiting_approval: true
38
+ blocked_reason: "<specific reason>"
39
+ phase_kind: gate
40
+ ```
41
+
42
+ STOP. On user approval: log decision, clear `awaiting_approval`, set `status: running`, retry gate.
43
+
44
+ ## Capability resolution (record on Run)
45
+
46
+ When resolving object capabilities:
47
+
48
+ ```yaml
49
+ capabilities_resolved:
50
+ layer-boundaries:
51
+ providers:
52
+ - id: architecture
53
+ type: skill
54
+ ```
55
+
56
+ Include MCP providers (`type: mcp`) in decisions even though graph skills exclude them.
57
+
58
+ ## Resume
59
+
60
+ Read `state/runs/{run_id}/run.json`. Continue from `phase` when `status` is `running` or user approved `blocked`.
61
+
62
+ ## Complete
63
+
64
+ After `report`: set `status: completed`, write `artifacts.report`.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: shared-schema
3
+ description: >-
4
+ Data models, migrations, RLS. Used when object is schema. Not user-facing.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Shared schema
9
+
10
+ ## Scope
11
+
12
+ - `supabase/migrations/`, shared Zod/TS types, RLS policies
13
+ - SSOT: schema lives in migrations + shared types — never duplicate columns in app state
14
+
15
+ ## Execution focus
16
+
17
+ - New migration file per change; apply via Supabase MCP (`hjadkzfemzuvhpwbixbt`)
18
+ - Backward-compatible defaults; document breaking changes in report
19
+ - RLS and security advisors after apply
20
+
21
+ ## Check / test focus
22
+
23
+ - Migration order, nullable vs required, FK integrity
24
+ - Types consumed by server and app match migration
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: shared-testing
3
+ description: >-
4
+ Runs vitest and Fallow check_changed for AAAC workflows. Software pass/fail —
5
+ not goal verification. Not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Shared testing
10
+
11
+ ## When
12
+
13
+ Phase `test` (and `test_only` orchestrators).
14
+
15
+ ## Steps
16
+
17
+ 1. Run tests from domain inventory relevant to change
18
+ 2. Invoke [unit-test-run.md](../../../agents/unit-test-run.md) pattern for targeted vitest
19
+ 3. Fallow MCP → `check_changed` on touched files when configured
20
+ 4. `ReadLints` on edited paths
21
+
22
+ ## Output
23
+
24
+ Pass/fail summary with test names and Fallow verdict for `verification` skill.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: test-function-orchestrator
3
+ description: Orchestrates test-function — targeted journey/integration verification. Internal only.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # test-function orchestrator
8
+
9
+ ## Parse
10
+
11
+ - **Intent:** required — describes user journey (e.g. "add new user to project")
12
+ - **Domain:** optional slug in args for scope hint
13
+
14
+ ## Phases
15
+
16
+ 1. [discovery](../discovery/SKILL.md) — map journey to files/tests
17
+ 2. [planning](../planning/SKILL.md) — which tests to run or add
18
+ 3. [testing](../testing/SKILL.md) — run vitest/e2e as appropriate
19
+ 4. [verification](../verification/SKILL.md) — journey criteria met?
20
+ 5. [reporting](../reporting/SKILL.md)
21
+
22
+ Code changes only if intent explicitly requests fixing failures (then `execution`).
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: shared-validation
3
+ description: >-
4
+ Confidence gates before execute. STOP and request clarification when thresholds
5
+ not met. Not user-facing.
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Validation (confidence gates)
10
+
11
+ **When:** After plan, **before** impact_analysis / execute.
12
+
13
+ ## Thresholds (SSOT)
14
+
15
+ From [ontology.json](../../../aaac/ontology.json) `confidence`:
16
+
17
+ | Dimension | Minimum |
18
+ |-----------|---------|
19
+ | architecture | 0.9 |
20
+ | requirements | 0.8 |
21
+ | scope | 0.8 |
22
+
23
+ ## Inputs
24
+
25
+ - Plan from [planning](../planning/SKILL.md)
26
+ - Confidence scores from [investigation-lite](../investigation-lite/SKILL.md) or [investigation](../investigation/SKILL.md) + [root-cause](../root-cause/SKILL.md)
27
+ - Domain inventory constraints
28
+
29
+ ## Procedure
30
+
31
+ 1. Score each dimension 0.0–1.0 with one-line evidence
32
+ 2. Compare to thresholds
33
+ 3. If **any** below threshold:
34
+
35
+ ```yaml
36
+ status: blocked
37
+ awaiting_approval: true
38
+ blocked_reason: "confidence.{dimension} {score} below {threshold}"
39
+ ```
40
+
41
+ ```text
42
+ STOP — awaiting approval
43
+ Reason: {blocked_reason}
44
+ Run: {run_id}
45
+ ```
46
+
47
+ List specific questions for the user. **Do not proceed to execute** until user approves in chat.
48
+
49
+ 4. Record scores on Run `confidence` and gate result in `gates.results.validate`
50
+ 5. If at threshold: emit gate pass, continue gate stack
51
+
52
+ ## Plan sanity checks
53
+
54
+ - Plan respects inventory out-of-scope
55
+ - Plan names files to touch (no vague "update CMS")
56
+ - Protected/critical objects include rollback mention in plan or next rollback phase