Repository navigation
Conversation
Sync scripts/rules with policyengine-api. The rules-registry guard now verifies that agent adapters ([agents]) only point to AGENTS.md, and a new ci-scripts quality guard ([ci_scripts]) fails on run: blocks longer than one logical line, workflow scripts that no test runs, and shellcheck findings, each ratcheted against a baseline that may only shrink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both adapters duplicated part of the skill list and had drifted from AGENTS.md (observability and the rules registry were missing). They now only point to AGENTS.md; the safety boundaries move into AGENTS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Document the rule in docs/engineering/skills/ci-workflows.md, install a pinned shellcheck in the quality-guards job, and record today's exceptions as baselines: 16 multi-line run: blocks, 4 untested scripts and 1 script with a shellcheck finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Steps 1.3, 1.5 and 1.6: sim.agents.adapters-point-to-agents-md (enforced, with proof), sim.process.pr-tracking-issue (doc-only, split out of sim.process.same-repo-draft-prs), and three ratcheted sim.ci.* rules with proofs. AGENTS.md gains the safety boundaries and a pointer to the CI workflows skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sync scripts/rules with policyengine-api: folded blocks and backslash-continued lines now count line by line, and chaining commands with &&, || or ; counts as more than one line. The multi-line baseline grows from 16 to 20 entries (the backslash-continued commands). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
This branch has not been deployed
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.
Fixes #756
Same-Repository Draft PR Check
PolicyEngine/policyengine-sim-api, not a personal fork.Summary
The top of the rules stack: Phase 0 (#754) → rules registry (#752) → this PR, which covers Phase 1 steps 1.3, 1.5 and 1.6. The API counterpart is PolicyEngine/policyengine-api#3890.
1.3: one source of agent instructions.
CLAUDE.mdand.github/copilot-instructions.mdare now short pointers toAGENTS.md. Both had duplicated part of the skill list and drifted from it.main; no production deploys or client publishing unless asked) move intoAGENTS.md.[agents]table. It's registered assim.agents.adapters-point-to-agents-md(enforced, with proof).1.5:
sim.process.pr-tracking-issueis registered as doc-only and split out ofsim.process.same-repo-draft-prs. CI enforcement comes in step 2.8.1.6: workflow logic lives in tested scripts. The new
ci-scriptsquality guard (same tool as the API) checks for:run:blocks with more than one line of code, counting every line, including folded and backslash-continued ones, plus commands chained with&&,||or;;shellcheckfindings.Each check is ratcheted against
rules/baselines/: 20 multi-line blocks, 4 untested scripts (the dependency-update scripts andupdate-policyengine-package.sh) and 1 shellcheck finding (modal-precompute.sh).The rules are
sim.ci.multiline-run-is-script,sim.ci.workflow-scripts-testedandsim.ci.shell-scripts-pass-shellcheck, all ratcheted, with proofs. Thequality-guardsjob installs a pinnedshellcheck-py==0.11.0.1. Seedocs/engineering/skills/ci-workflows.md.scripts/rules/is byte-identical with the API's copy; the tool sha256 inrules.mdmatches.Testing
python -m unittest discover -s scripts/rules/tests -t .: 74 tests pass.python scripts/run_quality_guards.pypassesrules-registryandci-scripts.python -m scripts.rules guard --base-ref origin/mainpasses.projects/policyengine-simulation-entry:uv run pytest tests/passes 159 tests.changelog_entry.yamlparse as YAML.actionlintreports only the pre-existing note on the format loop.🤖 Generated with Claude Code