Skip to content

docs(adr): reshelve harness-internal ADRs into unic-archon-dlc plugin#130

Merged
orioltf merged 11 commits into
developfrom
feature/adr-reshelving-harness-internal
May 26, 2026
Merged

docs(adr): reshelve harness-internal ADRs into unic-archon-dlc plugin#130
orioltf merged 11 commits into
developfrom
feature/adr-reshelving-harness-internal

Conversation

@orioltf
Copy link
Copy Markdown
Member

@orioltf orioltf commented May 23, 2026

Closes #129. Implements docs/issues/adr-reshelving-harness-internal/PRD.md.

Summary

  • Moves nine harness-internal ADRs from root docs/adr/ into apps/claude-code/unic-archon-dlc/docs/adr/, renumbered 0002–0010. Each renumbered file carries a Renumbered from monorepo-root ADR-NNNN (2026-05) trace under its Status header; intra-set supersession references (0020→0002, 0030→0009, 0031→0010, etc.) are updated.
  • Replaces the nine old root paths with one-line redirect stubs so externally-shared GitHub permalinks still resolve (honours the "Never delete an ADR" rule).
  • Sweeps every live inbound link across CONTRIBUTING.md, docs/agents/feature-runner.md, docs/process/ai-development.md, and docs/process/development-workflow.md to point directly at the new harness paths and numbers — no live reader pays a redirect hop. The dogfood-banner PRD and the custom-spec-runner-grill-02 conversation transcript carry name-only references and are intentionally left alone.
  • Refreshes apps/claude-code/unic-archon-dlc/docs/adr/README.md to list all ten ADRs in its index and adds a single-line note to CONTEXT-MAP.md under Relationships documenting the new per-scope ADR split.
  • Generalises the multi-context branch of buildDomainDoc in lib/agent-docs-writer.mjs so the generated docs/agents/domain.md notes that each context may keep its own docs/adr/. Wording is portable — no hardcoded plugin path leaks into Consumer output. Extends test/install-agent-docs.test.mjs with assertions on both branches.
  • Regenerates the dogfooded docs/agents/domain.md by invoking writeAgentDocs against this repo's existing .archon/unic-dlc.config.json (no hand-editing).
  • Bumps unic-archon-dlc to 0.1.2 with a CHANGELOG entry for the generator change.

Why

The root ADR index mixed monorepo-wide conventions (pnpm, Biome, CI, releases, GPG) with nine plugin-internal ADRs describing the Feature Runner / spec template / retired Ralph orchestrator. That miscommunicated scope, fragmented supersession chains across two indexes, and made the root harder to scan. Reshelving puts each ADR next to the code it constrains.

Test plan

  • pnpm check — clean (one pre-existing info-level note, unrelated)
  • pnpm typecheck — clean
  • pnpm test — full suite green (138 tests in unic-archon-dlc, including the two new assertions for buildDomainDoc)
  • pnpm --filter unic-archon-dlc verify:changelog — ok
  • Grep guard docs/adr/00\(20\|23\|24\|26\|27\|28\|29\|30\|31\) returns only the historical-conversation transcript and the PRD (no live link survives on an old path; the stubs themselves do not match the pattern)

🤖 Generated with Claude Code

orioltf and others added 9 commits May 23, 2026 03:15
…ain.md

Generalize the buildDomainDoc multi-context branch so the generated
docs/agents/domain.md acknowledges that each context may keep its own
docs/adr/. The wording is portable — no hardcoded plugin path leaks
into the generator. Add a node:test assertion covering both branches,
and regenerate the dogfooded docs/agents/domain.md in this repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…lugin

Move ADRs 0020, 0023, 0024, 0026, 0027, 0028, 0029, 0030, 0031 from
root docs/adr/ into apps/claude-code/unic-archon-dlc/docs/adr/ and
renumber them to 0002–0010 (the existing 0001-setup-as-slash-command
keeps its slot). Each renumbered file carries a "Renumbered from
monorepo-root ADR-NNNN (2026-05)" trace under Status, and intra-set
supersession references (0020→0002, 0030→0009, 0031→0010, etc.) are
updated. Cross-set references (ADR-0014) stay pointing at the root.

This makes the harness-internal scope of these decisions structurally
explicit: the root ADR index now reads as monorepo-wide conventions,
and a contributor opening the plugin directory sees its full design
history without cross-jumping to the root.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Each old root path now holds a one-line redirect-stub callout pointing
at the new harness-local home. Stubs honour the "Never delete an ADR"
rule from docs/adr/README.md and preserve external GitHub permalinks
shared in Slack, PR descriptions, and issue comments — links land on
a stub that tells the reader exactly where the live ADR lives now.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Update every live link in CONTRIBUTING.md, docs/agents/feature-runner.md,
docs/process/ai-development.md, and docs/process/development-workflow.md
to point at the new harness-local ADR paths and numbers (0028→0007,
0030→0009, 0031→0010, etc.). No live link inside these files survives
on an old root path; readers no longer pay an extra redirect hop.

