hyp policy: class-neutral machine-local marking verb (LLP 0110/0111)#327
hyp policy: class-neutral machine-local marking verb (LLP 0110/0111)#327philcunliffe wants to merge 15 commits into
Conversation
Generated-by: neutral Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generated-by: neutral Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extract runMarkMachineLocal, runUnmarkMachineLocal, and runIgnoreCheck in src/core/commands/clients.js so they take an explicit resolved targetDir instead of computing it from parsed argv, and add repoRootDefaultTarget as the one shared repo-root-default placement rule. This is a pure refactor with zero behavior change: the flag branches in runIgnore/runUnignore now resolve the target and delegate, but stdout/stderr/exit codes are unchanged, so all existing ignore/unignore tests pass unmodified. This sets up both the flag forms and the future hyp policy runners (LLP 0112 T2) to call one implementation instead of drifting. Carries the existing @ref LLP 0103#cli annotations along with the moved code; gloss updates come in T6. Task-Id: T1
…rnals
Adds the hyp policy command group (LLP 0110/0111) as the class-neutral
successor to the ignore --sync/--local-only/--private aliases: thin
runners in src/core/commands/policy.js parse CLI args and delegate to
the shared runMarkMachineLocal/runUnmarkMachineLocal/runIgnoreCheck
internals in clients.js, now exported and parameterized by a
`component` attribute so telemetry still names the dispatching verb.
runUnmarkMachineLocal gains a class-neutral mode (targetClass
undefined) backing `policy unset <path>` with no trailing token,
removing every machine-local entry governing a path regardless of
class, alongside the existing class-scoped removal used by both
`unignore` and `policy unset <path> <class>`.
`policy list` enumerates the machine-local store directly with a
--json {entries, path} shape; `policy show` reuses runIgnoreCheck so
its --json output stays byte-compatible with `ignore --check --json`.
New test/core/policy-command.test.js mirrors the existing
ignore-private-sync-command coverage for the new spellings, plus list
enumeration and class-neutral unset across multiple governing
entries.
Task-Id: T2
The --sync/--local-only/--private/--check branches in runIgnore/runUnignore already delegate to the T1 hoisted internals (runMarkMachineLocal, runUnmarkMachineLocal, runIgnoreCheck) that the T2 policy runners call, so the delegation seam is single-implementation by construction and alias behavior cannot drift from the verb's. This task makes the compatibility posture explicit: - Annotate the delegation seam in both runners with // @ref LLP 0111#aliases [implements], noting the flag forms' repo-root defaulting is preserved at the alias edge (and unignore's cwd-relative no-default target likewise). - Mark the --local-only/--private/--sync/--check flags "deprecated: use hyp policy ..." in the hyp ignore / hyp unignore registry help, while stating the bare dotfile verbs are not deprecated. No runtime stderr warning (LLP 0111 #aliases). Zero behavior change: every existing alias test passes unchanged (stdout, stderr, exit codes, JSON fields, usage_policy.mark log event), the compatibility proof LLP 0110's exit criteria require. npm test (2284), typecheck, and build:types all green. @ref LLP 0111#aliases [implements] Task-Id: T3 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…111) Swap the consent-sensitive classification hook copy off the deprecated `hyp ignore --sync`/`--local-only`/`--private` misnomer and onto the class-neutral `hyp policy set <path> <token>` verb (registered since T2). - CLASSIFICATION_CHOICES: replace the `flag` field with the CLI-edge class `token` (`sync`/`local-only`/`ignore`). - verbArgvForClass now returns ['policy', 'set', targetPath, token], dispatched against the registry's two-word `policy set` path. - buildClassificationPrompt prints `hyp policy set <cwd> <token>`. - Pinned consent-copy tests updated in the same commit, plus an exit-criterion assertion that no ignore-spelled command is taught for a non-ignore class. - @ref glosses cite LLP 0111#teaching for the verb surface; the store and class rationale keeps citing LLP 0103#cli. Task-Id: T4 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both hypaware-privacy SKILL.md bodies (claude + codex) now teach the machine-local marking surface as `hyp policy set/show/unset` instead of the `hyp ignore --sync/--local-only/--private/--check` and `hyp unignore --<class>` misnomer. The bare `.hypignore` dotfile verbs are left untouched. Both bodies stay byte-consistent with each other. Swept the remaining runtime help strings that pointed users at the marking flags: the login durable-command hint (DURABLE_HINT) and the purge durability tip now name `hyp policy set ...`, with their pinned teaching-copy test assertions moved in the same commit. The alias behavior tests (hyp ignore --*/hyp unignore --*) are untouched and still pass as the compatibility proof. No product surface teaches an ignore-spelled command for a non-ignore class. Classification hook copy (classification.js) is out of scope here (T4); the JSDoc on the alias runners keeps naming the old flags because those functions are the aliases. @ref LLP 0111#teaching [implements] @ref LLP 0110 [implements] Task-Id: T5
Ran ref-check across the touched hyp-policy-verb surface (clients.js, policy.js, classification.js, core_commands.js, both hypaware-privacy SKILL.md bodies, and LLP 0103/0110/0111/0112) and found the verb-surface @ref citations already correct from T2-T5. The remaining stale spots were three doc comments left over from T1's carry-forward (repoRootDefaultTarget, runMarkMachineLocal, runIgnoreCheck) that still described the policy set/show runners as "a future task" and described repoRootDefaultTarget as shared with the future policy verb, when in fact policy set/show now exist and policy set deliberately never calls repoRootDefaultTarget (it marks the resolved path exactly as pointed at, per LLP 0111 #set). Corrected those glosses to state the current, already-landed relationship instead of a stale forward-looking one. Verified LLP 0103's Extended-by: LLP 0110 forward-ref still reads correctly against the final shipped verb surface. ref-check's only remaining findings in touched files are two pre-existing false positives against LLP 0086's HTML-anchor sections (the tool only scans markdown headings), unrelated to this change set and present before T1-T5 touched this file. No behavior change. npm test (2284 tests) and npm run typecheck both pass. Task-Id: T6
|
neutral review — round 1 (reviewed head Verdict: clean / approve-grade. The change set does exactly what LLP 0110/0111 specify, and the PR own diff has no actionable finding. Verified:
Out-of-scope residue (deferred, not a PR-diff finding): three sibling-skill lines still teach the deprecated-but-working Non-attributable: a review pass flagged Reviewed-clean at the current head. Next tick: ready + held for you to merge. |
…in sibling skills Folds in the deferred minor review finding from PR #327 review round 1 (the sensitive-scan and reference skills still taught the deprecated hyp ignore --check alias). Doc-only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Update: the deferred sibling-skill doc residue (previously tracked as #328) has been folded into this PR at commit |
|
neutral review — round 2 (reviewed head Verdict: clean. The only delta since round 1 is the folded-in doc sweep: three sibling-skill lines now teach The misnomer migration is now complete across every user-facing surface. Reviewed-clean at the current head; next tick this is readied and held for you to merge. |
Mints
hyp policyas the class-neutral machine-local marking verb, retiring thehyp ignore --syncmisnomer (running "ignore" to opt a folder INTO syncing).What changed
hyp policy set|show|unset|list(src/core/commands/policy.js, registered incore_commands.js), delegating to shared marking internals hoisted out of the flag branches. The LLP 0103 machine-local store, resolver, and class lattice are untouched.hyp ignore/hyp unignorestay the honest dotfile verbs; the--sync/--local-only/--private/--checkflags survive as output-compatible, help-text-deprecated aliases that delegate to the same internals (zero behavior change; existing alias tests pass unchanged).verbArgvForClassnow emitspolicy set <path> <token>, prompt text + pinned tests updated) and bothhypaware-privacySKILL.md bodies +hyp status/help wording.Provenance
Neutral pipeline: request LLP 0110 (issue, Accepted) -> design LLP 0111 -> plan LLP 0112 (6 tasks T1-T6), all tasks verified-merged. Implemented and reviewed by neutral, held for a human merge.
@ref LLP 0110 [implements]
@ref LLP 0111 [implements]
Change-Set: hyp-policy-verb