agentleFS
AidALLAidALL/ghost-alice/merge-companion/SKILL.md

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.

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
  1. Distinctive:

    Use the manifest-missing-or-invalid silent-pass rule:

    line 33
  2. Distinctive:

    All three pass without user-facing noise.

    line 39
  3. Very specific:

    Ask: offer integrate, discard, or later.

    line 61
  4. Distinctive:

    All AI output in steps 3, 4, and 5 must pass adversarial-verification before it is shown as a decision aid or applied.

    line 67
  5. Distinctive:

    After step 4, ask whether the same decision should apply to other platforms.

    line 72
  6. Very specific:

    If yes, mark entries with the same source_path in other platform manifests.

    line 73
  7. Distinctive:

    If platform-specific outputs differ, mark propagation unavailable for that entry.

    line 74
  8. Distinctive:

    Do not overwrite live installed files before user confirmation.

    line 99
  9. Distinctive:

    Do not collapse integrate, discard, and later into a single default.

    line 100
  10. Distinctive:

    Do not treat impact tier as verification.

    line 101
  11. Distinctive:

    Do not propagate decisions across platforms without asking.

    line 102

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.json exists.
  • At least one entry has decided=false.

Silent Pass Conditions

Use the manifest-missing-or-invalid silent-pass rule:

  • manifest missing
  • entries empty
  • 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.ps1 tail 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

  1. Notify: explain that changes were detected after the last install and show the backup location.
  2. Classify: label each change as trivial, semantic, or structural using references/impact-tier.md. This is display sorting only; it does not bypass verification.
  3. 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.
  4. Ask: offer integrate, discard, or later. later is the default and keeps the entry pending. Advanced flows may offer AI partial merge.
  5. Stage merge: create the proposed result under ~/.ghost-alice/staged/<entry-id>/. Do not touch the live file yet.
  6. 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_path in 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.md
  • references/impact-tier.md
  • references/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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.