Repository navigation
feat(aidd-context): assess existing rules before writing - #1006
Merged
Merged
Conversation
Compare complete candidate policies and applicable project guidance before publication. Require an explicit resolution and preserve the approved body through the existing writer. Refs #791
Include local Claude policies and conditionally loaded AGENTS sources in the discovery contract. Record a Claude-only conflict assessment that leaves every project byte unchanged. Refs #791
Record independent review and outcome challenge, mark the plan reviewed, and preserve reproducible native receipts and fixture teardown evidence. Refs #791
Keep each instruction with its owner; preserve assessment and publication contracts. Refs #791.
Keep delivery evidence local; retain plugin-source writing separately from host publication.
Keep category and workflow semantics lost during compression. Make assessed approval, explicit artifact language and host applicability unambiguous. Refs #791
Keep routing in the skill and detailed contracts in existing references. Give each action an explicit input and output without repeating the frame or assessment fields in its process. Refs #791
Preserve installed-tool discovery when destinations are unspecified. Shared AGENTS guidance alone cannot identify an installed host. Refs #791
Await missing destination confirmation before assessing candidates. Give unresolved applicability priority over conflict resolution so unknown Copilot interfaces cannot justify changing imported policies. Scope that uncertainty to existing-policy comparisons rather than requiring activation proof for future publications. Refs #791
Resolve installed action filenames without guessing numeric prefixes. Refs #791
Keep agent decisions and usable publication contracts concise while leaving mechanical diagnostics with the existing writer. Refs #791
Keep the workflow in actions and reusable contracts in references so the agent can follow the process without chasing procedural redirects. Refs #791
Put clarification and reassessment before policy-change choices when comparison evidence is missing; keep label definitions in the reference. Refs #791
Keep the action flow readable while loading assessment, discovery and publication contracts only when needed. Preserve approval and host-format safeguards. Refs #791
blafourcade
marked this pull request as ready for review
October 15, 2026 05:19
Give each action a one-line purpose and bold-led imperative steps, keep the approval gate in the router, and phrase rules positively. References stay self-contained. Refs #791 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add --plan (dry run listing exact paths, same refusals) and --check --publish (drift report, non-zero on drift) to the standalone writer. Rule generation drops its validate action: capture plans before approval, write verifies after publishing. Refs #791 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Present ends the turn, replans after any change and waits for a later explicit approval. The writer path is resolved absolute once, in capture. Refs #791 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Write requires a user message that approves the displayed candidate unchanged; a choice, edit or rename is a resolution. Refs #791 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…te-rule Refs #791 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…l rule Drop redundant bold step labels and filler across the skill, state the approval rule once in the transversal rules, show description, scope and hosts in the presented candidate, and reuse the existing rule's hosts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Closed
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Assess existing policies before creating/updating a rule; show the full candidate and findings, then await explicit approval. Closes #791.
Two actions instead of three:
capture-rule: confirm, frame, draft, compare against existing policies, plan withwrite-rule.cjs --plan, present, end the turn.write-rule: needs an explicit approval (a user message after the last shown candidate, unmodified; a choice or a rename is a resolution, not an approval), writes, verifies with--check --publish, reports.The assessment lives in
capture-rule(no separate assess action).tool-paths.mdis replaced byrule-publication.md. Style follows #1028 (imperative steps, positive wording, no sibling links).Writer change
scripts/write-rule.cjschanged (previously "unchanged"):--plan: dry-run, same refusals, prints{"dryRun":true,"files":[...]}.--check --publish: prints{"drift":[...]}, exit 1 on drift.--checkaccepts only--publish, excludes--plan.Validation
scripts/__tests__/rule-generation.test.js: 66 pass. Five mutations, each fails the matching test.cli-knipandcli-testgreen.drift: []).-p): no approval pause, same as the previous skill (host limit). Publication formats and--checkOK.scripts/write-rule.cjs.Limits
AGENTS.md(accepted).To replay on Codex, Cursor, OpenCode (maintainer with access)
Install:
aidd translate <repo> --to <host> --as flat --out <project>,git init, addpackage.json{"type":"module"}. Same user wording on each host, no mention of guardrails. Use the same session for follow-ups.Check each: writer path absolute and identical across plan, write and check;
--planbefore the pause;--check --publishgives{"drift":[]}; no write before the explicit approval.✅ I certify
🤖 Generated with Claude Code