## [2026-05-15T08:46:12.622Z]
Add --type <id> mode: shows type metadata (description, enforce, when, aspects), nodes of that type with count, source files covered (up to 20), and strict coverage gap (orphans + misplaced) when enforce=strict. Mutex with --node/--file/--aspect/--flow.
## [2026-05-15T09:57:38.623Z]
resolveFileArg call updated: cwd arg removed, file arg now repo-root-relative
## [2026-05-15T12:12:58.897Z]
R0.3: updated import from utils/repo-scan to io/repo-scanner (no logic change)
## [2026-05-15T12:28:17.897Z]
R0.4: file-content-cache import updated from core to io (no logic change)
## [2026-05-15T20:45:36.280Z]
Add debugWrite() to catch block — required by diagnostic-logging aspect to surface errors via debug channel.
## [2026-05-16T03:57:21.039Z]
Fix: stdout (not stderr) for --file resolution success message; add debugWrite() already present in catch block.
## [2026-05-16T04:42:33.168Z]
Revert file->node resolution to stderr — test suite explicitly expects this diagnostic output on stderr (not stdout). The previous change was incorrect.
## [2026-05-16T05:57:55.222Z]
Phase 4.7 (no-direct-fs): inject appendToDebugLog as third argument to initDebugLog; debug-log DI refactor decouples utils/debug-log from node:fs
## [2026-05-16T08:39:07.117Z]
Use buildIssueMessage for all 5 not-found/no-coverage errors: satisfies what-why-next aspect added via graph-analysis flow
## [2026-05-16T17:37:13.929Z]
Replaced inline 'No .yggdrasil/ directory found' error block with the shared loadGraphOrAbort helper from formatters/cli-preamble.ts. Reason: the same string and exit-1 logic was duplicated across 12 CLI command handlers; centralization eliminates a copy-paste class and routes the missing-graph message through buildIssueMessage uniformly. Other errors continue to flow through the surrounding catch and will be migrated to buildIssueMessage in the next task.
## [2026-05-16T18:22:20.678Z]
Migrated remaining ad-hoc stderr errors to buildIssueMessage (constant-text errors wrapped inline) and routed generic catch-blocks through the new abortOnUnexpectedError helper from formatters/cli-preamble.ts. Reason: even after the loadGraphOrAbort centralization, command-specific errors and option-validation messages bypassed the what/why/next structure; this commit aligns them so the AST aspect added in the next commit can enforce the rule mechanically.
## [2026-05-16T18:54:56.519Z]
Wrapped three option-validation errors (--node/--file mutex, missing target, multiple targets) in buildIssueMessage. Matches the cli-command-contract requirement that constant-text remediation errors use the structured what/why/next form.
## [2026-05-16T19:31:39.274Z]
Updated effective-aspects import path to core/graph/aspects.
## [2026-05-28T10:05:15.685Z]
Extended handleFileImpact to scan all graph nodes for cascade-via-reference when the queried file appears in a node's collectTrackedFiles result with category 'graph' and layer 'aspects'. When the structural owner exists, both sections are shown. When no owner exists but reference-cascade nodes do, the reference section is shown and the command exits 0 instead of failing. When both sets are empty, the existing no-coverage error is emitted. This enables agents to assess the full blast radius of a file that functions as an aspect reference — the same file could cascade drift to multiple nodes even if it has no mapping owner.
## [2026-05-28T14:01:40.557Z]
Surface effective per-(node, aspect) status in yg impact. For --aspect runs each directly affected node line ends with [<status>] showing how the aspect resolves on that node (cascade may bump above the aspect default). For --node runs the Aspects: summary annotates each aspect with its effective status, and Nodes sharing aspects shows the status as seen on the other node. The current command has no status-simulation flag, so the flip-risk note for advisory-to-enforced swaps was deliberately deferred — it can land alongside a future --simulate-status option.
## [2026-05-28T19:39:36.743Z]
Add rendering-severity-flip annotation per design §12.1. When yg impact --aspect lists affected nodes, also read each node's drift-state baseline and call out nodes whose aspectVerdicts[X] is refused. If the user later flips the aspect's status (advisory ↔ enforced), those refused baselines will flip how yg check renders them; surfacing this proactively in impact output gives the agent the information before the status change, not after.
## [2026-05-28T19:41:42.888Z]
Pre-existing fix surfaced during dogfood review: change line 532 from process.stderr.write to process.stdout.write for the file->nodePath resolution message. This is informational output, not an error, so it belongs on stdout per the command-error-via-buildissuemessage aspect's contract that 'errors go exclusively to stderr and all results go to stdout'. Bundled with the rendering-flip annotation change because the reviewer caught it in the same commit boundary.
## [2026-05-28T19:52:53.525Z]
Strip dangling design/plan section references from JSDoc and test descriptions. The design doc lives in .plans/ which is gitignored and will be deleted; references like 'spec §7', 'design §12.1', 'Task 14' become stale pointers to non-existent files. Replaced with self-contained prose. No behavior change.
## [2026-05-28T19:59:13.615Z]
Replaced three localeCompare-based sorts with locale-independent lexicographic comparisons (a < b ? -1 : a > b ? 1 : 0). localeCompare consults process locale; identical graph state in different locales (C vs en_US.UTF-8) could produce different output orderings. Plain string comparison via < and > is locale-free and matches the deterministic-output contract.
## [2026-05-29T10:05:51.167Z]
Test suite for this command was updated to reflect the redesigned yg check output format. The old format had section headers (Structural:, Cascade summary:), per-node cascade repetition, and a Result: footer. The new format uses a single-line verdict header, grouped cascade blocks, and Why:/Fix: labelled output. Tests that asserted the old format strings were updated to the equivalent new format assertions.
## [2026-05-29T17:08:10.385Z]
Cross-node files that a structure-shape rule reads through a related component now count toward the dependent component's verification identity and its change-impact blast radius. Previously such a rule could inspect a sibling component's file, but the set of files brought into the dependent component's drift fingerprint was only assembled when the stored approval baseline was supplied to the file-collection routine — and the routine that gates everyday drift checks did not supply it. The consequence was a silent gap: editing a file that only a neighbour's structure rule reads never marked the dependent component as needing re-verification, and the change-impact query reported zero affected components for that file. The baseline is now supplied at the drift-detection points, and the canonical fingerprint is recomputed after the structure runner records the touched files, so the first approval already folds those cross-component files into the identity. Files the component owns directly stay classified as ordinary source changes; only genuinely cross-component paths receive the dedicated layer, and they are deliberately excluded from the owned-file map so a deleted-file scan never mistakes them for a vanished local file. A targeted single-rule re-approval now carries forward a sibling rule's recorded touched-file set instead of dropping it.
## [2026-05-29T17:25:06.076Z]
The change-impact query for a file now reports components whose structure-shape rule reads that file through a related component, in a dedicated cascade section, so editing a file that only a neighbour's rule inspects no longer reports zero affected components. The scan that computes this cross-component set was extracted from the command handler into a standalone routine to keep the handler body small and its single error-handling path easy to verify; the behaviour is unchanged.
## [2026-05-29T17:58:58.424Z]
The blast-radius and structure-cascade graph algorithms that back the change-impact query were moved out of the command handler into the pure graph-query layer. This restores the intended layering — graph traversal and reverse-dependency computation belong with the other side-effect-free graph helpers, not inside a command file — and keeps the command source small enough that the automated reviewer can read it whole. When the command file grew past the reviewer's per-file size budget, its trailing error-handling path was being truncated out of the review prompt, so the reviewer could no longer confirm the catch block logs through the diagnostic channel and refused the file. Shrinking the file by relocating the algorithms eliminates that truncation. The command handler keeps argument parsing, output formatting, and its single error path; behaviour and output are unchanged.
## [2026-05-31T17:27:17.141Z]
Moved the shared command-layer support helpers — the graph-load-or-abort wrapper and the unexpected-error funnel — out of the formatters layer and into the command layer. These helpers must reach both the engine (to load the graph) and the formatters (to build the uniform what/why/next message), and only the command layer may legally depend on both; keeping them in the formatters layer was an upward dependency on the engine that the layering rules forbid. The helpers register no command of their own, so they live under a dedicated command-support classification rather than as a command handler. Command handlers now import them from their new command-layer location.
## [2026-06-01T06:21:23.534Z]
Updated the reference-cascade scan to the typed tracked-context shape: the context collector now returns the tracked file list together with the typed upstream identity, so the impact scan destructures the file list before testing whether a node references a changed aspect artifact. No change to blast-radius results.
## [2026-06-13T05:33:57.997Z]
A report handed to a pipe now drains fully before the process exits, so a long error list sent to a capturing consumer (an agent, a grep, or CI) is never truncated by the process terminating before the kernel buffer flushes. The full refusal reason for a rejected pair is now shown in the gate output rather than being abbreviated, so the reader sees the complete reason a verdict was refused.
## [2026-06-13T09:43:46.660Z]
The blast-radius handlers for the impact command (the aspect, flow, and type analyses, plus the re-fill cost helpers) were moved out of the command file into a sibling support module, leaving the command file with just the command registration and the file/node path. This is a pure relocation with no behavior change; its purpose is to shrink the command file so that editing it triggers fewer rule re-checks, since support modules carry fewer enforced rules than command files.
## [2026-06-13T11:05:16.416Z]
The impact command ended without a concrete next step, and in component mode a long list of nodes that merely share a ubiquitous style rule buried the actionable blast-radius summary. Each mode now ends with a clear next step, and the shared-aspect list omits aspects effective on very many nodes (which indicate no real dependency), so the blast-radius summary and next step are the final lines.