The dogfood-banner PRD and the custom-spec-runner-grill-02 conversation
transcript carry name-only references (no link) and are left alone to
preserve historical wording.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…T-MAP

Refresh apps/claude-code/unic-archon-dlc/docs/adr/README.md so its
index table lists all ten ADRs in numeric order (0001 plus the nine
freshly reshelved entries with their renumbered titles and statuses).

Add a single Relationships line to CONTEXT-MAP.md noting that
architectural decisions are split by scope — monorepo-wide decisions
at root docs/adr/, per-context decisions in each context's own
docs/adr/. CONTEXT.md is intentionally not touched: the ADR location
is a structural fact, not domain vocabulary, and the glossary is
strict ubiquitous-language only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Captures the rationale, mapping, and acceptance criteria for relocating
the nine harness-internal ADRs into the unic-archon-dlc plugin.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Patch bump for the buildDomainDoc generator change: multi-context
domain.md now documents per-context docs/adr/. Behavioural change
to generated output in any multi-context Consumer; no API change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ew addition

The 0.1.2 entry is a wording refinement of an existing bullet in
buildDomainDoc, so lead with "Updated" to signal that to changelog
readers scanning the Added section.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reshelves unic-archon-dlc harness-internal ADRs out of the monorepo-root ADR set into the plugin’s own ADR directory (preserving external permalinks via redirect stubs), and updates agent-facing/generated docs to reflect the per-context ADR pattern.

Changes:

  • Moved/renumbered 9 harness-internal ADRs into apps/claude-code/unic-archon-dlc/docs/adr/ and replaced the old root ADR files with redirect stubs; swept inbound links to the new locations.
  • Generalized buildDomainDoc multi-context output to mention per-context docs/adr/, regenerated docs/agents/domain.md, and extended tests.
  • Bumped unic-archon-dlc to 0.1.2 and added a CHANGELOG entry for the generator wording change.

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/process/development-workflow.md Updates ADR links to new plugin-scoped ADR locations.
docs/process/ai-development.md Sweeps ADR references/links to new plugin-scoped ADR locations.
docs/issues/adr-reshelving-harness-internal/PRD.md Adds the PRD describing the ADR reshelving + generator/test changes.
docs/agents/feature-runner.md Updates Feature Runner doc links to renumbered plugin ADRs.
docs/agents/domain.md Regenerated domain doc reflecting per-context ADR pattern (multi-context).
docs/adr/0020-per-plugin-ralph-loops.md Replaced with redirect stub to plugin ADR 0002.
docs/adr/0023-spec-template-format.md Replaced with redirect stub to plugin ADR 0003.
docs/adr/0024-ralph-atomic-iteration.md Replaced with redirect stub to plugin ADR 0004.
docs/adr/0026-tdd-dispatch-by-version-impact.md Replaced with redirect stub to plugin ADR 0005.
docs/adr/0027-feature-runner-context-bundle.md Replaced with redirect stub to plugin ADR 0006.
docs/adr/0028-blocked-by-canonical-sequencing.md Replaced with redirect stub to plugin ADR 0007.
docs/adr/0029-feature-runner-afk-invocation.md Replaced with redirect stub to plugin ADR 0008.
docs/adr/0030-retire-ralph-adopt-archon-runner.md Replaced with redirect stub to plugin ADR 0009.
docs/adr/0031-retire-implement-feature-skill.md Replaced with redirect stub to plugin ADR 0010.
CONTRIBUTING.md Sweeps ADR links to new plugin-scoped ADR locations.
CONTEXT-MAP.md Documents the split between root ADRs and context-scoped ADRs.
apps/claude-code/unic-archon-dlc/test/install-agent-docs.test.mjs Adds assertions covering multi-context vs single-context domain.md wording.
apps/claude-code/unic-archon-dlc/package.json Bumps package version to 0.1.2.
apps/claude-code/unic-archon-dlc/lib/agent-docs-writer.mjs Updates multi-context buildDomainDoc ADR bullet wording.
apps/claude-code/unic-archon-dlc/docs/adr/README.md Updates plugin ADR index to list all ADRs after the move.
apps/claude-code/unic-archon-dlc/docs/adr/0002-per-plugin-ralph-loops.md Adds renumbered ADR content (moved from root ADR-0020).
apps/claude-code/unic-archon-dlc/docs/adr/0003-spec-template-format.md Adds renumbered ADR content (moved from root ADR-0023).
apps/claude-code/unic-archon-dlc/docs/adr/0004-ralph-atomic-iteration.md Adds renumbered ADR content (moved from root ADR-0024).
apps/claude-code/unic-archon-dlc/docs/adr/0005-tdd-dispatch-by-version-impact.md Adds renumbered ADR content (moved from root ADR-0026).
apps/claude-code/unic-archon-dlc/docs/adr/0006-feature-runner-context-bundle.md Adds renumbered ADR content (moved from root ADR-0027).
apps/claude-code/unic-archon-dlc/docs/adr/0007-blocked-by-canonical-sequencing.md Adds renumbered ADR content (moved from root ADR-0028).
apps/claude-code/unic-archon-dlc/docs/adr/0008-feature-runner-afk-invocation.md Adds renumbered ADR content (moved from root ADR-0029).
apps/claude-code/unic-archon-dlc/docs/adr/0009-retire-ralph-adopt-archon-runner.md Adds renumbered ADR content (moved from root ADR-0030).
apps/claude-code/unic-archon-dlc/docs/adr/0010-retire-implement-feature-skill.md Adds renumbered ADR content (moved from root ADR-0031).
apps/claude-code/unic-archon-dlc/CHANGELOG.md Adds 0.1.2 entry describing the generator wording change.
apps/claude-code/unic-archon-dlc/.claude-plugin/plugin.json Bumps plugin version to 0.1.2.
apps/claude-code/unic-archon-dlc/.claude-plugin/marketplace.json Bumps marketplace version to 0.1.2.
Comments suppressed due to low confidence (1)

docs/agents/domain.md:22

  • In this multi-context domain doc, the new ADR bullet explicitly allows per-context docs/adr/ directories, but the following guidance still tells agents to read “the ADRs in docs/adr/”, which reads as root-only and is inconsistent with the paragraph above. Consider updating the generated guidance to explicitly include both root ADRs and any context-scoped docs/adr/ (and ideally point to CONTEXT-MAP.md for locating the relevant context).
- **ADRs:** monorepo-wide decisions live in root `docs/adr/`; each context may also keep its own `docs/adr/` for decisions scoped to that context.

## How agents use this

Every agent working in this repo should read `CONTEXT.md` (and the ADRs in `docs/adr/`) before proposing terminology changes or architectural decisions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/claude-code/unic-archon-dlc/lib/agent-docs-writer.mjs
…layout

The trailing "How agents use this" paragraph in `buildDomainDoc` was
shared between single-context and multi-context branches and read as
root-only (`CONTEXT.md` + `docs/adr/`), contradicting the per-context-ADR
bullet shipped in 0.1.2.

Branches the paragraph by `isMulti` so the multi-context form points
readers via `CONTEXT-MAP.md` and acknowledges both root and
context-scoped `docs/adr/`. The single-context wording is unchanged.

- Test (TDD red→green): asserts the multi-context phrase
  `located via ` + "`CONTEXT-MAP.md`" + ` is present in multi-context
  output and absent in single-context output.
- Regenerated dogfooded `docs/agents/domain.md` via the writer against
  this repo's `.archon/unic-dlc.config.json` (not hand-edited).
- 0.1.2 CHANGELOG entry extended to mention the branching.

No version bump.
@orioltf
Copy link
Copy Markdown
Member Author

orioltf commented May 26, 2026

Addressed Copilot AI's flagged inconsistency in the "How agents use this" paragraph of the generated docs/agents/domain.md.

Finding (from Copilot's review body, suppressed/low-confidence comment): the trailing paragraph in buildDomainDoc was shared between single-context and multi-context branches and still read as root-only — read \CONTEXT.md` (and the ADRs in `docs/adr/`)` — directly contradicting the new per-context-ADR bullet shipped in 0.1.2 for multi-context layouts. This came in as PRD user stories 9 and 10.

Fix (commit ecf6a5c):

  • lib/agent-docs-writer.mjs: branched the paragraph by isMulti. The multi-context form now reads: "Every agent working in this repo should read the relevant `CONTEXT.md` (located via `CONTEXT-MAP.md`) and the ADRs in root `docs/adr/` plus any context-scoped `docs/adr/` before proposing terminology changes or architectural decisions." The single-context wording is unchanged.
  • test/install-agent-docs.test.mjs: extended the existing multi-context test to anchor on the unique located via \CONTEXT-MAP.md`phrase, and added a regression guard in the single-context test thatlocated via` is absent (TDD red→green).
  • docs/agents/domain.md: regenerated via writeAgentDocs(projectDir, config) against this repo's .archon/unic-dlc.config.json (not hand-edited).
  • CHANGELOG.md: folded the branching into the existing 0.1.2 entry. No version bump.

Gates green locally: pnpm format, pnpm --filter unic-archon-dlc test (138 pass), pnpm --filter unic-archon-dlc verify:changelog, pnpm typecheck.

The Copilot finding was a suppressed comment in the review body, not a separate thread, so nothing to resolve.

…ull multi-context phrase

The negative assertion at install-agent-docs.test.mjs:49 anchored on the
short generic phrase 'located via', which catches today's regression but
is not refactor-resilient. Tightens it to the full distinctive substring
'located via `CONTEXT-MAP.md`' so it mirrors the positive multi-context
assertion at :77 and only fires on the exact multi-context wording.

Surfaced by the comprehensive PR review.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@orioltf orioltf merged commit be1431b into develop May 26, 2026
15 checks passed
@orioltf orioltf deleted the feature/adr-reshelving-harness-internal branch May 26, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reshelve harness-internal ADRs into the unic-archon-dlc plugin

2 participants