yam-flow 2.7.0 → 2.8.1
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.md +5 -0
- package/CHANGELOG.md +41 -0
- package/COMMANDS.md +52 -5
- package/README.md +40 -8
- package/ROADMAP.md +17 -6
- package/dist/bin/yam.js +462 -74
- package/dist/lib/external-updates.d.ts +9 -0
- package/dist/lib/external-updates.js +232 -4
- package/dist/lib/next-step.d.ts +61 -0
- package/dist/lib/next-step.js +340 -0
- package/dist/lib/release-auth-readiness.d.ts +81 -0
- package/dist/lib/release-auth-readiness.js +106 -0
- package/dist/lib/release-registry-status.d.ts +18 -0
- package/dist/lib/release-registry-status.js +37 -0
- package/dist/lib/scout-receipt.d.ts +89 -0
- package/dist/lib/scout-receipt.js +542 -0
- package/dist/lib/security-check.d.ts +98 -0
- package/dist/lib/security-check.js +262 -0
- package/dist/lib/security-integration.d.ts +8 -0
- package/dist/lib/security-integration.js +428 -0
- package/dist/lib/skill-installation.d.ts +30 -0
- package/dist/lib/skill-installation.js +470 -82
- package/dist/lib/trust-kernel.d.ts +2 -0
- package/dist/lib/trust-kernel.js +21 -2
- package/package.json +26 -4
- package/references/final-report.md +17 -1
- package/references/next-step.md +67 -0
- package/references/scout-wide-scan.md +16 -0
- package/references/security-check.md +131 -0
- package/references/study-note.md +10 -2
- package/references/tool-trust-layer.md +2 -0
- package/skills/deep/SKILL.md +6 -0
- package/skills/mission/SKILL.md +6 -0
- package/skills/quick/SKILL.md +5 -0
- package/skills/scout/SKILL.md +19 -9
- package/skills/ueye/SKILL.md +5 -0
- package/src/bin/yam.ts +465 -72
- package/src/lib/external-updates.ts +262 -4
- package/src/lib/next-step.ts +397 -0
- package/src/lib/release-auth-readiness.ts +148 -0
- package/src/lib/release-registry-status.ts +55 -0
- package/src/lib/scout-receipt.ts +593 -0
- package/src/lib/security-check.ts +184 -0
- package/src/lib/security-integration.ts +299 -0
- package/src/lib/skill-installation.ts +542 -87
- package/src/lib/trust-kernel.ts +25 -2
- package/templates/security-check-note.md +42 -0
- package/templates/security-gate.yml +44 -0
- package/yam.manifest.json +4 -3
package/AGENTS.md
CHANGED
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
19. Treat security as the first project lens: identify sensitive surfaces early and guide safer defaults before convenience.
|
|
22
22
|
20. Keep final reports short and concrete, but always include remaining tasks or state that none are meaningful.
|
|
23
23
|
21. When relevant, include architecture hygiene in the Study Note: avoid dumping unrelated logic into `page.tsx`, one-off component CSS into `global.css`, or structured product data into broad DB `jsonb` blobs when existing project boundaries, scoped styles, typed tables, constraints, or indexes fit better.
|
|
24
|
+
22. When an artifact changed, put `Next step` immediately after Study Note. Build it from a quick whole-process scan with current situation, forward outlook, a concrete critical opinion, improvement recommendations, and ordered fix-first then planned actions with evidence and ownership; do not merely rename remaining tasks.
|
|
25
|
+
|
|
26
|
+
## Security check gate
|
|
27
|
+
|
|
28
|
+
Before commit, push, CI approval, or deployment, run the configured `yam security check` gate for the exact stage and record its Security check block. Use `references/security-check.md`; preserve every SEC explanation, evidence reference, and unresolved status. Missing required evidence or a note-write failure blocks the stage. Local hooks are bypassable; enforce protected merge/deployment with a trusted CI policy and required checks. Never present a validated supplied report as an independent vulnerability scan.
|
|
24
29
|
|
|
25
30
|
## Latest Update Trigger
|
|
26
31
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to yam-flow are documented here.
|
|
4
4
|
|
|
5
|
+
## v2.8.1 - 2026-10-01
|
|
6
|
+
|
|
7
|
+
### Security
|
|
8
|
+
|
|
9
|
+
- Add nine explained SEC areas, exact-stage evidence validation and safe append-only Security check notes. Missing, stale or unresolved evidence blocks the operation.
|
|
10
|
+
- Add project snapshot checks, reviewed source/policy pins, commit/push hooks and required CI security checks. Package lifecycle verification uses the same reviewed revision on Linux, macOS and Windows.
|
|
11
|
+
- Retain sanitized security notes in CI artifacts and require actual environment inspection for deployment. Document operator-run npm publication and its enforcement limits.
|
|
12
|
+
|
|
13
|
+
### Verification
|
|
14
|
+
|
|
15
|
+
- Independent security audit, actual commit/push hooks, hosted security evidence and three-platform packaged lifecycle checks passed for the security implementation.
|
|
16
|
+
|
|
17
|
+
## v2.8.0 - 2026-09-01
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Added `yam.next-step.v1` plus CLI create/verify commands and Loop integration. Changed-artifact reports now require an evidence-bound whole-process scan, critical opinion, recommendations, and ordered fix-first/planned work immediately after Study Note.
|
|
22
|
+
- Added pure `yam install --dry-run --json` plans with ownership-aware operations, explicit replacement previews, deterministic plan digests, and no mutation authorization.
|
|
23
|
+
- Added immutable `yam.scout-receipt.v1` source/claim baselines with canonical entity aliases, four freshness clocks, acquisition-failure taxonomy, claim links, local integrity verification, and explicit operator-supplied truth boundaries.
|
|
24
|
+
- Added clean-source and strict signed-release ref gates plus exact-tarball Linux/macOS/Windows lifecycle workflows and explicit manual-dispatch npm OIDC/provenance publishing.
|
|
25
|
+
|
|
26
|
+
### Improved
|
|
27
|
+
|
|
28
|
+
- Aligned release readiness with npm Trusted Publisher OIDC: local `npm whoami` no longer blocks the selected OIDC path, while missing workflow controls and unverified npmjs account binding fail closed with path-specific guidance.
|
|
29
|
+
- Strengthened Scout guidance with canonical entity resolution, registry/release/main/latest-commit comparison, stable/RC/unreleased classification, opposition, stop reasons, and delta-scan receipts.
|
|
30
|
+
- Updater checks and component receipts now retain npm integrity/`gitHead`, PyPI release-file SHA-256 values, or the Git-pinned Insane Search manifest commit as applicable. Apply commands pin the official npm registry or isolated PyPI index, and Insane Search requires a clean tracked local manifest whose bytes match Git plus matching pre/post-add marketplace commits and pinned manifest versions.
|
|
31
|
+
- Registry readiness now probes the exact immutable package version, accepts only an explicit E404 as unpublished, fails closed on auth or network errors, and binds downstream release-report parsing to the same package/version identity.
|
|
32
|
+
- Install dry-run plans list unowned legacy, retired, and mirror paths that the real transaction preserves.
|
|
33
|
+
- README, commands, roadmap, project pack, route skills, manifest, package exports, and self-verification now describe and exercise the new contracts.
|
|
34
|
+
|
|
35
|
+
### Security
|
|
36
|
+
|
|
37
|
+
- Next step receipts reject unknown fields, contradictory blocker/truth combinations, weak evidence for strong claims, invalid ordering, limit overruns, and digest tampering.
|
|
38
|
+
- Scout receipts reject path escapes, symlinked paths, overwrite attempts, credential-bearing URLs, oversized or non-canonical content, incomplete clocks paired with a known stability, unknown claim sources, and digest drift while never trusting fetched content as instructions. Failed opened writes are preserved for manual inspection instead of using an unsafe pathname cleanup.
|
|
39
|
+
- Release workflows pin third-party actions to reviewed commit SHAs, grant OIDC only to the final no-checkout publish job, and require the publish artifact to match the independently carried SHA-256 receipt.
|
|
40
|
+
|
|
41
|
+
### Verification
|
|
42
|
+
|
|
43
|
+
- Focused typecheck/build, Next step, Scout receipt, install-transaction, external-update, packaged CLI, release-ref, and same-tarball lifecycle smokes.
|
|
44
|
+
- Full self-verification, package boundary/secrets, dependency audit/signatures, update/status/Doctor, Mission receipt gate, and bounded Deep false-completion audit are release criteria.
|
|
45
|
+
|
|
5
46
|
## v2.7.0 - 2026-08-24
|
|
6
47
|
|
|
7
48
|
### Added
|
package/COMMANDS.md
CHANGED
|
@@ -114,6 +114,24 @@ Next.js에서 이 기능을 구현하는 가장 안전한 방식을 찾아줘.
|
|
|
114
114
|
코드는 아직 수정하지 마.
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
For a repeated scan, resolve the canonical entity first and store a non-overwriting source/claim baseline:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
yam scout receipt create --root /path/to/project --receipt-path .yam/scout/run.json --spec ./scout-spec.json --json
|
|
121
|
+
yam scout receipt verify --root /path/to/project --receipt-path .yam/scout/run.json --json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The spec records aliases, registry/release/main/latest-commit clocks, source receipts, claim links, acquisition failures, opposition, recommendation, and stop reason. All four clocks are required for a stability other than `unknown`. Verification proves the local structure and digest, not the truth of operator-supplied source interpretation. A failed opened write is preserved for manual inspection because Node cannot prove a race-free pathname cleanup without descriptor-relative unlink support.
|
|
125
|
+
|
|
126
|
+
## Install Planning
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
yam install --dry-run --json
|
|
130
|
+
yam install --dry-run --replace-user-skill quick --json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Dry-run is a pure plan: it writes no lock, receipt, active skill, replacement, or retired-skill removal. Review `operations`, `preserved_paths`, `blockers`, and `plan_digest`; run ordinary `yam install` separately to authorize mutation.
|
|
134
|
+
|
|
117
135
|
## Project Pack
|
|
118
136
|
|
|
119
137
|
Use the CLI to create and inspect the small project direction file.
|
|
@@ -154,7 +172,17 @@ yam update apply --component yam --json
|
|
|
154
172
|
yam update apply --all --json
|
|
155
173
|
```
|
|
156
174
|
|
|
157
|
-
`yam update check` is read-only. Every `apply` needs explicit authorization, uses a concurrent-run lock, records a component receipt, and stops on failed/manual results. `--all` runs yam last. A yam install verifies the effective executable identity before any yam-side install command and repeats that check during rollback. This identity contract currently supports POSIX symlink layouts; Windows npm `.cmd` shims fail closed as unverified. Insane Search is never remove-first and `.codex/plugins/cache`
|
|
175
|
+
`yam update check` is read-only. Its component result preserves the registry artifact source receipt: npm integrity/`gitHead` for yam, PyPI release-file SHA-256 values for Scrapling, and the Git-pinned manifest commit for Insane Search. Every `apply` needs explicit authorization, pins the official npm registry or isolated PyPI index, uses a concurrent-run lock, records a component receipt, and stops on failed/manual results. `--all` runs yam last. A yam install verifies the effective executable identity before any yam-side install command and repeats that check during rollback. This identity contract currently supports POSIX symlink layouts; Windows npm `.cmd` shims fail closed as unverified. Insane Search requires a clean tracked local manifest whose bytes match Git and matching pre/post-add commits, is never remove-first, and never edits `.codex/plugins/cache` directly.
|
|
176
|
+
|
|
177
|
+
## Release Supply Chain
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npm run release:ref:smoke
|
|
181
|
+
npm run release:packed-lifecycle:smoke
|
|
182
|
+
npm run release:supply-chain:smoke
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Ordinary CI uses clean-source verification. Publishing is manual-dispatch only and additionally requires an exact signed annotated version tag contained in `origin/main`, reuses one SHA-256-bound tarball across the OS matrix, and publishes those tested bytes with npm OIDC provenance. Before the first release, register the exact `.github/workflows/release.yml` workflow in npm Trusted Publishing; do not add a long-lived npm token as a fallback.
|
|
158
186
|
|
|
159
187
|
## Demand-Gated Design Production
|
|
160
188
|
|
|
@@ -222,8 +250,10 @@ yam tools doctor /path/to/project --json
|
|
|
222
250
|
yam context pressure /path/to/project --json
|
|
223
251
|
yam cleanup scan /path/to/project --json
|
|
224
252
|
yam detect /path/to/project --json
|
|
225
|
-
yam study-note check /path/to/project --
|
|
226
|
-
yam
|
|
253
|
+
yam study-note check /path/to/project --report ./completion-report.md --json
|
|
254
|
+
yam next-step report --spec ./next-step-spec.json --json
|
|
255
|
+
yam next-step verify --receipt ./next-step-receipt.json --json
|
|
256
|
+
yam loop report --route quick --intent "fix release readiness" --stage "inspect:passed:read release report" --evidence "typecheck passed" --evidence-level local --evidence-stamp "sha256:release-report" --touched-file src/bin/yam.ts --read-file README.md --verified-file scripts/cli-smoke.mjs --skipped-check "npm publish skipped by design" --stop-condition "stop after readiness evidence is recorded" --resume-hint "rerun release report after npm auth refresh" --readiness-state blocked --covered-requirement "release report is read-only" --uncovered-requirement "npm auth verified" --blocked-kind auth_blocked --failure-cause auth_token_invalid --safe-retry "retry after npm whoami succeeds" --recovery-hint "refresh npm auth, then rerun readiness checks" --fix-first-item "npm auth must be verified before publish" --remaining-task "rerun release report after auth refresh" --recommended-direction "fix npm auth first, then publish manually" --implementation-note "keep loop report read-only" --why-this-next "auth blocks public release claims" --blocked-by "npm whoami E401" --owner-route deep --owner-scope "release readiness only" --scope-owner deep --side-effect "no publish attempted" --avoidance-note "do not retry publish before npm auth is proven" --next-step-spec ./next-step-spec.json --issue-code "src/bin/yam.ts release report" --issue-role "summarizes release readiness without publishing" --issue-symptom "npm auth failure needs clearer next action" --changed-code "yam loop report" --changed-role "records loop evidence and learning note" --change-summary "added a read-only loop artifact" --why-important "it helps users learn what changed without overclaiming verification" --learning-note "fix blockers before claiming done" --json
|
|
227
257
|
yam proof /path/to/project
|
|
228
258
|
yam proof --route deep --truth verified --command "npm run build: pass"
|
|
229
259
|
yam proof --route ueye --truth verified --visual "reference image only"
|
|
@@ -247,10 +277,16 @@ yam proof write /path/to/project --format md --truth assumed --assumption "No ru
|
|
|
247
277
|
yam safety "supabase db reset --linked"
|
|
248
278
|
```
|
|
249
279
|
|
|
280
|
+
`completion-report.md` places a complete Study Note immediately before Next step. Next step must record the current situation, outlook, critical opinion, recommendations, then order `[fix-first]` before `[planned]` actions with owner, blocker/safe retry, evidence, side effects, and truth status.
|
|
281
|
+
|
|
250
282
|
Release reporting intentionally runs the release checks and returns a machine-readable summary.
|
|
251
283
|
|
|
284
|
+
With the default `--auth-mode auto`, `.github/workflows/release.yml` selects Trusted Publisher OIDC. A local `npm whoami` result is recorded only as an optional manual-token probe because the [official npm Trusted Publisher documentation](https://docs.npmjs.com/trusted-publishers/) states that it does not reflect publish-time OIDC authentication. Use `--auth-mode token` only when intentionally preparing a direct local token publish. The report stays blocked until the selected path has appropriate evidence; it never publishes.
|
|
285
|
+
|
|
252
286
|
```bash
|
|
253
287
|
yam release report --json
|
|
288
|
+
yam release report --auth-mode oidc --json
|
|
289
|
+
yam release report --auth-mode token --json
|
|
254
290
|
```
|
|
255
291
|
|
|
256
292
|
## Flow Artifact Shapes
|
|
@@ -266,7 +302,7 @@ yam release report --json
|
|
|
266
302
|
yam runtime evidence --backend terminal --claim cleanup-verified --cleanup-observed --exit-code 0 --cleanup-method "exit observed" --json
|
|
267
303
|
yam mission receipt --thread-id reviewer-1 --role reviewer --lifecycle stopped --outcome passed --scope "changed files review" --evidence "read-only findings recorded" --json
|
|
268
304
|
yam benchmark report --label "bundle size" --baseline 120 --current 118 --unit kB --target lower --json
|
|
269
|
-
yam loop report --route deep --intent "verify release
|
|
305
|
+
yam loop report --route deep --intent "verify an explicitly selected manual-token release path" --blocked "npm auth not verified" --next-action "refresh npm token, then rerun npm whoami" --json
|
|
270
306
|
```
|
|
271
307
|
|
|
272
308
|
Supported report shapes:
|
|
@@ -274,8 +310,9 @@ Supported report shapes:
|
|
|
274
310
|
- Runtime evidence mini: command/process, observation, cleanup, truth status, next action.
|
|
275
311
|
- Patch queue lite: mission lane status, changed files, verification hint, rollback hint, truth status.
|
|
276
312
|
- Verification Ladder: L0 stated, L1 inspected, L2 local check, L3 integrated, L4 release/runtime/visual proof, L5 bounded deep with stop condition and skipped/remaining work.
|
|
277
|
-
- Loop report: intent, guided stage outcomes, touched/read/verified files, skipped checks, stop condition, resume hint, readiness state, evidence level/stamp, blockers, blocker kind, safe retry, next action, fix-first items, remaining tasks, recommended direction, blocked-by notes, owner route/scope, side effects, and
|
|
313
|
+
- Loop report: intent, guided stage outcomes, touched/read/verified files, skipped checks, stop condition, resume hint, readiness state, evidence level/stamp, blockers, blocker kind, safe retry, next action, fix-first items, remaining tasks, recommended direction, blocked-by notes, owner route/scope, side effects, Study Note, and a Next step receipt when artifacts changed.
|
|
278
314
|
- Study note: non-specialist explanation of the changed code/artifact, its role, execution point, before/after behavior, expected behavior, one syntax/structure insight, verification, uncertainty, and architecture hygiene around `page.tsx`, `global.css`, and DB `jsonb`.
|
|
315
|
+
- Next step: whole-process situation/outlook scan, critical opinion, improvement recommendations, ordered fix-first then planned actions, ownership, blockers, safe retry, side effects, evidence level/stamp, truth status, and deterministic digest.
|
|
279
316
|
- Study Note guard: read-only check for changed files and supplied final-report text; the opt-in `study-note` hook adds a prompt reminder and one bounded Codex `Stop` correction pass.
|
|
280
317
|
- Benchmark optimization loop lite: baseline, one change, rerun, keep/revert decision.
|
|
281
318
|
- Structured diagnostic next action: severity, evidence, owner route, next action, truth status.
|
|
@@ -299,3 +336,13 @@ yam hook disable study-note --global
|
|
|
299
336
|
```
|
|
300
337
|
|
|
301
338
|
`yam hook status` exits nonzero for unreadable configs, stale paths, missing targets, duplicate handlers, or incomplete event coverage. Re-enable the affected profile to back up the file, preserve unrelated hooks, and migrate its command and events.
|
|
339
|
+
|
|
340
|
+
## Security check
|
|
341
|
+
|
|
342
|
+
- `yam security init`: create a private all-unverified draft and pin a reviewed policy; preserve existing files.
|
|
343
|
+
- `yam security check --stage commit|push|ci|deploy`: validate exact-target evidence and append Security check to Yam note; nonzero exit blocks.
|
|
344
|
+
- `yam security hooks enable`: explicitly install local pre-commit/pre-push hooks, preserving existing hooks.
|
|
345
|
+
- `yam security status`: show local configuration; remote protections remain not measured.
|
|
346
|
+
- `yam template security` / `yam template security-ci`: explained note and CI setup templates.
|
|
347
|
+
|
|
348
|
+
See `references/security-check.md` for stage arguments, trusted policy requirements and limitations. This validates supplied evidence; it does not automatically scan application vulnerabilities.
|
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ See `ROADMAP.md` for remaining implementation stages.
|
|
|
45
45
|
- Small work stays small, but serious work is allowed to become serious.
|
|
46
46
|
- Security-sensitive work is never treated as ordinary polish.
|
|
47
47
|
- When code, config, release metadata, documentation, or project artifacts changed, final reports include a Study Note even if no yam skill was invoked.
|
|
48
|
+
- A changed-artifact report puts `Next step` immediately after Study Note. It rescans the whole process, states the situation and outlook, adds a critical opinion and improvement recommendations, then orders fix-first work before planned work.
|
|
48
49
|
- Useful Study Notes explain what the changed code or artifact does, what role it has, what was wrong or missing, what changed, what behavior is expected, one small syntax/structure insight, what was verified, and what remains uncertain.
|
|
49
50
|
- Research and reference scans should keep source boundaries clear, then rework good ideas into yam style.
|
|
50
51
|
- Token economy is part of quality.
|
|
@@ -112,6 +113,15 @@ cd ~/Documents/Codex/tools/yam
|
|
|
112
113
|
yam install
|
|
113
114
|
```
|
|
114
115
|
|
|
116
|
+
Preview the ownership and mutation plan without writing a lock, receipt, skill, or replacement:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
yam install --dry-run --json
|
|
120
|
+
yam install --dry-run --replace-user-skill quick --json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The `yam.install-plan.v1` result always reports `mutation_authorized: false` and includes a deterministic digest over the source manifest, destination, operations, preserved paths, and blockers. A replacement flag changes only the previewed ownership decision; mutation still requires a later `yam install` command.
|
|
124
|
+
|
|
115
125
|
`yam install` first checks ownership of every existing active skill. A skill is replaced automatically only when the previous yam receipt names it and its complete regular-file inventory and content hashes still match the receipt. The installer then stages every managed skill plus the shared `references/` directory, verifies the complete staged file manifest with SHA-256, and replaces the verified active set in `~/.agents/skills/`. If any commit or post-install verification step fails, yam restores the previous managed skill set and receipt. Rollback and cleanup remove newly installed skills, receipts, locks, and transaction roots only while their recorded type and device/inode identity still match; an identity-swapped path is preserved and reported instead of being treated as yam-owned.
|
|
116
126
|
|
|
117
127
|
Install source, destination, receipt, and managed-tree paths must use canonical physical directories. A symlink alias used as the package source or `YAM_SKILLS_HOME`, or a symlinked parent segment inside either boundary, fails closed; resolve the alias to its real path before retrying. Regular-file reads use descriptor identity checks and `O_NOFOLLOW` where the platform exposes it, while mutation boundaries revalidate parent directory identities. This narrows symlink-swap risk but is not `openat`-grade proof because Node does not expose descriptor-relative traversal here. Arbitrary Windows reparse-point handling is also unverified, so Windows receives the portable identity checks without a claim of complete reparse coverage.
|
|
@@ -154,7 +164,7 @@ yam update apply --all --json
|
|
|
154
164
|
|
|
155
165
|
`--all` processes Scrapling, then Insane Search, then yam so the running updater replaces itself last. It stops at the first failed or manual-only component. After the global npm install, yam resolves `npm root -g`, the installed package manifest and bin mapping, the first `yam` on `PATH`, canonical realpaths, and the observed version before any `yam install` mutation. A same-version PATH shadow, malformed package, or identity mismatch fails closed; legitimate multi-hop symlinks remain valid. Rollback repeats the same identity check before rollback-side yam commands.
|
|
156
166
|
|
|
157
|
-
A yam update is successful only after the installed version and status checks plus a final read-only `yam doctor --json` return the expected healthy contract. Doctor failure triggers the existing rollback path, and rollback is considered automatic only when its own identity, version, status, and Doctor checks pass. The deepest actionable rollback or Doctor cause remains primary even if receipt persistence also fails. Each attempt writes a bounded, redacted component receipt under `~/.local/state/yam/update-receipts/` with the old/new version, source revision, executable identity, checks, side effects, outcome, and rollback guidance. The aggregate apply response emits and verifies the strict `yam.gate-result.v1`; an already-held lock also returns a blocked gate without mutating components. A lock prevents concurrent apply runs.
|
|
167
|
+
A yam update is successful only after the installed version and status checks plus a final read-only `yam doctor --json` return the expected healthy contract. Doctor failure triggers the existing rollback path, and rollback is considered automatic only when its own identity, version, status, and Doctor checks pass. The deepest actionable rollback or Doctor cause remains primary even if receipt persistence also fails. Each attempt writes a bounded, redacted component receipt under `~/.local/state/yam/update-receipts/` with the old/new version, source revision, registry artifact provenance, executable identity, checks, side effects, outcome, and rollback guidance. Read-only checks retain npm integrity plus `gitHead` for yam, PyPI release-file SHA-256 values for Scrapling, and the Git-pinned manifest commit for Insane Search. Apply pins the official npm registry and an isolated official PyPI index even when user config names an alternate source; npm and pip retain their native registry artifact-integrity enforcement, while the post-install identity/version checks bind the result. Insane Search requires a clean marketplace tree and tracked local manifest whose bytes match the checked Git object, then re-observes the Git commit and manifest before and after plugin add; a dirty or moved source blocks the receipt. The aggregate apply response emits and verifies the strict `yam.gate-result.v1`; an already-held lock also returns a blocked gate without mutating components. A lock prevents concurrent apply runs.
|
|
158
168
|
|
|
159
169
|
Effective yam identity currently verifies POSIX-style executable/symlink layouts through `which` and canonical realpaths. Windows npm `.cmd` shim identity is intentionally unverified and fails closed until a dedicated shim parser and fixture exist.
|
|
160
170
|
|
|
@@ -162,6 +172,17 @@ Scrapling updates install an exact stable PyPI version into a new versioned virt
|
|
|
162
172
|
|
|
163
173
|
There is no unattended updater. The exact project trigger in `AGENTS.md` grants one-time authorization for a checked `--all` run, and Codex is never restarted automatically.
|
|
164
174
|
|
|
175
|
+
## Scout Receipts
|
|
176
|
+
|
|
177
|
+
Repeated research can preserve an immutable delta-scan baseline without turning Scout into a default database:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
yam scout receipt create --root . --receipt-path .yam/scout/run.json --spec scout-spec.json --json
|
|
181
|
+
yam scout receipt verify --root . --receipt-path .yam/scout/run.json --json
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The `yam.scout-receipt.v1` artifact binds the canonical entity and aliases, registry/release/main/latest-commit clocks, source URLs and digests, claim-to-source links, acquisition failures, opposition, recommendation, and stop reason. A non-`unknown` stability requires all four clocks; incomplete clock evidence must stay `unknown`. It rejects path escapes, symlinks, overwrites, oversized receipts, non-canonical ordering, and digest drift. Descriptor identity plus parent-directory revalidation narrows path-swap races, but Node does not expose `openat`-grade traversal and a receipt is not a signature against another process running as the same OS user. If an opened receipt write fails, yam preserves the possibly partial path for manual identity inspection instead of risking a path-based cleanup outside the root. The receipt proves local structure and integrity only: source interpretation remains operator-supplied and external content is never trusted as an instruction.
|
|
185
|
+
|
|
165
186
|
### Scrapling Usage
|
|
166
187
|
|
|
167
188
|
The isolated executable can be used directly from the shell:
|
|
@@ -209,7 +230,11 @@ yam tools doctor /path/to/project --json
|
|
|
209
230
|
yam context pressure /path/to/project --json
|
|
210
231
|
yam cleanup scan /path/to/project --json
|
|
211
232
|
yam detect /path/to/project --json
|
|
212
|
-
yam study-note check /path/to/project --
|
|
233
|
+
yam study-note check /path/to/project --report ./completion-report.md --json
|
|
234
|
+
yam next-step report --spec ./next-step-spec.json --json
|
|
235
|
+
yam next-step verify --receipt ./next-step-receipt.json --json
|
|
236
|
+
yam scout receipt create --root /path/to/project --receipt-path .yam/scout/run.json --spec ./scout-spec.json --json
|
|
237
|
+
yam scout receipt verify --root /path/to/project --receipt-path .yam/scout/run.json --json
|
|
213
238
|
yam proof /path/to/project
|
|
214
239
|
yam proof write /path/to/project --route quick --truth verified --command "npm run verify:self: pass"
|
|
215
240
|
yam proof --route ueye --truth verified --visual "reference image only"
|
|
@@ -234,7 +259,7 @@ yam media proof --requested --attempted --output ./generated.png --wait-loop --j
|
|
|
234
259
|
yam proof --route mission --mission-envelope '{"agent_id":"implementer","assigned_scope":"target component","changed_files":["src/file.ts"],"verification_hint":"npm run typecheck","truth_status":"partial"}'
|
|
235
260
|
yam mission receipt --thread-id reviewer-1 --role reviewer --lifecycle stopped --outcome passed --scope "read-only review" --evidence "review completed without edits" --out .yam/mission/reviewer-1.json --json
|
|
236
261
|
yam mission gate --expected-thread reviewer-1 --receipt .yam/mission/reviewer-1.json --out .yam/mission/completion.json --json
|
|
237
|
-
yam loop report --route quick --intent "fix release readiness" --stage "inspect:passed:read release report" --evidence "typecheck passed" --evidence-level local --evidence-stamp "sha256:release-report" --touched-file src/bin/yam.ts --read-file README.md --verified-file scripts/cli-smoke.mjs --skipped-check "npm publish skipped by design" --stop-condition "stop after readiness evidence is recorded" --resume-hint "rerun release report after npm auth refresh" --readiness-state blocked --covered-requirement "release report is read-only" --uncovered-requirement "npm auth verified" --blocked-kind auth_blocked --failure-cause auth_token_invalid --safe-retry "retry after npm whoami succeeds" --recovery-hint "refresh npm auth, then rerun readiness checks" --fix-first-item "npm auth must be verified before publish" --remaining-task "rerun release report after auth refresh" --recommended-direction "fix npm auth first, then publish manually" --implementation-note "keep loop report read-only" --why-this-next "auth blocks public release claims" --blocked-by "npm whoami E401" --owner-route deep --owner-scope "release readiness only" --scope-owner deep --side-effect "no publish attempted" --avoidance-note "do not retry publish before npm auth is proven" --issue-code "src/bin/yam.ts release report" --issue-role "summarizes release readiness without publishing" --issue-symptom "npm auth failure needs clearer next action" --changed-code "yam loop report" --changed-role "records loop evidence and learning note" --change-summary "added a read-only loop artifact" --why-important "it helps users learn what changed without overclaiming verification" --learning-note "fix blockers before claiming done" --json
|
|
262
|
+
yam loop report --route quick --intent "fix release readiness" --stage "inspect:passed:read release report" --evidence "typecheck passed" --evidence-level local --evidence-stamp "sha256:release-report" --touched-file src/bin/yam.ts --read-file README.md --verified-file scripts/cli-smoke.mjs --skipped-check "npm publish skipped by design" --stop-condition "stop after readiness evidence is recorded" --resume-hint "rerun release report after npm auth refresh" --readiness-state blocked --covered-requirement "release report is read-only" --uncovered-requirement "npm auth verified" --blocked-kind auth_blocked --failure-cause auth_token_invalid --safe-retry "retry after npm whoami succeeds" --recovery-hint "refresh npm auth, then rerun readiness checks" --fix-first-item "npm auth must be verified before publish" --remaining-task "rerun release report after auth refresh" --recommended-direction "fix npm auth first, then publish manually" --implementation-note "keep loop report read-only" --why-this-next "auth blocks public release claims" --blocked-by "npm whoami E401" --owner-route deep --owner-scope "release readiness only" --scope-owner deep --side-effect "no publish attempted" --avoidance-note "do not retry publish before npm auth is proven" --next-step-spec ./next-step-spec.json --issue-code "src/bin/yam.ts release report" --issue-role "summarizes release readiness without publishing" --issue-symptom "npm auth failure needs clearer next action" --changed-code "yam loop report" --changed-role "records loop evidence and learning note" --change-summary "added a read-only loop artifact" --why-important "it helps users learn what changed without overclaiming verification" --learning-note "fix blockers before claiming done" --json
|
|
238
263
|
yam release report --json
|
|
239
264
|
yam safety "supabase db reset"
|
|
240
265
|
yam pack /path/to/project
|
|
@@ -257,6 +282,8 @@ yam version
|
|
|
257
282
|
yam init-project /path/to/project
|
|
258
283
|
```
|
|
259
284
|
|
|
285
|
+
`completion-report.md` must contain a complete `Study Note` followed immediately by `Next step`; the latter records situation, outlook, critical opinion, recommendations, then every `[fix-first]` action before `[planned]` work with owner, blocker/safe retry, evidence, side effects, and truth status.
|
|
286
|
+
|
|
260
287
|
## npm / npx Prep
|
|
261
288
|
|
|
262
289
|
The package exposes the `yam` binary. It does not mutate your home directory during package installation.
|
|
@@ -272,7 +299,9 @@ After `yam status` reports all skills and the install receipt as `ok`, restart C
|
|
|
272
299
|
|
|
273
300
|
Before packaging or publishing, `verify:self` inspects the exact file list returned by `npm pack --dry-run --json --ignore-scripts`. The release gate scans regular UTF-8 text files up to 2 MiB for high-signal private-key, npm, GitHub, OpenAI, Anthropic, and AWS credential patterns. Findings expose only the pattern id, package-relative path, and line number; matched text is never printed. Binary, symlink, non-regular, unreadable, outside-root, and oversized entries are reported as skipped rather than silently represented as scanned.
|
|
274
301
|
|
|
275
|
-
|
|
302
|
+
Public release workflows pack one tarball once, record its SHA-256/size/source receipt, reuse those bytes for Linux, macOS, and Windows install/status/Doctor/reinstall/uninstall checks, and publish the same artifact through npm Trusted Publishing with provenance. All referenced GitHub actions are pinned to reviewed commit SHAs. Release mode requires an exact `v<package.version>` annotated signed tag contained in `origin/main`.
|
|
303
|
+
|
|
304
|
+
Publishing remains blocked until the npm package settings register the exact `.github/workflows/release.yml` filename as the trusted publisher. The workflow does not accept a long-lived npm token, does not run from branch or tag pushes, and publishes only after an explicit manual dispatch names the reviewed signed version tag.
|
|
276
305
|
|
|
277
306
|
## Trust Kernel
|
|
278
307
|
|
|
@@ -295,6 +324,8 @@ Publishing still requires confirming the final npm package name and account acce
|
|
|
295
324
|
- release report JSON
|
|
296
325
|
- loop report JSON
|
|
297
326
|
- study note JSON
|
|
327
|
+
- evidence-bound Next step JSON and verification
|
|
328
|
+
- immutable Scout source/claim receipt verification
|
|
298
329
|
- structured diagnostic next actions
|
|
299
330
|
- context pressure summaries
|
|
300
331
|
- advisory cleanup scans
|
|
@@ -315,13 +346,14 @@ These shapes keep reports machine-readable without turning normal work into a he
|
|
|
315
346
|
- Patch queue lite: `$mission` lane records with pending/applied/verified/reverted/blocked state, changed files, verification hint, rollback hint, truth status, and next action.
|
|
316
347
|
- Mission completion receipt: every expected thread records lifecycle and outcome separately; reviewer/doctor write access, missing evidence, ambiguous stops, and receipt inventory gaps block the aggregate gate.
|
|
317
348
|
- Verification Ladder: L0 stated, L1 inspected, L2 local check, L3 integrated, L4 release/runtime/visual proof, and L5 bounded deep. Heavier claims require heavier evidence, but stop conditions prevent endless proof loops.
|
|
318
|
-
- Release report JSON: `yam release report --json` summarizes typecheck, forbidden-name scan, package boundary, registry status, CLI smoke, dist freshness, diagnostics, readiness receipt, and final truth status.
|
|
319
|
-
- Loop report JSON: `yam loop report --json` records a read-only handoff artifact: guided stages, touched/read/verified files, skipped checks, stop condition, resume hint, readiness state, requirement coverage, evidence level/stamp, blocker kind, failure cause, safe retry, recovery hint, owner route/scope, side effects, next action, fix-first items, remaining tasks, recommended direction, implementation notes, blocked-by notes, avoidance note, tool intent, truth status, and
|
|
320
|
-
- Study note: `yam.study-note.v1` and `references/study-note.md` keep non-specialist explanations for what code/artifact changed, what role it plays, where it runs, what changed from before to after, what behavior is expected, one syntax/structure insight, what was verified, and what remains uncertain. Missing details stay in `limits` instead of being guessed. Study Note
|
|
349
|
+
- Release report JSON: `yam release report --json` summarizes typecheck, forbidden-name scan, package boundary, registry status, CLI smoke, dist freshness, diagnostics, readiness receipt, and final truth status. Default `--auth-mode auto` selects Trusted Publisher OIDC when the reviewed release workflow is present, treats `npm whoami` as an optional manual-token probe rather than OIDC evidence, and blocks on missing workflow controls or unverified npmjs package binding instead. `--auth-mode token` explicitly selects direct local token readiness.
|
|
350
|
+
- Loop report JSON: `yam loop report --json` records a read-only handoff artifact: guided stages, touched/read/verified files, skipped checks, stop condition, resume hint, readiness state, requirement coverage, evidence level/stamp, blocker kind, failure cause, safe retry, recovery hint, owner route/scope, side effects, next action, fix-first items, remaining tasks, recommended direction, implementation notes, blocked-by notes, avoidance note, tool intent, truth status, Study Note, and an optional `--next-step-spec` receipt. Changed artifacts without a valid Next step are blocked.
|
|
351
|
+
- Study note: `yam.study-note.v1` and `references/study-note.md` keep non-specialist explanations for what code/artifact changed, what role it plays, where it runs, what changed from before to after, what behavior is expected, one syntax/structure insight, what was verified, and what remains uncertain. Missing details stay in `limits` instead of being guessed. Study Note v4 keeps the architecture-hygiene check for `page.tsx`, `global.css`, and broad DB `jsonb`, then requires an evidence-bound Next step immediately afterward.
|
|
352
|
+
- Next step: `yam.next-step.v1` records the whole-process scan, outlook, critical opinion, recommendations, ordered fix-first/planned actions, owner scope, blockers, safe retry, side effects, L0-L5 evidence, and a deterministic digest. Unknown fields, contradictory truth, weak evidence for strong claims, and tampering fail closed.
|
|
321
353
|
- Study Note guard: `yam study-note check` is a read-only missing-note guard. The opt-in `yam hook enable study-note --global` profile reuses it for a prompt reminder and one bounded Codex `Stop` correction pass; it still does not generate or edit a report.
|
|
322
354
|
- Avoidance note: loop reports may include one short mistake-to-avoid note, but durable memory stays explicit through `yam memory add`; `yam loop report` does not write `.yam/memory`.
|
|
323
355
|
- Publish blocker evidence: release reports classify common npm auth, permission, OTP, immutable-version, cache, registry, and tarball failures into safe next actions.
|
|
324
|
-
- Publish readiness evidence: release reports run read-only registry/auth/version probes, redact account/token details, keep npm publish outside the report, and include a `yam.release-readiness-receipt.v1` basis for the readiness judgment.
|
|
356
|
+
- Publish readiness evidence: release reports run read-only registry/auth/version probes, redact account/token details, keep npm publish outside the report, and include a `yam.release-readiness-receipt.v1` basis for the readiness judgment. OIDC account binding remains explicitly unverified until the npmjs Trusted Publisher configuration and hosted publish result provide evidence; this follows the [official npm Trusted Publisher behavior](https://docs.npmjs.com/trusted-publishers/), where `npm whoami` does not reflect OIDC authentication.
|
|
325
357
|
- Context pressure: `yam context pressure` explains when project context is getting stale, broad, or confusing enough to summarize, refresh, narrow scope, or deepen route.
|
|
326
358
|
- Changed-file verification detector: `yam detect [dir] --json` reads dirty, staged, and untracked Git paths and returns advisory `matched_rule`, `confidence`, `reason`, `fallback`, source files, and only commands that exist in the project. Its deduplicated command plan retains the contributing rules and files, but never runs the commands. If Git status is unavailable, it reports a low-confidence fallback instead of claiming the project is clean.
|
|
327
359
|
- Cleanup scan: `yam cleanup scan` is read-only and advisory; it reports confusing hooks, local skill folders, stale traces, or old proof artifacts without deleting anything. Its bounded AGENTS/SKILL duplication budget scans at most 24 files and 128 KB per file, reports exact normalized cross-surface directive matches with redacted previews and provenance, and never becomes a hard gate.
|
package/ROADMAP.md
CHANGED
|
@@ -9,11 +9,15 @@ Implemented:
|
|
|
9
9
|
- Shared references.
|
|
10
10
|
- Local CLI: list, status, verify, doctor, examples, path, install, uninstall.
|
|
11
11
|
- Transactional skill install with rollback, SHA-256 receipt, install lock, and status drift detection. Done.
|
|
12
|
+
- Pure install dry-run plans with ownership blockers, explicit replacement previews, deterministic digests, and zero mutation authorization. Done.
|
|
12
13
|
- CLI helpers: detect, budget, template, tune-log, version.
|
|
13
14
|
- Optional advisory `yam-lite` hook with status/enable/disable. Done.
|
|
14
15
|
- Optional Study Note prompt reminder plus bounded Codex `Stop` completion gate, hook health, and stale-path migration. Done.
|
|
15
16
|
- Opt-in project memory: init, add, list, summary, resolve.
|
|
16
17
|
- Honest completion guard: no verified/cleanup/visual claims without evidence.
|
|
18
|
+
- Evidence-bound Next step contract and Study Note adjacency guard for changed artifacts. Done.
|
|
19
|
+
- Immutable Scout source/claim receipts and four-clock freshness classification for repeated scans. Done.
|
|
20
|
+
- Exact-tarball cross-platform supply-chain workflows with signed-tag gating and npm OIDC provenance. Done locally; npm trusted-publisher registration remains external.
|
|
17
21
|
- No hooks, automations, or global config mutations unless the user explicitly enables them.
|
|
18
22
|
- Token economy policy.
|
|
19
23
|
|
|
@@ -99,7 +103,9 @@ Tasks:
|
|
|
99
103
|
- Reconsider symlink-friendly local install only if Node exposes a safe descriptor-relative traversal boundary or an equivalent proven design. Deferred: current package source, `YAM_SKILLS_HOME`, and managed-tree paths intentionally reject symlink aliases and symlinked parent segments.
|
|
100
104
|
- Add version command. Done.
|
|
101
105
|
- Add staged transactional install, rollback, receipt, and drift-aware status. Done.
|
|
106
|
+
- Add a non-mutating install plan before authorization, including conflict and explicit-replacement operations. Done.
|
|
102
107
|
- Add checked component updates for yam, Scrapling, and Insane Search with explicit authorization, receipts, and rollback guidance. Done.
|
|
108
|
+
- Preserve registry artifact provenance in updater checks and component receipts. Done.
|
|
103
109
|
- Consider npm packaging only after route behavior stabilizes.
|
|
104
110
|
|
|
105
111
|
### 8. Scout / Research Workflow
|
|
@@ -123,6 +129,8 @@ Tasks:
|
|
|
123
129
|
- realistic view: near-term feasibility and cost
|
|
124
130
|
- future view: second-order effects and durable bets
|
|
125
131
|
- Match source count to the decision: focused scouts use a few high-signal sources, broad scouts may use more. Done.
|
|
132
|
+
- Resolve one canonical entity and compare registry, release/tag, main, and latest-commit clocks before calling an update new or stable. Done.
|
|
133
|
+
- Add an immutable, digest-bound source/claim receipt for repeated delta scans while keeping source truth operator-supplied. Done.
|
|
126
134
|
- Avoid making research a default gate for implementation. Done.
|
|
127
135
|
|
|
128
136
|
### 9. Question Workflow
|
|
@@ -142,11 +150,14 @@ Goal: prepare yam for a personal GitHub repo under `0kim0bos`.
|
|
|
142
150
|
|
|
143
151
|
Tasks:
|
|
144
152
|
|
|
145
|
-
- Choose repository description.
|
|
146
|
-
- Add a short public README intro.
|
|
147
|
-
- Add install/update instructions for local Codex skills.
|
|
148
|
-
- Add a clear note that yam installs no hooks and no automations by default.
|
|
149
|
-
-
|
|
153
|
+
- Choose repository description. Done.
|
|
154
|
+
- Add a short public README intro. Done.
|
|
155
|
+
- Add install/update instructions for local Codex skills. Done.
|
|
156
|
+
- Add a clear note that yam installs no hooks and no automations by default. Done.
|
|
157
|
+
- Pack one tarball once and reuse its exact bytes across Linux, macOS, and Windows lifecycle checks. Done.
|
|
158
|
+
- Require a clean, exact-version, `origin/main`-contained signed tag before public publishing. Done.
|
|
159
|
+
- Publish only through npm OIDC/provenance without a repository npm token. Workflow done; npm package settings still need the exact trusted-publisher workflow registration.
|
|
160
|
+
- Re-run source/install/release verification before publishing. Required for each release.
|
|
150
161
|
|
|
151
162
|
### 11. Memory Workflow
|
|
152
163
|
|
|
@@ -278,7 +289,7 @@ Tasks:
|
|
|
278
289
|
- Add `$ueye`. Done.
|
|
279
290
|
- Retire `$fast`, `$build`, `$ui`, `$eye`, and `$review`. Done.
|
|
280
291
|
- Update CLI budgets, templates, docs, manifest, install cleanup. Done.
|
|
281
|
-
- Re-run source and installed-skill verification.
|
|
292
|
+
- Re-run source and installed-skill verification. Done for the local 2.8.0 install; repeat for each release candidate.
|
|
282
293
|
|
|
283
294
|
### 15. Lite Hook / Progressive Tool Trust Layer
|
|
284
295
|
|