Skip to content

Give /setup install provenance and a --check mode #408

Closed as not planned
Closed as not planned

Description

@orioltf

Question

Give /setup install provenance and a read-only --check mode, so a Consumer can see which plugin
version its installed artefacts came from and find out that a copy has gone stale.

Decided on #402 and recorded in the
Decisions-so-far passage on #373. The short
version: /setup is the Consumer's installer, autoUpdate goes off in a Consumer, and drift
therefore stops being an unattended overwrite and becomes staleness by inaction. Nothing detects
that today, and both real failures to date — #389's wrong parity claim, and the two rotted files the
0.23.0 port found — were detection failures.

This is the read half. #383 rewrites
setup.md and owns every write. This ticket owns what the writes record and what reads them back. It
is blocked by #383 for one concrete reason: /setup must locate the plugin's own installed directory
before it can compare anything against it, $CLAUDE_PLUGIN_ROOT is not set inside the Bash tool, and
ADR-0036's
2026-08-20 amendment assigns that mechanism to #383.

One reversal to record. ADR-0036's 2026-08-14 amendment states that the record file its
Consequences deferred to #295 is not built, and that per-file provenance is the whole mechanism.
.archon/methods/INSTALLED.md makes that sentence untrue for the directory entry. The rule that
replaces it: a named entry carries its own header, a directory entry carries one record — the
split CONTEXT.md § Install set already draws.

Acceptance criteria

  • Every Box YAML /setup installs carries the Generated header, and the header names this plugin,
    the plugin version that wrote the file, the Archon version observed at install time, and that the
    next run replaces the file.
  • .archon/methods/ carries one INSTALLED.md naming this plugin and the version that installed
    the Bundle. No SKILL.md is stamped, and no upstream Method file is edited.
  • /setup --check writes nothing and reports, per artefact class, whether the installed copy
    matches the plugin on disk.
  • --check treats the two tenant classes differently from the two plugin classes: for the config
    and the two tracker docs it reports presence and what differs, and never describes a replacement
    it would perform.
  • --check reports an artefact that carries no Generated header as unknown-provenance rather than
    as matching, because every artefact installed before this ticket is headerless.
  • ADR-0036 carries a fourth amendment naming which sentence of its 2026-08-14 amendment stopped
    being true, and why the directory entry now carries a record while the named entry does not.
  • CONTEXT.md § Generated header states the Archon-version line and the Methods record, so the
    vocabulary and what /setup writes agree.
  • --check has been run against DXP-DesignSystem, and its output is quoted on this ticket. Expect
    it to report all four Boxes as unknown-provenance: they were hand-copied at 0.23.0 and none carries
    a header.

Open questions this ticket must settle before it is dispatched

  • The report shape. "Names each difference" is not a format. A whole-file comparison, a first-line
    header comparison, and a line diff are three different answers, and an implementer will pick one and
    defend it. Decide it, or the criteria above have a gap.
  • Who remembers to run --check. The cure for "a hand-carried artefact nobody checks" is still a
    command a human must remember. Naming the moment — as the root AGENTS.md does for a vendored Bundle
    upgrade — is the cheapest honest answer, but it is not decided.
  • Whether --check belongs on /setup or on /archon-upgrade. /archon-upgrade already reads
    versions and re-asserts the ADR-0011 schema traps by reading. The overlap is real and undecided.

Activity

  1. added
    needs-specsEnough info from reporter; ready to write a spec
    tech-debtInternal restructuring; no behaviour change
    p2Medium priority
    on Aug 23, 2026
  2. orioltf commented on Aug 25, 2026

    @orioltf
    MemberAuthor

    Unblocked by #420 — and here is exactly what you start from

    #383's rewrite of commands/setup.md is up with eight green checks. Three facts it settles, so this ticket does not re-derive them:

    • The Generated header is one comment line, first line of each installed Box, naming the Plugin and the version that wrote it and stating that /setup rewrites the file. The install step writes it and reads it back as PREVIOUS_VERSION by matching a prefix of the first line, never a search over the body. ADR-0036's 2026-08-25 amendment records it.
    • No Method file carries a header. The Bundle is upstream text pinned to a tag, and a line at the top forks it from that tag — which is the fork the formatter exclusions exist to prevent. So D3's "every installed file's header" reads: every installed Box. If this ticket wants per-Method provenance, that is a INSTALLED.md beside the tree, not a stamp inside a Method.
    • Locating this Plugin's own installed directory is solved, which is what this ticket could not start without: ~/.claude/plugins/installed_plugins.json → the entry keyed unic-archon-dlc@<marketplace>, matched on projectPath for a project-scope install, then installPath, verified against the manifest, the Bundle and at least one Box. It stops rather than guessing. Never a search of ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/ — that directory held nine versions of this Plugin on the machine measured, of which one was installed.

    One more thing worth knowing before you write --check: the rewrite already reports every version it found when the installed Boxes disagree, rather than picking one, because a partial prior install is a real state and picking one claims an install that never happened. A drift check should read that the same way.

    Still entirely yours, and #383 deliberately invented none of it: the Archon-version line, the Methods record, and the whole --check mode.

  3. orioltf commented on Nov 3, 2026

    @orioltf
    MemberAuthor

    unic-archon-dlc is frozen. This question carries over to adlc, its successor, as input for adlc's map (internal Jira APD-3). Nothing more happens on it in this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app:unic-archon-dlcneeds-specsEnough info from reporter; ready to write a specp2Medium prioritytech-debtInternal restructuring; no behaviour changewayfinder:taskWayfinder ticket: do the thing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions