ai-engineering-loop 1.13.0 → 1.15.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/.agents/skills/ai-engineering-loop/SKILL.md +62 -0
- package/.agents/skills/ai-engineering-loop/references/loop-commands.md +20 -0
- package/.agents/skills/ai-engineering-loop/references/loop-deliver.md +8 -0
- package/.agents/skills/ai-engineering-loop/references/loop-goal.md +10 -0
- package/.agents/skills/ai-engineering-loop/references/loop-hosts.md +44 -0
- package/.agents/skills/ai-engineering-loop/references/loop-maker.md +8 -0
- package/.agents/skills/ai-engineering-loop/references/loop-review.md +18 -0
- package/.agents/skills/ai-engineering-loop/references/loop-risky.md +9 -0
- package/.agents/skills/ai-engineering-loop/references/loop-verify.md +20 -0
- package/.claude/skills/ai-engineering-loop/SKILL.md +28 -47
- package/.claude/skills/ai-engineering-loop/references/loop-commands.md +20 -0
- package/.claude/skills/ai-engineering-loop/references/loop-deliver.md +8 -0
- package/.claude/skills/ai-engineering-loop/references/loop-goal.md +10 -0
- package/.claude/skills/ai-engineering-loop/references/loop-hosts.md +44 -0
- package/.claude/skills/ai-engineering-loop/references/loop-maker.md +8 -0
- package/.claude/skills/ai-engineering-loop/references/loop-review.md +18 -0
- package/.claude/skills/ai-engineering-loop/references/loop-risky.md +9 -0
- package/.claude/skills/ai-engineering-loop/references/loop-verify.md +20 -0
- package/CHANGELOG.md +116 -0
- package/README.md +90 -5
- package/README.npm.md +6 -2
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/adapters/dot/README.md +1 -1
- package/adapters/dot/skills/dot-dev-skill-router/SKILL.md +24 -16
- package/adapters/project-onboarding/SKILL.md +27 -0
- package/adapters/project-onboarding/references/output.md +29 -0
- package/adapters/quality/skills/ael-code-simplifier/SKILL.md +43 -0
- package/adapters/quality/skills/ael-receiving-code-review/SKILL.md +37 -0
- package/bin/ai-engineering-loop.js +1270 -75
- package/core/grill-policy.md +1 -1
- package/core/root-cause-analysis.md +6 -0
- package/core/runtime-safety.md +31 -3
- package/evals/cases/21-tier-t0-docs.json +34 -0
- package/evals/cases/22-tier-t1-small-pass.json +30 -0
- package/evals/cases/23-tier-t1-blocker.json +26 -0
- package/evals/cases/24-tier-t1-auth-escalates.json +30 -0
- package/lib/auto-update.js +488 -0
- package/lib/budget.js +31 -1
- package/lib/cli-args.js +95 -0
- package/lib/docs.js +91 -0
- package/lib/doctor.js +9 -14
- package/lib/gates.js +114 -1
- package/lib/host-skill-build.js +121 -0
- package/lib/hosts/agent-formats.js +135 -0
- package/lib/hosts/commands.js +126 -0
- package/lib/hosts/detect.js +56 -0
- package/lib/hosts/doctor.js +76 -0
- package/lib/hosts/redetect.js +60 -0
- package/lib/hosts/registry.js +271 -0
- package/lib/hosts/table.js +35 -0
- package/lib/migrations.js +84 -0
- package/lib/project-registry.js +148 -0
- package/lib/run-abandon.js +116 -0
- package/lib/run-state.js +6 -3
- package/lib/sync-hosts.js +456 -130
- package/lib/tier.js +134 -0
- package/lib/update-manager.js +17 -1
- package/lib/update-notice.js +192 -0
- package/lib/user-state.js +80 -0
- package/lib/verification-recorder.js +44 -0
- package/migrations/README.md +21 -0
- package/package.json +8 -4
- package/.agents/devil-advocate.md +0 -79
- package/.agents/judge.md +0 -58
- package/.agents/workflows/ai-engineering-loop.md +0 -24
- package/.claude/commands/ai-engineering-loop.md +0 -11
- package/.gemini/skills/ai-engineering-loop/SKILL.md +0 -74
- package/.gemini/skills/animate/RECIPES.md +0 -324
- package/.gemini/skills/animate/SKILL.md +0 -207
- package/.gemini/skills/animate-expo/RECIPES.md +0 -385
- package/.gemini/skills/animate-expo/SKILL.md +0 -263
- package/.gemini/skills/animation-vocabulary/SKILL.md +0 -181
- package/.gemini/skills/apple-design/SKILL.md +0 -290
- package/.gemini/skills/ask-sonner/API.md +0 -64
- package/.gemini/skills/ask-sonner/SKILL.md +0 -88
- package/.gemini/skills/backend-development/SKILL.md +0 -272
- package/.gemini/skills/backend-development/references/api-design-guidelines.md +0 -95
- package/.gemini/skills/backend-development/references/query-and-database-best-practices.md +0 -53
- package/.gemini/skills/backend-development/references/security-checklist.md +0 -60
- package/.gemini/skills/emil-design-eng/SKILL.md +0 -674
- package/.gemini/skills/find-animation-opportunities/SKILL.md +0 -140
- package/.gemini/skills/improve-animations/AUDIT.md +0 -115
- package/.gemini/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
- package/.gemini/skills/improve-animations/SKILL.md +0 -109
- package/.gemini/skills/mobile-native/SKILL.md +0 -311
- package/.gemini/skills/pick-ui-library/SKILL.md +0 -85
- package/.gemini/skills/prototype/PICKER.md +0 -197
- package/.gemini/skills/prototype/SKILL.md +0 -98
- package/.gemini/skills/review-animations/SKILL.md +0 -120
- package/.gemini/skills/review-animations/STANDARDS.md +0 -187
- package/.gemini/skills/write-swift/SKILL.md +0 -396
- package/.grok/commands/ai-engineering-loop.md +0 -11
- package/.grok/skills/ai-engineering-loop/SKILL.md +0 -94
- package/.grok/skills/animate/RECIPES.md +0 -324
- package/.grok/skills/animate/SKILL.md +0 -207
- package/.grok/skills/animate-expo/RECIPES.md +0 -385
- package/.grok/skills/animate-expo/SKILL.md +0 -263
- package/.grok/skills/animation-vocabulary/SKILL.md +0 -181
- package/.grok/skills/apple-design/SKILL.md +0 -290
- package/.grok/skills/ask-sonner/API.md +0 -64
- package/.grok/skills/ask-sonner/SKILL.md +0 -88
- package/.grok/skills/backend-development/SKILL.md +0 -272
- package/.grok/skills/backend-development/references/api-design-guidelines.md +0 -95
- package/.grok/skills/backend-development/references/query-and-database-best-practices.md +0 -53
- package/.grok/skills/backend-development/references/security-checklist.md +0 -60
- package/.grok/skills/emil-design-eng/SKILL.md +0 -674
- package/.grok/skills/find-animation-opportunities/SKILL.md +0 -140
- package/.grok/skills/improve-animations/AUDIT.md +0 -115
- package/.grok/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
- package/.grok/skills/improve-animations/SKILL.md +0 -109
- package/.grok/skills/mobile-native/SKILL.md +0 -311
- package/.grok/skills/pick-ui-library/SKILL.md +0 -85
- package/.grok/skills/prototype/PICKER.md +0 -197
- package/.grok/skills/prototype/SKILL.md +0 -98
- package/.grok/skills/review-animations/SKILL.md +0 -120
- package/.grok/skills/review-animations/STANDARDS.md +0 -187
- package/.grok/skills/write-swift/SKILL.md +0 -396
package/.agents/judge.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: judge
|
|
3
|
-
description: Use this agent after Devil's Advocate returns a Finding Ledger. Issues PASS, ITERATE, or ESCALATE from Validity plus Severity. Typical triggers include a completed adversarial review and an explicit judge request.
|
|
4
|
-
tools: view_file, grep_search, list_dir, run_command
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are the Judge for the AI Engineering Loop. You do not write application code. You issue one verdict: PASS, ITERATE, or ESCALATE.
|
|
8
|
-
|
|
9
|
-
## Budget (hard stop)
|
|
10
|
-
|
|
11
|
-
Finish in at most 4 tool calls, then emit the verdict. Read the Finding Ledger and Goal Contract first. Open source only to fact-check a location the ledger already cited. Do not re-review the whole diff. Do not run git log. Do not spawn children. Skip `*.css`, `*report-css*`, and generated/vendor files.
|
|
12
|
-
|
|
13
|
-
Use a lean decision style. The Judge decides; it does not write an audit report. Prefer compact verdict evidence over narrative summaries.
|
|
14
|
-
|
|
15
|
-
## Inputs
|
|
16
|
-
|
|
17
|
-
Use only paths in the spawn prompt: Goal Contract, verification evidence, Finding Ledger. Ignore Maker optimism and reviewer tone. Disposition never overrides Validity plus Severity.
|
|
18
|
-
|
|
19
|
-
AC source is the Goal Contract **file** only. Chat `setuju` and the parent transcript are not AC. Do not PASS because the parent agreed in chat. `CONTEXT_ISOLATION_ONLY` does not relax this.
|
|
20
|
-
|
|
21
|
-
ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows. ITERATE if claimed-vs-reality.md is missing or a Claimed row has empty Reality.
|
|
22
|
-
|
|
23
|
-
## Axes
|
|
24
|
-
|
|
25
|
-
Do not merge Spec and Standards into one ranking.
|
|
26
|
-
|
|
27
|
-
- Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE if iteration is 3 or more)
|
|
28
|
-
- Standards VALID BLOCKER or HIGH: ITERATE only when hardConvention is true
|
|
29
|
-
- Other Standards findings: ACCEPT as tradeoff; may still PASS
|
|
30
|
-
- INVALID findings: DISMISS, cannot block delivery
|
|
31
|
-
- VALID MEDIUM or LOW: ACCEPT as tradeoff; may still PASS
|
|
32
|
-
- Verification missing, vague, or non-zero exit: ITERATE
|
|
33
|
-
- All acceptance criteria proven, verification green, zero open blockers: PASS
|
|
34
|
-
|
|
35
|
-
## Output
|
|
36
|
-
|
|
37
|
-
Return a fenced JSON block:
|
|
38
|
-
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"verdict": "PASS",
|
|
42
|
-
"reason": "All acceptance criteria verified; 0 open blocking findings",
|
|
43
|
-
"action": "Proceed to context impact assessment and delivery adapter",
|
|
44
|
-
"blockingFindings": [],
|
|
45
|
-
"acceptableTradeoffs": [],
|
|
46
|
-
"dismissedFindings": []
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
`verdict` must be exactly PASS, ITERATE, or ESCALATE. Do not edit source.
|
|
51
|
-
|
|
52
|
-
Lean output caps:
|
|
53
|
-
|
|
54
|
-
- Keep `reason` under 900 characters.
|
|
55
|
-
- Keep `action` under 700 characters.
|
|
56
|
-
- Put only blocking IDs in `blockingFindings`; do not restate every accepted LOW/MEDIUM note.
|
|
57
|
-
- Summarize accepted tradeoffs as IDs plus one short phrase each.
|
|
58
|
-
- Do not quote the Goal Contract or Finding Ledger unless needed to resolve a disputed blocker.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineering-loop
|
|
3
|
-
description: Run the AI Engineering Loop on Antigravity (init, status, refresh, or full Maker then Devil's Advocate then Judge).
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Follow `policies/review-budget.md`. Parent is Maker plus orchestrator. Do not use `browser_subagent`.
|
|
7
|
-
|
|
8
|
-
Compact map (not a second OS): Specify (stages 0-1), Make (stages 2-4), Review (stages 5-7), Deliver (stage 8). Keep the 8-stage numbers. Do not skip Goal Contract, verification, Devil's Advocate, or Judge.
|
|
9
|
-
|
|
10
|
-
Deterministic gates are mandatory. Read `core/runtime-safety.md`. Stage 0 runs sync-hosts, status, then `npx ai-engineering-loop run [--mode report-only|assisted|unattended]`; `state --json` gives runId, immutable mode, and `.ai-engineering-loop/runs/<runId>/` (`RUN_DIR`). Never edit state.json. Run `budget status --run <runId>` before every model/subagent call and `budget record --input <actual> --output <actual> --model <id> --run <runId>` immediately after provider usage is returned. Never invent counts. Missing accounting stops UNATTENDED and requires human direction in ASSISTED. `budget pause` is the kill switch. Keep Workflow Studio alive without exposing chain-of-thought: before each stage or long operation emit `npx ai-engineering-loop activity heartbeat --run <runId> --phase <phase> --message <short factual summary>`. Existing node and gate commands publish their lifecycle automatically. Persist human questions with `interaction question` so they appear once in Studio.
|
|
11
|
-
|
|
12
|
-
Inherited invariants: read `core/grill-policy.md`, `policies/tdd-policy.md`, and `.ai-engineering-loop/glossary.md`. On `adapter_type: dot`, grill includes blast radius: lifecycle sketch and load `task-impact-inquiry`. If the user prompt has no numbered AC, draft the contract, list a short menu and wait. Chat agreement is not freeze. AC is a failure table. One red test per AC row. Do not freeze sunny-path-only. Write claimed-vs-reality.md. Do not spawn Devil's Advocate if the file is missing or any Claimed row lacks Reality. Report Spec and Standards separately. Use `context query <term>` and `context related <file>` before opening broad source files. Use `reviewProfile` from runtime policy (default `lean`) for context packs; use iteration-delta review in iteration 2+. DA prompt: "at most 8 tool calls; read the diff file; skip css and generated files". Judge prompt: "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff". Never use `browser_subagent` as reviewer. `generate-workflow` reads workflow.md and lessons.md; missing maker_intern means INVOCATION_UNAVAILABLE. Do not type a model name.
|
|
13
|
-
|
|
14
|
-
Stage 1: if the user asks for ideas, list a short menu and wait; do not implement. Grill if the task is ambiguous (`core/grill-policy.md`). Chat agreement is not freeze. Publish the complete failure-table JSON through `npx ai-engineering-loop goal draft --run <runId> --file <repository-local-json> --revision <currentRevision>` so Studio shows the exact draft, then wait. After explicit human freeze, run `goal freeze --run <runId> --revision <reviewedRevision> --hash <reviewedHash> --by human`; `gate goal` remains legacy compatibility only. Do not start Maker before freeze. On business-logic change, and always on `adapter_type: dot`, grill includes blast radius: lifecycle sketch, four pillars (state, sibling, approval, queues), ASCII picture. Load `task-impact-inquiry` if present. Do not run a second interview. Passing unit tests are not isolation proof. Use `.ai-engineering-loop/glossary.md`. Name test seams. AC is a failure table (happy, empty/omit, boundary, sibling, error). One red test per AC row. Do not freeze sunny-path-only. Stages 2-4 branch on mode: REPORT_ONLY never edits repository files, writes RUN_DIR/report.json, runs `gate report`, and stops. ASSISTED uses normal Maker. UNATTENDED runs `sandbox create --run <runId>`, Maker only in the returned worktreePath, never edits the parent checkout, and runs `sandbox capture --run <runId>`. Read `maker_intern` from workflow.md (missing or none = parent is Maker). Do not type a model name. If intern is set, confirm it came from this host's list (`/models` if that command exists). If the list command is missing or the id is not on it, parent is Maker; say intern INVOCATION_UNAVAILABLE. Intern cannot skip verification, Devil's Advocate, or Judge. Maker: TDD at those seams (`policies/tdd-policy.md`): one red test per AC row. ASSISTED writes RUN_DIR/diff.patch; UNATTENDED capture writes it. After package/manifest edits stabilize, run `npx ai-engineering-loop refresh` once; drift during red-green is expected, so do not refresh after each test cycle. Then run `npx ai-engineering-loop gate maker`. Stage 5 may use `npx ai-engineering-loop verification record --run <runId> -- <executable> [args...]` to capture bounded, redacted output and generate verification.json plus its summary without a shell. Use `--shell -- "command"` only when necessary. Failed commands stay recorded and fail the verification gate. `npx ai-engineering-loop scaffold verification --run <runId>` (or `findings` / `delivery`) creates a deliberately incomplete template; edit it into real evidence, remove `_templateOnly`, and run `npx ai-engineering-loop validate <repository-relative-file>` for diagnostics. Templates never pass a gate. Generate AC rows with `npx ai-engineering-loop context claimed-vs-reality --run <runId>` and fill Claim/Reality from actual changes and command output. Run `npx ai-engineering-loop context compact --run <runId>`, pass compact summaries to reviewers instead of raw logs, then `gate verification`. Bugs: red repro first (`core/root-cause-analysis.md`). Mid-loop stop: `core/handoff-policy.md`.
|
|
15
|
-
|
|
16
|
-
If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` as siblings. Wait for each child. Do not run them in the background. Use `general-purpose` only if the named type is rejected.
|
|
17
|
-
|
|
18
|
-
5. Before Devil's Advocate: write `git diff` to `.ai-engineering-loop/tasks/current.diff` and put `git diff --name-only` in the child prompt. Do not paste Maker rationale. Write `.ai-engineering-loop/tasks/claimed-vs-reality.md` (AC, Claimed, Reality from command log). Do not spawn Devil's Advocate if the file is missing or any Claimed row lacks Reality.
|
|
19
|
-
6. Run `context fast-path --json`; keep the default lean path when eligible. Build `context diff-hunks --run <runId>` first, add `context devil-advocate` only for hunks that need full file context, check `budget status`, spawn DA with the pack path, wait, `budget record` actual usage, normalize RUN_DIR/findings.json with runId and diffHash, then `gate review`.
|
|
20
|
-
7. Run `escalation --json`, resolve the required tier from the host catalog, build Judge context from only run-summary.md, verification-summary.json (or verification.json), open-findings.json/findings.json, and the Goal hash; Judge must not read the full diff unless those summaries contradict each other. Check `budget status`, spawn Judge, wait, `budget record` actual usage, write verdict.json with modelTier, then `gate judge`.
|
|
21
|
-
|
|
22
|
-
If no subagent tool exists, run the same budgets in this session as CONTEXT_ISOLATION_ONLY. Do not claim independent agent execution.
|
|
23
|
-
|
|
24
|
-
Init/status/refresh/sync-hosts/generate-adapter/generate-workflow: `npx ai-engineering-loop <command>`. generate-workflow grills Q1-Q6. Q6 Maker intern: pick from the host catalog; do not type a model name. After Judge PASS, PR/MR body includes `Steps to Reproduce & Testing (QA)` and bugfix placeholders must not stay empty. Preview Stage 8 remote payloads and never include context packs, usage ledgers, raw logs, or credentials. In ASSISTED, wait for explicit human approval and write `humanApproved: true` in RUN_DIR/delivery.json; never infer it. Before `gate delivery`, inspect `npx ai-engineering-loop node status --run <runId>` and explicitly approve any READY approval prerequisite with `npx ai-engineering-loop node approve delivery-approval --yes --by <name> --run <runId>`. A blocked gate should explain the READY prerequisite and next command; never bypass approval. Only `gate delivery` completes the run. Confirmed process lessons go to lessons.md, not a chat dump.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineering-loop
|
|
3
|
-
description: Run the AI Engineering Loop (init, status, refresh, or full Maker then Devil's Advocate then Judge).
|
|
4
|
-
allowed-tools: "Read, Grep, Glob, Edit, Write, Task, Bash(npm run *), Bash(npm test *), Bash(npx *), Bash(git *)"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Follow `.claude/skills/ai-engineering-loop/SKILL.md`.
|
|
8
|
-
|
|
9
|
-
Use the Task tool for Devil's Advocate and Judge. Pass subagent_type, description, and prompt. If the schema includes run_in_background, set it false. Wait for each Task to finish. Write the git diff to a file and pass that path. DA: 8 tool calls. Judge: 4 tool calls, ledger and contract only. Do not let either roam the repo.
|
|
10
|
-
|
|
11
|
-
Arguments: init, status, refresh, sync-hosts, generate-adapter, generate-workflow, or a task description.
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineering-loop
|
|
3
|
-
description: Use when the user runs /ai-engineering-loop, asks to init or refresh living project context, or wants the Maker / Devil's Advocate / Judge engineering loop on Antigravity.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# AI Engineering Loop (Antigravity)
|
|
7
|
-
|
|
8
|
-
Canonical specs: if this workspace has `core/`, `agents/`, `policies/`, read those files. Otherwise run `npx ai-engineering-loop` and follow the published specs.
|
|
9
|
-
|
|
10
|
-
Follow `policies/review-budget.md` when that file exists. Parent is Maker plus orchestrator. Do not use `browser_subagent`.
|
|
11
|
-
|
|
12
|
-
## Host rule
|
|
13
|
-
|
|
14
|
-
If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` as siblings. Wait for each child. Do not run them in the background. Use `general-purpose` only if the named type is rejected.
|
|
15
|
-
|
|
16
|
-
If no subagent tool exists, run the same budgets in this session as CONTEXT_ISOLATION_ONLY. Do not claim independent agent execution.
|
|
17
|
-
|
|
18
|
-
Canonical mode ids: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_PROCESS_AGENT`, `CONTEXT_ISOLATION_ONLY`, `UNAVAILABLE`.
|
|
19
|
-
|
|
20
|
-
## Commands
|
|
21
|
-
|
|
22
|
-
- `init` / `status` / `refresh` / `sync-hosts` / `generate-adapter` / `generate-workflow`: run `npx ai-engineering-loop <command>` in the repo. Do not commit unless asked.
|
|
23
|
-
- `generate-adapter`: load skill `generate-adapter` if present. Grill Q1-Q5. Then write `.ai-engineering-loop/adapter.md`. Do not start Maker.
|
|
24
|
-
- `generate-workflow`: load skill `generate-workflow` if present. Grill Q1-Q6. Q6 Maker intern: if `/models` exists in this session, use it and show numbered options; else only `none`. Do not type a model name. Then write `.ai-engineering-loop/workflow.md` and empty `lessons.md` if missing. Do not start Maker.
|
|
25
|
-
- Any other argument: full loop for that task.
|
|
26
|
-
|
|
27
|
-
## Loop
|
|
28
|
-
|
|
29
|
-
Compact map (not a second OS): Specify (stages 0-1), Make (stages 2-4), Review (stages 5-7), Deliver (stage 8). Keep the 8-stage numbers. Do not skip Goal Contract, verification, Devil's Advocate, or Judge.
|
|
30
|
-
|
|
31
|
-
## Deterministic artifact gates (mandatory)
|
|
32
|
-
|
|
33
|
-
Keep Workflow Studio alive without exposing chain-of-thought: before each stage or long operation emit `npx ai-engineering-loop activity heartbeat --run <runId> --phase <phase> --message <short factual summary>`. Existing `node start|activity|complete` and `gate` commands publish node lifecycle automatically. Before asking the human, persist the question with `npx ai-engineering-loop interaction question --run <runId> --id <id> --message <text>` so it appears once in Studio. Never put secrets, hidden reasoning, or raw model context in activity messages.
|
|
34
|
-
|
|
35
|
-
Run `npx ai-engineering-loop state --json` to get the current runId and use `.ai-engineering-loop/runs/<runId>/` as `RUN_DIR`. Never edit state.json or current.json.
|
|
36
|
-
|
|
37
|
-
Read `core/runtime-safety.md`. Before every model or subagent call, run `budget status --run <runId>` and afterward run `budget record --input <actual> --output <actual> --model <id> --run <runId>` using provider-reported usage. Never invent usage. Missing usage stops UNATTENDED and requires human direction in ASSISTED. `budget pause` is the kill switch.
|
|
38
|
-
|
|
39
|
-
Inherited invariants remain mandatory: read `core/grill-policy.md`, `policies/tdd-policy.md`, and `.ai-engineering-loop/glossary.md`. On `adapter_type: dot`, grill includes blast radius: lifecycle sketch and load `task-impact-inquiry`. If the user prompt has no numbered AC, draft the contract, list a short menu and wait. Chat agreement is not freeze. AC is a failure table. One red test per AC row. Do not freeze sunny-path-only. Write claimed-vs-reality.md. Do not spawn Devil's Advocate if the file is missing or any Claimed row lacks Reality. Report Spec and Standards separately. Use `npx ai-engineering-loop context query <term>` and `context related <file>` before opening broad source files. Use the runtime policy `reviewProfile` (default `lean`) for context packs; do not upgrade to `standard` or `thorough` unless the human asks or the budget gate requires escalation. DA prompt includes "at most 8 tool calls; read the diff file; skip css and generated files". Judge prompt includes "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff". `generate-workflow` still reads workflow.md and lessons.md; missing maker_intern means INVOCATION_UNAVAILABLE. Do not type a model name.
|
|
40
|
-
|
|
41
|
-
1. Stage 0: sync hosts, check status, then run `npx ai-engineering-loop run [--mode report-only|assisted|unattended]` to create or resume the ledger. Run `state --json` and `budget status`. Read glossary, lessons, and workflow overlays. Required gates cannot be skipped.
|
|
42
|
-
2. Stage 1: grill ambiguous decisions and business blast radius first. Emit `npx ai-engineering-loop activity goal-drafting --run <runId> --message <summary>`. Write the Goal Contract JSON to a repository-local temporary file, then publish it with `npx ai-engineering-loop goal draft --run <runId> --file <file> --revision <currentRevision>` so Workflow Studio sees it and its ready state. Wait. Chat agreement is not freeze. After explicit human freeze, use `npx ai-engineering-loop goal freeze --run <runId> --revision <reviewedRevision> --hash <reviewedHash> --by human`; do not edit production code unless it passes. `gate goal` remains the legacy compatibility command, not the preferred revision-bound path.
|
|
43
|
-
3. After Goal freeze, branch on mode. REPORT_ONLY: never edit repository files; write `RUN_DIR/report.json`, run `gate report`, and stop. ASSISTED: use the normal Maker. UNATTENDED: run `sandbox create --run <runId>`, run Maker only in the returned worktreePath, never edit the parent checkout, then run `sandbox capture --run <runId>`. Resolve maker_intern only through the host catalog; otherwise parent is Maker. Intern cannot skip gates. Use red repro or TDD. ASSISTED writes `RUN_DIR/diff.patch`; UNATTENDED capture writes it. After package/manifest edits are stable, run `npx ai-engineering-loop refresh` once; drift during red-green is expected, so avoid refreshing after each test cycle. Then run `npx ai-engineering-loop gate maker`.
|
|
44
|
-
4. Stage 5: record each verification command with `npx ai-engineering-loop verification record --run <runId> -- <executable> [args...]`. It runs without a shell by default, captures bounded/redacted output, binds evidence to the gated diff, writes `RUN_DIR/verification.json`, and updates the summary. Use `--shell -- "command"` only when shell syntax is required. Failed commands are recorded and return non-zero; they cannot pass the gate. Run `npx ai-engineering-loop context compact --run <runId>` and pass run-summary.md and verification-summary.json to reviewers instead of raw logs whenever possible. Use `npx ai-engineering-loop context claimed-vs-reality --run <runId>` to scaffold AC rows from the frozen Goal, then fill both columns from real changes and command output. For hand-authored artifacts, `npx ai-engineering-loop scaffold verification --run <runId>` (or `findings` / `delivery`) creates an incomplete `.template.json`; edit it into the real artifact, remove `_templateOnly`, then use `npx ai-engineering-loop validate <repository-relative-file>` for diagnostics. Templates are never evidence. Run `npx ai-engineering-loop gate verification`; do not spawn DA unless it passes.
|
|
45
|
-
5. Write artifacts, then spawn. Before Devil's Advocate:
|
|
46
|
-
- Write `git diff` to a file (for example `.ai-engineering-loop/tasks/current.diff`).
|
|
47
|
-
- Write changed paths (`git diff --name-only`) into the child prompt as a short list.
|
|
48
|
-
- Put those paths in the child prompt. Do not paste Maker rationale.
|
|
49
|
-
- Write `.ai-engineering-loop/tasks/claimed-vs-reality.md` if missing. Do not spawn DA without it.
|
|
50
|
-
- If stopping mid-loop, write `.ai-engineering-loop/tasks/handoff.md` (`core/handoff-policy.md`).
|
|
51
|
-
6. Stage 6: Run `npx ai-engineering-loop context fast-path --json`; keep the default lean path when eligible. Build `npx ai-engineering-loop context diff-hunks --run <runId>`, then `context devil-advocate <files...>` only when hunks are insufficient. Use unresolved findings and new hunks instead of replaying accepted old findings. Check `budget status`, spawn DA with the pack path, wait, and `budget record` actual usage. Normalize its output into `RUN_DIR/findings.json` with runId and diffHash, then run `npx ai-engineering-loop gate review`.
|
|
52
|
-
7. Stage 7: Run `npx ai-engineering-loop escalation --json`, resolve the required tier through the host catalog, or escalate to the user. Build Judge context from only run-summary.md, verification-summary.json (or verification.json if the summary is missing), open-findings.json/findings.json, and the Goal hash; Judge must not read the full diff unless those summaries contradict each other. Check `budget status`, spawn Judge, wait, and `budget record` actual usage. Write `RUN_DIR/verdict.json` with modelTier, then run `npx ai-engineering-loop gate judge`.
|
|
53
|
-
8. ITERATE with iteration under 3: fix in the parent, re-verify, spawn a **new** Devil's Advocate.
|
|
54
|
-
9. After Judge PASS: run after_pass, then the configured Stage 8 adapter. PR/MR body includes `Steps to Reproduce & Testing (QA)`; bugfix placeholders must not stay empty. Preview remote payloads and never include context packs, usage ledgers, raw logs, or credentials. In ASSISTED, wait for explicit human approval and put `humanApproved: true` in `RUN_DIR/delivery.json`; never infer it. For recipe-bound Runs, check `node status --run <runId>` and explicitly approve every READY approval prerequisite (for example `node approve delivery-approval --yes --by <name> --run <runId>`). Then run `npx ai-engineering-loop gate delivery`; follow actionable prerequisite hints if the gate says the delivery node is not READY.
|
|
55
|
-
|
|
56
|
-
## Report header
|
|
57
|
-
|
|
58
|
-
When a child actually returned a result:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
Execution Mode: TRUE_INDEPENDENT_AGENT
|
|
62
|
-
Independent LLM Execution: PROVEN
|
|
63
|
-
Native Subagent Invocation: AVAILABLE
|
|
64
|
-
Review Method: True Independent Agent
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
When no subagent tool exists:
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
Execution Mode: CONTEXT_ISOLATION_ONLY
|
|
71
|
-
Independent LLM Execution: NOT PROVEN
|
|
72
|
-
Native Subagent Invocation: UNAVAILABLE
|
|
73
|
-
Review Method: Clean-Slate Artifact Isolation Barrier
|
|
74
|
-
```
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
# Animation Recipes
|
|
2
|
-
|
|
3
|
-
Ready-to-build implementations for the cases that come up most. Start from the recipe, then adapt — don't rebuild from scratch.
|
|
4
|
-
|
|
5
|
-
Curves are the `--ease-out`, `--ease-in-out`, and `--ease-drawer` tokens defined in SKILL.md.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Button press
|
|
10
|
-
|
|
11
|
-
Any pressable element. Instant feedback that the interface heard the user.
|
|
12
|
-
|
|
13
|
-
```css
|
|
14
|
-
.button {
|
|
15
|
-
transition: transform 160ms var(--ease-out);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.button:active {
|
|
19
|
-
transform: scale(0.97);
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
`scale()` scales children too — the label and icons come along, which is what makes it read as a physical press.
|
|
24
|
-
|
|
25
|
-
No hover gating needed here: `:active` is a real press on touch. Gate any `:hover` styling separately.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Dropdown, popover, menu, select
|
|
30
|
-
|
|
31
|
-
Scales out of its trigger, not out of thin air.
|
|
32
|
-
|
|
33
|
-
```css
|
|
34
|
-
.popover {
|
|
35
|
-
transform-origin: var(--transform-origin); /* Base UI supplies this */
|
|
36
|
-
transition:
|
|
37
|
-
opacity 200ms var(--ease-out),
|
|
38
|
-
transform 200ms var(--ease-out);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.popover[data-starting-style],
|
|
42
|
-
.popover[data-ending-style] {
|
|
43
|
-
opacity: 0;
|
|
44
|
-
transform: scale(0.95);
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The `transform-origin` is the whole point — the panel should look like it came out of the thing you clicked.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Tooltip
|
|
53
|
-
|
|
54
|
-
Same shape as a popover, faster, plus the detail most implementations miss.
|
|
55
|
-
|
|
56
|
-
```css
|
|
57
|
-
.tooltip {
|
|
58
|
-
transform-origin: var(--transform-origin);
|
|
59
|
-
transition:
|
|
60
|
-
transform 125ms var(--ease-out),
|
|
61
|
-
opacity 125ms var(--ease-out);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.tooltip[data-starting-style],
|
|
65
|
-
.tooltip[data-ending-style] {
|
|
66
|
-
opacity: 0;
|
|
67
|
-
transform: scale(0.97);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* Once one tooltip is open, neighbours open instantly */
|
|
71
|
-
.tooltip[data-instant] {
|
|
72
|
-
transition-duration: 0ms;
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The initial delay prevents accidental activation. After that, skipping both the delay and the animation makes the whole toolbar feel faster.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Modal
|
|
81
|
-
|
|
82
|
-
The one popover that stays centered.
|
|
83
|
-
|
|
84
|
-
```css
|
|
85
|
-
.modal {
|
|
86
|
-
transform-origin: center; /* exempt — not anchored to a trigger */
|
|
87
|
-
transition:
|
|
88
|
-
opacity 250ms var(--ease-out),
|
|
89
|
-
transform 250ms var(--ease-out);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.modal[data-starting-style],
|
|
93
|
-
.modal[data-ending-style] {
|
|
94
|
-
opacity: 0;
|
|
95
|
-
transform: scale(0.96);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.backdrop {
|
|
99
|
-
transition: opacity 250ms var(--ease-out);
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Animate the backdrop's opacity alongside it so they read as one surface.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Drawer / sheet
|
|
108
|
-
|
|
109
|
-
```css
|
|
110
|
-
.drawer {
|
|
111
|
-
transform: translateY(0);
|
|
112
|
-
transition: transform 500ms var(--ease-drawer);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.drawer[data-closed] {
|
|
116
|
-
transform: translateY(100%);
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
This is how Vaul hides a drawer before animating it in.
|
|
121
|
-
|
|
122
|
-
Add drag and it becomes a gesture problem — see **Drag to dismiss** below.
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Toast
|
|
127
|
-
|
|
128
|
-
```css
|
|
129
|
-
.toast {
|
|
130
|
-
opacity: 1;
|
|
131
|
-
transform: translateY(0);
|
|
132
|
-
transition:
|
|
133
|
-
opacity 400ms ease,
|
|
134
|
-
transform 400ms ease;
|
|
135
|
-
|
|
136
|
-
@starting-style {
|
|
137
|
-
opacity: 0;
|
|
138
|
-
transform: translateY(100%);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
- `ease` rather than `ease-out`, slightly slower than typical UI: Sonner reads as elegant partly because its motion is tuned to the component's personality rather than to the generic UI budget.
|
|
144
|
-
- If `@starting-style` isn't available, fall back to the mount flag:
|
|
145
|
-
|
|
146
|
-
```jsx
|
|
147
|
-
useEffect(() => { setMounted(true); }, []);
|
|
148
|
-
// <div data-mounted={mounted}>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
When toasts stack and the list reflows, the opacity change has to work against the height change. There's no formula for that pair — adjust until it feels right, then check it again the next day.
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## Accordion / collapse
|
|
156
|
-
|
|
157
|
-
```css
|
|
158
|
-
.content {
|
|
159
|
-
overflow: hidden;
|
|
160
|
-
transition:
|
|
161
|
-
height 200ms var(--ease-out),
|
|
162
|
-
opacity 200ms var(--ease-out);
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Keep it short — this is one of the few animations that costs layout on every frame, so a long duration is expensive as well as sluggish. Measure the content height in JS (or use a headless primitive that supplies it) rather than animating to `auto`.
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Stagger a group entrance
|
|
171
|
-
|
|
172
|
-
For a list or grid the user sees occasionally — not for a list they scroll past all day.
|
|
173
|
-
|
|
174
|
-
```css
|
|
175
|
-
.item {
|
|
176
|
-
opacity: 0;
|
|
177
|
-
transform: translateY(8px);
|
|
178
|
-
animation: fadeIn 300ms var(--ease-out) forwards;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.item:nth-child(2) { animation-delay: 50ms; }
|
|
182
|
-
.item:nth-child(3) { animation-delay: 100ms; }
|
|
183
|
-
.item:nth-child(4) { animation-delay: 150ms; }
|
|
184
|
-
|
|
185
|
-
@keyframes fadeIn {
|
|
186
|
-
to {
|
|
187
|
-
opacity: 1;
|
|
188
|
-
transform: translateY(0);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Stagger is decorative — it must never block interaction while it plays.
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Hold to confirm
|
|
198
|
-
|
|
199
|
-
For destructive actions where a plain click is too easy to fire by accident.
|
|
200
|
-
|
|
201
|
-
```css
|
|
202
|
-
.overlay {
|
|
203
|
-
clip-path: inset(0 100% 0 0);
|
|
204
|
-
transition: clip-path 200ms var(--ease-out); /* release: snappy */
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.button:active .overlay {
|
|
208
|
-
clip-path: inset(0 0 0 0);
|
|
209
|
-
transition: clip-path 2s linear; /* press: slow and deliberate */
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.button:active {
|
|
213
|
-
transform: scale(0.97);
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
`linear` is correct here — the fill is a progress indicator, and progress shouldn't ease.
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## Tab indicator with a color transition
|
|
222
|
-
|
|
223
|
-
Timing individual color transitions across a tab list never quite lands. Clip instead.
|
|
224
|
-
|
|
225
|
-
Duplicate the tab list. Style the copy as the active state — different background, different text color. Clip the copy so only the active tab shows, and animate the clip on change:
|
|
226
|
-
|
|
227
|
-
```css
|
|
228
|
-
.tabs-active-copy {
|
|
229
|
-
clip-path: inset(0 60% 0 20%); /* driven by the active tab's position */
|
|
230
|
-
transition: clip-path 250ms var(--ease-in-out);
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
The text and background change together, in perfect sync, because they're one element being revealed rather than two colors being interpolated.
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
## Scroll reveal
|
|
239
|
-
|
|
240
|
-
Marketing surfaces only. Don't do this to functional UI a user visits daily.
|
|
241
|
-
|
|
242
|
-
```css
|
|
243
|
-
.reveal {
|
|
244
|
-
clip-path: inset(0 0 100% 0);
|
|
245
|
-
transition: clip-path 600ms var(--ease-in-out);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.reveal[data-visible] {
|
|
249
|
-
clip-path: inset(0 0 0 0);
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Trigger with `IntersectionObserver`, or Motion's `useInView` with `{ once: true, margin: "-100px" }`. Fire it once — re-animating on every scroll-by is an interface fighting its reader.
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Drag to dismiss
|
|
258
|
-
|
|
259
|
-
The gesture recipe. Springs, not durations, because the user can reverse mid-motion.
|
|
260
|
-
|
|
261
|
-
```js
|
|
262
|
-
// Dismiss on a flick, not just on distance
|
|
263
|
-
const timeTaken = Date.now() - dragStartTime.current;
|
|
264
|
-
const velocity = Math.abs(swipeAmount) / timeTaken;
|
|
265
|
-
|
|
266
|
-
if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {
|
|
267
|
-
dismiss();
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
```js
|
|
272
|
-
// Set transform on the dragged element directly.
|
|
273
|
-
// Driving it through a CSS variable on the parent recalcs styles for every child.
|
|
274
|
-
element.style.transform = `translateY(${distance}px)`;
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Four details that separate a good drag from a bad one:
|
|
278
|
-
|
|
279
|
-
- **Pointer capture** once the drag starts, so it continues when the pointer leaves the element's bounds.
|
|
280
|
-
- **Multi-touch protection** — `if (isDragging) return` on new touch points, or switching fingers mid-drag makes the element jump.
|
|
281
|
-
- **Damping past boundaries** — dragging beyond a natural edge moves the element less the further it goes. Real things slow before they stop.
|
|
282
|
-
- **Friction, not a wall** — allow the over-drag with rising resistance rather than refusing it.
|
|
283
|
-
|
|
284
|
-
Settle with a spring so an interrupted drag keeps its velocity:
|
|
285
|
-
|
|
286
|
-
```js
|
|
287
|
-
{ type: "spring", duration: 0.5, bounce: 0.2 }
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## Masking a crossfade that won't settle
|
|
293
|
-
|
|
294
|
-
When two states overlap visibly during a transition and no amount of easing or duration tuning fixes it, blur the seam:
|
|
295
|
-
|
|
296
|
-
```css
|
|
297
|
-
.content {
|
|
298
|
-
transition:
|
|
299
|
-
filter 200ms ease,
|
|
300
|
-
opacity 200ms ease;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.content.transitioning {
|
|
304
|
-
filter: blur(2px);
|
|
305
|
-
opacity: 0.7;
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
Without blur the eye reads two distinct objects swapping. Blur blends them into one perceived transformation. Keep it under 20px — heavy blur is expensive, especially in Safari.
|
|
310
|
-
|
|
311
|
-
---
|
|
312
|
-
|
|
313
|
-
## Programmatic, without a library
|
|
314
|
-
|
|
315
|
-
When the motion needs JS control but not a dependency, WAAPI gives you CSS-grade performance:
|
|
316
|
-
|
|
317
|
-
```js
|
|
318
|
-
element.animate(
|
|
319
|
-
[{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }],
|
|
320
|
-
{ duration: 1000, fill: 'forwards', easing: 'cubic-bezier(0.77, 0, 0.175, 1)' }
|
|
321
|
-
);
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
Hardware-accelerated, interruptible, no bundle cost.
|