merge-companion
Skill15 starsChanged 6 months agoApache-2.0View on GitHub
Use after skill updates to protect, classify, merge, discard, or defer local user changes. Handles undecided pending-merges manifest entries, install backups, a six-step UX, adversarial verification, and cross-platform decision propagation.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-verificationSkill
- agent-security-scanSkill
- boundary-contractSkill
- compact-handoffSkill
- jailbreak-detectorSkill
- necessity-gateSkill
- session-intent-analyzerSkill
- skill-evolutionSkill
- task-routerSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Use the manifest-missing-or-invalid silent-pass rule:
- Distinctive: line 39
All three pass without user-facing noise.
- Very specific: line 61
Ask: offer integrate, discard, or later.
- Distinctive: line 67
All AI output in steps 3, 4, and 5 must pass adversarial-verification before it is shown as a decision aid or applied.
- Distinctive: line 72
After step 4, ask whether the same decision should apply to other platforms.
- Very specific: line 73
If yes, mark entries with the same source_path in other platform manifests.
- Distinctive: line 74
If platform-specific outputs differ, mark propagation unavailable for that entry.
- Distinctive: line 99
Do not overwrite live installed files before user confirmation.
- Distinctive: line 100
Do not collapse integrate, discard, and later into a single default.
- Distinctive: line 101
Do not treat impact tier as verification.
- Distinctive: line 102
Do not propagate decisions across platforms without asking.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
merge-companion
merge-companion protects local user changes during skill updates. The installer backs up changed installed files into ~/.ghost-alice/pending-merges/<platform>/ and records them in a manifest. At session start, the platform hook checks the manifest and surfaces this skill when undecided entries exist.
Contents
- Entry Conditions
- Silent Pass Conditions
- Activation Guarantee
- Six-Step Review UX
- Mandatory Adversarial Verification
- Pattern-Two Isolation And Propagation
- Self-Call Restriction
- io-trace
- References
- Warnings
Entry Conditions
~/.ghost-alice/pending-merges/<current-platform>/manifest.jsonexists.- At least one entry has
decided=false.
Silent Pass Conditions
Use the manifest-missing-or-invalid silent-pass rule:
- manifest missing
entriesempty- JSON parse failure
All three pass without user-facing noise.
Activation Guarantee
This skill is expected to surface if any of these layers are alive:
- pending-merge-session-start layer: SessionStart hook registered by
install_hooks.py - pending-merge-user-prompt layer: UserPromptSubmit hook payload text
- pending-merge-prose-rule layer: AGENTS.md rule 0-A
- pending-merge-task-router-precheck layer: task-router 1.0 manifest precheck
- pending-merge-bootstrap-self-check layer: platform bootstrap such as
~/.codex/AGENTS.md - pending-merge-install-tail layer:
install.sh/install.ps1tail message - pending-merge-readme layer:
~/.ghost-alice/pending-merges/<platform>/READ-ME-FIRST.md - pending-merge-session-start-failsafe layer: SessionStart hook command ending in
|| true
This eight-layer list is the current operating contract.
Six-Step Review UX
- Notify: explain that changes were detected after the last install and show the backup location.
- Classify: label each change as trivial, semantic, or structural using
references/impact-tier.md. This is display sorting only; it does not bypass verification. - Show differences: provide a natural-language summary by default, plus raw diff on request and workflow impact. Use hashes and provenance only to establish artifact identity, drift, and merge safety. Choose semantic behavior by current contract and behavior evidence, not by recency, authorship, or hash equality.
- Ask: offer integrate, discard, or later.
lateris the default and keeps the entry pending. Advanced flows may offer AI partial merge. - Stage merge: create the proposed result under
~/.ghost-alice/staged/<entry-id>/. Do not touch the live file yet. - Confirm: after user approval, overwrite the live file and mark the manifest entry decided. If rejected, discard the staged output and leave the manifest entry undecided so it stays pending for a later decision.
Mandatory Adversarial Verification
All AI output in steps 3, 4, and 5 must pass adversarial-verification before it is shown as a decision aid or applied. Do not skip this for cost reasons or for low-tier changes. Block immediately the moment a rationalization to skip begins.
Pattern-Two Isolation And Propagation
- Decisions are persisted only in the current platform manifest by default.
- After step 4, ask whether the same decision should apply to other platforms.
- If yes, mark entries with the same
source_pathin other platform manifests. - If platform-specific outputs differ, mark propagation unavailable for that entry.
Self-Call Restriction
This skill may be surfaced only by:
- task-router 1.0
- AGENTS.md rule 0-A
- SessionStart hook
- explicit user request
Other skills must not call it speculatively.
io-trace
Record manifest reads/writes, backup reads/copies, staged writes, and user confirmation prompts in the final [io-trace] block.
References
references/manifest-schema.mdreferences/impact-tier.mdreferences/merge-flow.md
Warnings
- Do not overwrite live installed files before user confirmation.
- Do not collapse integrate, discard, and later into a single default.
- Do not treat impact tier as verification.
- Do not propagate decisions across platforms without asking.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

