yam-flow 0.1.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 (52) hide show
  1. package/AGENTS.md +18 -0
  2. package/COMMANDS.md +152 -0
  3. package/DECISIONS.md +70 -0
  4. package/LICENSE +21 -0
  5. package/README.md +174 -0
  6. package/ROADMAP.md +313 -0
  7. package/dist/bin/yam.d.ts +2 -0
  8. package/dist/bin/yam.js +2005 -0
  9. package/dist/lib/trust-kernel.d.ts +99 -0
  10. package/dist/lib/trust-kernel.js +300 -0
  11. package/package.json +101 -0
  12. package/references/context-reuse.md +59 -0
  13. package/references/current-docs.md +45 -0
  14. package/references/db-supabase-safety-lite.md +40 -0
  15. package/references/doctor-scan.md +56 -0
  16. package/references/eye.md +30 -0
  17. package/references/final-report.md +61 -0
  18. package/references/honest-completion.md +61 -0
  19. package/references/hook-lite.md +55 -0
  20. package/references/markdown-management.md +56 -0
  21. package/references/memory.md +59 -0
  22. package/references/mission.md +86 -0
  23. package/references/question.md +25 -0
  24. package/references/quick.md +70 -0
  25. package/references/risk-escalation.md +27 -0
  26. package/references/runtime-orchestration.md +57 -0
  27. package/references/scout.md +38 -0
  28. package/references/token-budget-reporter.md +44 -0
  29. package/references/token-economy.md +61 -0
  30. package/references/tool-trust-layer.md +115 -0
  31. package/references/trust-kernel.md +55 -0
  32. package/references/truth-matrix.md +47 -0
  33. package/references/ueye-proof.md +109 -0
  34. package/references/ueye.md +174 -0
  35. package/references/ui-quality.md +23 -0
  36. package/references/verification-levels.md +53 -0
  37. package/skills/deep/SKILL.md +77 -0
  38. package/skills/mission/SKILL.md +105 -0
  39. package/skills/question/SKILL.md +45 -0
  40. package/skills/quick/SKILL.md +81 -0
  41. package/skills/scout/SKILL.md +71 -0
  42. package/skills/ueye/SKILL.md +132 -0
  43. package/src/bin/yam.ts +1988 -0
  44. package/src/lib/trust-kernel.ts +398 -0
  45. package/templates/mission-plan.md +46 -0
  46. package/templates/runtime-proof.md +54 -0
  47. package/templates/tuning-log.md +39 -0
  48. package/templates/ueye-comparison.md +78 -0
  49. package/templates/ueye-review.md +110 -0
  50. package/templates/yam.project.md +73 -0
  51. package/tsconfig.json +27 -0
  52. package/yam.manifest.json +48 -0
@@ -0,0 +1,56 @@
1
+ # Doctor Scan
2
+
3
+ Doctor scan is the final mission pass that looks for false completion, stale context, hidden failures, and avoidable follow-up risk.
4
+
5
+ It is not another broad implementation pass.
6
+
7
+ ## Checklist
8
+
9
+ Direction:
10
+
11
+ - `yam.project.md` was read when project direction matters.
12
+ - The implementation still matches product direction, UI direction, tech stack, and no-go rules.
13
+ - New complexity is justified by the mission scope.
14
+
15
+ Changed surface:
16
+
17
+ - Changed files are within the approved mission scope.
18
+ - No unrelated refactors or metadata churn were introduced.
19
+ - Any generated files or markdown artifacts are intentional.
20
+
21
+ Verification:
22
+
23
+ - The smallest honest checks were run.
24
+ - Failed or skipped checks are reported.
25
+ - Browser, screenshot, or visual claims have actual visual evidence.
26
+ - Runtime/tmux/process claims have PID, port, session, pane, log, or equivalent evidence when relevant.
27
+
28
+ Cleanup:
29
+
30
+ - Dev servers, watchers, tmux panes, or child processes are stopped or intentionally left running.
31
+ - Cleanup is not claimed unless exit/closure was checked.
32
+ - Remaining running processes are named.
33
+
34
+ Truth status:
35
+
36
+ - `verified` or `proven` is used only when evidence supports it.
37
+ - `partial`, `blocked`, `skipped`, or `assumed` is used when appropriate.
38
+ - Fixture or mock evidence is not promoted to real runtime proof.
39
+
40
+ Report hygiene:
41
+
42
+ - Final answer includes remaining tasks when real work remains.
43
+ - Fix-first items are listed before planned tasks when they can block or distort the next run.
44
+ - The report is concise enough to avoid wasting context in the next session.
45
+
46
+ ## Output Shape
47
+
48
+ ```text
49
+ Doctor scan:
50
+ - Direction fit:
51
+ - Scope control:
52
+ - Verification:
53
+ - Runtime/cleanup:
54
+ - Truth status:
55
+ - Fix-first:
56
+ ```
@@ -0,0 +1,30 @@
1
+ # Eye
2
+
3
+ `eye` is visual inspection for UI/UX quality.
4
+
5
+ Inputs:
6
+
7
+ - Screenshot.
8
+ - URL.
9
+ - Current local app screen.
10
+ - Reference image.
11
+
12
+ Review dimensions:
13
+
14
+ - Direction fit.
15
+ - Visual hierarchy.
16
+ - CTA clarity.
17
+ - Spacing and alignment.
18
+ - Contrast.
19
+ - Responsive behavior.
20
+ - Empty, loading, error, disabled states.
21
+ - Interaction affordance.
22
+
23
+ Output:
24
+
25
+ - P0: blocker.
26
+ - P1: major issue.
27
+ - P2: noticeable quality issue.
28
+ - P3: polish.
29
+ - Safe fix suggestions.
30
+
@@ -0,0 +1,61 @@
1
+ # Final Report
2
+
3
+ Every `yam` route should end with a compact handoff that helps the next run avoid re-reading and re-planning.
4
+
5
+ ## Required Closing Check
6
+
7
+ Include these when they are useful and keep them short:
8
+
9
+ - What changed or what was found.
10
+ - What verification ran.
11
+ - What was not checked.
12
+ - Truth status, when verification or runtime claims matter.
13
+ - Remaining tasks.
14
+ - Fix-first items before planned tasks.
15
+
16
+ ## Anti-False-Completion Check
17
+
18
+ Before final response, compare claim strength to evidence:
19
+
20
+ - Do not say `verified` unless a relevant check actually ran and passed.
21
+ - Do not say cleanup is complete unless exit/closure was checked or the process is intentionally left running.
22
+ - Do not say UI was reviewed unless a screen, screenshot, browser check, or equivalent visual evidence was inspected.
23
+ - Do not hide skipped or blocked checks.
24
+
25
+ Use `references/honest-completion.md` and `references/truth-matrix.md` when the route has meaningful verification claims.
26
+
27
+ ## Remaining Tasks
28
+
29
+ Use this for work that still belongs to the current roadmap or request.
30
+
31
+ Examples:
32
+
33
+ - Implement the next UI state.
34
+ - Add browser verification.
35
+ - Move large component logic into a helper.
36
+ - Run build after a data-flow change.
37
+
38
+ ## Fix-First Items
39
+
40
+ Use this for issues that should be considered before starting the next planned task because they can slow work, break verification, or distort product direction.
41
+
42
+ Examples:
43
+
44
+ - Current lint/build errors.
45
+ - Failing tests.
46
+ - Broken dev server.
47
+ - Stale `yam.project.md`.
48
+ - Active hooks or instruction files that conflict with the route.
49
+ - Warnings that keep obscuring real problems.
50
+
51
+ ## Route Weight
52
+
53
+ For `$quick`, one short paragraph or a compact verification matrix is enough.
54
+
55
+ For `$ueye`, include source evidence, states/viewports checked, and P0-P3 issues only when they matter.
56
+
57
+ For `$deep` and `$mission`, include evidence, remaining risks, remaining tasks, and fix-first items.
58
+
59
+ Do not pad the final answer when there are no meaningful remaining tasks or fix-first items.
60
+
61
+ When budget drift matters, include or run `yam measure <route>` with approximate files, commands, report lines, and seconds.
@@ -0,0 +1,61 @@
1
+ # Honest Completion
2
+
3
+ `yam` should prevent false completion without turning every task into a heavy proof ceremony.
4
+
5
+ ## Completion Rule
6
+
7
+ Never claim that work is done, verified, cleaned up, visually checked, deployed, or fixed unless the matching evidence exists.
8
+
9
+ Use precise language:
10
+
11
+ - `done`: the requested edit or answer was completed.
12
+ - `verified`: an actual relevant check passed.
13
+ - `partial`: meaningful evidence exists, but not the full surface.
14
+ - `assumed`: inferred from code or context, with no execution evidence.
15
+ - `blocked`: the check could not run.
16
+ - `skipped`: intentionally not checked because it was not worth the cost.
17
+
18
+ ## Default Guard
19
+
20
+ Every route should ask before final response:
21
+
22
+ - What did I actually change or answer?
23
+ - What evidence do I actually have?
24
+ - What did I not check?
25
+ - Is the truth status stronger than the evidence?
26
+ - Are there fix-first items before the next planned task?
27
+
28
+ ## Lightweight By Default
29
+
30
+ For small work, the guard can be one sentence:
31
+
32
+ ```text
33
+ Verification: not run; change was limited to copy/CSS and inspected locally.
34
+ ```
35
+
36
+ For larger work, include proof summary and residual risk.
37
+
38
+ ## Runtime Guard
39
+
40
+ Runtime work needs stronger evidence because long-running processes can create false success:
41
+
42
+ - Record the command or process that was started.
43
+ - Record the PID, port, session, or tmux pane when available.
44
+ - Do not claim cleanup unless process exit or intended persistence is confirmed.
45
+ - Do not claim browser/visual verification unless a browser check, screenshot, or equivalent evidence exists.
46
+
47
+ ## What yam Does Not Do By Default
48
+
49
+ - No automatic proof gates.
50
+ - No forced subagents.
51
+ - No automatic tmux for ordinary work.
52
+ - No release-blocking runtime proof unless the user chooses `$deep` or `$mission`.
53
+ - No full `$mission` claim without real subagent/team evidence; downgrade to `$deep`, or mark mission partial/blocked.
54
+
55
+ Design baseline:
56
+
57
+ - Strict proof collects stronger physical proof and gates completion more aggressively.
58
+ - Modular skill workflows keep evidence boundaries and report what is known vs inferred.
59
+ - Minimal-core design keeps the rule short and obeyable.
60
+
61
+ `yam` keeps the guard explicit, cheap, and route-aware.
@@ -0,0 +1,55 @@
1
+ # Hook Lite
2
+
3
+ `yam-lite` is an opt-in advisory hook.
4
+
5
+ It exists to keep yam's direction present without turning every request into a proof gate.
6
+ It does not mean `yam` itself should stay shallow; it only keeps the always-on layer small enough to preserve momentum.
7
+
8
+ ## Contract
9
+
10
+ Allowed:
11
+
12
+ - Add short route guidance through `UserPromptSubmit` additional context.
13
+ - Remind the agent to check project direction and keep ordinary work moving.
14
+ - Remind the agent not to overclaim verification, cleanup, or visual evidence.
15
+ - Suggest `$quick`, `$ueye`, `$question`, `$scout`, `$deep`, or `$mission` based on obvious prompt signals.
16
+ - Mention a project pack or memory summary when present.
17
+ - Warn when conflicting proof-harness surfaces are active in the current project.
18
+
19
+ Not allowed:
20
+
21
+ - Run verification commands.
22
+ - Start tmux, browser QA, dev servers, or subagents.
23
+ - Block tools or permissions.
24
+ - Read broad project context.
25
+ - Force `$quick` or any other route.
26
+ - Install dependencies.
27
+ - Modify source files.
28
+
29
+ ## Toggle
30
+
31
+ ```bash
32
+ yam hook status --global
33
+ yam hook enable lite --global
34
+ yam hook disable lite --global
35
+
36
+ yam hook status --project /path/to/project
37
+ yam hook enable lite --project /path/to/project
38
+ yam hook disable lite --project /path/to/project
39
+ ```
40
+
41
+ Global hooks write to `~/.codex/hooks.json`.
42
+
43
+ Project hooks write to `<project>/.codex/hooks.json`.
44
+
45
+ `yam` backs up an existing hook file before enabling the lite hook.
46
+
47
+ ## Design Baseline
48
+
49
+ Broad hook systems often use route prep, tool evidence, permission gates, subagent evidence, and stop gates.
50
+
51
+ Selective skill systems favor lower-context workflows.
52
+
53
+ Minimal-core systems avoid hooks unless the rule is short and changes behavior.
54
+
55
+ `yam` keeps this hook advisory-only so beginner momentum is preserved while the agent still receives a direction nudge. Deeper proof belongs in `$deep` and real team execution belongs in `$mission`, not in an always-on prompt hook.
@@ -0,0 +1,56 @@
1
+ # Markdown Management
2
+
3
+ `yam` uses markdown as a small direction layer, not as an automatic control system.
4
+
5
+ ## Design Baseline
6
+
7
+ Strict proof systems:
8
+
9
+ - Creates and manages more markdown surfaces for agent control, route instructions, proof, and dashboards.
10
+ - Good for strict verification and anti-fake-work pressure.
11
+ - Risk: too much generated context and too much automatic intervention.
12
+
13
+ Modular skill systems:
14
+
15
+ - Splits markdown into modular instructions, rules, skills, and commands.
16
+ - Good for selective installation and low-context operation.
17
+ - Risk: too many optional files can still become noisy if installed wholesale.
18
+
19
+ Minimal-core systems:
20
+
21
+ - Keeps the core instruction document short and human-readable.
22
+ - Good for speed, obedience, and easy maintenance.
23
+ - Risk: weaker automated structure when work becomes broad or risky.
24
+
25
+ ## yam Policy
26
+
27
+ - `yam.project.md` is project-local, short, and user-owned.
28
+ - `SKILL.md` files are route instructions managed by the `yam` source.
29
+ - `references/*.md` files are optional detail and should be opened only when needed.
30
+ - `.yam/*.md` files are optional logs, summaries, or proof notes.
31
+ - `.yam/memory/records/*.json` files are opt-in sparse memory records, not an automatic control layer.
32
+ - Do not install hooks or automations to keep markdown "fresh".
33
+ - Do not overwrite an existing project pack during normal init.
34
+ - Update stale project packs narrowly instead of re-reading the whole project every run.
35
+
36
+ ## Project Pack Size
37
+
38
+ Target:
39
+
40
+ ```text
41
+ 500 to 1200 words
42
+ ```
43
+
44
+ Hard preference:
45
+
46
+ - Short enough to read before each route.
47
+ - Specific enough to prevent re-planning from scratch.
48
+ - Focused on product direction, UI direction, commands, risks, and no-go rules.
49
+
50
+ ## Write Rules
51
+
52
+ - Create `yam.project.md` only when missing.
53
+ - Never replace a user-edited pack without explicit approval.
54
+ - If command detection changes, report the new command and let the user or route update the pack narrowly.
55
+ - Keep generated sections clearly marked.
56
+ - Prefer one project pack over multiple competing instruction files.
@@ -0,0 +1,59 @@
1
+ # Memory
2
+
3
+ `yam memory` is an opt-in, project-local memory layer.
4
+
5
+ It keeps only the lightest useful parts from heavier harness patterns:
6
+
7
+ - Sparse records, one file per durable claim, and deliberate forgetting instead of injecting every old claim.
8
+ - Wrongness memory for repeated mistakes, wrong decisions, stale assumptions, and overconfident claims.
9
+ - Separate evidence, inference, and recommendation.
10
+ - Keep the mechanism small enough to obey.
11
+
12
+ Storage:
13
+
14
+ ```text
15
+ .yam/memory/records/<id>.json
16
+ .yam/memory/summary.md
17
+ ```
18
+
19
+ Use it for:
20
+
21
+ - Wrong decisions that should not be repeated.
22
+ - Repeated mistakes that waste time.
23
+ - Project direction changes.
24
+ - Lessons learned after a bug, failed implementation, or UX review.
25
+ - Verification command notes that should survive across sessions.
26
+
27
+ Do not use it for:
28
+
29
+ - Secrets, tokens, credentials, local private paths that should not be committed, or personal data.
30
+ - Full proof logs.
31
+ - Large research reports.
32
+ - Automatic gates or route enforcement.
33
+ - Every minor thought from a session.
34
+
35
+ Commands:
36
+
37
+ ```bash
38
+ yam memory init .
39
+ yam memory add . --kind wrong_decision --summary "..." --evidence "..." --action "..."
40
+ yam memory list .
41
+ yam memory summary .
42
+ yam memory resolve . mem-YYYYMMDD... --note "..."
43
+ ```
44
+
45
+ Kinds:
46
+
47
+ - `wrong_decision`
48
+ - `repeat_mistake`
49
+ - `direction_change`
50
+ - `lesson`
51
+ - `risk`
52
+ - `command`
53
+
54
+ Route behavior:
55
+
56
+ - Routes may read `.yam/memory/summary.md` only when the task is likely to repeat a known mistake or touch project direction.
57
+ - Routes should not read all memory records by default.
58
+ - If memory is stale or noisy, report that as a fix-first item instead of expanding context.
59
+ - Memory never proves completion by itself; it only informs direction and avoids repeated waste.
@@ -0,0 +1,86 @@
1
+ # Mission
2
+
3
+ `mission` is the real-subagent/team execution route for approved plans.
4
+
5
+ It exists so `deep` can stay single-agent and verification-centered while `mission` owns real team/subagent implementation and cross-verification.
6
+
7
+ Use it when:
8
+
9
+ - The user has approved a broad implementation plan.
10
+ - Real subagent/team lanes would reduce risk.
11
+ - Implementation, review, visual/runtime verification, and final proof need to happen together.
12
+ - The work is too broad for `quick` or `ueye`.
13
+
14
+ Do not use it for:
15
+
16
+ - Small edits.
17
+ - Ordinary scoped feature work.
18
+ - Pure research.
19
+ - Pure verification or single-agent heavy work.
20
+ - Tasks without an approved plan or clear acceptance criteria.
21
+ - Tasks where real subagents are unavailable, unsafe, or not worth the token/time cost; use `deep` instead.
22
+
23
+ Role model:
24
+
25
+ - Implementer: makes the scoped changes.
26
+ - Reviewer: checks correctness, risk, architecture, and direction.
27
+ - UX/browser verifier: checks UI behavior, browser state, screenshots, or flows when relevant.
28
+ - Doctor/scanner: checks direction fit, scope control, command output, stale instructions, runtime/cleanup evidence, false-completion risk, and remaining fix-first items.
29
+
30
+ Subagent policy:
31
+
32
+ - Mission requires real subagent/team orchestration to be considered a full mission.
33
+ - Use mission when the environment supports subagents and the work can be split into independent implementation, review, or verification lanes.
34
+ - If the task is bounded, the split is artificial, or the token/time cost would exceed the safety benefit, choose `deep` instead.
35
+ - If the user invoked mission but real subagents are unavailable or unsafe, downgrade to `deep` by default and report `subagent decision: downgraded_to_deep`.
36
+ - If the user explicitly insists on mission despite missing subagents, mark the result `partial` or `blocked`; do not treat self-review as team execution.
37
+ - The final proof must record the subagent decision: `used`, `downgraded_to_deep`, `unavailable_partial`, or `blocked`, with the reason.
38
+
39
+ Runtime use:
40
+
41
+ - Mission may use deep runtime verification when needed, but runtime proof alone does not make a mission if subagents were not used.
42
+ - tmux is recommended when a persistent dev server, watcher, or browser QA loop materially improves evidence.
43
+ - tmux is not mandatory for every mission.
44
+
45
+ Completion rule:
46
+
47
+ - No verified claim without evidence.
48
+ - No cleanup claim without exit/closure confirmation or intentional persistence.
49
+ - No visual claim without screen, browser, or screenshot evidence.
50
+
51
+ Suggested prompt:
52
+
53
+ ```text
54
+ $mission
55
+ 아래 구현 계획은 확정됐어.
56
+
57
+ 목표:
58
+ -
59
+
60
+ 범위:
61
+ -
62
+
63
+ 금지사항:
64
+ -
65
+
66
+ Acceptance criteria:
67
+ -
68
+
69
+ 실제 subagent/team 단위로 구현하고,
70
+ implementer/reviewer/UX verifier/doctor lane으로 교차 검증해줘.
71
+ 필요하면 tmux/dev server/browser QA/process cleanup proof까지 사용해줘.
72
+ 최종 보고에는 evidence, truth status, cleanup status, fix-first items, remaining tasks를 포함해줘.
73
+ ```
74
+
75
+ Doctor scan:
76
+
77
+ Use `references/doctor-scan.md` before final completion.
78
+ Keep the scan short, but cover direction fit, scope control, verification, runtime/cleanup, truth status, and fix-first items.
79
+
80
+ Design baseline:
81
+
82
+ - Strict proof would likely make this a team route with stronger gates and required agent evidence.
83
+ - Modular skill workflows split role responsibilities and keep evidence boundaries.
84
+ - Minimal-core design avoids adding this unless it clearly replaces a confusing middle route.
85
+
86
+ `yam` uses mission to replace the old standalone runtime route with a clearer heavy execution route.
@@ -0,0 +1,25 @@
1
+ # Question
2
+
3
+ `question` is the smallest yam route: direct Q&A without implementation, broad research, or proof loops.
4
+
5
+ Use it when:
6
+
7
+ - The user asks a simple explanation question.
8
+ - The answer can be given from stable knowledge or current conversation context.
9
+ - A local fact can be checked with one narrow file/command.
10
+ - The user wants a quick answer, not a decision memo.
11
+
12
+ Default behavior:
13
+
14
+ - Answer first.
15
+ - Keep the answer compact.
16
+ - Do not change files.
17
+ - Do not turn the answer into research unless freshness or uncertainty requires it.
18
+ - If comparison, market context, external references, or third-party judgment are needed, switch to `scout`.
19
+
20
+ Useful output shape:
21
+
22
+ - Direct answer.
23
+ - Why.
24
+ - Practical next step.
25
+ - Uncertainty, only when relevant.
@@ -0,0 +1,70 @@
1
+ # Quick
2
+
3
+ `quick` is the merged small-work route: fast patching, ordinary scoped implementation, and fast error scanning.
4
+
5
+ ## Selected Principles
6
+
7
+ Strict proof:
8
+
9
+ - Honest completion language.
10
+ - Real versus assumed verification.
11
+ - Stop instead of claiming success when evidence is missing.
12
+
13
+ Focused execution:
14
+
15
+ - Detect the smallest useful command.
16
+ - Group build/type/lint/test errors by file and root cause.
17
+ - Fix one error class at a time.
18
+ - Re-run the same focused command after a fix.
19
+ - Use a compact PASS/FAIL matrix.
20
+
21
+ Minimal core:
22
+
23
+ - Keep the instruction short enough to obey.
24
+ - Read the smallest useful context.
25
+ - Avoid ceremony unless it changes the result.
26
+
27
+ ## Lanes
28
+
29
+ Patch:
30
+
31
+ - Best for copy, CSS, labels, simple bugs, small docs, and small config changes.
32
+ - Usually read 1-3 files.
33
+ - Usually run 0-1 command.
34
+
35
+ Build-fix:
36
+
37
+ - Best when there is a concrete command failure.
38
+ - Read the error output first.
39
+ - Sort dependency/import/type errors before logic errors.
40
+ - Fix one root cause before moving to the next.
41
+
42
+ Scan:
43
+
44
+ - Best when the user wants to know what is broken before editing.
45
+ - Report grouped errors, likely root cause, smallest first fix, and verification command.
46
+ - If the scan sees destructive DB/Supabase, migration, production write, or RLS/policy signals, stop quick mode and recommend `$deep`.
47
+
48
+ ## Stop Conditions
49
+
50
+ Stop or recommend a heavier route when:
51
+
52
+ - The same error survives three focused attempts.
53
+ - A fix creates more errors than it removes.
54
+ - The change requires a new dependency, architecture change, or broad refactor.
55
+ - The surface touches auth, payments, data mutation, security, deployment, or process lifecycle.
56
+ - The requested work needs visual reference interpretation or screenshot-led QA.
57
+
58
+ ## Verification Matrix
59
+
60
+ Use this compact shape when commands were run:
61
+
62
+ ```text
63
+ Verification:
64
+ - typecheck: pass/fail/skipped
65
+ - lint: pass/fail/skipped
66
+ - test: pass/fail/skipped
67
+ - build: pass/fail/skipped
68
+ ```
69
+
70
+ Only include rows that matter to the actual run.
@@ -0,0 +1,27 @@
1
+ # Risk Escalation
2
+
3
+ Escalate by recommendation, not silent mode switching.
4
+
5
+ Recommend `$deep` when work touches:
6
+
7
+ - DB schema or data mutation.
8
+ - Supabase destructive commands, migrations, production writes, RLS, or policy changes.
9
+ - Auth, payment, billing, permissions.
10
+ - Security-sensitive code.
11
+ - Deployment or release configuration.
12
+ - Broad refactor or many files.
13
+ - Failing verification.
14
+ - Unknown ownership or unclear acceptance criteria.
15
+ - Long-running process lifecycle.
16
+
17
+ Recommend `$mission` only when the user has an approved plan and real subagent/team execution would materially reduce risk.
18
+
19
+ Suggested phrase:
20
+
21
+ ```text
22
+ This looks like a deeper route because it touches <risk>.
23
+ I can continue lightly, or switch to $deep for stronger single-agent verification.
24
+ Use $mission only if you want real subagent/team execution.
25
+ ```
26
+
27
+ Use `db-supabase-safety-lite.md` for the short DB/Supabase guardrail.
@@ -0,0 +1,57 @@
1
+ # Runtime Verification
2
+
3
+ Runtime verification now lives inside `$deep` and may be used by `$mission`.
4
+
5
+ It combines tmux/process management, cleanup confirmation, browser QA, and proof summary when a verification claim needs runtime evidence.
6
+
7
+ Use for:
8
+
9
+ - Long-running dev servers.
10
+ - Test watchers.
11
+ - Multi-step broad tasks.
12
+ - Browser QA sessions.
13
+ - Work requiring before/after evidence.
14
+
15
+ Do not use for ordinary small edits.
16
+
17
+ ## tmux Policy
18
+
19
+ tmux is a first-class runtime verification tool in `yam`, but it is not automatic.
20
+
21
+ Use tmux when it improves the work:
22
+
23
+ - Long-running dev servers.
24
+ - Test watchers.
25
+ - Multiple concurrent panes.
26
+ - Work where preserving logs or panes helps verification.
27
+ - Tasks that need a stable server while browser QA runs.
28
+
29
+ Do not use tmux just to make a small task look more verified.
30
+
31
+ When tmux is used, record:
32
+
33
+ - Session name.
34
+ - Pane id when available.
35
+ - Command running in the pane.
36
+ - Before/during/after observation.
37
+ - Whether the pane was left running intentionally or closed.
38
+
39
+ Runtime proof should include:
40
+
41
+ - Goal.
42
+ - Steps run.
43
+ - Commands/processes started.
44
+ - PIDs, ports, sessions, or panes when available.
45
+ - Checks before and after.
46
+ - Cleanup result.
47
+ - Truth status: proven, verified, partial, fixture_only, fixture_instrumented_real, integration_optional, real_required_missing, skipped, blocked, assumed.
48
+
49
+ ## Cleanup Rule
50
+
51
+ Do not claim cleanup succeeded unless one of these is true:
52
+
53
+ - Process exit was checked.
54
+ - tmux pane/session was checked closed.
55
+ - The process was intentionally left running and reported that way.
56
+
57
+ For `$deep` runtime verification and `$mission`, cleanup evidence matters more than a polished final sentence.
@@ -0,0 +1,38 @@
1
+ # Scout
2
+
3
+ `scout` is practical investigation and judgment, not academic research.
4
+
5
+ Use for:
6
+
7
+ - Current docs.
8
+ - Library or tool comparison.
9
+ - Design references.
10
+ - Product direction options.
11
+ - Risk discovery before implementation.
12
+ - Third-party judgment before implementation.
13
+ - Objective and subjective evaluation together.
14
+ - Macro, realistic, and future-facing direction checks.
15
+
16
+ Default behavior:
17
+
18
+ - Define the question narrowly.
19
+ - Prefer official or primary sources.
20
+ - Gather 3-7 high-signal references by default.
21
+ - Use current docs proof only for modern SDK/API/cloud-service behavior where stale knowledge is plausible.
22
+ - Summarize options and recommendation.
23
+ - Separate fact, inference, opinion, and recommendation.
24
+ - Do not change code unless the user asks.
25
+
26
+ Judgment format:
27
+
28
+ - Objective judgment: evidence, constraints, cost, feasibility, and known reality.
29
+ - Subjective judgment: taste, product instinct, design sensibility, and likely user perception.
30
+ - Macro view: category direction and broad movement.
31
+ - Realistic view: what can be done soon with the current project and skill level.
32
+ - Future view: second-order effects, durability, and what may age well or badly.
33
+
34
+ Escalate:
35
+
36
+ - Use `question` for direct answers that do not need sources.
37
+ - Use `deep` only when the user asks for heavy verification.
38
+ - Use implementation routes only after the user asks to change code.