Skip to content

Delete lib/ and test/ — take the plugin to zero code #381

Closed

Description

@orioltf

Question

Delete lib/ and test/. Take the plugin to zero code and zero runtime dependencies.

This gates the Consumer ten days. /build touches none of lib/, but /specs, /tickets and
/triage do — and #390 installed all seven commands into DXP-DesignSystem through the marketplace,
where every one of them halts at Step 1. #379 waits behind this. (The body used to say the opposite;
the reversal and its evidence are in the comments dated 2026-08-19.)

What goes, and what each deletion costs:

Module Lines What replaces it
slopcheck.mjs, stub-detector.mjs 119 nothing — already dead. unic-dlc-build.yaml inlines its own slopcheck
config-schema.mjs + labels-config.mjs 387 the Box reads .archon/unic-dlc.config.yaml directly; defaults ship as comments in it
issues-schema.mjs 149 the agent writes and orders issues.json; five tickets need no topological sort
prd-writer.mjs 88 the agent writes PRD.md
methods-resolver + -manifest + -bundle 623 one tier: the literal .archon/methods/<name>/SKILL.md path every Archon Box already uses. The manifest also held data no path replaces — providedTo, the upstream pins, subFiles, the METHODS_BUNDLE provenance — which moves to prose: the README § Dependencies table becomes the list itself, and vendor/mattpocock-skills/README.md keeps the pin
archon-check.mjs 115 archon --version, read by the agent
artefact-install.mjs 468 prose in the rewritten /setup (#371)
schema-traps.mjs 107 /archon-upgrade is outside the 1.0 box set

Also gone: the yaml dependency, the test script's hand-list of 19 files,
test/test-enumeration.test.mjs that guards that hand-list, and typecheck with no .mjs left to
check. The plugin reaches zero dependencies, which is the bar the root AGENTS.md sets with
auto-format.

Keep nothing without a written reason. If a module earns its place, say so on this ticket and keep it.

Acceptance criteria

  • lib/ and test/ are gone, or every surviving file carries a written reason on this ticket.
  • package.json has no yaml dependency, no test script listing files by hand, and no
    typecheck script with nothing to check.
  • No commands/*.md file imports a plugin module, and every one of them reads config and Methods
    by path.
  • The plugin's own CI still passes, or the checks that no longer apply are removed with a reason.
  • The four Boxes still run. Amended 2026-08-20 (maintainer's call, in-session): prose inside
    a node may be edited where it names a deleted symbol — the seven resolveMethod references in
    the Box prompt bodies go — but a node's machinery may not (depends_on, when, approval
    gates, always_run, context, loop, allowed_tools, staging rules). The diff proves the
    machinery half; the Consumer run that closes this ticket proves the running half. The
    lib/*.mjs mention at unic-dlc-explore.yaml:142 is advice about the Consumer's own code and
    stays.
  • Every command runs past Step 1 in a Consumer where the plugin is installed through the
    marketplace, with no node_modules and no hand-set environment variable.
    This is the
    condition Install the DLC's command Boxes in DXP-DesignSystem #390 could not meet and the one that proves the deletion did its job. The criterion
    above it — "no commands/*.md file imports a plugin module" — is necessary and not
    sufficient
    : it passes while Step 1 still reads an env var that is never set.

Activity

  1. orioltf commented on Aug 14, 2026

    @orioltf
    MemberAuthor

    Stale — do not follow. Superseded by the opener dated 2026-08-19 22:35 below. The dependency in step 2 reversed on 2026-08-19: #381 now gates #379, and the sprint waits on this deletion. Kept for the record only.

    How to start this session

    Produces: lib/ and test/ gone, the plugin at zero code and zero runtime dependencies.

    1. Run /wayfinder 373 #381. It claims this ticket.
    2. Confirm Land a rendering component on develop, so the client sees the walk's output #379 is closed. Decision 16 forbids deleting code during the client sprint.
    3. Work the table in the ticket body, module by module. It names what replaces each one.
    4. Invoke /implement — and ignore its second line, which tells you to use /tdd. Decisions 3 and
      11 delete the tests; there is no red-green loop here.
    5. Prove the Boxes survive: no Box imports plugin lib/, and each of the four still runs.
    6. pnpm ci:check before pushing. pnpm format does not fix import order.

    Traps

    • Keep nothing without writing the reason on this ticket.
    • package.json loses three things: the yaml dependency, the test script that lists 19 files by
      hand, and typecheck with no .mjs left to check.
    • Never create, copy or delete a LICENSE file — the maintainer owns those by hand.
    • The plugin's CI checks that no longer apply get removed with a stated reason, not left failing.
  2. orioltf commented on Aug 19, 2026

    @orioltf
    MemberAuthor

    This now unblocks a live Consumer, measured on 0.22.0

    #390 installed the command Boxes in DXP-DesignSystem through the marketplace entry. All seven commands
    load. None runs past Step 1, for two reasons this ticket deletes:

    1. $CLAUDE_PLUGIN_ROOT is not set inside the Bash tool. commands/specs.md, tickets.md,
      triage.md, improve-architecture.md and cleanup.md read it from process.env in Step 1 and stop
      with "Run this as a /unic-archon-dlc: slash command" — advice the operator has already followed.
      ADR-0023 §5
      already records the variable as unreliable and exempts only the Archon nodes.
    2. yaml is a runtime dependency and an installed plugin ships no node_modules.
      lib/config-schema.mjs:4, lib/methods-bundle.mjs:5 and lib/schema-traps.mjs:3 import it bare. It
      resolves through this monorepo's workspace and nowhere else, so setting the variable by hand only moves
      the failure to Cannot find package 'yaml'.

    Both are the same fix: a command that reads .archon/unic-dlc.config.yaml in prose needs neither the
    variable nor the package. So this is no longer housekeeping — /specs → /tickets → /build cannot run
    at the Consumer until it lands, and #379 waits behind it.

    Two things to carry into the rewrite:

    • The Methods must resolve without resolveMethod. The Archon Boxes already read
      .archon/methods/<name>/SKILL.md by literal path (ADR-0023 §5). The commands should read the same way,
      which retires the three-tier resolution along with the module.
    • Install the DLC's command Boxes in DXP-DesignSystem #390's AC-3 completes here. It asks /triage to resolve a state role through
      docs/agents/triage-labels.md. I resolved ready-for-human → Tag needs-human by hand and wrote it to
      work item 42948; the command could not. Re-run /triage in DXP-DesignSystem once Step 1 works.
  3. orioltf commented on Aug 19, 2026

    @orioltf
    MemberAuthor

    This ticket now blocks the ten-day goal. Its stated premise is false.

    The body opens:

    Blocked until the Consumer ten days are done: /build touches none of lib/, so this is cleanup the
    client sprint does not need, and doing it mid-sprint splits attention.

    /build still touches none of lib/. But /specs, /tickets and /triage do, and #390 installed
    them into DXP-DesignSystem today. All seven commands load and none runs past Step 1. So the
    dependency reversed: this is no longer cleanup the sprint does not need, it is what the sprint is waiting
    for. #379 sits behind it.

    Measured on 0.22.0, installed through the marketplace into that Consumer (#390), then verified statically
    here:

    1. $CLAUDE_PLUGIN_ROOT is not set inside the Bash tool. Step 1 reads it from process.env, halts,
    and prints "Run this as a /unic-archon-dlc: slash command" — advice the operator has already followed.
    All seven commands reference the variable; five also reference a lib/*.mjs path through it.

    The plugin's own ADR-0023 §5 already records it:

    $CLAUDE_PLUGIN_ROOT is a Claude Code env var that is not reliably set inside …

    The ADR exempted the Archon nodes on exactly that ground and left the commands depending on it.

    2. lib/ imports a bare external package, and an installed plugin ships no node_modules. Setting the
    variable by hand moves the failure to Cannot find package 'yaml'. Three modules import it, not one:

    lib/config-schema.mjs:4   import { parse as parseYaml, stringify as stringifyYaml } from 'yaml'
    lib/methods-bundle.mjs:5  import { parse as parseYaml } from 'yaml'
    lib/schema-traps.mjs:3    import { parse as parseYaml } from 'yaml'
    

    package.json declares it as "yaml": "catalog:" — the pnpm workspace protocol. Outside this
    monorepo that is unresolvable whether or not node_modules is present, so shipping the directory would
    not fix it either.

    Why this ticket rather than a patch

    The two defects have one fix and it is this ticket's deletion. Take the plugin to zero code and there is no
    lib/ to import, no yaml to resolve, and no $CLAUDE_PLUGIN_ROOT to be unset — the Box reads
    .archon/unic-dlc.config.yaml with its own tools, which is what the four Archon Boxes already do and why
    they were unaffected. Patching around it means keeping the module and inventing a second resolution path
    for a directory that is being deleted.

    #390 deliberately made no plugin edit for that reason.

    What changes here

    • Priority p1 → p0. It gates Land a rendering component on develop, so the client sees the walk's output #379, which is decision 17's ten-day goal.
    • The "Blocked until the Consumer ten days are done" line at the top of the body is now wrong and should go
      with the first edit.
    • Add to the acceptance criteria: every command runs past Step 1 in a Consumer where the plugin is
      installed through the marketplace, with no node_modules and no hand-set environment variable.
      That
      is the condition Install the DLC's command Boxes in DXP-DesignSystem #390 could not meet, and the one that proves the deletion did its job. The existing
      criterion "No commands/*.md file imports a plugin module" is necessary and not sufficient — it can be
      satisfied while Step 1 still reads an env var that is never set.

    Recorded from #390's session; verified here against 624de9e.

  4. added
    p0Critical priority
    and removed
    p1High priority
    on Aug 19, 2026
  5. self-assigned this
    on Aug 19, 2026
  6. orioltf commented on Aug 19, 2026

    @orioltf
    MemberAuthor

    How to start this session

    Produces: a plugin with no lib/ and no test/, and seven commands that run past Step 1 in a real
    Consumer. Invoke /writing-for-agents — every file this leaves behind is a command prompt, and Step 1
    of each is what you are rewriting.

    Do not grill the deletion; decision 11 settled it. Do grill the one thing this ticket does not
    decide, named below.

    Read in this order

    1. This body, then the comment above dated 2026-08-19 — it carries the two measured defects and the new
      acceptance criterion.
    2. wayfinder: unic-archon-dlc is prose, and proven at a Consumer #373's comment "The dependency order changed today: Delete lib/ and test/ — take the plugin to zero code #381 now gates Land a rendering component on develop, so the client sees the walk's output #379", and the § "The two
      repositories move together" in its body.
    3. ADR-0023
      §5, which already records $CLAUDE_PLUGIN_ROOT as unreliable and exempted only the Archon nodes.
    4. Rewrite commands/tickets.md from scratch against the to-tickets Method #382 and Rewrite commands/setup.md from scratch as prose #383. They own commands/tickets.md and commands/setup.md, and you cannot finish this
      ticket without touching both.

    Why this is p0 now

    #390 installed the command Boxes into DXP-DesignSystem through the marketplace. All seven load. None
    runs past Step 1.
    Two defects, one fix, and the fix is this deletion:

    • $CLAUDE_PLUGIN_ROOT is unset inside the Bash tool. Every command reads it from process.env and
      halts, printing advice the operator has already followed.
    • Three lib/ modules import bare yaml, declared "yaml": "catalog:" — the pnpm workspace
      protocol. Outside this monorepo that is unresolvable whether or not node_modules is present, so
      shipping the directory would not help either.

    So #379 and decision 17's ten-day goal sit behind you. The body's opening line — "Blocked until the Consumer
    ten days are done … cleanup the client sprint does not need" — is false and should go with your first
    edit.

    The decision this ticket does not make

    "Delete lib/" is stated. What replaces Step 1 is not, and that is the ticket. Today each command
    runs a node --input-type=module heredoc that resolves $CLAUDE_PLUGIN_ROOT, imports a module, and
    returns JSON the prose then parses. Which module each one reaches:

    Command Modules
    setup.md archon-check · config-schema · methods-manifest
    archon-upgrade.md archon-check · schema-traps
    cleanup.md config-schema
    specs.md prd-writer
    tickets.md issues-schema
    triage.md config-schema, via a path built at runtime

    Decide the replacement shape once and apply it identically everywhere — divergence here is what the
    one-dependency-list doctrine in AGENTS.md exists to stop. The obvious candidate is what the four Archon
    Boxes already do, and why they were unaffected: a prompt node reads .archon/unic-dlc.config.yaml with its
    own tools and validates in prose. Confirm that reading before you write seven of them.

    Two things to settle while you are there. What does "the config is incomplete" mean with no
    validateConfig — which keys does a command still refuse to run without, now that MANDATORY_PATHS is
    project.branching alone? And what replaces the tier line methods-resolver printed, once resolution is
    the single literal .archon/methods/<name>/SKILL.md path every Archon Box already uses?

    Traps

    The bar that proves it

    Not pnpm test — that passes today while every command is broken. Install the plugin into a Consumer
    through the marketplace
    — no node_modules, no hand-set environment variable — and run each command far
    enough to see Step 1 succeed. docs/agents/unic-archon-dlc.md in DXP-DesignSystem records the route, and
    that Consumer is already set up for it.

    Watch that the existing criterion "No commands/*.md file imports a plugin module" is necessary and
    not sufficient
    : it can pass while Step 1 still reads an env var that is never set.

    When you land it

    Minor bump with a ### Breaking changelog entry — ADR-0022's
    amendment says that is what a breaking change is on a 0.x line, and major is reserved for 1.0.0
    itself. Then say on #379 that it is unblocked, and on #373 whether the Consumer needed anything. A ticket
    that closes with only the plugin side done is half closed.

    Report back

    Send wayfinder-orchestrator four things when you learn something that would have changed this opener:
    what you expected, what happened, the command or file that proved it, and whether it changes only this
    ticket or every session in this repo. Send it when you learn it, not only at the end.

  7. orioltf commented on Aug 20, 2026

    @orioltf
    MemberAuthor

    Body amended 2026-08-20: the Box-edit criterion

    The maintainer decided the seven dead resolveMethod references in the Box prompt bodies are fixed in this ticket, not deferred. The AC "they never imported lib/, and this proves it" would have gone vacuous in the other direction the moment a Box was edited, so it now distinguishes prose (editable where it names a deleted symbol) from machinery (untouched, proven by the diff), and the running-half proof folds into the Consumer-run gate this ticket already closes on. Amended per root AGENTS.md: ticket amended, not merged around.

  8. orioltf commented on Aug 20, 2026

    @orioltf
    MemberAuthor

    Closed early — here is the criterion it closed without

    This auto-closed at 13:20:29Z when #398 merged, which was several hours before the criterion that mattered most could be met. Recording the evidence so the ticket does not read as complete-by-merge.

    The plugin half — #398, merged

    lib/ and test/ deleted, 6413 lines. All seven Step 1 blocks rewritten as prose. No command reads $CLAUDE_PLUGIN_ROOT, imports a plugin module, or runs a Node heredoc. package.json at zero runtime dependencies; verify:changelog kept because CI runs it on every PR. Released as unic-archon-dlc@0.23.0, commit 196806795c69b9a0cff663c81a78f0c399a6b64d.

    The four Boxes: three comments and seven node prompts changed, prose only. Every node's depends_on, when, approval gate, always_run, context, loop and allowed_tools hashed identical to 0.22.0, all four files still parsing with the same node counts. The amended criterion's machinery half, proven by diff.

    The Consumer half — DXP-DesignSystem !5782, merged as 2002246

    The criterion: every command runs past Step 1 in a Consumer where the plugin is installed through the marketplace, with no node_modules and no hand-set environment variable. Two probes, both read-only, on work item 42952:

    • /unic-archon-dlc:cleanup — Step 1 read .archon/unic-dlc.config.yaml with the Read tool, took five keys, then read the tracker contract. Its own report: "No shell, no Node, no $CLAUDE_PLUGIN_ROOT." That is precisely the operation 0.22.0 could not perform.
    • /unic-archon-dlc:archon-upgrade — Step 1 ran archon --version, read 0.7.0, compared it against the 0.7.0 floor stated in the command's own prose, and took the documented equals-floor branch.

    Two of the seven were probed, not seven, and DXP-DesignSystem/docs/agents/unic-archon-dlc.md says so rather than implying coverage nobody has. The two were chosen because between them they exercise both halves of the old failure — a command that reads config, and one that reads none — and neither writes. The other five share the Step 1 shape by construction, which is an argument and not a measurement.

    #390's AC-3 completes with it: /triage was not among the probed commands, so that one is still unproven and the Consumer doc carries the by-hand fallback for it.

    What this ticket produced beyond its own scope

    • #380 answered — the prose-Box quality bar, in the root AGENTS.md, with both hard cases given losing verdicts rather than hedged.
    • #401 filed — a defect this ticket introduced. unic-dlc-qa.yaml's rewritten comment points at README.md § Dependencies, which resolves correctly here and nowhere in a Consumer, where a Box actually runs. The text it replaced named lib/methods-manifest.mjs, a path no Consumer has, so it was unambiguous. Found by unic-dlc-pr-review against !5782.
    • #402 filed — reopening decision 14. Porting this release exposed that /setup has to come back if anything is to keep a Consumer current, and Rewrite commands/setup.md from scratch as prose #383 is blocked on the outcome.
    • Six ADRs amended, none deleted: 0016, 0018, 0019, 0023 §5, 0030, 0031, 0032, 0035, 0036 — each with what the change costs stated rather than hedged.

    The one thing that is thinner than before, on purpose

    test/schema-traps.test.mjs re-asserted ADR-0011's four schema traps in CI on every pull request. Nothing does that now. /archon-upgrade Step 5 is the only place they are re-asserted, by reading, in a command a human must remember to run. Nobody chose that replacement — it fell out of the deletion, and it is on #373's open list rather than buried here.

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

Metadata

Metadata

Assignees

Labels

app:unic-archon-dlcp0Critical 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