ai-engineering-loop 2.2.0 → 2.4.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 +4 -4
- package/.agents/skills/ai-engineering-loop/references/loop-deliver.md +2 -2
- package/.agents/skills/ai-engineering-loop/references/loop-goal.md +3 -3
- package/.agents/skills/ai-engineering-loop/references/loop-maker.md +1 -0
- package/.agents/skills/ai-engineering-loop/references/loop-review.md +3 -4
- package/.agents/skills/ai-engineering-loop/references/loop-risky.md +1 -0
- package/.agents/skills/ai-engineering-loop/references/loop-verify.md +3 -3
- package/.claude/agents/judge.md +5 -2
- package/.grok/agents/judge.md +5 -2
- package/CHANGELOG.md +60 -0
- package/README.md +1 -0
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/adapters/spec/LICENSE +202 -0
- package/adapters/spec/NOTICE-AEL.md +26 -0
- package/adapters/spec/agents/ael-spec-codebase-details.md +71 -0
- package/adapters/spec/agents/ael-spec-comprehension.md +71 -0
- package/adapters/spec/agents/ael-spec-design.md +65 -0
- package/adapters/spec/agents/ael-spec-implementation-readiness.md +64 -0
- package/adapters/spec/agents/ael-spec-structural.md +67 -0
- package/adapters/spec/agents/ael-spec-style.md +68 -0
- package/adapters/spec/agents/ael-spec-synthesizer.md +73 -0
- package/adapters/spec/agents/ael-spec-zoom-out.md +76 -0
- package/adapters/spec/skills/ael-spec-brainstorm/SKILL.md +265 -0
- package/adapters/spec/skills/ael-spec-draft/SKILL.md +315 -0
- package/adapters/spec/skills/ael-spec-draft/references/design_doc.md +179 -0
- package/adapters/spec/skills/ael-spec-drift/SKILL.md +68 -0
- package/adapters/spec/skills/ael-spec-resolve/SKILL.md +188 -0
- package/adapters/spec/skills/ael-spec-review/SKILL.md +403 -0
- package/adapters/spec/skills/ael-spec-review-loop/SKILL.md +191 -0
- package/adapters/spec/standards/ael-spec-execution-instructions.md +36 -0
- package/adapters/spec/standards/ael-spec-feature-spec-standard.md +38 -0
- package/adapters/spec/standards/ael-spec-heilmeier-standard.md +32 -0
- package/adapters/spec/standards/ael-spec-implementation-readiness-standard.md +36 -0
- package/adapters/spec/standards/ael-spec-re-implementation-standard.md +39 -0
- package/adapters/spec/standards/ael-spec-zoom-out-standard.md +62 -0
- package/agents/maker.md +1 -1
- package/agents/shared/judge.body.md +5 -2
- package/bin/ai-engineering-loop.js +344 -78
- package/core/definition-of-done.md +2 -2
- package/core/escalation-policy.md +1 -1
- package/core/goal-contract.md +1 -1
- package/core/iteration-policy.md +2 -1
- package/core/judge-policy.md +10 -4
- package/core/orchestration-model.md +8 -7
- package/core/repo-config-schema.md +2 -2
- package/core/runtime-safety.md +3 -3
- package/core/spec-pack.md +47 -0
- package/lib/auto-update.js +8 -14
- package/lib/claimed-vs-reality.js +2 -2
- package/lib/cli-args.js +3 -1
- package/lib/design-ref.js +178 -0
- package/lib/docs.js +1 -1
- package/lib/doctor.js +0 -6
- package/lib/escalation.js +1 -1
- package/lib/fsutil.js +88 -0
- package/lib/gates.js +70 -27
- package/lib/generate-workflow.js +0 -29
- package/lib/goal-runtime.js +8 -2
- package/lib/guard-hooks.js +26 -7
- package/lib/guard.js +100 -10
- package/lib/hosts/doctor.js +17 -7
- package/lib/impact-map.js +31 -8
- package/lib/jsonl-ledger.js +104 -0
- package/lib/learn.js +4 -9
- package/lib/loop-groups.js +0 -25
- package/lib/migrations.js +1 -5
- package/lib/no-progress.js +119 -0
- package/lib/node-evidence.js +1 -5
- package/lib/orchestration.js +5 -361
- package/lib/personal-workflow.js +1 -1
- package/lib/quick.js +152 -0
- package/lib/receipt.js +13 -6
- package/lib/recipe-builder.js +3 -35
- package/lib/recipe-graph.js +2 -63
- package/lib/recipe.js +2 -4
- package/lib/review-ingest.js +116 -0
- package/lib/run-abandon.js +2 -1
- package/lib/run-compaction.js +4 -12
- package/lib/run-interactions.js +16 -71
- package/lib/run-lifecycle.js +25 -77
- package/lib/run-state.js +68 -17
- package/lib/run-watcher.js +11 -14
- package/lib/runtime-files.js +45 -1
- package/lib/safe-context.js +17 -6
- package/lib/sandbox.js +2 -1
- package/lib/smart-context.js +13 -14
- package/lib/spawn-command.js +94 -0
- package/lib/studio-layout.js +2 -8
- package/lib/studio-runtime.js +2 -1
- package/lib/studio-server.js +25 -5
- package/lib/sync-hosts.js +25 -2
- package/lib/tier.js +36 -10
- package/lib/user-state.js +2 -17
- package/lib/verification-lanes.js +115 -0
- package/lib/verification-recorder.js +110 -22
- package/lib/workflow-runtime.js +7 -4
- package/package.json +1 -2
- package/policies/review-budget.md +1 -1
- package/schemas/goal-contract.schema.json +87 -11
- package/.claude/skills/ai-engineering-loop/SKILL.md +0 -62
- package/.claude/skills/ai-engineering-loop/references/loop-commands.md +0 -24
- package/.claude/skills/ai-engineering-loop/references/loop-deliver.md +0 -10
- package/.claude/skills/ai-engineering-loop/references/loop-goal.md +0 -11
- package/.claude/skills/ai-engineering-loop/references/loop-hosts.md +0 -48
- package/.claude/skills/ai-engineering-loop/references/loop-maker.md +0 -14
- package/.claude/skills/ai-engineering-loop/references/loop-review.md +0 -20
- package/.claude/skills/ai-engineering-loop/references/loop-risky.md +0 -9
- package/.claude/skills/ai-engineering-loop/references/loop-verify.md +0 -20
- package/.claude/skills/animate/RECIPES.md +0 -324
- package/.claude/skills/animate/SKILL.md +0 -207
- package/.claude/skills/animate-expo/RECIPES.md +0 -385
- package/.claude/skills/animate-expo/SKILL.md +0 -263
- package/.claude/skills/animation-vocabulary/SKILL.md +0 -181
- package/.claude/skills/apple-design/SKILL.md +0 -290
- package/.claude/skills/ask-sonner/API.md +0 -64
- package/.claude/skills/ask-sonner/SKILL.md +0 -88
- package/.claude/skills/backend-development/SKILL.md +0 -272
- package/.claude/skills/backend-development/references/api-design-guidelines.md +0 -95
- package/.claude/skills/backend-development/references/query-and-database-best-practices.md +0 -53
- package/.claude/skills/backend-development/references/security-checklist.md +0 -60
- package/.claude/skills/emil-design-eng/SKILL.md +0 -674
- package/.claude/skills/find-animation-opportunities/SKILL.md +0 -140
- package/.claude/skills/improve-animations/AUDIT.md +0 -115
- package/.claude/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
- package/.claude/skills/improve-animations/SKILL.md +0 -109
- package/.claude/skills/mobile-native/SKILL.md +0 -311
- package/.claude/skills/pick-ui-library/SKILL.md +0 -85
- package/.claude/skills/prototype/PICKER.md +0 -197
- package/.claude/skills/prototype/SKILL.md +0 -98
- package/.claude/skills/review-animations/SKILL.md +0 -120
- package/.claude/skills/review-animations/STANDARDS.md +0 -187
- package/.claude/skills/write-swift/SKILL.md +0 -396
- package/lib/intern-catalog.js +0 -53
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineering-loop
|
|
3
|
-
description: Use when the user runs /ai-engineering-loop, says "run the engineering loop" or "devil's advocate review", asks to init or refresh living project context, or wants the Maker / Devil's Advocate / Judge engineering loop.
|
|
4
|
-
---
|
|
5
|
-
<!-- Generated from skill-src/ by npm run build:skills; do not edit. -->
|
|
6
|
-
|
|
7
|
-
# AI Engineering Loop
|
|
8
|
-
|
|
9
|
-
Stage details: `references/loop-*.md` beside this file (also via `docs`), read only on entering that stage. Specs and references: `npx ai-engineering-loop docs <name> [--section <h>]`; never read whole spec directories.
|
|
10
|
-
|
|
11
|
-
## Host rules
|
|
12
|
-
|
|
13
|
-
Same skill on every host. Before the first DA or Judge spawn, read your host's section in `loop-hosts` (exact tool, allowed keys, fallbacks).
|
|
14
|
-
1. Spawn `devil-advocate` then `judge` as fresh siblings with the host's own subagent tool, passing only keys its schema has; wait for each, never in the background or nested; `general-purpose` only if the named type is rejected. Never use a browser subagent as reviewer.
|
|
15
|
-
2. No subagent tool: same budgets in this session as `CONTEXT_ISOLATION_ONLY`; never claim independent execution.
|
|
16
|
-
3. A tool says "cannot determine the safety" or returns HTTP 400: stop that tool, do not retry, continue read-only, and tell the user (`loop-hosts`).
|
|
17
|
-
4. Models: the host catalog (`/models`, `grok models`); never type a model name.
|
|
18
|
-
|
|
19
|
-
## Commands
|
|
20
|
-
|
|
21
|
-
`init|status|refresh|sync-hosts|generate-adapter|generate-workflow`: run `npx ai-engineering-loop <command>` (`loop-commands`); do not commit unless asked. No task: offer `workflow interview` or a task; no Run. Otherwise: the loop.
|
|
22
|
-
|
|
23
|
-
## Loop
|
|
24
|
-
|
|
25
|
-
Map (not a second OS) of the 8-stage loop: Specify (stages 0-1), Make (stages 2-4), Review (stages 5-7), Deliver (stage 8). Parent = Maker + orchestrator; Devil's Advocate (DA) and Judge are fresh **siblings**, never nested or resumed. Gate failures override prose. Never edit `state.json`/`current.json`.
|
|
26
|
-
|
|
27
|
-
Tier (from `run --json`; it only rises). Do not skip Goal Contract, verification, Devil's Advocate, or Judge gates; the tier only decides who fills them.
|
|
28
|
-
- **T0** trivial (docs, typo, lint): `gate goal`, Maker, `verify`, claimed-vs-reality, `gate review`, `gate judge` (deterministic); no subagents.
|
|
29
|
-
- **T1** normal: frozen Goal, red test, `verify`, lean DA, `gate review --json`; spawn Judge only on `judgeRequired`.
|
|
30
|
-
- **T2** risky (HIGH_RISK_PATH, DOT business logic, >10 files): add `loop-risky` (blast radius, Judge on STRONG_MODEL). Unseen risk: `run --new --tier T2 --tier-reason <why>`.
|
|
31
|
-
|
|
32
|
-
0. `run --json [--mode report-only|assisted|unattended]` (`RUN_DIR` = `.ai-engineering-loop/runs/<runId>/`). Do not run `sync-hosts` per run; if `hostSkills.stale`, ask the user. Read `.ai-engineering-loop/glossary.md`, plus `lessons.md`/`workflow.md` if present.
|
|
33
|
-
1. Goal Contract: `loop-goal`. 2-4. Maker: `loop-maker`, then `gate maker`. 5. Verify: `loop-verify`. 6-7. DA and Judge: `loop-review`. 8. Deliver: `loop-deliver`.
|
|
34
|
-
|
|
35
|
-
Invariants (every tier):
|
|
36
|
-
- AC is a failure table. Do not freeze sunny-path-only. Chat agreement is not freeze.
|
|
37
|
-
- One red test per AC row (bugs: red repro) before the fix.
|
|
38
|
-
- Write claimed-vs-reality.md after `gate verification` passes. Do not spawn Devil's Advocate if the file is missing or any Claimed row lacks Reality.
|
|
39
|
-
- ITERATE at most to iteration 3, each with a **new** DA.
|
|
40
|
-
- Never infer human approval.
|
|
41
|
-
- After each child `budget record` real usage or `--unavailable`; never invent counts.
|
|
42
|
-
- No secrets or hidden reasoning in activity messages.
|
|
43
|
-
|
|
44
|
-
## Report header
|
|
45
|
-
|
|
46
|
-
When a subagent returned its own result (Grok: its own `subagent_id`):
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
Execution Mode: TRUE_INDEPENDENT_AGENT
|
|
50
|
-
Independent LLM Execution: PROVEN
|
|
51
|
-
Native Subagent Invocation: AVAILABLE
|
|
52
|
-
Review Method: True Independent Agent
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
When no subagent ran (tool AVAILABLE: mode adds `(reason: <why>)`):
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
Execution Mode: CONTEXT_ISOLATION_ONLY
|
|
59
|
-
Independent LLM Execution: NOT PROVEN
|
|
60
|
-
Native Subagent Invocation: UNAVAILABLE
|
|
61
|
-
Review Method: Clean-Slate Artifact Isolation Barrier
|
|
62
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Loop commands and Studio
|
|
2
|
-
|
|
3
|
-
- `init` / `status` / `refresh` / `sync-hosts`: run `npx ai-engineering-loop <command>` in the repo. `sync-hosts` installs the core pack into hosts that already exist; `--pack backend|design` opts in, and user-edited files are backed up first. Do not commit unless asked.
|
|
4
|
-
- `onboard`: load skill `project-onboarding` to fill `.ai-engineering-loop/architecture.md` and `conventions.md` from the code with evidence. Never automatic.
|
|
5
|
-
- `generate-adapter`: load skill `generate-adapter` if present. Grill Q1-Q5, then write `.ai-engineering-loop/adapter.md`. Do not start Maker.
|
|
6
|
-
- `generate-workflow`: load skill `generate-workflow` if present. Grill Q1-Q6. Q6 Maker intern: list numbered options from the host model catalog (see Host rules) plus `none`; if there is no catalog, offer only `none`. Do not type a model name. Write `.ai-engineering-loop/workflow.md` and an empty `lessons.md` if missing. Do not start Maker. Missing `maker_intern` means INVOCATION_UNAVAILABLE.
|
|
7
|
-
|
|
8
|
-
- Never run `update apply|auto|rollback|policy` unless the user asks; the CLI applies updates itself under the user's policy (`docs runtime-safety`).
|
|
9
|
-
|
|
10
|
-
## Personal workflow
|
|
11
|
-
|
|
12
|
-
No task (`ael`, "hi", "what can you do"): offer, numbered, 1) build my workflow, 2) start a task, 3) show status. Do not create a Run or edit files. For 1: `workflow interview --json`, show the pre-filled answers with their evidence, let the user confirm or change them, write the answers to a temp file, then `workflow propose --answers <file> --json` and show the diff. Install only after the user says yes: `workflow accept --proposal <id> --by <name>`. At a no-task start or at Deliver, show at most one pending `workflow suggest` proposal. Never accept for the user. The safety backbone cannot be removed (`docs personal-workflow`).
|
|
13
|
-
|
|
14
|
-
## Studio
|
|
15
|
-
|
|
16
|
-
Stage commands (`run`, `goal`, `gate`, `verify`, `review-pack`, `deliver`, `node start|activity|complete`) stream into an open Studio; `status --json` reports `studioUrl`. Emit `npx ai-engineering-loop activity heartbeat --run <runId> --phase <phase> --message <short factual summary>` only during long manual work, never before every stage. 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.
|
|
17
|
-
|
|
18
|
-
## Budget
|
|
19
|
-
|
|
20
|
-
`run --json` already reports the budget; run `budget status --run <runId>` only before each new iteration. After each child, `budget record --input <n> --output <n> --model <id> --run <runId>` from provider usage. No usage shown: `budget record --unavailable --run <runId>` once; ASSISTED continues and discloses it at delivery (do not ask the human); UNATTENDED fails that command, so stop and escalate. `budget pause` is the kill switch. The ledger mode is immutable. UNATTENDED or budget errors: `docs runtime-safety`.
|
|
21
|
-
|
|
22
|
-
## Resuming
|
|
23
|
-
|
|
24
|
-
`state --json` gives the current runId only when resuming a run. If stopping mid-loop, write `.ai-engineering-loop/tasks/handoff.md` (`docs handoff-policy`).
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Stage 8: Delivery
|
|
2
|
-
|
|
3
|
-
- After Judge PASS, run the `after_pass` hook, then the Stage 8 adapter from `.ai-engineering-loop/adapter.md`.
|
|
4
|
-
- Before any push, run `npx ai-engineering-loop doctor`: `✗ adapter-*` (unknown `adapter_type`, missing spec) must be fixed; `! adapter-*` (gh/glab not logged in, configured type differs from the detected one) needs a human look. `deliver` repeats this check: UNATTENDED stops before writing, ASSISTED only warns.
|
|
5
|
-
- The PR/MR body includes `Steps to Reproduce & Testing (QA)`; bugfix placeholders must not stay empty. Disclose any `budget record --unavailable`.
|
|
6
|
-
- Preview remote payloads; never include context packs, usage ledgers, raw logs, or credentials.
|
|
7
|
-
- ASSISTED: wait for explicit human approval and never infer it. Then one call: `npx ai-engineering-loop deliver --run <runId> --destination <where> --summary <text> --approve --by <name>` (approves READY approval nodes, writes `RUN_DIR/delivery.json` with `humanApproved: true`, runs `gate delivery`). Without `--approve` it refuses in ASSISTED.
|
|
8
|
-
- Long form: `node status --run <runId>`, `node approve delivery-approval --yes --by <name> --run <runId>` for each READY approval node, write `RUN_DIR/delivery.json`, then `gate delivery`. If the gate says a node is not READY, follow its prerequisite hint; never bypass approval.
|
|
9
|
-
- Commit before `deliver` (its receipt binds `HEAD`; screenshots: `--evidence AC-N=<https-url>`). Paste `RUN_DIR/receipt.md` into the PR/MR Receipt section unchanged; ❌ stays ❌ (`docs pr-receipt`).
|
|
10
|
-
- Only the delivery gate completes the run. Then run `learn` so the next Run's packs carry its lessons.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Stage 1: Goal Contract
|
|
2
|
-
|
|
3
|
-
- If the user asks for ideas, list a short menu and wait; do not implement.
|
|
4
|
-
- Ambiguous task the user can answer: grill first (`docs grill-policy`): design tree, recommended answers, never ask look-up facts. T2 adds `loop-risky`.
|
|
5
|
-
- If the user prompt has no numbered AC, draft the contract (`docs goal-contract` if needed), list it, and wait. Chat agreement is not freeze.
|
|
6
|
-
- AC is a failure table: each row has a statement, required evidence, and failure cases. Do not freeze sunny-path-only. T0 may use 1-3 rows that still list failure cases.
|
|
7
|
-
- Emit `npx ai-engineering-loop activity goal-drafting --run <runId> --message <summary>`, write the contract JSON to a repository-local temporary file, then `npx ai-engineering-loop goal draft --run <runId> --file <file> --revision <currentRevision>` so Studio shows the exact draft.
|
|
8
|
-
- Wait for the explicit human freeze, then `npx ai-engineering-loop goal freeze --latest --run <runId> --by human` (or `--revision <r> --hash <h>`). T0 may write `RUN_DIR/goal-contract.json` and run `gate goal` directly.
|
|
9
|
-
- The freeze writes a DRAFT blast-radius map: `impact show --run <runId>`. ASSISTED: the human confirms or edits it (`impact confirm --by <name> [--allow <glob>] [--remove <path>]`); copy/CSS/comment-only goals: `impact skip --by <name> --reason <text>` (`docs blast-radius-map`).
|
|
10
|
-
- Do not edit production code until the Goal gate passes.
|
|
11
|
-
- After the freeze, work from the frozen contract (`goal show --run <runId>`), not the drafting chat; compact the conversation there if the host supports it.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Host rules: subagent tools per host
|
|
2
|
-
|
|
3
|
-
Read only your host's section, before the first Devil's Advocate (DA) or Judge spawn. Every host shares the loop, budgets, and gates; only the spawn mechanics differ. REPORT_ONLY (`audit`) uses the same spawn tool for one `devil-advocate` report review (`loop-maker`); never report CONTEXT_ISOLATION_ONLY next to an AVAILABLE subagent tool without a reason. Modes: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_PROCESS_AGENT`, `CONTEXT_ISOLATION_ONLY`, `UNAVAILABLE`.
|
|
4
|
-
|
|
5
|
-
## Certification tiers
|
|
6
|
-
|
|
7
|
-
`hosts list` and `hosts doctor` show each host's tier (`lib/hosts/registry.js`). **full**: a real `default` recipe run with reviewer subagents and every gate is recorded (`certifiedBy`: recipe, AEL version, date). **experimental**: reviewer subagents install, no recorded run; follow your section below and report the mode you actually got. **instruction-only**: no subagents; run DA and Judge in-session as `CONTEXT_ISOLATION_ONLY`. The compact rules for these hosts: `npx ai-engineering-loop docs AGENTS` (≤2 KB). No host is `full` until such a run is recorded.
|
|
8
|
-
|
|
9
|
-
## Claude Code (and Kiro-backed strict proxies)
|
|
10
|
-
|
|
11
|
-
Strict proxies (including Kiro) return HTTP 400 `REQUEST_BODY_INVALID` on unknown keys:
|
|
12
|
-
1. Use only tools that exist in this session. Spawn subagents with **Task** (or **Agent** if that is the only one), passing only `subagent_type`, `description`, `prompt`, and `run_in_background: false` only if the schema has it. Never invent other keys.
|
|
13
|
-
2. `subagent_type: devil-advocate` / `judge`; `general-purpose` only if rejected. No Task/Agent tool: review in this session as `CONTEXT_ISOLATION_ONLY`.
|
|
14
|
-
3. Bash or Write says "cannot determine the safety" or 400: stop that tool, do not retry, use Read/Grep/Glob, and tell the user to leave auto permission mode or add a permissions.allow rule, then start a new session.
|
|
15
|
-
4. Models: `/models` when it exists; never type a model name.
|
|
16
|
-
|
|
17
|
-
## Grok CLI
|
|
18
|
-
|
|
19
|
-
1. `spawn_subagent` present and `GROK_SUBAGENTS` not `0`: review is **INVOCATION_AVAILABLE**; **PROVEN** only after a child returns its own `subagent_id`. Otherwise use `CONTEXT_ISOLATION_ONLY`, disclosed; never call it a subagent review.
|
|
20
|
-
2. Siblings only (depth limit 1): `capability_mode: "execute"`, `background: false`, `isolation: none`, no `resume_from`. Forbidden `subagent_type` for DA/Judge: `caveman:cavecrew-reviewer`, `caveman:cavecrew-builder`, `caveman:cavecrew-investigator`, `explore`, `plan`. Unregistered: `general-purpose`, agent spec prepended, `description` prefixed `[devil-advocate]`/`[judge]`.
|
|
21
|
-
3. Models: `grok models` (drop grok-imagine-* and video); never type a model name. Headless `grok -p` is `FRESH_PROCESS_AGENT` only once it prints a model response.
|
|
22
|
-
4. Alias: `NATIVE_SUBAGENT` → `TRUE_INDEPENDENT_AGENT`.
|
|
23
|
-
|
|
24
|
-
## Antigravity (IDE, 2.0, `agy` CLI)
|
|
25
|
-
|
|
26
|
-
1. If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` (custom agents with `subagent: true`) as siblings, wait for each, never in the background; `general-purpose` only if the named type is rejected. Do not use `browser_subagent` (or the `browser` subagent).
|
|
27
|
-
2. No subagent tool: run the same budgets in this session as `CONTEXT_ISOLATION_ONLY`; do not claim independent agent execution.
|
|
28
|
-
3. Models: the host catalog (`/models` when it exists); never type a model name.
|
|
29
|
-
|
|
30
|
-
## Gemini CLI
|
|
31
|
-
|
|
32
|
-
1. Subagents `devil-advocate` and `judge` live in `~/.gemini/agents/` after `sync-hosts`; delegate to them by name when the session exposes them, one at a time, and wait.
|
|
33
|
-
2. Otherwise `CONTEXT_ISOLATION_ONLY`. Models: `/model`; never type a model name.
|
|
34
|
-
|
|
35
|
-
## Codex CLI
|
|
36
|
-
|
|
37
|
-
1. Custom agents `devil-advocate` and `judge` live in `~/.codex/agents/*.toml` after `sync-hosts`; spawn them as sibling agents when the session has a spawn tool, and wait for each result.
|
|
38
|
-
2. Otherwise `CONTEXT_ISOLATION_ONLY`. Models: the host catalog; never type a model name.
|
|
39
|
-
|
|
40
|
-
## Cursor, GitHub Copilot, OpenCode, Factory Droid, Augment, Qwen Code, Kiro, Junie
|
|
41
|
-
|
|
42
|
-
1. `sync-hosts` installs `devil-advocate` and `judge` in the host's own agent format. Delegate with the host's subagent tool by that name (Cursor subagents, Copilot custom agents, OpenCode `@devil-advocate`, Droid Task `subagent_type`, Auggie subagents, Qwen `/agents`, Kiro custom agents, Junie subagents), one at a time, and wait.
|
|
43
|
-
2. No subagent tool, or the agent is missing: `CONTEXT_ISOLATION_ONLY`.
|
|
44
|
-
|
|
45
|
-
## Other hosts (Windsurf/Devin, Amp, Zed, Goose, Cline, Roo, unknown)
|
|
46
|
-
|
|
47
|
-
1. Use a native subagent only if it can run the DA or Judge prompt with a fresh context and return its own result; read-only research subagents qualify only for DA.
|
|
48
|
-
2. Otherwise run DA and Judge in this session as `CONTEXT_ISOLATION_ONLY`, disclosed, with the same budgets.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Stages 2-4: Maker
|
|
2
|
-
|
|
3
|
-
- T1/T2: read `docs tdd-policy` before Maker. Use `npx ai-engineering-loop context query <term>` and `context related <file>` before opening broad source files.
|
|
4
|
-
- Branch on mode. REPORT_ONLY: never edit repository files; write `RUN_DIR/report.json` with summary and recommendations, then the report review below, run `gate report`, and stop. ASSISTED: the parent (or intern) is Maker; delivery later needs human approval. UNATTENDED: `sandbox create --run <runId>`, Maker works only in the returned worktreePath, never the parent checkout, then `sandbox capture --run <runId>`.
|
|
5
|
-
- Maker intern: read `maker_intern` from workflow.md (missing or `none` = parent is Maker). Confirm it through the host model catalog; otherwise the parent is Maker and you report INVOCATION_UNAVAILABLE. The intern cannot skip later gates or spawn DA/Judge.
|
|
6
|
-
- Guardrails: Claude Code enforces them after `hooks install`. Elsewhere, before an out-of-scope edit or a destructive command (`rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`, `git clean -fd`) run `guard check --tool edit --path <file>` or `--tool bash --command "<cmd>"`: `warn` = ask the human, `block` = do not run it.
|
|
7
|
-
- Bugs: red repro first. Features: one red test per AC row, then green.
|
|
8
|
-
- After package and manifest edits are stable, run `npx ai-engineering-loop refresh` once (drift during red-green is expected; do not refresh per test cycle).
|
|
9
|
-
- ASSISTED: `npx ai-engineering-loop gate maker --from-git` writes the exact working-tree diff (tracked and new files, excluding `.ai-engineering-loop/`) to `RUN_DIR/diff.patch` and gates it; or write that file yourself and run `gate maker`. UNATTENDED: `sandbox capture` writes it, then `gate maker`. The gate can raise the tier from the diff.
|
|
10
|
-
|
|
11
|
-
## REPORT_ONLY report review (recipe `audit`)
|
|
12
|
-
|
|
13
|
-
- Host has a subagent tool (`loop-hosts`): spawn ONE fresh `devil-advocate` sibling with report.json and the evidence paths it cites; it challenges unsupported or wrong findings with the usual DA budget. No Judge, no iteration loop: fold accepted findings once, drop rejected ones with evidence. Record `"review": {"executionMode": "TRUE_INDEPENDENT_AGENT", "nativeSubagent": "AVAILABLE", "reviewer": "devil-advocate", "childId": "<its own id>"}`.
|
|
14
|
-
- No subagent tool, or the spawn failed: do the same challenge in this session and record `"executionMode": "CONTEXT_ISOLATION_ONLY"` with `"reason"` (required by `gate report` when `nativeSubagent` is `AVAILABLE`). The header shows `Execution Mode: CONTEXT_ISOLATION_ONLY (reason: <why>)`.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Stages 6-7: Devil's Advocate and Judge
|
|
2
|
-
|
|
3
|
-
REPORT_ONLY runs skip these stages; their single report review is in `loop-maker`.
|
|
4
|
-
|
|
5
|
-
## Devil's Advocate (T1, T2)
|
|
6
|
-
|
|
7
|
-
- `npx ai-engineering-loop review-pack --run <runId> --json` returns the DA pack path, fast-path, escalation floor, and tier. Keep the lean path when eligible; add `context devil-advocate <files...>` only for files whose hunks are insufficient. The DA reads that pack or `RUN_DIR/diff.patch` (do not also write `tasks/current.diff`).
|
|
8
|
-
- Use the runtime policy `reviewProfile` (default `lean`); upgrade to `standard` or `thorough` only when the human asks or the budget gate requires it.
|
|
9
|
-
- Spawn a new DA as a sibling (Host rules) with the pack path, the changed paths as a short list, and claimed-vs-reality.md. Do not paste Maker rationale. DA prompt includes "at most 8 tool calls; read the diff file; skip css and generated files".
|
|
10
|
-
- Iteration 2+: give unresolved findings and new hunks, not the whole diff again.
|
|
11
|
-
- Wait, `budget record` its usage (or `--unavailable`), normalize its ledger into `RUN_DIR/findings.json` with runId and diffHash, then `npx ai-engineering-loop gate review --json`. Report Spec and Standards separately.
|
|
12
|
-
|
|
13
|
-
## Judge
|
|
14
|
-
|
|
15
|
-
- T0, or T1 when `gate review --json` reports `judgeRequired: false`: run `gate judge`; the CLI writes the deterministic verdict.
|
|
16
|
-
- Otherwise run `npx ai-engineering-loop escalation --json` and resolve the required tier through the host model catalog; if unavailable, escalate to the user. T2 needs STRONG_MODEL.
|
|
17
|
-
- Judge context: only run-summary.md, verification-summary.json (or verification.json), open-findings.json/findings.json, and the Goal hash; it reads the full diff only if those contradict each other. Judge prompt includes "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff".
|
|
18
|
-
- Spawn a fresh sibling Judge, wait, `budget record`, write `RUN_DIR/verdict.json` with `modelTier`, then `gate judge`. A gate failure overrides optimistic prose.
|
|
19
|
-
- Acting on findings (ITERATE or human MR comments): verify each one before changing code; fix valid ones test-first, decline invalid ones with evidence (skill `ael-receiving-code-review` if installed).
|
|
20
|
-
- ITERATE while iteration < 3: fix in the parent, re-verify, spawn a **new** DA (never resume the previous child). At the iteration ceiling (3) ESCALATE to the human instead.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# T2 risky tier
|
|
2
|
-
|
|
3
|
-
Applies to HIGH_RISK_PATH changes (auth, payments, migrations, secrets, infra), DOT business logic, more than 10 files, or a manual `--tier T2`.
|
|
4
|
-
|
|
5
|
-
- Grill before the Goal (`docs grill-policy`): design tree, recommended answers, no look-up questions.
|
|
6
|
-
- Business-logic changes need a blast radius: lifecycle sketch of what reads and writes the changed state; on `adapter_type: dot` load `task-impact-inquiry`. Skip it for docs, config, or UI-copy changes.
|
|
7
|
-
- Full DA (not the T1 lean shortcut) and Judge on STRONG_MODEL resolved through the host model catalog; if unavailable, escalate to the user. Never run the deterministic Judge for T2.
|
|
8
|
-
- UNATTENDED: sandbox worktree only, and `budget pause` is the kill switch (`docs runtime-safety`).
|
|
9
|
-
- The tier never falls back once raised.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Stage 5: Verification
|
|
2
|
-
|
|
3
|
-
- One call: `npx ai-engineering-loop verify --run <runId> [--cmd "<command>"]...` (defaults to `test_unit` from `.ai-engineering-loop/verification.md`). It records each command in parallel (`--serial` for dependent commands), binds bounded, redacted evidence to the gated diff, and only when all pass runs `gate verification`, `context compact`, and scaffolds claimed-vs-reality. Shell syntax needs `--shell`.
|
|
4
|
-
- Long form (same gate): `verification record --run <runId> -- <executable> [args...]` per command, `gate verification`, `context compact --run <runId>`, `context claimed-vs-reality --run <runId>`.
|
|
5
|
-
- A failed command is recorded honestly and returns non-zero; it cannot pass the gate. Vague "seems green" is invalid.
|
|
6
|
-
- Fill `.ai-engineering-loop/tasks/claimed-vs-reality.md`: Claimed from the actual change, Reality from command output. Do not spawn DA while the file is missing or any Claimed row lacks Reality.
|
|
7
|
-
- Hand-authored artifacts: `scaffold verification|findings|delivery --run <runId>` writes an incomplete `.template.json`; edit it into the real artifact, remove `_templateOnly`, and `validate <repository-relative-file>`. Templates are never evidence.
|
|
8
|
-
- Pass run-summary.md and verification-summary.json to reviewers instead of raw logs.
|
|
9
|
-
|
|
10
|
-
## No claim without fresh evidence
|
|
11
|
-
|
|
12
|
-
Before saying "done", "fixed", "passing", or "ready", run the proving command in this iteration and cite its output; earlier runs and "should work" are not evidence.
|
|
13
|
-
|
|
14
|
-
| Claim | Required evidence |
|
|
15
|
-
|---|---|
|
|
16
|
-
| Tests pass | the test command's output this iteration, exit 0 |
|
|
17
|
-
| Bug fixed | the red repro now passes, with the command shown |
|
|
18
|
-
| AC met | its claimed-vs-reality row cites that output |
|
|
19
|
-
|
|
20
|
-
After `verify`, continue from run-summary.md and verification-summary.json, not earlier logs or chat.
|
|
@@ -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.
|