Repository navigation
Ignored generated Copilot output by default and added targets.copilot.commit_output to keep it tracked - #50
Conversation
….commit_output to keep it tracked
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Some Git-policy diagnostics still omit the recovery command promised by the PR and changelog.
Review effort: Balanced
Findings: 1
What changed in this PR
Makes Copilot-generated output ignored by default, with an opt-in for cloud Copilot consumers.
Changes:
- Adds
targets.copilot.commit_outputand contract-levelunignoresupport. - Updates Git-policy handling, diagnostics, documentation, and tests.
- Advances versioned artifacts to 0.19.0.
| File | Description |
|---|---|
README.md |
Documents Copilot output policy. |
packages/sync/skills/intelligence-learn-from-repository/SKILL.md |
Updates onboarding commit guidance. |
packages/sync/references/onboarding-migration.md |
Clarifies tracked .github files. |
packages/sync/references/conventions.md |
Defines the new policy and opt-in. |
packages/sync/references/adapters.md |
Documents manifest-aware contracts and unignore. |
intelligence/rules/engine.md |
Updates the adapter contract rule. |
intelligence.yaml |
Advances schema and package version. |
intelligence.lock |
Advances locked engine/package version. |
examples/with-remote-skills/intelligence.yaml |
Advances example versions. |
examples/platform-with-submodules/intelligence.yaml |
Advances example versions. |
examples/platform-with-submodules/intelligence.lock |
Advances locked versions. |
examples/go-api/intelligence.yaml |
Advances example versions. |
examples/go-api/intelligence.lock |
Advances locked versions. |
examples/go-api-with-pi-and-codex/intelligence.yaml |
Advances example versions. |
examples/go-api-with-pi-and-codex/intelligence.lock |
Advances locked versions. |
examples/go-api-with-opencode/intelligence.yaml |
Advances example versions. |
examples/go-api-with-opencode/intelligence.lock |
Advances locked versions. |
examples/go-api-with-antigravity/intelligence.yaml |
Advances example versions. |
examples/go-api-with-antigravity/intelligence.lock |
Advances locked versions. |
examples/dotnet-api-with-react-frontend/intelligence.yaml |
Advances example versions. |
examples/dotnet-api-with-react-frontend/intelligence.lock |
Advances locked versions. |
examples/cli-project/intelligence.yaml |
Advances example versions. |
engine/VERSION |
Selects version 0.19.0. |
engine/lib/adapter-contract.sh |
Adds optional manifest and unignore records. |
engine/adapters/copilot.sh |
Implements Copilot commit policy. |
engine/adapters/agents.sh |
Documents intentional tracking of AGENTS.md. |
engine/adapters/_template.sh |
Documents manifest-aware contracts. |
docs/cli.md |
Updates init and tracking behavior. |
decisions/0015-ignore-generated-copilot-output.md |
Records the architectural decision. |
cli/tests/unit-gitignore.sh |
Tests ignore withdrawal and preservation. |
cli/tests/e2e-negative.sh |
Tests invalid configuration rejection. |
cli/tests/e2e-lifecycle.sh |
Tests the complete Copilot policy lifecycle. |
cli/lib/gitignore.sh |
Implements managed-line removal. |
cli/lib/adapter-lifecycle.sh |
Passes manifests to policy consumers. |
cli/internal/check.sh |
Checks missing and stale Git policy. |
cli/commands/init.sh |
Updates onboarding guidance. |
CHANGELOG.md |
Records the 0.19.0 changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code review - PASS-WITH-WARNINGShead: 91d6b35 - base: main - files 37, +613/-76 CriticalNone. Warning
SuggestionNone. Summary
|
Verification - PASShead: 91d6b35 - steps: PR "## Verification" §1-4 (runtime layout + init/sync scenarios); qa_checks: none matched (
No Negative probes
No failures. |
Verification - PASShead: d9107e9 - steps: PR "## Verification" §1-4 (init/sync Runtime laid out per the PR's own instructions:
Negative probes (not separate steps; implied by the passing steps above)
No failures. All four declared steps pass; no |
Code review - PASS-WITH-WARNINGShead: d9107e9 - base: main - files 37, +633/-79 CriticalNone. Warning
SuggestionNone. Summary
|
…ce for both rewriters
Code review - CLEANhead: a40d98c - base: main - files 37, +648/-99 No findings at any severity. Standards axis: the Claims axis: all four manual verification steps and the three automated-coverage paragraphs in the PR body match code actually present in the diff ( CriticalWarningSuggestion |
Verification - PASShead: a40d98c - steps: PR "## Verification" §1-4 (init/sync
No Negative probes
No failures. No workspace block: |
…t-ignored # Conflicts: # CHANGELOG.md # cli/internal/check.sh # cli/lib/gitignore.sh
Verification - PASShead: 8aae84c - steps: PR "## Verification" §1-4 (fresh
No Negative probes
No failures. |
Code review - CLEANhead: 8aae84c - base: main - files 20, +605/-59 Merge resolution ( Standards axis: ownership stays untouched by the new manifest argument — Claims axis: decision 0020 matches the code. The PR body's four manual verification steps and three automated-coverage paragraphs match tests actually present ( CriticalNone. WarningNone. SuggestionNone. |
…t-ignored # Conflicts: # CHANGELOG.md
Verification - PASShead: efd875d - steps: PR "## Verification" §1-4 (fresh
Negative probes
No failures, no blocked steps. |
Code review - PASS-WITH-WARNINGShead: efd875d - base: main - files 20, +600/-63 Reviewed CriticalNone. WarningNone. Suggestion
|

Summary
Copilot was the only adapter whose generated output was committed by default: Cursor and Claude Code declare their output in
.gitignore, while Copilot's.github/instructions,prompts,agentsandskillswere tracked. There was no reason for the difference — Copilot in the editor reads those files from disk after sync, exactly as Cursor does — and on a repository hosted outside GitHub nothing ever reads the committed copies. Generated copies in history mean review noise and drift.Copilot now follows the same policy (decision 0020):
copilot-instructions.md(treated likeCLAUDE.md,.cursorrulesandGEMINI.md)..github/itself, workflows, templates and other hand-written files stay tracked.targets.copilot.commit_output: trueis the opt-in for a GitHub repository whose cloud Copilot (code review, coding agent) should read the output from the repository;init/adapter enablethen withdraw exactly those lines from the CLI-managed block, never a line the project wrote above its header. Any value other thantrue/falseis refused by sync with every output restored.unignorecontract record names a line to withdraw.status --checkreports a withdrawn line still present, and every Git-policy finding thatintelligence initrepairs names it; a re-inclusion another rule still defeats also namesgit check-ignore -vto find that rule. Existing projects apply the policy withintelligence init, which printsgit rm --cachedfor each generated file Git still tracks; the CLI never untracks anything itself.AGENTS.mdstays committed by default — the tool-neutral fallback every clone has before any sync — andadapter_contract_agentsnow says so instead of looking like an omission.Type of change
Public CLI check
intelligence sync(unchanged)Verification
Work in a scratch directory outside this checkout; nothing below moves the checkout or its refs. Lay out this branch's runtime first:
mkdir rt && git -C <checkout> archive <this PR's head> cli engine packages | tar -x -C rt, and usebash rt/cli/intelligenceas the CLI. Configure a Git identity in the scratch repository if the host has none.git init proj, createproj/.github/workflows/ci.yml(any content) andproj/intelligence/rules/scoped.mdwith frontmatterpaths:→- "src/**"anddescription: "scoped", then runinit --targets copilotinproj. Expected: exit 0; the CLI-managed block ofproj/.gitignorelists.github/instructions/,.github/prompts/,.github/agents/,.github/skills/and.github/copilot-instructions.md, and no line is exactly.github/;git -C proj check-ignore -q .github/instructions/scoped.instructions.mdexits 0;git -C proj check-ignore -q .github/workflows/ci.ymlexits 1.proj/intelligence.yamltocopilot: { enabled: true, output: ".github", commit_output: true }and runinitagain. Expected: exit 0; none of the five lines remains in the CLI-managed block;git -C proj check-ignore -q .github/instructions/scoped.instructions.mdexits 1. Runinitonce more:.gitignoreis byte-identical.git -C proj add -A && git -C proj commit -qm tracked, setcommit_output: false, and runinit. Expected: exit 0; each of the five lines is back exactly once; the output printsgit rm --cached -- '.github/instructions/scoped.instructions.md'and nogit rm --cachedfor.github/workflows/ci.yml; nothing was untracked (git -C proj ls-files .github/instructionsstill lists the file).commit_output: yesand runsync. Expected: non-zero exit; the output saystargets.copilot.commit_output must be true or false.Automated coverage
unit-gitignore: default patterns including the legacy file,.github/never ignored, opt-in withdrawal of exactly the managed lines (a project's own copy above the header kept), switching back, idempotence, CRLF and missing-final-newline preservation, a file without the header, ownership identical with and without the manifest, and an unsafeunignorepath refused. These fail against the old behaviour.e2e-lifecycle: fresh-init patterns, a hand-written workflow staying trackable, and a Copilot section covering the default,status --checkon a stale line, opt-in, idempotence, the switch back withstatus --checknamingintelligence init, and thegit rm --cachedhints.e2e-negative: a malformed value is refused and renders nothing;truerenders; a deletedincludenegation and a defeated re-inclusion both nameintelligence init, which repairs them.bash cli/tests/verify.sh(run in WSL on this Windows host, since Ran local verification in WSL on Windows #42) — both lint gates and every suite passed in 2m36s.Versioned artifacts
v0.18.1is published and0.19.0is pending: Made status --check decide .gitignore presence with the writer's CR-blind test #55 selected it and moved the engine version, example schema versions, exact sync pins and lock entries, so this PR moves none of them and adds its lines to the existing section (a changed default existing projects must apply, which a minor version covers)CHANGELOG.md## [0.19.0]carries this change, with### Breakingchecklist items of verifiable post-conditionsNotes for reviewers
update --applydoes not re-apply Git policy; the Breaking checklist is what the upgrade skill verifies, and it namesintelligence init.status --checkpresence checks use the CR-safeignore_file_has_linethat #55 (merged) made the single presence test; the merge ofmaininto this branch keeps it for the ignore and include findings.