docs: consolidate into a single docs/ tree
Fold the old docs/ into the VitePress site and rename docs-2 -> docs. The 12 architecture PRDs become first-class pages at docs/architecture/ with sidebar nav, rather than being buried under an archive path. Historical material stays at docs/archive/. Rewrites every docs-2 and docs/prds/architecture reference across the repo. Site builds clean.
This commit is contained in:
1 parent
2eae457e7b
commit
69640b5216
376 files changed
+2808
-2718
No files matched your search
@@ -26,7 +26,7 @@ Use these labels exactly:
|
||||
| --- | --- | --- |
|
||||
| **CURRENT** | Behavior present in live code and production composition as of 2026-07-28. | Code, tests, and `cmd/archied/main.go` wiring |
|
||||
| **APPROVED TARGET** | Direction an implementation must approach, but which may not exist on disk. | `docs/prds/01-project-management.md` and documents whose status says approved |
|
||||
| **OPEN** | A migration or API decision no implementer may invent locally. | `docs/prds/architecture/migration-decisions.md` and documents marked in progress or under design |
|
||||
| **OPEN** | A migration or API decision no implementer may invent locally. | `docs/architecture/migration-decisions.md` and documents marked in progress or under design |
|
||||
|
||||
> **Do not implement target prose as though it describes current code.**
|
||||
> Before treating a target package as available, prove that it exists and is
|
||||
@@ -39,7 +39,7 @@ Resolve apparent disagreement in this order:
|
||||
1. Read live code and production composition for CURRENT behavior.
|
||||
2. Read `docs/prds/01-project-management.md` for APPROVED TARGET ownership.
|
||||
3. Read the focused decision document for the selected behavior.
|
||||
4. Read `docs/prds/architecture/migration-decisions.md` for OPEN work.
|
||||
4. Read `docs/architecture/migration-decisions.md` for OPEN work.
|
||||
5. Stop and use `archie-architecture-planning-campaign` if a required semantic
|
||||
decision remains open.
|
||||
|
||||
@@ -118,7 +118,7 @@ not a small local patch.
|
||||
| Generic plugins stay metadata-only | Keep `plugin.Plugin` at `Name()` and `Version()`. Put behavior on a typed capability interface with an owning `Registry` or `Manager`. | CURRENT-enforced rule: `internal/plugin/architecture_test.go`; `ARCHITECTURE.md#plugin-engine-rule-strict` |
|
||||
| Capability engines own lifecycle | Give resource-owning engines explicit start/health/stop semantics and failure isolation. Supply narrow registrars/services, never `*daemon.Daemon` or a service locator. | APPROVED rule: `ARCHITECTURE.md#plugin-engine-rule-strict`; reviewers enforce non-mechanical parts |
|
||||
| Trust is explicit | Treat trusted operator-installed in-process code, repository code, out-of-process integrations, and container-isolated code as different trust classes. Never call Yaegi or subprocess execution a sandbox. | APPROVED rule: `ARCHITECTURE.md#plugin-engine-rule-strict` |
|
||||
| Infrastructure stays replaceable | Keep forge, persistence, workspace, transport, container, and model details behind behavior-owned contracts. Do not leak broker messages, DB rows, SDK types, or config DTOs into domain models. | APPROVED TARGET: `docs/prds/architecture/dependencies-and-contracts.md` |
|
||||
| Infrastructure stays replaceable | Keep forge, persistence, workspace, transport, container, and model details behind behavior-owned contracts. Do not leak broker messages, DB rows, SDK types, or config DTOs into domain models. | APPROVED TARGET: `docs/architecture/dependencies-and-contracts.md` |
|
||||
| Same-repository execution serializes by default | Preserve the default unless an explicit scheduling policy permits concurrency. | CURRENT: `internal/config/config.go`; `internal/daemon/daemon.go` |
|
||||
|
||||
Run the mechanical plugin guard after changing any plugin or `*Engine`
|
||||
@@ -160,8 +160,8 @@ Enforce:
|
||||
7. Reject generic `entities`, `services`, `repositories`, `messages`, or
|
||||
`utils` layers that merely group mechanisms.
|
||||
|
||||
Sources: `docs/prds/architecture/organisation.md` and
|
||||
`docs/prds/architecture/dependencies-and-contracts.md`.
|
||||
Sources: `docs/architecture/organisation.md` and
|
||||
`docs/architecture/dependencies-and-contracts.md`.
|
||||
|
||||
### Keep source ownership independent of deployment
|
||||
|
||||
@@ -177,7 +177,7 @@ Do not add a network protocol or duplicate service scaffolding for possible
|
||||
future extraction. A transport is an infrastructure implementation of a
|
||||
behavior-owned contract, not the owner of the behavior.
|
||||
|
||||
Source: `docs/prds/architecture/organisation.md`.
|
||||
Source: `docs/architecture/organisation.md`.
|
||||
|
||||
### Separate interaction, admission, assistance, and execution
|
||||
|
||||
@@ -207,9 +207,9 @@ Do not equate an external issue/message with a WorkflowExecution. Do not let
|
||||
Work Intake create one directly. Do not require ordinary conversation or direct
|
||||
tool use to become durable workflow-backed work.
|
||||
|
||||
Sources: `docs/prds/architecture/migration-decisions.md`,
|
||||
`docs/prds/architecture/agent-system.md`, and
|
||||
`docs/prds/architecture/messaging-and-work-intake.md`.
|
||||
Sources: `docs/architecture/migration-decisions.md`,
|
||||
`docs/architecture/agent-system.md`, and
|
||||
`docs/architecture/messaging-and-work-intake.md`.
|
||||
|
||||
### Separate identity, Agent, conversation, and memory
|
||||
|
||||
@@ -230,9 +230,9 @@ Preserve the four fixed target memory scopes:
|
||||
Resolve Agent and initiating user before loading memory. Do not use conversation
|
||||
branching as a fifth memory scope.
|
||||
|
||||
Sources: `docs/prds/architecture/identity.md`,
|
||||
`docs/prds/architecture/agent-system.md`, and
|
||||
`docs/prds/architecture/migration-decisions.md`.
|
||||
Sources: `docs/architecture/identity.md`,
|
||||
`docs/architecture/agent-system.md`, and
|
||||
`docs/architecture/migration-decisions.md`.
|
||||
|
||||
### Dissolve global runtime configuration
|
||||
|
||||
@@ -253,7 +253,7 @@ Do not add another unrelated concern to the global config model without an
|
||||
explicit compatibility plan and deletion criterion. Use
|
||||
`archie-config-and-flags` for the field ledger.
|
||||
|
||||
Source: `docs/prds/architecture/configuration.md`.
|
||||
Source: `docs/architecture/configuration.md`.
|
||||
|
||||
## Place new behavior deliberately
|
||||
|
||||
@@ -351,7 +351,7 @@ before architecture work:
|
||||
```bash
|
||||
test ! -d internal/domain && echo 'target domain tree is not current'
|
||||
sed -n '1,90p' docs/prds/01-project-management.md
|
||||
sed -n '1,260p' docs/prds/architecture/migration-decisions.md
|
||||
sed -n '1,260p' docs/architecture/migration-decisions.md
|
||||
sed -n '1,320p' internal/store/store.go
|
||||
sed -n '1,240p' internal/workflow/workflow.go
|
||||
sed -n '1,220p' internal/agentexec/protocol.go
|
||||
|
||||
@@ -1,526 +0,0 @@
|
||||
---
|
||||
name: archie-architecture-planning-campaign
|
||||
description: Run a decision-gated architecture campaign for archie-core before implementing a cross-package feature, migration, new domain, new process boundary, configuration redesign, duplicated-path cleanup, or other change whose ownership and change surface are unclear. Use when an engineer would otherwise need to trace much of the repository to discover what a feature touches, when TDD can prove behavior but not maintainability, or when planning must distinguish the live implementation from the approved target architecture.
|
||||
---
|
||||
|
||||
# Archie architecture planning campaign
|
||||
|
||||
Prevent another last-minute migration. Produce an implementation-ready
|
||||
architecture handoff in which every behavior, state transition, configuration
|
||||
value, boundary, compatibility path, and deletion has an explicit owner and
|
||||
testable disposition. Optimize for a cohesive change that a zero-context
|
||||
engineer can locate, explain, extend, and remove without tracing unrelated code,
|
||||
not the first green test.
|
||||
|
||||
## Load the required skill chain
|
||||
|
||||
Load these sibling skills before starting. For smaller-context sessions,
|
||||
load only the first two initially, then load the rest at their relevant
|
||||
phase:
|
||||
|
||||
1. `archie-codebase-discovery` — investigate the complete live change cone.
|
||||
2. `archie-architecture-contract` — apply Archie's load-bearing invariants.
|
||||
3. `archie-research-methodology` — state hypotheses and measurable predictions
|
||||
(needed by Phase 5).
|
||||
4. `archie-technical-accountability` — record evidence, decisions, debt, and
|
||||
ownership without hiding uncertainty (needed by Phase 6+).
|
||||
5. `archie-change-control` — classify and gate any resulting source or runtime
|
||||
change (needed by Phase 11).
|
||||
|
||||
Also load `archie-domain-reference` at Phase 3 (vocabulary and ownership) and
|
||||
`archie-docs-and-writing` plus its template at Phase 10 (ADR/PRD handoff).
|
||||
|
||||
If a sibling is unavailable, stop at the current read-only gate and report the
|
||||
missing control. Do not reconstruct its doctrine from memory.
|
||||
|
||||
## Know when not to use this campaign
|
||||
|
||||
- For a localized defect whose owner, state, consumers, and boundary are already proven, use `archie-change-control` and the repository TDD workflow.
|
||||
- To explore an unfamiliar package, use `archie-codebase-discovery`.
|
||||
- To review an already-written patch, use `archie-technical-accountability` plus the applicable review and validation skills.
|
||||
- To justify a preferred rewrite, use `archie-research-methodology`; this campaign may conclude that no architecture change is warranted.
|
||||
|
||||
## Use the ground-truth model
|
||||
|
||||
Keep two ledgers. Never blend them.
|
||||
|
||||
| Ledger | Authority | Meaning |
|
||||
|---|---|---|
|
||||
| Current implementation | Live production wiring, Go code, persistence, tests, deployment definitions, and observed behavior | What Archie does now, including duplication and defects |
|
||||
| Approved target | `docs/prds/01-project-management.md` and the status-qualified decisions in `docs/prds/architecture/*.md` | What Archie has approved or explicitly left open |
|
||||
|
||||
Treat `ARCHITECTURE.md` as a useful earlier architecture description, not proof
|
||||
that current wiring still matches it. Treat a decision marked “in progress,”
|
||||
“deferred,” or “under design” as a constraint plus open questions, not a
|
||||
finished design.
|
||||
|
||||
As of 2026-07-28, the approved target is domain-oriented, while much of the live
|
||||
tree remains in technical packages such as `internal/config`, `internal/daemon`,
|
||||
`internal/store`, and `internal/workflow`. Re-run the provenance commands before
|
||||
relying on that volatile fact.
|
||||
|
||||
## Define the terms once
|
||||
|
||||
- **Area under review**: one cohesive application responsibility, not an existing directory name.
|
||||
- **Owner**: the domain or capability with authority over behavior, vocabulary, state, settings, commands, events, and consequences.
|
||||
- **Change cone**: every entry point, caller, consumer, state record, adapter, test, configuration input, process boundary, and document affected by the decision.
|
||||
- **Domain contract**: the smallest behavior required by the owning domain; infrastructure implements it.
|
||||
- **Compatibility path**: a temporary adapter, dual read, dual write, or translation used only to preserve behavior during cutover.
|
||||
- **Authoritative path**: the sole path allowed to decide or mutate a behavior after cutover.
|
||||
- **Deletion criterion**: observable evidence that makes removal safe; “after migration” is not a criterion.
|
||||
- **Architecture packet**: the complete evidence and decision handoff produced by this campaign.
|
||||
|
||||
## Establish dynamic expected numbers
|
||||
|
||||
Do not invent repository counts. First verify the repository root, then
|
||||
capture baselines and use them as expected numbers:
|
||||
|
||||
```bash
|
||||
git rev-parse --show-toplevel >/dev/null || { echo 'run from repo root' >&2; exit 1; }
|
||||
test -f go.mod && test -f Taskfile.yml && test -f CLAUDE.md || {
|
||||
echo 'go.mod, Taskfile.yml, or CLAUDE.md missing — wrong directory?' >&2
|
||||
exit 1
|
||||
}
|
||||
git rev-parse HEAD
|
||||
git status --short
|
||||
go list -f '{{.ImportPath}}' ./internal/... | sort | tee /tmp/archie-architecture-packages.txt
|
||||
wc -l /tmp/archie-architecture-packages.txt
|
||||
find docs/prds/architecture -maxdepth 1 -type f -name '*.md' -print | sort | tee /tmp/archie-architecture-docs.txt
|
||||
wc -l /tmp/archie-architecture-docs.txt
|
||||
```
|
||||
|
||||
Name the resulting counts:
|
||||
|
||||
- `P` = current internal package rows in scope; for the whole migration, use every row in `/tmp/archie-architecture-packages.txt`.
|
||||
- `D` = architecture decision documents.
|
||||
- `F(area)` = production and test Go files in the declared change cone.
|
||||
- `R(symbol)` = typed references returned for a symbol by gopls.
|
||||
- `C` = decoded configuration fields and behavior-affecting literals in scope.
|
||||
- `L` = legacy or competing paths in scope.
|
||||
|
||||
Record the commit and dirty-file list beside every baseline. If concurrent work changes either, refresh the affected baseline; never mix measurements from two tree states.
|
||||
|
||||
## Phase 0 — Declare one decision scope
|
||||
|
||||
Write one sentence in this form:
|
||||
|
||||
> Decide who owns `<behavior>`, how `<input>` reaches `<outcome>`, and how the current paths migrate without changing `<preserved invariants>`.
|
||||
|
||||
List explicit non-goals and affected operators/users. Classify the work with `archie-change-control`, but authorize no implementation yet.
|
||||
|
||||
**Gate 0 — scope**
|
||||
|
||||
- Expected declared architecture questions: `1`.
|
||||
- Expected unexplained dirty files in the change cone: `0`.
|
||||
- Expected implementation edits during the campaign: `0`.
|
||||
- Expected non-goal list: at least `1` item.
|
||||
|
||||
If more than one independent architecture question remains, split campaigns. If a dirty file has unknown ownership, pause until its author or intent is known.
|
||||
|
||||
## Phase 1 — Build the decision corpus
|
||||
|
||||
Read the index and every focused architecture decision before designing:
|
||||
|
||||
```bash
|
||||
sed -n '1,240p' docs/prds/01-project-management.md
|
||||
while IFS= read -r ARCHIE_DOC; do sed -n '1,520p' "$ARCHIE_DOC"; done < /tmp/archie-architecture-docs.txt
|
||||
sed -n '1,360p' ARCHITECTURE.md
|
||||
sed -n '1,240p' CLAUDE.md
|
||||
```
|
||||
|
||||
Build a current-versus-target ledger with columns:
|
||||
|
||||
| Claim | Current evidence | Target decision | Status | Conflict or open decision |
|
||||
|---|---|---|---|---|
|
||||
|
||||
Give special attention to:
|
||||
|
||||
- `package-review.md` for the required investigation and decision set;
|
||||
- `migration-decisions.md` for unresolved destinations and cutover;
|
||||
- `organisation.md` and `dependencies-and-contracts.md` for ownership and dependency direction;
|
||||
- `configuration.md` for the required dissolution of `internal/config`;
|
||||
- `safe-change-and-recovery.md` for candidate promotion and rollback;
|
||||
- identity, agent, messaging, workflow, policy, plugin, and generated-doc documents whenever their vocabulary or contracts enter the change cone.
|
||||
|
||||
**Gate 1 — corpus**
|
||||
|
||||
- Expected decision-document review rows: `D`.
|
||||
- Expected documents with omitted status: `0`.
|
||||
- Expected target claims presented as current behavior: `0`.
|
||||
- Expected contradictions without an evidence link and disposition: `0`.
|
||||
|
||||
If live code contradicts an approved target, record migration work; do not silently redefine the target. If approved documents conflict, stop and request a decision instead of choosing the easier implementation.
|
||||
|
||||
## Phase 2 — Inventory the live change cone with syntax-aware tools
|
||||
|
||||
Do not start from package names. Start at production entry points and behavior.
|
||||
|
||||
```bash
|
||||
rg -n '^func main\\(' cmd
|
||||
rg -n 'flag\\.(String|Bool|Int|Int64|Duration|Var)' cmd --glob '*.go'
|
||||
rg --files cmd internal | sort
|
||||
env GOTMPDIR=/tmp GOCACHE=/tmp/archie-architecture-inventory-cache go run .claude/skills/archie-architecture-planning-campaign/scripts/go-inventory.go -root . -scope internal/<area> -include-tests=true
|
||||
```
|
||||
|
||||
Replace `<area>` with a real repository-relative directory. Run the inventory once per package in the change cone. It emits Go-parser-derived declarations as tab-separated columns:
|
||||
|
||||
| Column | Kind values | Meaning |
|
||||
|---|---|---|
|
||||
| `KIND` | `IMPORT`, `TYPE`, `FUNC`, `METHOD`, `VAR`, `CONST` | Go AST declaration kind |
|
||||
| `PACKAGE` | Directory path relative to `-root` | Package directory containing the declaration |
|
||||
| `FILE` | Filename within the package | Source file |
|
||||
| `LINE` | Positive integer | Declaration line number |
|
||||
| `NAME` | Identifier string | Exported or unexported name |
|
||||
| `DETAIL` | Short type/kind string | Receiver type for `METHOD`, underlying type for `TYPE`, signature summary for `FUNC` |
|
||||
|
||||
Empty output means no matching Go packages were found under `-scope`.
|
||||
Lines with empty `NAME` after the tab are parse-level artifacts; treat them
|
||||
as noise. The inventory does not infer runtime use, cross-package references,
|
||||
or dynamic registration.
|
||||
|
||||
Use gopls after the inventory:
|
||||
|
||||
- call `go_workspace` to confirm the module view;
|
||||
- call `go_package_api` for every package exposing a boundary;
|
||||
- call `go_search` for each domain term and competing synonym;
|
||||
- call `go_symbol_references` for every constructor, interface, state type, command, event, setting, and persistence method in scope.
|
||||
|
||||
If gopls is unavailable, use `go doc <package>`, `go list -json <package>`, and literal `rg` as a fallback. Label text-search counts approximate; do not claim typed coverage.
|
||||
|
||||
Count files before reading:
|
||||
|
||||
```bash
|
||||
rg --files internal/<area> -g '*.go' | sort | tee /tmp/archie-architecture-area-files.txt
|
||||
wc -l /tmp/archie-architecture-area-files.txt
|
||||
```
|
||||
|
||||
**Gate 2 — inventory**
|
||||
|
||||
- Expected files read: `F(area)`, the baseline line count.
|
||||
- Expected boundary packages with API summaries: all boundary packages; omitted count `0`.
|
||||
- Expected typed references traced for each selected symbol: `R(symbol)`; unexplained references `0`.
|
||||
- Expected discoverable facts deferred as user questions: `0`.
|
||||
|
||||
If gopls and text search disagree, inspect generated files, build tags, interfaces, reflection, Yaegi loading, and registration side effects. Do not infer “unused” from zero textual callers.
|
||||
|
||||
## Phase 3 — Establish vocabulary and ownership
|
||||
|
||||
Extract verbs, nouns, records, transitions, commands, events, settings, and failure outcomes from live behavior. Resolve overloaded terms rather than globally renaming `task`, `session`, `message`, `execution`, `identity`, or `plugin`.
|
||||
|
||||
Create this table:
|
||||
|
||||
| Term or behavior | Plain-language definition | Current locations | One owner | Competing meaning | Target contract |
|
||||
|---|---|---|---|---|---|
|
||||
|
||||
Use these ownership tests:
|
||||
|
||||
1. Name the cohesive job.
|
||||
2. Name the mutable records and transitions it governs.
|
||||
3. Name the policy consequences it decides.
|
||||
4. Name only the external services it requires.
|
||||
5. Explain why this code changes together.
|
||||
|
||||
Reject ceremonial `entities`, `services`, `helpers`, and `common` layers. A single-operation wrapper needs a boundary reason, a second genuine consumer, or removal/inlining.
|
||||
|
||||
For NellDB-related areas, inspect `internal/nell`, every consumer, persistence tests, and the pinned module before assigning semantics:
|
||||
|
||||
```bash
|
||||
go list -m -f '{{.Path}} {{.Version}}' github.com/samcharles93/NellDB
|
||||
rg -n 'nell\\.|NellDB|OpenStore|NewSessionStore' cmd internal --glob '*.go'
|
||||
```
|
||||
|
||||
Do not make NellDB records domain models merely because they persist current state.
|
||||
|
||||
**Gate 3 — vocabulary**
|
||||
|
||||
- Expected behaviors or records without one owner: `0`.
|
||||
- Expected unqualified terms with multiple meanings: `0`.
|
||||
- Expected domain owners chosen because of an existing directory name: `0`.
|
||||
- Expected boundaryless single-operation indirection: `0`, unless listed for deletion or justified by a tested contract.
|
||||
|
||||
If one candidate owner must know another domain's internal state, redesign the handoff as an owned command, event, or narrow shared contract.
|
||||
|
||||
## Phase 4 — Trace consumers, state, and failure semantics
|
||||
|
||||
Trace each behavior from input to observable outcome:
|
||||
|
||||
| Input/source | Entry point | Command/event | State mutation | Persistence | Side effect | Failure/retry | Output |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
|
||||
For every mutable record, produce a transition table:
|
||||
|
||||
| From | Command | Preconditions/version | To | Atomic event | Invalid result | Retry/idempotency |
|
||||
|---|---|---|---|---|---|---|
|
||||
|
||||
Inspect production construction in `cmd/archied/main.go` and `cmd/archie-agent/main.go`; constructors alone do not prove production use. Trace RPC, NATS, container, in-process, and subprocess paths separately. Trace tests after production; a mirrored fake can validate the same wrong assumption.
|
||||
|
||||
**Gate 4 — runtime trace**
|
||||
|
||||
- Expected production consumers reconciled per symbol: `R(symbol)`.
|
||||
- Expected mutable records without a complete transition table: `0`.
|
||||
- Expected state mutations without an identified transaction boundary: `0`.
|
||||
- Expected side effects without failure, timeout, retry, and idempotency evidence: `0`.
|
||||
- Expected competing authoritative write paths: `0`, or exactly `L` rows with cutover and deletion criteria.
|
||||
|
||||
If two paths create the same outcome, do not add a third abstraction over both. Decide authority and migration direction first.
|
||||
|
||||
## Phase 5 — Compare solutions and predict change locality
|
||||
|
||||
Use `archie-research-methodology`. Compare at least three explicit options:
|
||||
|
||||
| Rank | Approach | Normal use | Fence |
|
||||
|---|---|---|---|
|
||||
| 1 candidate default | Domain-first modular monolith with owner-defined contracts and composition in `internal/app` | Behavior and ownership are understood | Do not retain old technical ownership merely to reduce moves |
|
||||
| 2 migration tool | Strangler cutover through the narrowest compatibility adapter | Data or live callers require staged migration | Require owner, expiry trigger, metrics, rollback, and deletion test |
|
||||
| 3 conditional | Retain a process boundary or extract a service | Measured security isolation, failure containment, scaling, or independent-operation need exists | Future possibility is not evidence |
|
||||
| rejected | Rename a generic package, pass global config, add a service locator, or keep parallel implementations indefinitely | Never | Violates approved architecture |
|
||||
|
||||
Score each legitimate option on cohesion, dependency direction, state authority, contract size, configuration ownership, failure containment, migration risk, reversibility, deletion cost, and testability.
|
||||
|
||||
Before choosing, rehearse at least three representative future changes:
|
||||
|
||||
1. add a small behavior to the area;
|
||||
2. replace an infrastructure implementation;
|
||||
3. change one owned setting or policy.
|
||||
|
||||
Predict the packages, contracts, and tests each would touch. Prefer obvious ownership and exclusion of unrelated packages over the smallest immediate diff.
|
||||
|
||||
**Gate 5 — option decision**
|
||||
|
||||
- Expected compared options: at least `3`, including the current structure.
|
||||
- Expected selected option: `1`.
|
||||
- Expected approved-invariant violations in the winner: `0`.
|
||||
- Expected representative change rehearsals: at least `3`.
|
||||
- Expected unexplained unrelated packages per rehearsal: `0`.
|
||||
- Expected predictions without a measurement or later verification command: `0`.
|
||||
|
||||
If no option clears every invariant, leave the decision open. Do not downgrade a MUST to get a winner.
|
||||
|
||||
## Phase 6 — Complete the package destination matrix
|
||||
|
||||
For the architecture migration, create one row for every package in `P`. For a bounded change, cover the measured change cone and prove why other packages are outside it.
|
||||
|
||||
| Current package/behavior | Owner | Target path | Disposition | Dependencies to remove | State/contracts to preserve | Prerequisites | Deletion criterion | Decision status |
|
||||
|---|---|---|---|---|---|---|---|---|
|
||||
|
||||
Use only these dispositions: move, merge with named replacement, infrastructure adapter, application composition, approved shared contract, plugin/extra/deployment/example/generated artifact, or delete after proof.
|
||||
|
||||
**Gate 6 — destinations**
|
||||
|
||||
- Expected destination rows: `P` for the whole migration, otherwise every package in the recorded change cone.
|
||||
- Expected blank owner, disposition, or status cells: `0`.
|
||||
- Expected confirmed rows that still require an implementer to invent domain semantics: `0`.
|
||||
- Expected compatibility rows without deletion criteria: `0`.
|
||||
|
||||
An open row blocks that row, not an independent confirmed slice.
|
||||
|
||||
## Phase 7 — Dissolve configuration by ownership
|
||||
|
||||
Inventory both decoded fields and behavior-affecting literals:
|
||||
|
||||
```bash
|
||||
env GOTMPDIR=/tmp GOCACHE=/tmp/archie-architecture-inventory-cache go run .claude/skills/archie-architecture-planning-campaign/scripts/go-inventory.go -root . -scope internal/config -include-tests=false
|
||||
rg -n '\\bconfig\\.' cmd internal --glob '*.go'
|
||||
rg -n 'time\\.(Second|Minute|Hour)|time\\.Duration|http\\.DefaultClient|0\\.0\\.0\\.0|localhost|/usr/share|/data/' cmd internal --glob '*.go'
|
||||
```
|
||||
|
||||
For each value, record external input, default/provenance, typed owner, validation, mutability, consumers, secrets, and migration. Keep the decoded document private to configuration infrastructure; never pass complete app configuration into a domain.
|
||||
|
||||
Classify every literal as invariant, owned setting/default, policy value, external constraint, or defect. One current value does not make an invariant.
|
||||
|
||||
**Gate 7 — configuration**
|
||||
|
||||
- Expected inventoried configuration items: `C`.
|
||||
- Expected items without exactly one runtime owner and classification: `0`.
|
||||
- Expected domains importing configuration infrastructure or full app config:
|
||||
`0` in the target.
|
||||
- Expected live-setting mutation paths omitted from the migration ledger: `0`.
|
||||
- Expected plugin settings added to an unrelated global model: `0`.
|
||||
|
||||
If an item cannot reload safely, mark it restart-required and design candidate
|
||||
validation, health observation, last-known-good preservation, and rollback.
|
||||
|
||||
## Phase 8 — Justify process and trust boundaries
|
||||
|
||||
Inventory current boundaries:
|
||||
|
||||
```bash
|
||||
rg -n 'Subprocess|NATS|nats\\.|RPC|rpc|container|Docker|Yaegi|plugin' cmd/archied cmd/archie-agent internal/{agentexec,container,nats,natsrpc,taskrun,forgerpc,storerpc,worktreerpc,plugin,yaegiutil} --glob '*.go'
|
||||
```
|
||||
|
||||
For each retained boundary, record purpose, trusted principal, secrets and
|
||||
resources exposed, protocol owner/version, failure containment, health,
|
||||
startup/shutdown order, retries, and operator burden.
|
||||
|
||||
Keep source ownership independent of deployment. Treat a subprocess as
|
||||
transport, not a security sandbox. Keep model-owned work away from git
|
||||
credentials and daemon authority. Give plugins narrow typed registrars, never
|
||||
daemon access or generic hooks.
|
||||
|
||||
**Gate 8 — boundaries**
|
||||
|
||||
- Expected retained boundaries with one concrete justification: all retained
|
||||
boundaries; unjustified count `0`.
|
||||
- Expected external or cross-process contracts without owner/version: `0`.
|
||||
- Expected boundaries described as isolation without an enforced isolation
|
||||
mechanism: `0`.
|
||||
- Expected domains split only for possible future deployment: `0`.
|
||||
|
||||
If removal of a boundary changes confidentiality, integrity, availability, or
|
||||
operations, return to Phase 5 with those constraints.
|
||||
|
||||
## Phase 9 — Plan deprecation, cutover, rollback, and deletion
|
||||
|
||||
Mine compatibility and prior replacement attempts:
|
||||
|
||||
```bash
|
||||
rg -n 'legacy|compat|deprecated|deprecat|TODO|FIXME|HACK|remove|delete' cmd internal docs --glob '*.go' --glob '*.md'
|
||||
git log --oneline --decorate --all -- cmd internal docs/prds/architecture
|
||||
git log -S'internal/config' --oneline --all
|
||||
```
|
||||
|
||||
For each legacy path, record predecessor, successor, parity evidence, data
|
||||
backfill, dual-read/write need, production switch, rollback trigger, observation
|
||||
window, deletion criterion, and regression test.
|
||||
|
||||
Require the production composition test to prove the successor is selected.
|
||||
Require a negative test or architecture check to prevent reintroduction after
|
||||
deletion. Time-box transitional duplication by an observable trigger, not a
|
||||
calendar promise alone.
|
||||
|
||||
**Gate 9 — cutover**
|
||||
|
||||
- Expected legacy paths inventoried: `L`.
|
||||
- Expected successor authorities per legacy behavior: exactly `1`.
|
||||
- Expected compatibility paths without owner, rollback, and deletion proof:
|
||||
`0`.
|
||||
- Expected permanent duplicate authoritative paths after cutover: `0`.
|
||||
- Expected old states/records without migration or explicit safe abandonment:
|
||||
`0`.
|
||||
|
||||
If parity cannot be measured, do not switch production wiring. Design the
|
||||
observable first.
|
||||
|
||||
## Phase 10 — Produce the ADR/PRD handoff
|
||||
|
||||
Write or propose the focused architecture document only where change control
|
||||
authorizes it. Include:
|
||||
|
||||
1. scope and non-goals;
|
||||
2. current-state trace with commit and dynamic baselines;
|
||||
3. vocabulary and ownership;
|
||||
4. current-versus-target ledger;
|
||||
5. considered options, predicted numbers, and rejection reasons;
|
||||
6. chosen owner, contracts, state machine, settings, policy, and boundaries;
|
||||
7. destination matrix;
|
||||
8. migration, compatibility, cutover, rollback, and deletion;
|
||||
9. implementation slices and dependencies;
|
||||
10. verification commands, expected evidence, unknowns, and named decisions
|
||||
still requiring the user.
|
||||
|
||||
Ask the user only questions whose answers materially change behavior or
|
||||
structure and cannot be discovered in the repository.
|
||||
|
||||
**Gate 10 — handoff**
|
||||
|
||||
- Expected discoverable facts presented as questions: `0`.
|
||||
- Expected undecided semantics delegated to implementers in a confirmed slice:
|
||||
`0`.
|
||||
- Expected claims without source evidence or explicit “candidate/open” status:
|
||||
`0`.
|
||||
- Expected unresolved normative contradictions: `0`.
|
||||
|
||||
If a decision remains open, isolate it from executable slices and name its
|
||||
owner. Never disguise it as an implementation detail.
|
||||
|
||||
## Phase 11 — Slice for short, artful successes
|
||||
|
||||
Route every slice through `archie-change-control`. Keep TDD and fresh
|
||||
adversarial review, but add architecture acceptance before code acceptance.
|
||||
|
||||
Each slice must:
|
||||
|
||||
- deliver one observable behavior or migration proof;
|
||||
- have one domain owner and a bounded change cone;
|
||||
- establish or consume the final contract rather than create another temporary
|
||||
model;
|
||||
- preserve a working application at its boundary;
|
||||
- remove a predecessor, or advance its recorded deletion criterion;
|
||||
- add deterministic conformance protection where mechanically possible;
|
||||
- state what becomes easier to change after the slice.
|
||||
|
||||
Order slices as: characterization and observability, final contract, adapter or
|
||||
data migration, production cutover, legacy deletion, architecture regression
|
||||
guard. Do not create all target folders as empty scaffolding.
|
||||
|
||||
**Gate 11 — executable plan**
|
||||
|
||||
- Expected observable outcome per slice: `1`.
|
||||
- Expected owner per slice: `1`.
|
||||
- Expected unrelated domains modified per slice: `0`.
|
||||
- Expected predecessors neither removed nor advanced toward deletion: `0`.
|
||||
- Expected implementation slices bypassing change control: `0`.
|
||||
|
||||
If a slice requires broad service-locator access or the full configuration
|
||||
document, return to ownership and contract design.
|
||||
|
||||
## Phase 12 — Re-measure after every slice
|
||||
|
||||
Run the repository gate selected by `archie-change-control`, then compare the
|
||||
slice against this packet. At minimum, re-run package inventory, typed
|
||||
references, production construction tracing, configuration inventory, and
|
||||
legacy-path search.
|
||||
|
||||
Use a fresh adversarial reviewer to inspect every changed non-test file for
|
||||
cohesion, hidden dead paths, duplicated authority, unchecked errors,
|
||||
hard-coded behavior, interface leakage, nil/race/goroutine risk, and production
|
||||
wiring. A green TDD suite proves required behavior; it does not prove the code
|
||||
is maintainable.
|
||||
|
||||
**Gate 12 — conformance**
|
||||
|
||||
- Expected unexplained package/reference/configuration deltas from baseline:
|
||||
`0`.
|
||||
- Expected new authoritative paths beyond the selected design: `0`.
|
||||
- Expected surviving reviewer findings: `0`.
|
||||
- Expected destination/cutover rows left stale by the slice: `0`.
|
||||
- Expected representative change rehearsals made harder without an accepted
|
||||
rationale: `0`.
|
||||
|
||||
If the slice passes tests but fails conformance, reject or redesign it. “Make it
|
||||
work and move on” is not completion.
|
||||
|
||||
## Fence off settled wrong paths
|
||||
|
||||
- Do not code before mapping ownership, consumers, state, and cutover.
|
||||
- Do not equate moving or renaming packages with architecture.
|
||||
- Do not centralize unrelated runtime settings in a renamed global config.
|
||||
- Do not add abstractions solely to wrap one operation or hide duplication.
|
||||
- Do not preserve old and new models indefinitely “for compatibility.”
|
||||
- Do not expose domain meaning through broker, database, SDK, or DTO types.
|
||||
- Do not use process splits as source boundaries or subprocesses as sandboxes.
|
||||
- Do not add capability methods to the generic plugin contract.
|
||||
- Do not ask the user to rediscover code facts the tools can establish.
|
||||
- Do not accept linter silence as dead-code evidence; inspect registration,
|
||||
reflection, build tags, generated code, and production composition.
|
||||
- Do not let a mirrored test fake become the sole proof of an external or
|
||||
cross-process contract.
|
||||
- Do not permit implementation difficulty to waive an approved invariant.
|
||||
|
||||
## Provenance and maintenance
|
||||
|
||||
Grounded on 2026-07-28 in the approved architecture index and every file under
|
||||
`docs/prds/architecture/`, plus live `cmd`, `internal`, tests, `Taskfile.yml`,
|
||||
and the user's quality requirements. Re-verify volatile facts before each use.
|
||||
|
||||
```bash
|
||||
sed -n '1,240p' docs/prds/01-project-management.md
|
||||
for ARCHIE_DOC in docs/prds/architecture/*.md; do sed -n '1,8p' "$ARCHIE_DOC"; done
|
||||
go list -f '{{.ImportPath}}' ./internal/... | sort
|
||||
rg -n '^func main\\(' cmd
|
||||
rg -n '\\bconfig\\.' cmd internal --glob '*.go'
|
||||
rg -n 'legacy|compat|deprecated|TODO|FIXME|HACK' cmd internal docs --glob '*.go' --glob '*.md'
|
||||
git log --oneline --decorate --all -- cmd internal docs/prds/architecture
|
||||
env GOTMPDIR=/tmp GOCACHE=/tmp/archie-architecture-inventory-cache go run .claude/skills/archie-architecture-planning-campaign/scripts/go-inventory.go -root . -scope internal/config -include-tests=false
|
||||
task --list
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
interface:
|
||||
display_name: "Archie Architecture Planning Campaign"
|
||||
short_description: "Plan maintainable Archie architecture before coding"
|
||||
default_prompt: "Use $archie-architecture-planning-campaign to design and gate an Archie architectural change before implementation."
|
||||
@@ -1,231 +0,0 @@
|
||||
// Command go-inventory emits a stable TSV inventory of Go declarations.
|
||||
//
|
||||
// It uses the Go parser instead of text matching, so architecture research can
|
||||
// enumerate imports, types, struct fields, functions, methods, variables, and
|
||||
// constants before tracing their references with gopls.
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/format"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type record struct {
|
||||
kind string
|
||||
pkg string
|
||||
file string
|
||||
line int
|
||||
name string
|
||||
detail string
|
||||
sortKey string
|
||||
}
|
||||
|
||||
func main() {
|
||||
rootFlag := flag.String("root", ".", "repository root")
|
||||
scopeFlag := flag.String("scope", "internal", "repository-relative directory to inspect")
|
||||
includeTests := flag.Bool("include-tests", true, "include _test.go files")
|
||||
flag.Parse()
|
||||
|
||||
root, err := filepath.Abs(*rootFlag)
|
||||
if err != nil {
|
||||
fatalf("resolve root: %v", err)
|
||||
}
|
||||
scope, err := confinedPath(root, *scopeFlag)
|
||||
if err != nil {
|
||||
fatalf("resolve scope: %v", err)
|
||||
}
|
||||
|
||||
fset := token.NewFileSet()
|
||||
var records []record
|
||||
err = filepath.WalkDir(scope, func(path string, entry fs.DirEntry, walkErr error) error {
|
||||
if walkErr != nil {
|
||||
return walkErr
|
||||
}
|
||||
if entry.IsDir() {
|
||||
switch entry.Name() {
|
||||
case ".git", "node_modules", "testdata", "vendor":
|
||||
if path != scope {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if filepath.Ext(path) != ".go" || (!*includeTests && strings.HasSuffix(path, "_test.go")) {
|
||||
return nil
|
||||
}
|
||||
|
||||
parsed, parseErr := parser.ParseFile(fset, path, nil, 0)
|
||||
if parseErr != nil {
|
||||
return fmt.Errorf("parse %s: %w", path, parseErr)
|
||||
}
|
||||
relative, relErr := filepath.Rel(root, path)
|
||||
if relErr != nil {
|
||||
return relErr
|
||||
}
|
||||
relative = filepath.ToSlash(relative)
|
||||
pkg := filepath.ToSlash(filepath.Dir(relative))
|
||||
records = append(records, fileRecords(fset, parsed, pkg, relative)...)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
fatalf("inventory: %v", err)
|
||||
}
|
||||
|
||||
sort.Slice(records, func(i, j int) bool {
|
||||
return records[i].sortKey < records[j].sortKey
|
||||
})
|
||||
fmt.Println("KIND\tPACKAGE\tFILE\tLINE\tNAME\tDETAIL")
|
||||
for _, item := range records {
|
||||
fmt.Printf("%s\t%s\t%s\t%d\t%s\t%s\n",
|
||||
item.kind,
|
||||
item.pkg,
|
||||
item.file,
|
||||
item.line,
|
||||
sanitize(item.name),
|
||||
sanitize(item.detail),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
func confinedPath(root, scope string) (string, error) {
|
||||
if filepath.IsAbs(scope) {
|
||||
return "", fmt.Errorf("scope must be repository-relative")
|
||||
}
|
||||
clean := filepath.Clean(scope)
|
||||
if clean == ".." || strings.HasPrefix(clean, ".."+string(filepath.Separator)) {
|
||||
return "", fmt.Errorf("scope escapes repository root")
|
||||
}
|
||||
path := filepath.Join(root, clean)
|
||||
info, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if !info.IsDir() {
|
||||
return "", fmt.Errorf("%s is not a directory", clean)
|
||||
}
|
||||
return path, nil
|
||||
}
|
||||
|
||||
func fileRecords(fset *token.FileSet, file *ast.File, pkg, relative string) []record {
|
||||
var records []record
|
||||
add := func(kind string, pos token.Pos, name, detail string) {
|
||||
line := fset.Position(pos).Line
|
||||
records = append(records, record{
|
||||
kind: kind,
|
||||
pkg: pkg,
|
||||
file: relative,
|
||||
line: line,
|
||||
name: name,
|
||||
detail: detail,
|
||||
sortKey: strings.Join([]string{pkg, relative, fmt.Sprintf("%09d", line), kind, name}, "\x00"),
|
||||
})
|
||||
}
|
||||
|
||||
for _, imported := range file.Imports {
|
||||
path, err := strconv.Unquote(imported.Path.Value)
|
||||
if err != nil {
|
||||
path = imported.Path.Value
|
||||
}
|
||||
name := ""
|
||||
if imported.Name != nil {
|
||||
name = imported.Name.Name
|
||||
}
|
||||
add("IMPORT", imported.Pos(), name, path)
|
||||
}
|
||||
|
||||
for _, declaration := range file.Decls {
|
||||
switch node := declaration.(type) {
|
||||
case *ast.FuncDecl:
|
||||
kind := "FUNC"
|
||||
name := node.Name.Name
|
||||
if node.Recv != nil && len(node.Recv.List) > 0 {
|
||||
kind = "METHOD"
|
||||
name = expression(node.Recv.List[0].Type) + "." + name
|
||||
}
|
||||
add(kind, node.Pos(), name, expression(node.Type))
|
||||
case *ast.GenDecl:
|
||||
for _, spec := range node.Specs {
|
||||
switch item := spec.(type) {
|
||||
case *ast.TypeSpec:
|
||||
detail := typeKind(item.Type)
|
||||
add("TYPE", item.Pos(), item.Name.Name, detail)
|
||||
structType, ok := item.Type.(*ast.StructType)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
for _, field := range structType.Fields.List {
|
||||
fieldNames := make([]string, 0, len(field.Names))
|
||||
for _, name := range field.Names {
|
||||
fieldNames = append(fieldNames, name.Name)
|
||||
}
|
||||
if len(fieldNames) == 0 {
|
||||
fieldNames = append(fieldNames, expression(field.Type))
|
||||
}
|
||||
for _, fieldName := range fieldNames {
|
||||
add("FIELD", field.Pos(), item.Name.Name+"."+fieldName, expression(field.Type))
|
||||
}
|
||||
}
|
||||
case *ast.ValueSpec:
|
||||
kind := "VAR"
|
||||
if node.Tok == token.CONST {
|
||||
kind = "CONST"
|
||||
}
|
||||
for _, name := range item.Names {
|
||||
add(kind, item.Pos(), name.Name, expression(item.Type))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return records
|
||||
}
|
||||
|
||||
func expression(node ast.Node) string {
|
||||
if node == nil {
|
||||
return ""
|
||||
}
|
||||
var buffer bytes.Buffer
|
||||
if err := format.Node(&buffer, token.NewFileSet(), node); err != nil {
|
||||
return fmt.Sprintf("%T", node)
|
||||
}
|
||||
return buffer.String()
|
||||
}
|
||||
|
||||
func typeKind(node ast.Expr) string {
|
||||
switch node.(type) {
|
||||
case *ast.StructType:
|
||||
return "struct"
|
||||
case *ast.InterfaceType:
|
||||
return "interface"
|
||||
case *ast.FuncType:
|
||||
return "func"
|
||||
case *ast.ArrayType:
|
||||
return "array-or-slice"
|
||||
case *ast.MapType:
|
||||
return "map"
|
||||
case *ast.ChanType:
|
||||
return "chan"
|
||||
default:
|
||||
return expression(node)
|
||||
}
|
||||
}
|
||||
|
||||
func sanitize(value string) string {
|
||||
return strings.Join(strings.Fields(value), " ")
|
||||
}
|
||||
|
||||
func fatalf(format string, args ...any) {
|
||||
fmt.Fprintf(os.Stderr, format+"\n", args...)
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -25,9 +25,9 @@ installed version.
|
||||
`archie-config-and-flags`.
|
||||
- Do not use it to approve generated changes, dependency updates, cleanup, or
|
||||
gate changes. Load `archie-change-control`.
|
||||
- Do not use `docs-2/README.md` as onboarding documentation. It describes Tau,
|
||||
- Do not use `docs/README.md` as onboarding documentation. It describes Tau,
|
||||
and VitePress excludes it through `srcExclude` in
|
||||
`docs-2/.vitepress/config.mts`.
|
||||
`docs/.vitepress/config.mts`.
|
||||
|
||||
## Name the surfaces
|
||||
|
||||
@@ -38,7 +38,7 @@ Use these terms consistently:
|
||||
| Repository root | The directory containing `go.mod`, `Taskfile.yml`, and `CLAUDE.md`. |
|
||||
| Runtime module | The root Go module, `github.com/samcharles93/archie-core`. It owns `cmd/`, `domain/`, and `internal/`. |
|
||||
| Tools module | The independent nested Go module under `tools/`. It currently owns `tools/docsgen`. |
|
||||
| Docs site | The pnpm/VitePress project under `docs-2/`. |
|
||||
| Docs site | The pnpm/VitePress project under `docs/`. |
|
||||
| Cold cache | A dependency cache that does not yet contain the required modules or packages; filling it requires network access. |
|
||||
| Restricted sandbox | An environment that may allow file reads but deny loopback listeners, the container engine, or writes to default caches and temporary directories. |
|
||||
| Host run | A run on an environment that permits the listeners and process features used by the tests. |
|
||||
@@ -255,15 +255,15 @@ go -C tools run ./docsgen \
|
||||
-repo-root .. \
|
||||
-out /tmp/archie-core-contracts.json
|
||||
cmp --silent \
|
||||
docs-2/data/generated/contracts.json \
|
||||
docs/data/generated/contracts.json \
|
||||
/tmp/archie-core-contracts.json
|
||||
```
|
||||
|
||||
The 2026-07-28 run wrote 10 schemas, the comparison passed, and
|
||||
`go -C tools test ./... -count=1` passed. The planned `docsgen all` and
|
||||
`docsgen check` commands described in
|
||||
`docs/prds/architecture/generated-documentation.md` do **not** exist yet.
|
||||
The checkout's `docs-2/data/generated/contracts.json` exists but is untracked
|
||||
`docs/architecture/generated-documentation.md` do **not** exist yet.
|
||||
The checkout's `docs/data/generated/contracts.json` exists but is untracked
|
||||
as of this snapshot. The comparison proves local generator parity, not
|
||||
version-controlled drift protection.
|
||||
|
||||
@@ -272,12 +272,12 @@ version-controlled drift protection.
|
||||
Treat dependency installation and site compilation as two separate gates:
|
||||
|
||||
```bash
|
||||
pnpm --dir docs-2 install --frozen-lockfile
|
||||
pnpm --dir docs-2 build
|
||||
pnpm --dir docs install --frozen-lockfile
|
||||
pnpm --dir docs build
|
||||
```
|
||||
|
||||
The install needs registry access on a cold pnpm store. The build writes
|
||||
`docs-2/.vitepress/dist`. GitHub Pages CI uses pnpm major 10, Node `latest`,
|
||||
`docs/.vitepress/dist`. GitHub Pages CI uses pnpm major 10, Node `latest`,
|
||||
the frozen lockfile, then `pnpm build`; it does not run Go tests or docsgen.
|
||||
|
||||
The docs build could not be completed in the restricted 2026-07-28 session
|
||||
@@ -285,14 +285,14 @@ because missing packages required npm registry access and DNS returned
|
||||
`EAI_AGAIN`. Record that as an environment result, not a passing or failing
|
||||
site build.
|
||||
|
||||
Do not trust the checked-in `docs-2/node_modules` shape. It contains 237
|
||||
Do not trust the checked-in `docs/node_modules` shape. It contains 237
|
||||
tracked symlink entries as of the snapshot, introduced by commit `308c199`.
|
||||
Detect the condition:
|
||||
|
||||
```bash
|
||||
git ls-files -s 'docs-2/node_modules/**' \
|
||||
git ls-files -s 'docs/node_modules/**' \
|
||||
| awk '$1 == "120000" {count++} END {print count+0}'
|
||||
git status --short -- docs-2
|
||||
git status --short -- docs
|
||||
```
|
||||
|
||||
Do not stage, normalize, or mass-delete that tree as incidental setup. Route
|
||||
@@ -374,7 +374,7 @@ required acceptance set.
|
||||
| Build | `go build -o /tmp/archie-core-archied ./cmd/archied` and the analogous `archie-agent` command | Both passed on 2026-07-28. |
|
||||
| Tools tests | `go -C tools test ./... -count=1` | Passed on 2026-07-28. |
|
||||
| Local generated contract parity | Temporary docsgen output plus `cmp --silent` | Passed for 10 schemas on 2026-07-28; the checkout output is untracked. |
|
||||
| Docs install/build | `pnpm --dir docs-2 install --frozen-lockfile` then `pnpm --dir docs-2 build` | Blocked by restricted network; unknown, not failed. |
|
||||
| Docs install/build | `pnpm --dir docs install --frozen-lockfile` then `pnpm --dir docs build` | Blocked by restricted network; unknown, not failed. |
|
||||
| Container build | `task docker-build` | Not verified in the restricted container environment. |
|
||||
| Repository gate | `task check` | Currently non-green because the root suite reaches the genuine skillscript failure; it may also rewrite files first. |
|
||||
|
||||
@@ -400,8 +400,8 @@ failure.
|
||||
## Provenance and maintenance
|
||||
|
||||
Ground this skill in `CLAUDE.md`, `Taskfile.yml`, `.golangci.yml`, `go.mod`,
|
||||
`tools/go.mod`, `tools/docsgen/`, `docs-2/package.json`,
|
||||
`docs-2/pnpm-lock.yaml`, `.github/workflows/docs.yml`, both Dockerfiles,
|
||||
`tools/go.mod`, `tools/docsgen/`, `docs/package.json`,
|
||||
`docs/pnpm-lock.yaml`, `.github/workflows/docs.yml`, both Dockerfiles,
|
||||
`docker-compose.yml`, `.gitea/workflows/deploy.yml`, `.gitignore`,
|
||||
`internal/worktree/`, and the tests named above.
|
||||
|
||||
@@ -412,13 +412,13 @@ Re-verify Task coverage:
|
||||
`sed -n '1,180p' Taskfile.yml; rg -n 'task: lint|go test.*race|go -C tools|docsgen|pnpm' Taskfile.yml`
|
||||
|
||||
Re-verify docs and CI:
|
||||
`sed -n '1,120p' docs-2/package.json; sed -n '1,120p' .github/workflows/docs.yml; go -C tools test ./... -count=1`
|
||||
`sed -n '1,120p' docs/package.json; sed -n '1,120p' .github/workflows/docs.yml; go -C tools test ./... -count=1`
|
||||
|
||||
Re-verify container inputs:
|
||||
`test -e .dockerignore || echo ABSENT; rg -n '^(FROM|[[:space:]]*image:)|@latest|:latest' Dockerfile Dockerfile.archied docker-compose.yml .gitea/workflows/deploy.yml`
|
||||
|
||||
Re-verify artifact counts:
|
||||
`git ls-files 'docs-2/node_modules/**' | wc -l; git ls-files '.gotmp/**' | wc -l`
|
||||
`git ls-files 'docs/node_modules/**' | wc -l; git ls-files '.gotmp/**' | wc -l`
|
||||
|
||||
Re-verify current failures:
|
||||
`go test ./internal/skillscript -run '^TestRunWrapsExternalCommand$' -count=1 -v; golangci-lint run ./...`
|
||||
@@ -1,411 +0,0 @@
|
||||
---
|
||||
name: archie-change-control
|
||||
description: "Classify, investigate, plan, gate, review, and accept archie-core changes without trading maintainability for a passing test. Use before changing or approving architecture, Go source, configuration, runtime lifecycle, dependencies, protocols, persistence, security boundaries, deployments, generated documentation, or read-only designs; also use when deciding whether scoped evidence is sufficient, whether an old path must be deprecated or deleted, or whether a change is ready to close."
|
||||
---
|
||||
|
||||
# Archie change control
|
||||
|
||||
Protect Archie's quality, not merely its test result. Treat a passing test as
|
||||
necessary evidence for code changes, never as proof that the design is coherent,
|
||||
the old path is gone, or production selects the new path.
|
||||
|
||||
## Route to the right sibling
|
||||
|
||||
Use this skill to control a change from classification through acceptance.
|
||||
Load these siblings for the specialized work:
|
||||
|
||||
| Need | Load |
|
||||
|---|---|
|
||||
| Design or revise boundaries, ownership, package structure, or a migration | `archie-architecture-planning-campaign` |
|
||||
| Find duplication, hidden dead paths, poor names, misplaced responsibilities, or maintainability debt | `archie-technical-accountability` |
|
||||
| Design tests, reproduce a defect, select QA evidence, or run complete gates | `archie-validation-and-qa` |
|
||||
| Run, deploy, observe, recover, or roll back a live assembly | `archie-run-and-operate` |
|
||||
|
||||
Do **not** use this skill alone to:
|
||||
|
||||
- conduct an architecture campaign;
|
||||
- perform a deep code-quality or AST investigation;
|
||||
- invent a test strategy for a complex behaviour;
|
||||
- operate production;
|
||||
- replace the governing decision document for a domain.
|
||||
|
||||
## Use these terms consistently
|
||||
|
||||
| Term | Meaning here |
|
||||
|---|---|
|
||||
| Baseline | Recorded behaviour and gate output before the proposed change. |
|
||||
| Current state | Behaviour selected by the checked-out live code, not a PRD target or branch-only fix. |
|
||||
| Production wiring | The complete path by which a supported assembly selects, configures, runs, and observes an implementation. |
|
||||
| Authoritative contract | The source whose semantics the producer and consumer are required to obey; a projection or shared test fake is not authoritative. |
|
||||
| Compatibility adapter | Temporary code that preserves an older input or caller while migration proceeds, with explicit deletion criteria. |
|
||||
| Last-known-good | The previously active version proved healthy and retained for restoration. |
|
||||
| Evidence packet | Commands, outputs, traces, diffs, decisions, and reviews supporting acceptance. |
|
||||
| Acceptance | Permission to close the controlled work; it is not permission to push, deploy, migrate, or delete. |
|
||||
|
||||
## Apply the non-negotiables
|
||||
|
||||
| Rule | Why it is mandatory | Repository evidence or incident |
|
||||
|---|---|---|
|
||||
| Investigate the live call path before planning. | A constructor, registry entry, config field, or test can exist without production ever selecting it. | Missing Compose passthroughs in `22fc0ef` and `d0624b7` left configured secrets absent at runtime. |
|
||||
| Test the authoritative contract, not a convenient projection. | A best-effort or mirrored interface can pass while the real producer blocks or the peer rejects the exchange. | `6a0bd27`: consuming `TextStream` instead of draining authoritative `FullStream` deadlocked every streamed reply. `3ad57c9`: recreating a buffered reader dropped MCP messages; the harness also masked process-exit behaviour. |
|
||||
| Preserve compatibility deliberately. Never rely on a decoder ignoring old input. | Silent omission turns a schema edit into an outage. | `1f8588d`: removing `[forge].token_env` compatibility caused both production containers to crash-loop because TOML ignored the old key. |
|
||||
| Make deployment dependencies explicit and observable. | Hostname, network, secret, mount, and environment assumptions differ between tests and the running Compose assembly. | `37cf089` and `2ac306b`: failed Docker-network auto-detection put workers on the default bridge, so NATS returned “no responders.” |
|
||||
| Inspect every mechanical or generated edit semantically. Never accept a broad cleanup by count alone. | Formatting, autofix, rebasing, and three-way application can alter behaviour or erase concurrent work. | `9b44bac`: `golangci-lint --fix` introduced a bad `:=` that would have defeated a timeout if it compiled. `affc717`: worktree diffs were based on an older tree and required explicit survival checks. `308c199`: a broad cleanup changed the skillscript command so its test now emits only a newline. |
|
||||
| Enforce lifecycle transitions and audit atomically. | Ignoring expected state permits lost updates; splitting state and history permits contradictory evidence. | As of 2026-07-28, `internal/store.Store.Transition` ignores `from` and performs two writes. Fix `a7f294e` exists only on `origin/fix/48-transition-ignores-from-status-guard-allowing-lost-updates`, not on `main`; the Nell adapter also does not record equivalent transition history. |
|
||||
| Keep deterministic constraints outside the proposing model. | A prompt can be ignored to make a test pass. | `CLAUDE.md` requires gates, protected tests, and diff limits to be code-enforced; the model never owns git operations. |
|
||||
| Require a fresh adversarial reviewer after green. | The implementer is biased toward the path it just made pass. | `CLAUDE.md` makes a memory-independent review mandatory and blocks completion on surviving findings. |
|
||||
|
||||
## Classify the change
|
||||
|
||||
Classify every affected surface. For a composite change, apply the union of all
|
||||
required controls and use the highest-risk class.
|
||||
|
||||
| Class | Examples | Minimum control |
|
||||
|---|---|---|
|
||||
| Read-only investigation | Review, diagnosis, inventory, impact map | Do not mutate. Cite live code, tests, history, and unresolved uncertainty. |
|
||||
| Design or documentation | PRD, ADR-like decision, architecture guide, skill | Separate current facts from approved target and open candidates. Validate links/format. Do not imply implementation. |
|
||||
| Source | Go behaviour, refactor, API, workflow | Current-state map, red-green, scoped iteration, architecture and maintainability review, final relevant gates. |
|
||||
| Configuration | Decoder, default, env name, overlay, secret reference, setting owner | Old/new input fixtures, precedence/default proof, production composition trace, invalid-input behaviour, explicit rollback. |
|
||||
| Runtime lifecycle | Start, stop, reload, concurrency, stream, retry, health | Cancellation/backpressure/failure tests, race test, bounded retry, shutdown and rollback proof. |
|
||||
| Dependency | Root or `tools` module dependency/version | Adoption rationale, API/behaviour delta, both module manifests as applicable, transitive/security review, reverse plan. |
|
||||
| Protocol | MCP, NATS, RPC, subprocess, JSON/wire schema | Version and compatibility matrix, independent-peer or recorded-wire evidence, malformed/partial/multi-message tests. |
|
||||
| Persistence | SQLite, NellDB, schema, lifecycle state, migrations | Old-data fixture, legal-transition and concurrency tests, atomic state/audit proof, backup/rollback strategy. |
|
||||
| Security or trust boundary | Secret flow, plugins, tools, containers, identity, authorization | Threat/authority analysis, deny tests, deterministic enforcement, fresh security review, no “subprocess equals sandbox” claims. |
|
||||
| Deployment | Dockerfile, Compose, image/tag, env passthrough, volume/network | Exact assembly validation, secret-name-to-container trace, health observation, previous image/config recovery plan. |
|
||||
| Generated documentation | `tools/docsgen`, registries, generated JSON, VitePress | Generator tests, byte-for-byte drift check, site build, generated-vs-handwritten ownership check. |
|
||||
|
||||
Escalate the risk class when the change crosses a process boundary, changes
|
||||
stored or wire data, changes operator-visible defaults, alters authorization,
|
||||
removes compatibility, or can affect a live deployment.
|
||||
|
||||
## Execute the control loop
|
||||
|
||||
### 1. Establish authority and scope
|
||||
|
||||
For implementation work, start from the existing Beads issue and claim it.
|
||||
Create durable work before writing code if no issue exists. Do not create a
|
||||
Markdown task list.
|
||||
|
||||
```bash
|
||||
bd prime
|
||||
: "${BEADS_ISSUE_ID:?set BEADS_ISSUE_ID to the target issue}"
|
||||
bd show "$BEADS_ISSUE_ID"
|
||||
bd update "$BEADS_ISSUE_ID" --claim
|
||||
```
|
||||
|
||||
For a review or investigation, remain read-only unless the user separately
|
||||
authorizes implementation.
|
||||
|
||||
Record:
|
||||
|
||||
- the requested outcome and explicit non-goals;
|
||||
- every selected change class;
|
||||
- files and domains believed to be in scope;
|
||||
- user authority for source, config, deployment, dependency, and destructive
|
||||
operations;
|
||||
- whether another session owns overlapping files.
|
||||
|
||||
### 2. Protect concurrent work
|
||||
|
||||
Inspect before editing:
|
||||
|
||||
```sh
|
||||
git status --short
|
||||
git diff --stat
|
||||
git worktree list --porcelain
|
||||
```
|
||||
|
||||
Treat every pre-existing change as somebody else's. Stop before overlapping it
|
||||
unless ownership and integration order are known. Never discard, reset, or
|
||||
silently reformat unrelated changes.
|
||||
|
||||
Partition parallel work by non-overlapping file ownership. Before applying an
|
||||
agent result based on another tree, compare its base and verify that every
|
||||
intervening semantic fix survives. The `affc717` history demonstrates why a
|
||||
cleanly applied diff is not proof of preservation.
|
||||
|
||||
Do not run broad autofix against a shared dirty tree. `task check` and
|
||||
`task fmt` are broad mutators; isolate them and inspect their complete diff.
|
||||
|
||||
### 3. Map the current state before proposing a change
|
||||
|
||||
Read `CLAUDE.md`, `ARCHITECTURE.md`, `docs/prds/01-project-management.md`, and
|
||||
the focused decision document linked from the architecture index.
|
||||
|
||||
For the selected behaviour, trace all of:
|
||||
|
||||
- entry points under `cmd/` and application composition;
|
||||
- constructors, registries, interfaces, adapters, and concrete selection;
|
||||
- every caller and consumer, including RPC/process peers;
|
||||
- settings, defaults, overlays, secrets, and deployment passthrough;
|
||||
- state ownership, persistence, lifecycle, cancellation, and recovery;
|
||||
- tests and what they do **not** exercise;
|
||||
- duplicated implementations, compatibility adapters, generated copies, and
|
||||
apparently dead paths;
|
||||
- git history for rejected, stalled, reverted, or branch-only work;
|
||||
- documents that disagree with live code.
|
||||
|
||||
Use read-only evidence:
|
||||
|
||||
```bash
|
||||
# Guard: verify repository root first
|
||||
git rev-parse --show-toplevel >/dev/null || { echo 'run from repo root' >&2; exit 1; }
|
||||
: "${ARCHIE_SYMBOL:?set ARCHIE_SYMBOL to the symbol or config key}"
|
||||
rg -n "$ARCHIE_SYMBOL" cmd internal config*.toml docker-compose.yml docs
|
||||
: "${ARCHIE_PACKAGE:?set ARCHIE_PACKAGE to the package path relative to repo root}"
|
||||
go list -deps "./internal/$ARCHIE_PACKAGE/..."
|
||||
: "${ARCHIE_PATHS:?set ARCHIE_PATHS to the space-separated affected paths}"
|
||||
git log --all --oneline -- $ARCHIE_PATHS
|
||||
git blame -- $ARCHIE_PATHS
|
||||
```
|
||||
|
||||
Do not ask the user for a fact the repository can reveal. Ask only when a real
|
||||
product, compatibility, ownership, or risk decision remains.
|
||||
|
||||
### 4. Write the change brief
|
||||
|
||||
Do not begin implementation until the brief answers:
|
||||
|
||||
| Question | Required answer |
|
||||
|---|---|
|
||||
| What owns this behaviour? | One cohesive domain/capability and the governing decision document. |
|
||||
| Where does production select it? | Exact entry point-to-implementation path. “Registered” is insufficient. |
|
||||
| What changes and what stays stable? | Behavioural contract, invariants, non-goals, and affected consumers. |
|
||||
| What does this supersede? | Every older or parallel path, with keep/merge/deprecate/delete decision. |
|
||||
| What gets deleted? | Obsolete code, compatibility adapters, duplicated config, tests, and docs, or a justified reason to retain each. |
|
||||
| What proves failure first? | A behavioural red test that fails for the intended reason, not a compile error. |
|
||||
| What proves maintainability? | Ownership, dependency direction, naming, size, duplication, and dead-path checks. |
|
||||
| What is the compatibility plan? | Old/new config, protocol, data, caller, and rollout combinations. |
|
||||
| How is it reversed? | Last-known-good state and evidence that reversal preserves data and service. |
|
||||
| What remains uncertain? | Explicit open/candidate claims; never convert a hunch into a requirement. |
|
||||
|
||||
If adding a feature makes an existing path redundant, deletion is part of the
|
||||
feature unless compatibility has a named owner, deadline or deletion
|
||||
criterion, and test. Do not leave two active paths merely because deleting the
|
||||
old one is harder.
|
||||
|
||||
Route boundary or ownership uncertainty through
|
||||
`archie-architecture-planning-campaign` before coding. Route unlocatable impact,
|
||||
duplication, or dead-path uncertainty through `archie-technical-accountability`.
|
||||
|
||||
### 5. Capture a baseline
|
||||
|
||||
Run the narrowest non-mutating checks that exercise the affected area before
|
||||
the red test. Preserve exact command, exit status, and output.
|
||||
|
||||
Example for one Go package:
|
||||
|
||||
```sh
|
||||
go test ./internal/gateway/... -count=1
|
||||
go vet ./internal/gateway/...
|
||||
golangci-lint run ./internal/gateway/...
|
||||
gofumpt -l internal/gateway
|
||||
```
|
||||
|
||||
Distinguish:
|
||||
|
||||
- **clean baseline**: proceed;
|
||||
- **unrelated known failure**: preserve its exact signature and escalate;
|
||||
- **failure in the affected surface**: do not build on it; repair or split the
|
||||
work with explicit authority;
|
||||
- **environment failure**: prove it is environmental before classifying it as
|
||||
non-code.
|
||||
|
||||
Do not call a baseline green when a command was skipped.
|
||||
|
||||
### 6. Apply red-green without surrendering design
|
||||
|
||||
1. Add a behavioural test for the intended contract.
|
||||
2. Run it and capture a meaningful failure.
|
||||
3. Implement the smallest coherent design, not the smallest patch.
|
||||
4. Run the focused test until green.
|
||||
5. Add every relevant error, boundary, compatibility, cancellation, and
|
||||
concurrency case.
|
||||
6. Re-read every changed non-test file for ownership, clarity, duplication,
|
||||
unused branches, and superseded paths.
|
||||
|
||||
Load `archie-validation-and-qa` for the test design. Load
|
||||
`archie-technical-accountability` before accepting “works but ugly” code.
|
||||
|
||||
Never weaken or rewrite the red test merely to admit the implementation.
|
||||
Environmental test protection is preferable to a prompt-only prohibition.
|
||||
|
||||
### 7. Prove production wiring
|
||||
|
||||
Demonstrate all applicable links:
|
||||
|
||||
```text
|
||||
external input
|
||||
-> decoder/adapter
|
||||
-> application composition
|
||||
-> selected implementation
|
||||
-> state or external effect
|
||||
-> observable outcome
|
||||
```
|
||||
|
||||
Test at the highest practical seam. A package unit test does not prove that
|
||||
`cmd/archied` supplies the new setting, registers the implementation, forwards
|
||||
the environment variable, chooses the right mode, or exposes the result.
|
||||
|
||||
For configuration, test the deployed legacy form and the new form. Verify both
|
||||
the source environment and `docker-compose.yml` passthrough. For protocols,
|
||||
verify bytes/messages with an independently implemented peer or fixture rather
|
||||
than a client and server sharing the same wrong assumption.
|
||||
|
||||
### 8. Make rollback executable
|
||||
|
||||
Identify last-known-good **before** changing runtime state. Define the trigger,
|
||||
owner, commands or deterministic mechanism, data consequences, and health check
|
||||
for restoration.
|
||||
|
||||
| Change | Required rollback evidence |
|
||||
|---|---|
|
||||
| Source or dependency | Exact prior version plus proof that reverting does not leave incompatible data, config, or generated output. |
|
||||
| Configuration | Prior accepted input and effective values, secret-safe diff, reload/restart consequence, and health check. |
|
||||
| Protocol | Old/new peer matrix; retain the old path until mixed-version operation or coordinated cutover is proved. |
|
||||
| Persistence | Backup/restore or reversible migration rehearsal against an old-data fixture; never call a destructive forward-only migration rollback-safe. |
|
||||
| Deployment | Previous image digest and config, exact supported assembly, restoration command, and post-restore observation. |
|
||||
| Generated documentation | Regenerate from authoritative definitions; never recover by hand-editing generated JSON. |
|
||||
|
||||
The candidate-promotion and automatic last-known-good protocol in
|
||||
`docs/prds/architecture/safe-change-and-recovery.md` is an approved requirement,
|
||||
but its exact Go contracts and atomicity boundary are explicitly still under
|
||||
design as of 2026-07-28. Do not claim Archie currently provides it. For live
|
||||
work, route the concrete manual or implemented recovery procedure through
|
||||
`archie-run-and-operate`.
|
||||
|
||||
### 9. Run the required evidence set
|
||||
|
||||
Use scoped checks while iterating. Use a scoped final gate only for a genuinely
|
||||
isolated single-package change allowed by `CLAUDE.md`. Require full and
|
||||
class-specific checks for cross-package, configuration, runtime, dependency,
|
||||
protocol, persistence, security, deployment, or generated-documentation work.
|
||||
|
||||
`task check` is repository doctrine but is not the complete evidence set:
|
||||
|
||||
```sh
|
||||
task check
|
||||
golangci-lint run ./...
|
||||
go test -race ./... -count=1
|
||||
go -C tools test ./... -count=1
|
||||
go -C tools vet ./...
|
||||
```
|
||||
|
||||
For generated contracts and the site, run the current commands:
|
||||
|
||||
```sh
|
||||
go -C tools test ./docsgen -count=1
|
||||
go -C tools run ./docsgen --repo-root .. --out /tmp/archie-contracts.check.json
|
||||
cmp /tmp/archie-contracts.check.json docs-2/data/generated/contracts.json
|
||||
pnpm --dir docs-2 build
|
||||
```
|
||||
|
||||
Inspect the diff after any formatter, fixer, generator, or `task check`. A zero
|
||||
exit status does not authorize unrelated edits.
|
||||
|
||||
### 10. Run fresh adversarial review
|
||||
|
||||
Give a reviewer with no implementation memory the requirement, governing
|
||||
architecture, current diff, and raw validation output. Require findings first;
|
||||
do not let that pass silently fix its own findings.
|
||||
|
||||
Require review of:
|
||||
|
||||
- production selection and every affected consumer;
|
||||
- correctness and error propagation;
|
||||
- architecture ownership and dependency direction;
|
||||
- obsolete, duplicate, disconnected, or single-use paths;
|
||||
- config/default/identity hardcoding;
|
||||
- interface satisfaction and wire compatibility;
|
||||
- nil, cancellation, goroutine, race, transaction, and rollback hazards;
|
||||
- whether tests prove the contract rather than mirror the implementation.
|
||||
|
||||
Resolve every blocking and important finding, rerun affected checks, then use a
|
||||
fresh final pass if semantics changed. Surviving findings block acceptance.
|
||||
|
||||
### 11. Accept or stop
|
||||
|
||||
Accept only when the evidence packet contains:
|
||||
|
||||
- issue/scope and all change classes;
|
||||
- current-state impact map and governing decisions;
|
||||
- baseline, red, green, and final command outputs;
|
||||
- production-wiring proof;
|
||||
- compatibility, deprecation, deletion, and rollback decisions;
|
||||
- architecture and maintainability review;
|
||||
- fresh adversarial review with zero surviving blocking or important findings;
|
||||
- explicit uncertainties and follow-up ownership;
|
||||
- no unexplained diff.
|
||||
|
||||
Do not close a Beads issue until its acceptance criteria and the session close
|
||||
protocol are satisfied. Do not push, deploy, migrate, or delete data without
|
||||
separate authority.
|
||||
|
||||
## Know the current gate gaps
|
||||
|
||||
**Volatile snapshot: 2026-07-28. Re-verify before every acceptance decision.**
|
||||
|
||||
- `task check` runs `task fmt`, which executes `gofumpt -w .` and
|
||||
`go fix ./...`; it then executes `go fix ./...` a second time before vet,
|
||||
build, and root tests. It mutates source.
|
||||
- `task check` does not run `task lint`, race tests, the nested `tools` module,
|
||||
docsgen drift checks, or the VitePress build.
|
||||
- Root `go test ./...` does not cross the nested `tools/go.mod` boundary.
|
||||
- `.gitea/workflows/deploy.yml` builds and pushes images without a Go quality
|
||||
job. `.github/workflows/docs.yml` installs and builds VitePress but does not
|
||||
run the Go gate or docsgen.
|
||||
- `go test ./internal/skillscript -count=1` currently fails
|
||||
`TestRunWrapsExternalCommand`: `Run() = "\n"`.
|
||||
- The approved generated-documentation document describes future
|
||||
`task docs:*` and `docsgen check` commands, but neither exists in the current
|
||||
`Taskfile.yml`/CLI. Use the current commands above.
|
||||
- No `task deadcode` target exists. Never report it as executed.
|
||||
|
||||
Repository doctrine still requires a clean relevant gate. A known baseline
|
||||
failure is not permission to report completion. Either repair it under
|
||||
separately controlled scope or report the work blocked with scoped no-regression
|
||||
evidence.
|
||||
|
||||
## Escalate instead of improvising
|
||||
|
||||
Stop and obtain a decision when:
|
||||
|
||||
- a requested feature conflicts with an approved architecture decision;
|
||||
- ownership or the production selection path remains ambiguous after research;
|
||||
- a new path overlaps an existing feature and no deprecation/deletion decision
|
||||
exists;
|
||||
- compatibility requires supporting two behaviours with no sunset criterion;
|
||||
- a migration can lose data or cannot demonstrate restoration;
|
||||
- a runtime/config change cannot preserve last-known-good state;
|
||||
- a protocol change lacks an independent interoperability oracle;
|
||||
- a security rule exists only in a prompt;
|
||||
- a baseline failure touches the same surface;
|
||||
- concurrent work overlaps the files or semantics;
|
||||
- the required full gate cannot run or has an unexplained failure;
|
||||
- an adversarial finding survives.
|
||||
|
||||
Do not escalate discoverable facts or ordinary implementation choices. Bring
|
||||
the evidence, the smallest decision required, and the consequences of each
|
||||
option.
|
||||
|
||||
## Provenance and maintenance
|
||||
|
||||
Re-verify commands, gates, current defects, and incidents before updating this
|
||||
skill:
|
||||
|
||||
```sh
|
||||
sed -n '1,220p' Taskfile.yml
|
||||
sed -n '1,260p' CLAUDE.md
|
||||
find .gitea/workflows .github/workflows -maxdepth 1 -type f -print
|
||||
sed -n '1,140p' .gitea/workflows/deploy.yml
|
||||
sed -n '1,180p' .github/workflows/docs.yml
|
||||
sed -n '1,130p' docs/prds/architecture/safe-change-and-recovery.md
|
||||
sed -n '1,120p' docs/prds/architecture/package-review.md
|
||||
sed -n '300,350p' docs/prds/architecture/agent-system.md
|
||||
sed -n '255,280p' internal/store/store.go
|
||||
sed -n '270,305p' internal/nell/adapter.go
|
||||
go test ./internal/skillscript -count=1
|
||||
git log --all --format='%h %ad %s' --date=short --grep='FullStream\|MCP transport framing\|token_env\|container Docker network\|autofix\|Transition() ignores' -i
|
||||
git branch -a --contains a7f294e
|
||||
rg -n 'docs:|deadcode' Taskfile.yml
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
interface:
|
||||
display_name: "Archie Change Control"
|
||||
short_description: "Plan, gate, and accept Archie changes safely"
|
||||
default_prompt: "Use $archie-change-control to classify, plan, verify, review, and accept this archie-core change."
|
||||
@@ -133,7 +133,7 @@ Start at these verified anchors:
|
||||
| Chat and channels | `internal/gateway/`, `internal/channels/` |
|
||||
| Configuration | `internal/config/`, `config.example.toml`, `config.docker.toml` |
|
||||
| Production/deploy shape | `cmd/archied/main.go`, `docker-compose.yml`, `.gitea/workflows/deploy.yml` |
|
||||
| Target map | `docs/prds/01-project-management.md` and linked `docs/prds/architecture/*.md` |
|
||||
| Target map | `docs/prds/01-project-management.md` and linked `docs/architecture/*.md` |
|
||||
|
||||
Do not assume this table is complete after code moves. Re-find anchors with
|
||||
`go list` and `gopls`.
|
||||
@@ -156,7 +156,7 @@ Map internal dependency direction:
|
||||
```
|
||||
|
||||
Treat imports as dependency evidence, not ownership proof. Compare the result
|
||||
with `docs/prds/architecture/dependencies-and-contracts.md` only after
|
||||
with `docs/architecture/dependencies-and-contracts.md` only after
|
||||
distinguishing current from target.
|
||||
|
||||
### Resolve symbols with gopls
|
||||
|
||||
@@ -310,7 +310,7 @@ mutable `config.Config`. It passes that aggregate into `daemon.Daemon`,
|
||||
`workflow.TaskContext`, and a second worker DTO. Treat this as a current
|
||||
load-bearing weakness, not a pattern to copy.
|
||||
|
||||
`docs/prds/architecture/configuration.md` is approved as of 2026-07-28:
|
||||
`docs/architecture/configuration.md` is approved as of 2026-07-28:
|
||||
|
||||
- move file/env/secret/overlay loading to a private
|
||||
`internal/infrastructure/configuration` input boundary;
|
||||
@@ -340,4 +340,4 @@ Re-verify config behavior: `env GOTMPDIR=/tmp GOCACHE=/tmp/archie-config-test-go
|
||||
|
||||
Re-verify deployment passthrough: `rg -n 'command:|environment:|config\.toml|config\.docker\.toml|NATS_|TOKEN|API_KEY' docker-compose.yml config.docker.toml config.example.toml Dockerfile Dockerfile.archied`
|
||||
|
||||
Re-verify target doctrine: `rg -n 'Ownership|Dissolution|Current configuration migration ledger|Universal change protocol|Completion criteria' docs/prds/architecture/configuration.md`
|
||||
Re-verify target doctrine: `rg -n 'Ownership|Dissolution|Current configuration migration ledger|Universal change protocol|Completion criteria' docs/architecture/configuration.md`
|
||||
@@ -180,7 +180,7 @@ When an edge looks wrong:
|
||||
|
||||
1. Run `archie-codebase-discovery` on the imported contract.
|
||||
2. Identify the concrete production consumer.
|
||||
3. Compare the current edge with `docs/prds/architecture/`.
|
||||
3. Compare the current edge with `docs/architecture/`.
|
||||
4. Route any boundary change through the architecture campaign.
|
||||
|
||||
### Find configuration-consumption candidates
|
||||
@@ -412,7 +412,7 @@ Ground truth verified on 2026-07-28:
|
||||
`Taskfile.yml`, `.golangci.yml`, `go.mod`, `tools/go.mod`,
|
||||
`cmd/{archied,archie-agent}/`, `internal/{config,nell,skillscript}/`,
|
||||
`.github/workflows/docs.yml`, `.gitea/workflows/deploy.yml`,
|
||||
`docker-compose.yml`, `docs-2/package.json`, and `tools/docsgen/`.
|
||||
`docker-compose.yml`, `docs/package.json`, and `tools/docsgen/`.
|
||||
|
||||
Re-verify scripts: `sh -n .claude/skills/archie-diagnostics-and-tooling/scripts/*.sh && go vet .claude/skills/archie-diagnostics-and-tooling/scripts/source-metrics.go && go vet .claude/skills/archie-diagnostics-and-tooling/scripts/config-use-candidates.go`
|
||||
|
||||
|
||||
@@ -269,8 +269,8 @@ func excludedDirectory(relative, name string) bool {
|
||||
case ".git", ".claude", ".references", "node_modules", "vendor", ".gotmp":
|
||||
return true
|
||||
}
|
||||
return strings.HasPrefix(relative, "docs-2/.vitepress/cache") ||
|
||||
strings.HasPrefix(relative, "docs-2/.vitepress/dist")
|
||||
return strings.HasPrefix(relative, "docs/.vitepress/cache") ||
|
||||
strings.HasPrefix(relative, "docs/.vitepress/dist")
|
||||
}
|
||||
|
||||
func fail(code int, format string, arguments ...any) {
|
||||
|
||||
@@ -252,8 +252,8 @@ func excludedDirectory(relative, name string) bool {
|
||||
case ".git", ".claude", ".references", "node_modules", "vendor", ".gotmp":
|
||||
return true
|
||||
}
|
||||
return strings.HasPrefix(relative, "docs-2/.vitepress/cache") ||
|
||||
strings.HasPrefix(relative, "docs-2/.vitepress/dist")
|
||||
return strings.HasPrefix(relative, "docs/.vitepress/cache") ||
|
||||
strings.HasPrefix(relative, "docs/.vitepress/dist")
|
||||
}
|
||||
|
||||
func moduleFor(relative string) string {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: archie-docs-and-writing
|
||||
description: Maintain Archie's documentation of record and write durable architecture decisions, migration plans, parity matrices, incident and dead-end records, feature ownership and deprecation records, operational runbooks, and documentation reviews. Use when deciding where an Archie fact belongs; reconciling code with ARCHITECTURE.md, CLAUDE.md, docs/prds, docs/archive, generated contracts, or the docs-2 VitePress site; changing tools/docsgen; documenting a feature so future maintainers can find its owners, consumers, invariants, superseded paths, deletion gates, evidence, and rollback; or checking documentation authority, drift, links, copied content, and source-artifact hygiene.
|
||||
description: Maintain Archie's documentation of record and write durable architecture decisions, migration plans, parity matrices, incident and dead-end records, feature ownership and deprecation records, operational runbooks, and documentation reviews. Use when deciding where an Archie fact belongs; reconciling code with ARCHITECTURE.md, CLAUDE.md, docs/prds, docs/archive, generated contracts, or the docs VitePress site; changing tools/docsgen; documenting a feature so future maintainers can find its owners, consumers, invariants, superseded paths, deletion gates, evidence, and rollback; or checking documentation authority, drift, links, copied content, and source-artifact hygiene.
|
||||
---
|
||||
|
||||
# Maintain Archie documentation
|
||||
@@ -57,18 +57,18 @@ Treat this as a volatile map verified on 2026-07-28:
|
||||
| `CLAUDE.md` | Current contributor and safety protocol plus a compact architecture orientation | Verify operational claims against code and `Taskfile.yml`; `AGENTS.md` is a symlink to this file |
|
||||
| `ARCHITECTURE.md` | Useful architecture history and partial current overview | Corroborate every inventory/status claim; its “Planned” list is stale for implemented skill support |
|
||||
| `docs/prds/01-project-management.md` | Index and approved foundation for the target architecture | Add or change target decisions in the focused document it names |
|
||||
| `docs/prds/architecture/*.md` | Focused target decisions, active review procedure, and migration inventory | Read each file's status; distinguish fixed decisions from explicitly remaining decisions |
|
||||
| `docs/prds/architecture/migration-decisions.md` | `OPEN` migration inventory constrained by approved decisions | Close a question only after code-grounded review and an approved record |
|
||||
| `docs/architecture/*.md` | Focused target decisions, active review procedure, and migration inventory | Read each file's status; distinguish fixed decisions from explicitly remaining decisions |
|
||||
| `docs/architecture/migration-decisions.md` | `OPEN` migration inventory constrained by approved decisions | Close a question only after code-grounded review and an approved record |
|
||||
| `docs/archive/` | `HISTORICAL` material | Mine rationale and failure evidence; never restore authority from a title such as “Final” |
|
||||
| `CHANGELOG.md`, `CHANGELOG.archied.md`, `CHANGELOG.archie.md` | Component release-note index and packaged runtime inputs | Keep gateway and agent-runtime entries separate; `internal/releaseannounce` parses the version headings |
|
||||
| `tools/docsgen` | Current, partial generator implementation in the nested `tools` Go module | Treat its flags and tests—not planned PRD commands—as executable truth |
|
||||
| `docs-2/data/generated/contracts.json` | Current working-tree `GENERATED` output | Regenerate; never edit by hand; re-check whether it is tracked |
|
||||
| `docs-2/` | Staging VitePress site | Do not treat a rendered summary as the architecture record |
|
||||
| `docs/data/generated/contracts.json` | Current working-tree `GENERATED` output | Regenerate; never edit by hand; re-check whether it is tracked |
|
||||
| `docs/` | Staging VitePress site | Do not treat a rendered summary as the architecture record |
|
||||
| `.github/workflows/docs.yml` | Current Pages build/deploy workflow | It builds the site; it does not currently run Go setup, generator tests, or drift checking |
|
||||
|
||||
The repository root has no `README.md` or `CONTRIBUTING.md` as of 2026-07-28.
|
||||
Record this as an onboarding coverage gap, not permission to invent a new
|
||||
authority. `docs-2/README.md` is excluded by VitePress and still contains copied
|
||||
authority. `docs/README.md` is excluded by VitePress and still contains copied
|
||||
Tau material; it is not a root onboarding guide.
|
||||
|
||||
## Choose one destination
|
||||
@@ -88,11 +88,11 @@ Use this placement guide:
|
||||
| Content | Destination |
|
||||
|---|---|
|
||||
| Cross-cutting approved architecture index | `docs/prds/01-project-management.md` |
|
||||
| Focused domain or requirement decision | The matching `docs/prds/architecture/*.md` file |
|
||||
| Unresolved migration question or cutover requirement | `docs/prds/architecture/migration-decisions.md` |
|
||||
| Focused domain or requirement decision | The matching `docs/architecture/*.md` file |
|
||||
| Unresolved migration question or cutover requirement | `docs/architecture/migration-decisions.md` |
|
||||
| Contributor protocol that must load before work | `CLAUDE.md` |
|
||||
| Runtime/API/config reference derivable from code | Domain-owned registry/type, then `tools/docsgen` output |
|
||||
| User-facing staging site prose | `docs-2/`, linking back to its authority |
|
||||
| User-facing staging site prose | `docs/`, linking back to its authority |
|
||||
| Shipped release behavior | The matching component changelog; keep `CHANGELOG.md` as the two-component index |
|
||||
| Superseded design retained only for context | `docs/archive/`, with historical status |
|
||||
| Incident or rejected approach | `archie-failure-archaeology`'s authoritative chronology |
|
||||
@@ -108,7 +108,7 @@ Run from the repository root:
|
||||
rg -n 'ExactTerm|RelatedTerm' --glob '*.go' --glob '*.md' --glob '*.toml' --glob '*.yml'
|
||||
rg -n 'type ExactType|func .*ExactMethod|ExactConfigField' cmd internal domain tools
|
||||
rg -n 'ExactType|ExactMethod' --glob '*_test.go'
|
||||
rg -n 'ExactTerm' docs/prds ARCHITECTURE.md CLAUDE.md docs/archive docs-2
|
||||
rg -n 'ExactTerm' docs/prds ARCHITECTURE.md CLAUDE.md docs/archive docs
|
||||
```
|
||||
|
||||
Then build a fact ledger:
|
||||
@@ -198,7 +198,7 @@ release announcer.
|
||||
## Maintain generated contracts
|
||||
|
||||
The current implementation is smaller than the approved target in
|
||||
`docs/prds/architecture/generated-documentation.md`.
|
||||
`docs/architecture/generated-documentation.md`.
|
||||
|
||||
### Current behavior, verified 2026-07-28
|
||||
|
||||
@@ -208,7 +208,7 @@ The current implementation is smaller than the approved target in
|
||||
`asyncapi`, `all`, or `check` subcommands.
|
||||
- `currentContractTypes` explicitly publishes three top-level contracts and
|
||||
collects their referenced schemas into one JSON object.
|
||||
- Its default output is `docs-2/data/generated/contracts.json`.
|
||||
- Its default output is `docs/data/generated/contracts.json`.
|
||||
- The current test proves byte-identical repeated output, expected top-level
|
||||
contracts, resolvable local references, duplicate/conflict rejection, and
|
||||
filesystem/source error reporting.
|
||||
@@ -221,7 +221,7 @@ Test and compare without changing the repository:
|
||||
GOTMPDIR=/tmp GOCACHE=/tmp/archie-docsgen-gocache go -C tools test ./docsgen -count=1
|
||||
docs_tmp="$(mktemp /tmp/archie-contracts.XXXXXX.json)"
|
||||
GOTMPDIR=/tmp GOCACHE=/tmp/archie-docsgen-gocache go -C tools run ./docsgen --repo-root .. --out "$docs_tmp"
|
||||
cmp "$docs_tmp" docs-2/data/generated/contracts.json
|
||||
cmp "$docs_tmp" docs/data/generated/contracts.json
|
||||
```
|
||||
|
||||
Exit status `0` from `cmp` means the one current output matches. This is not a
|
||||
@@ -244,10 +244,10 @@ Current behavior, verified 2026-07-28:
|
||||
|
||||
| Surface | Current state |
|
||||
|---|---|
|
||||
| Package | `docs-2/package.json`; VitePress `^1.6.4`; pnpm lockfile resolves 1.6.4 |
|
||||
| Package | `docs/package.json`; VitePress `^1.6.4`; pnpm lockfile resolves 1.6.4 |
|
||||
| Site config | Archie title, local search, clean URLs, last-updated metadata, output at `.vitepress/dist` |
|
||||
| Published prose | Handwritten home and architecture pages; no generated-data loader is present |
|
||||
| Copied content | `docs-2/README.md` describes Tau and is excluded by `srcExclude` |
|
||||
| Copied content | `docs/README.md` describes Tau and is excluded by `srcExclude` |
|
||||
| Workflow | Frozen-lockfile install, `pnpm build`, Pages artifact upload/deploy |
|
||||
| Versioning | pnpm major `10`; Node is `latest`, so the Node input is volatile |
|
||||
| Missing gates | No Go setup, docsgen test, generator drift check, or root `task check` integration |
|
||||
@@ -255,8 +255,8 @@ Current behavior, verified 2026-07-28:
|
||||
Run the implemented site commands for review and acceptance:
|
||||
|
||||
```bash
|
||||
pnpm --dir docs-2 install --frozen-lockfile
|
||||
pnpm --dir docs-2 build
|
||||
pnpm --dir docs install --frozen-lockfile
|
||||
pnpm --dir docs build
|
||||
```
|
||||
|
||||
Use `build` for review evidence.
|
||||
@@ -264,7 +264,7 @@ Use `build` for review evidence.
|
||||
### Interactive authoring (not for automated acceptance)
|
||||
|
||||
```bash
|
||||
pnpm --dir docs-2 dev
|
||||
pnpm --dir docs dev
|
||||
```
|
||||
|
||||
This starts a long-running dev server at `http://localhost:5173` (by default).
|
||||
@@ -274,18 +274,18 @@ versions in failure reports because CI currently permits version drift.
|
||||
|
||||
### Enforce source-artifact hygiene
|
||||
|
||||
As of 2026-07-28, Git tracks 237 `docs-2/node_modules` symlink entries.
|
||||
Neither `docs-2/node_modules` nor `docs-2/.vitepress/dist` is ignored by the
|
||||
As of 2026-07-28, Git tracks 237 `docs/node_modules` symlink entries.
|
||||
Neither `docs/node_modules` nor `docs/.vitepress/dist` is ignored by the
|
||||
root `.gitignore`. Treat cleanup and ignore changes as a classified repository
|
||||
change; route them through `archie-change-control`.
|
||||
|
||||
Before review, inspect rather than assuming:
|
||||
|
||||
```bash
|
||||
git ls-files -s 'docs-2/node_modules/**' | awk '$1 == 120000 { count++ } END { print count + 0 }'
|
||||
git ls-files 'docs-2/.vitepress/dist/**'
|
||||
git check-ignore -v docs-2/node_modules docs-2/.vitepress/dist || true
|
||||
rg -n -i 'tau|template|placeholder' docs-2 --glob '!node_modules/**'
|
||||
git ls-files -s 'docs/node_modules/**' | awk '$1 == 120000 { count++ } END { print count + 0 }'
|
||||
git ls-files 'docs/.vitepress/dist/**'
|
||||
git check-ignore -v docs/node_modules docs/.vitepress/dist || true
|
||||
rg -n -i 'tau|template|placeholder' docs --glob '!node_modules/**'
|
||||
```
|
||||
|
||||
Never stage dependency installs, VitePress output, generator scratch files,
|
||||
@@ -309,7 +309,7 @@ Require all of the following:
|
||||
- [ ] Release notes use the correct component file, and release metadata,
|
||||
parser behavior, tests, and version headings agree.
|
||||
- [ ] Generator tests and a non-mutating drift comparison pass.
|
||||
- [ ] `pnpm --dir docs-2 build` passes for site changes.
|
||||
- [ ] `pnpm --dir docs build` passes for site changes.
|
||||
- [ ] Copied product text and tracked build/dependency artifacts are absent from
|
||||
the intended change.
|
||||
- [ ] Behavior-changing decisions passed `archie-change-control` and
|
||||
@@ -330,11 +330,11 @@ test -L AGENTS.md && readlink AGENTS.md && test ! -e README.md && test ! -e CONT
|
||||
```
|
||||
|
||||
```bash
|
||||
rg -n '^\\*\\*Status:\\*\\*|^# ' docs/prds/01-project-management.md docs/prds/architecture/*.md docs/archive/*.md
|
||||
rg -n '^\\*\\*Status:\\*\\*|^# ' docs/prds/01-project-management.md docs/architecture/*.md docs/archive/*.md
|
||||
```
|
||||
|
||||
```bash
|
||||
rg -n 'docsgen|docs:|pnpm|vitepress|CHANGELOG' Taskfile.yml .github/workflows/docs.yml tools/docsgen docs-2/package.json docs-2/.vitepress/config.mts Dockerfile.archied internal/releaseannounce cmd/archied
|
||||
rg -n 'docsgen|docs:|pnpm|vitepress|CHANGELOG' Taskfile.yml .github/workflows/docs.yml tools/docsgen docs/package.json docs/.vitepress/config.mts Dockerfile.archied internal/releaseannounce cmd/archied
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -342,9 +342,9 @@ GOTMPDIR=/tmp GOCACHE=/tmp/archie-docsgen-gocache go -C tools test ./docsgen -co
|
||||
```
|
||||
|
||||
```bash
|
||||
docs_tmp="$(mktemp /tmp/archie-contracts.XXXXXX.json)"; GOTMPDIR=/tmp GOCACHE=/tmp/archie-docsgen-gocache go -C tools run ./docsgen --repo-root .. --out "$docs_tmp" && cmp "$docs_tmp" docs-2/data/generated/contracts.json
|
||||
docs_tmp="$(mktemp /tmp/archie-contracts.XXXXXX.json)"; GOTMPDIR=/tmp GOCACHE=/tmp/archie-docsgen-gocache go -C tools run ./docsgen --repo-root .. --out "$docs_tmp" && cmp "$docs_tmp" docs/data/generated/contracts.json
|
||||
```
|
||||
|
||||
```bash
|
||||
git status --short -- docs-2 tools docs/prds/architecture/generated-documentation.md .github/workflows/docs.yml; git ls-files -s 'docs-2/node_modules/**' | awk '$1 == 120000 { count++ } END { print count + 0 }'
|
||||
git status --short -- docs tools docs/architecture/generated-documentation.md .github/workflows/docs.yml; git ls-files -s 'docs/node_modules/**' | awk '$1 == 120000 { count++ } END { print count + 0 }'
|
||||
```
|
||||
@@ -51,10 +51,10 @@ settled:
|
||||
|
||||
```bash
|
||||
sed -n '1,180p' docs/prds/01-project-management.md
|
||||
rg -n '^\*\*Status:\*\*|^## Decisions still required|^## Remaining migration decisions' docs/prds/architecture
|
||||
rg -n '^\*\*Status:\*\*|^## Decisions still required|^## Remaining migration decisions' docs/architecture
|
||||
```
|
||||
|
||||
`docs/prds/architecture/agent-system.md` is marked current-state investigation
|
||||
`docs/architecture/agent-system.md` is marked current-state investigation
|
||||
in progress, and `messaging-and-work-intake.md` says foundation decisions are in
|
||||
progress. Treat only their constraints confirmed by approved documents or
|
||||
`migration-decisions.md` as settled target doctrine. Treat their explicit
|
||||
@@ -154,7 +154,7 @@ Retain `task` only for:
|
||||
Never globally replace `task`. Classify each occurrence first:
|
||||
|
||||
```bash
|
||||
rg -n '\b(Task|task|TaskID|task_id)\b' --glob '*.go' --glob '*.md' cmd internal docs/prds/architecture
|
||||
rg -n '\b(Task|task|TaskID|task_id)\b' --glob '*.go' --glob '*.md' cmd internal docs/architecture
|
||||
```
|
||||
|
||||
### Interpret the current lifecycle exactly
|
||||
@@ -371,10 +371,10 @@ these one-line commands before relying on this skill after architecture or
|
||||
package changes:
|
||||
|
||||
```bash
|
||||
rg -n '^\*\*Status:\*\*|^## (Confirmed|Decisions still required|Remaining migration decisions|Completion criteria)' docs/prds/01-project-management.md docs/prds/architecture/*.md
|
||||
rg -n '^\*\*Status:\*\*|^## (Confirmed|Decisions still required|Remaining migration decisions|Completion criteria)' docs/prds/01-project-management.md docs/architecture/*.md
|
||||
rg -n '^type (Task|Workflow|Stage|TaskContext|Request|Result|Message|MessageEvent|SessionContext|Event|Plugin|Channel|BasePlatformAdapter)\b' internal
|
||||
rg -n 'Status[A-Za-z]+|status[A-Za-z]+|func \(s \*Store\) Transition' internal/store internal/gateway
|
||||
rg -n 'AgentID|IdentityID|ParentConversationID|ForkMessageID|WorkflowExecution|StepExecution|accepted work request' docs/prds/architecture
|
||||
rg -n 'AgentID|IdentityID|ParentConversationID|ForkMessageID|WorkflowExecution|StepExecution|accepted work request' docs/architecture
|
||||
for p in internal/domain internal/eventbus internal/policy internal/infrastructure internal/app; do test -d "$p" && echo "$p CURRENT" || echo "$p TARGET-ONLY"; done
|
||||
go test ./internal/plugin -run 'Test(GenericPluginContractRemainsMetadataOnly|EveryEngineInterfaceHasTypedCapabilityAndFamilyOwner)' -count=1
|
||||
```
|
||||
@@ -205,7 +205,7 @@ Follow the whole chain.
|
||||
| Incident and date | Symptom | Attempted solution and root cause | Evidence and status | Settled rule |
|
||||
|---|---|---|---|---|
|
||||
| Tracked `.gotmp`, 2026-07-27 | Go build-cache binaries, generated `_testmain.go`, and `.git-askpass` appear in commits. | **Attempt:** use repo-local `.gotmp` to work around tmpfs quota, then broad `git add -A`. **Cause:** the workaround path was not ignored before use. | `da61e4e`/`f715db2` introduced artifacts; `4cb0577` removes them and adds `.gotmp/` to `.gitignore`. Live tracked count is zero. **Status:** `settled`. | Put caches outside the repo or ignore them before the first command. Scan tracked files before accepting a broad add. |
|
||||
| Tracked `docs-2/node_modules`, 2026-07-28 | Hundreds of pnpm symlink entries become repository content. | **Attempt:** broad `308c199` cleanup/documentation commit. **Cause:** `docs-2/node_modules` was neither ignored nor excluded from the commit. | `git ls-files 'docs-2/node_modules/**'` reports 237 entries at `HEAD`; `.gitignore` has no `node_modules` rule. **Status:** `current/open`. | Track lockfiles, never installed dependency trees. Add the ignore before installation and verify tracked counts are zero. |
|
||||
| Tracked `docs/node_modules`, 2026-07-28 | Hundreds of pnpm symlink entries become repository content. | **Attempt:** broad `308c199` cleanup/documentation commit. **Cause:** `docs/node_modules` was neither ignored nor excluded from the commit. | `git ls-files 'docs/node_modules/**'` reports 237 entries at `HEAD`; `.gitignore` has no `node_modules` rule. **Status:** `current/open`. | Track lockfiles, never installed dependency trees. Add the ignore before installation and verify tracked counts are zero. |
|
||||
| `308c199` cleanup regression, 2026-07-28 | `TestRunWrapsExternalCommand` returns `"\n"` instead of `"wrapped\n"`; forge compatibility is removed again; dependency artifacts are added. | **Attempt:** a 311-file cleanup/source-reference purge changed `exec.Command("echo", "wrapped")` to `exec.CommandContext(ctx, "sh", "-c", "echo", "wrapped")`, where `"wrapped"` becomes shell `$0`, and removed `Forge.TokenEnv`. **Cause:** semantic edits were classified and reviewed as cleanup. | `git show 308c199`; focused skillscript test fails at current `HEAD`; compare `HEAD:internal/config/config.go` with the dirty worktree; tracked node_modules count above. **Status:** `current/open`; do not assume dirty repairs are accepted. | No commit is “cleanup” for gating purposes. Classify each changed behavior, inspect every non-test semantic diff, run the full relevant suite, and scan artifact/compatibility deltas. |
|
||||
| `diff_cap_lines = 0` contradiction, introduced at project start and exposed 2026-07-23 | Operators set zero expecting unlimited, but decoded config becomes 400. | **Attempt:** `5d60e75` made `StageDiffCap` treat `<=0` as disabled and later Docker config used zero. **Cause:** `finalize` has always converted zero to the default 400, so the same sentinel means both “unset” and “unlimited.” | `internal/config/config.go` defaults zero to 400; `internal/workflow/steps.go` treats zero as unlimited; `config.example.toml` advertises 400. **Status:** `current/open` contradiction. | Never overload a zero value with both defaulting and explicit policy. Use presence-aware decoding or a distinct explicit value, then test config-to-runtime behavior end to end. |
|
||||
|
||||
@@ -262,7 +262,7 @@ Re-verify live incident anchors: `rg -n 'selfNetwork|TokenEnv|FullStream|readMes
|
||||
|
||||
Re-verify dependency locality: `rg -n '^replace|/work/apps|/work/projects' go.mod tools/go.mod`
|
||||
|
||||
Re-verify tracked artifact counts: `git ls-files '.gotmp/**' 'docs-2/node_modules/**'`
|
||||
Re-verify tracked artifact counts: `git ls-files '.gotmp/**' 'docs/node_modules/**'`
|
||||
|
||||
Re-verify branch-only candidates: `git branch -r --no-merged HEAD`
|
||||
|
||||
|
||||
@@ -1,359 +0,0 @@
|
||||
---
|
||||
name: archie-research-methodology
|
||||
description: Turn an Archie architecture, maintainability, performance, persistence, configuration, protocol, concurrency, or migration hunch into reproducible evidence and an accountable decision. Use before advocating a redesign, accepting a surprising test result, claiming code is duplicate or dead, comparing execution modes or stores, measuring NellDB scans, validating an external protocol, or promoting a candidate fix; also use when a green TDD result does not prove production wiring or design quality.
|
||||
---
|
||||
|
||||
# Research Archie with falsifiable evidence
|
||||
|
||||
Use research to expose a decision, not to decorate a preferred answer. Ask one
|
||||
vertical question, predict an observable result before measuring, preserve
|
||||
failures and negative results, and hand any resulting change to Archie's change
|
||||
control. Optimize for a small meaningful answer that improves the architecture
|
||||
ledger.
|
||||
|
||||
All volatile repository observations in this skill were verified on
|
||||
**2026-07-28**. Re-run the provenance commands before treating them as current.
|
||||
|
||||
## Route the work
|
||||
|
||||
| Need | Load instead or alongside |
|
||||
|---|---|
|
||||
| Trace entry points, types, callers, registrations, and complete change cones | `archie-codebase-discovery` |
|
||||
| Collect repeatable counts, coverage, timings, profiles, or runtime diagnostics | `archie-diagnostics-and-tooling` |
|
||||
| Decide boundaries, ownership, target packages, and migration slices | `archie-architecture-planning-campaign` |
|
||||
| Reconstruct an earlier failure, rejected fix, revert, or branch-only candidate | `archie-failure-archaeology` |
|
||||
| Decide test sufficiency and acceptance thresholds | `archie-validation-and-qa` |
|
||||
| Classify, authorize, review, or accept a change | `archie-change-control` |
|
||||
| Assign ownership, supersession, deletion criteria, and maintainability debt | `archie-technical-accountability` |
|
||||
|
||||
Do **not** use this skill to implement the hypothesized fix, to operate
|
||||
production, or to replace NellDB domain knowledge. Use `archie-nelldb` for the
|
||||
database model and `archie-run-and-operate` for live operations. Stop the
|
||||
research pass before mutation.
|
||||
|
||||
## Define the terms once
|
||||
|
||||
- **Question**: one uncertainty whose answer changes a design or acceptance
|
||||
decision.
|
||||
- **Hypothesis**: a falsifiable explanation, written before the experiment.
|
||||
- **Prediction**: a number, relation, state, byte sequence, error, or call path
|
||||
that must be observed if the hypothesis is correct.
|
||||
- **Falsifier**: an observation that rejects the hypothesis. “The test fails”
|
||||
is too vague; name the failure that matters.
|
||||
- **Baseline**: the unchanged tree, environment, mode, data, and measurements
|
||||
against which a treatment is compared.
|
||||
- **Treatment**: the one intentional difference between baseline and
|
||||
comparison.
|
||||
- **Control**: an unchanged case that detects a broken fixture or measurement.
|
||||
- **Confounder**: another difference that could explain the result.
|
||||
- **Replication**: a repeat from the same frozen inputs.
|
||||
- **Triangulation**: evidence from a different mechanism that does not share
|
||||
the first mechanism's assumptions or helpers.
|
||||
- **Decision gate**: a predeclared rule that maps observed evidence to proceed,
|
||||
reject, redesign, or investigate.
|
||||
|
||||
## Keep current and target truth separate
|
||||
|
||||
Maintain two columns throughout the record:
|
||||
|
||||
| Ledger | Authority | Permitted conclusion |
|
||||
|---|---|---|
|
||||
| Current implementation | Checked-out production composition, source, tests, deployed assembly evidence, and captured runtime behavior | What this exact tree and assembly do now |
|
||||
| Approved target | `docs/prds/01-project-management.md` and status-qualified documents under `docs/prds/architecture/` | What the project requires or has deliberately left open |
|
||||
|
||||
Treat `ARCHITECTURE.md`, comments, commit messages, Beads history, unmerged
|
||||
branches, and proposals as leads until reconciled with those ledgers. An
|
||||
approved target is authoritative for direction but is never evidence that the
|
||||
live implementation already satisfies it.
|
||||
|
||||
Use these claim labels:
|
||||
|
||||
- `observed-current`: directly reproduced or traced in the frozen tree;
|
||||
- `approved-target`: required by a status-qualified target document;
|
||||
- `candidate`: plausible and worth testing, but not accepted;
|
||||
- `open`: evidence is insufficient or contradictory.
|
||||
|
||||
## Apply the evidence hierarchy
|
||||
|
||||
Match evidence to the claim. Do not add two correlated tests and call them
|
||||
independent.
|
||||
|
||||
| Rank | Evidence | What it can prove | Required caution |
|
||||
|---:|---|---|---|
|
||||
| 1 | Captured behavior from the exact binary/config/data plus a trace through live production composition and source | What the named assembly selected and did | Record version, mode, inputs, secrets redacted, and environment; one deployment is not universal |
|
||||
| 2 | Independent protocol peer, official SDK, published conformance vector, or raw fixture captured outside Archie's helpers | Interoperability at an external boundary | Pin peer/version and preserve bytes or messages |
|
||||
| 3 | Integration, composition, legal-transition, deterministic concurrency, cancellation, recovery, and race evidence | Behavior across real internal boundaries and schedules | Prove the test uses the production handoff rather than a parallel constructor |
|
||||
| 4 | Focused unit tests, benchmarks, AST/type queries, lint findings, coverage, and source inspection | Local behavior and structural candidates | Do not infer production use, ownership, absence, or protocol compatibility |
|
||||
| 5 | Current docs, history, incident reports, issue records, branches, and proposals | Intent, constraints, and candidate explanations | Reconcile with live code; never present a candidate as current |
|
||||
|
||||
For a current-code claim, include at least one live composition/source trace and
|
||||
one independently produced check. For an external protocol claim, include Rank
|
||||
2. For a concurrency claim, include deterministic ordering plus `-race`.
|
||||
|
||||
## Run the decision-gated method
|
||||
|
||||
### Gate 0 — Declare one vertical question
|
||||
|
||||
Write one sentence:
|
||||
|
||||
> Determine whether `<current mechanism>` causes `<observable outcome>` under
|
||||
> `<named mode/input/state>`, so we can decide `<specific architecture or
|
||||
> maintenance action>`.
|
||||
|
||||
Require:
|
||||
|
||||
- question count: exactly `1`;
|
||||
- named decision owner: exactly `1`;
|
||||
- implementation edits during research: `0`;
|
||||
- meaningful falsifiers: at least `1`;
|
||||
- explicit non-goals: at least `1`.
|
||||
|
||||
Split the work if the question contains “and” between independently testable
|
||||
behaviors. A short success must still traverse one complete path from real
|
||||
input through ownership and state to observable outcome.
|
||||
|
||||
### Gate 1 — Freeze the observation point
|
||||
|
||||
Run from the repository root before changing anything:
|
||||
|
||||
```bash
|
||||
git rev-parse HEAD
|
||||
git status --short
|
||||
go version
|
||||
go env GOMOD GOWORK GOOS GOARCH CGO_ENABLED GOTMPDIR GOCACHE
|
||||
go list -m -f '{{.Path}} {{.Version}} {{.GoVersion}}'
|
||||
find . \( -path './.git' -o -path './.references' -o -path './.claude/worktrees' -o -name node_modules \) -prune -o -name go.mod -print
|
||||
```
|
||||
|
||||
Record:
|
||||
|
||||
- commit and every dirty path;
|
||||
- Go/tool versions and module boundary;
|
||||
- operating system, architecture, sandbox/host, and resource restrictions;
|
||||
- execution mode and concrete implementation;
|
||||
- configuration source and relevant effective values, with secrets redacted;
|
||||
- data/fixture identity and size;
|
||||
- exact command, exit status, output, and run time.
|
||||
|
||||
The root and `tools/` directories are separate Go modules as of 2026-07-28.
|
||||
Never blend their results. Do not run `task check` to establish a read-only
|
||||
baseline: it runs `gofumpt -w`, `go fix`, and builds into `bin/`.
|
||||
|
||||
The focused command below currently fails with `Run() = "\n"`; preserve that
|
||||
signature as a real pre-existing code failure rather than an environmental
|
||||
confounder:
|
||||
|
||||
```bash
|
||||
env GOTMPDIR=/tmp GOCACHE=/tmp/archie-research-gocache \
|
||||
GIT_CONFIG_GLOBAL=/dev/null go test ./internal/skillscript \
|
||||
-run '^TestRunWrapsExternalCommand$' -count=1 -v
|
||||
```
|
||||
|
||||
If the tree, dependency set, configuration, mode, fixture, or environment
|
||||
changes, invalidate the affected baseline and restart this gate.
|
||||
|
||||
### Gate 2 — Predict before measuring
|
||||
|
||||
State both the explanation and the null:
|
||||
|
||||
```text
|
||||
Hypothesis H1:
|
||||
Null H0:
|
||||
Mechanism:
|
||||
Primary metric/observable:
|
||||
Baseline prediction:
|
||||
Treatment prediction:
|
||||
Falsifier:
|
||||
Invariant predictions:
|
||||
```
|
||||
|
||||
Use numbers whenever the result is countable. If no dated baseline exists,
|
||||
write `predict before measurement`, choose the number or relation now, and only
|
||||
then run the command. Never backfill an “expected” value from the observed
|
||||
output.
|
||||
|
||||
Predict all of:
|
||||
|
||||
1. the primary result;
|
||||
2. one negative/control result;
|
||||
3. preserved behavior in every affected mode, adapter, or data form;
|
||||
4. the expected error or failure consequence;
|
||||
5. what result makes the experiment inconclusive.
|
||||
|
||||
### Gate 3 — Design independent controls
|
||||
|
||||
Build a matrix before execution:
|
||||
|
||||
| Variable | Baseline | Treatment | Held constant | Measurement |
|
||||
|---|---|---|---|---|
|
||||
| one intentional difference | exact value | exact value | commit, mode, data, tools, timeouts | exact command/output |
|
||||
|
||||
List confounders explicitly. Check at least:
|
||||
|
||||
- sandbox listener, process, keyring, Docker socket, and cache restrictions;
|
||||
- stale editor/compiler diagnostics versus a real `go build` or `go test`;
|
||||
- warm versus cold cache and network access;
|
||||
- test-only constructors versus production composition;
|
||||
- reused parsing, framing, constants, fixtures, or server helpers;
|
||||
- background goroutines, timing, retries, and global mutable state;
|
||||
- local module replacements and unpublished dependency checkouts;
|
||||
- dirty concurrent work and generated artifacts.
|
||||
|
||||
Require one control that would fail if the fixture or instrumentation were
|
||||
broken. For protocols, require an independently implemented peer. For
|
||||
architecture claims, require a source/type trace and a runtime or
|
||||
composition-level observation.
|
||||
|
||||
### Gate 4 — Execute without moving the target
|
||||
|
||||
Run the baseline first, then the treatment, then the baseline again when
|
||||
ordering or cache effects are plausible. Preserve raw output under a
|
||||
task-specific temporary path or in the controlled work artifact.
|
||||
|
||||
Do not:
|
||||
|
||||
- edit implementation, tests, config, fixtures, or success criteria mid-run;
|
||||
- discard outliers without a predeclared rule;
|
||||
- turn a failing hypothesis into a differently worded success;
|
||||
- replace a denied listener, missing peer, or cold dependency with a weaker
|
||||
test and claim equivalence.
|
||||
|
||||
If execution exposes a separate defect, freeze it as a new question. Do not
|
||||
fold its repair into the experiment.
|
||||
|
||||
### Gate 5 — Apply the predeclared decision
|
||||
|
||||
Classify the result exactly:
|
||||
|
||||
| Result | Action |
|
||||
|---|---|
|
||||
| Every prediction and invariant holds, controls work, and required evidence ranks are present | Mark `supported`, not “proven forever”; proceed to replication and change control |
|
||||
| A falsifier occurs with valid controls | Mark `falsified`; preserve the negative result and reject solutions depending on H1 |
|
||||
| Fixture, environment, baseline, independence, or statistical power is inadequate | Mark `inconclusive`; state the next evidence needed |
|
||||
| Current and target ledgers conflict | Record the migration gap; do not redefine either ledger |
|
||||
| Another mechanism explains the result equally well | Design a discriminating experiment; do not choose by preference |
|
||||
|
||||
Post-hoc success criteria count: `0`. Unexplained deviations count: `0`.
|
||||
|
||||
### Gate 6 — Replicate and triangulate
|
||||
|
||||
Repeat deterministic checks from a clean process. For variable measurements,
|
||||
declare the run count before starting and report every sample. Compare an
|
||||
independent mechanism:
|
||||
|
||||
- AST/type references versus runtime composition;
|
||||
- SQLite behavior versus NellDB behavior;
|
||||
- in-process behavior versus subprocess/NATS behavior;
|
||||
- raw protocol frames versus an official peer;
|
||||
- unit behavior versus race/integration behavior;
|
||||
- source expectation versus persisted reload/recovery.
|
||||
|
||||
If two checks share the same implementation helper, parser, mock, global, or
|
||||
fixture generator, treat them as one evidence source.
|
||||
|
||||
### Gate 7 — Preserve the reproducibility packet
|
||||
|
||||
Attach this compact record to the controlled issue, architecture handoff, or
|
||||
decision document selected by sibling skills. Do not create an orphan report.
|
||||
|
||||
```markdown
|
||||
## Research record R-<id>
|
||||
Question:
|
||||
Decision affected:
|
||||
Current claim / target claim:
|
||||
Tree: <commit>; dirty paths:
|
||||
Environment/mode/config/data:
|
||||
H1 / H0 / mechanism:
|
||||
Predictions: <metric | baseline | treatment | falsifier | invariants>
|
||||
Controls and confounders:
|
||||
Commands and raw-output locations:
|
||||
Observed results:
|
||||
Verdict: supported | falsified | inconclusive
|
||||
Independent evidence:
|
||||
Negative results and fenced paths:
|
||||
Open uncertainty:
|
||||
Owner and next gate:
|
||||
```
|
||||
|
||||
Preserve negative results with the same care as positive results. Route a
|
||||
recurring rejected approach to `archie-failure-archaeology`.
|
||||
|
||||
### Gate 8 — Hand off; do not self-approve
|
||||
|
||||
Send ownership/boundary conclusions to
|
||||
`archie-architecture-planning-campaign`. Send deprecation and deletion to
|
||||
`archie-technical-accountability`. Send tests and acceptance thresholds to
|
||||
`archie-validation-and-qa`, then route every behavior-changing proposal through
|
||||
`archie-change-control`.
|
||||
|
||||
Research acceptance does not authorize implementation, config mutation,
|
||||
dependency changes, deployment, data migration, or deletion. A fresh
|
||||
adversarial reviewer must be able to reproduce the packet without the
|
||||
researcher's unstated knowledge.
|
||||
|
||||
## Choose an Archie experiment
|
||||
|
||||
Write every `N`, `R`, `M`, latency, allocation, and ratio prediction before
|
||||
running its command.
|
||||
|
||||
| Question | Controlled method | Required prediction and falsifier |
|
||||
|---|---|---|
|
||||
| Are two paths duplicates? | Run `golangci-lint run --enable-only=dupl ./internal/<area>/...`; then trace both by domain effect, entrypoint, state mutation, mode, and consumer with `archie-codebase-discovery` | Predict textual candidates `N`, live authorities, and preserved differences. Falsify “one authority” with a second production-selected path that decides or mutates the same meaning. |
|
||||
| Is code dead or a one-shot abstraction? | Run `staticcheck -checks=U1000 ./internal/<area>/...`, `gopls references -d <file:line:column>`, and the discovery skill's AST construction scan; inspect registrations, Yaegi, tags, build variants, tests, and both binaries | Predict typed references `R`, production constructions, dynamic registrations, and compatibility consumers. Zero text hits alone is never the falsifier. |
|
||||
| Does configuration affect production? | Trace `key → decode → default → validate → translate → cmd/archied read → concrete component → observable`; inspect Compose passthrough separately | Predict exactly one effective owner and every production read. As of 2026-07-28, `cmd/archied` has two `config.LoadOverlay` call sites and no `LoadDir` call; `LoadDir` tests therefore do not prove production selection. |
|
||||
| Do execution modes have parity? | Enumerate the three accepted `agent.mode` values from `internal/config`; test the same input/error/cancel matrix through `inprocess`, `subprocess`, and `nats`; treat containers as a NATS deployment assembly, not a fourth mode | Predict `M` matrix rows and the exact outcome for every cell. One direct runner unit test cannot falsify a mode-wiring defect. |
|
||||
| Are persistence transitions correct? | Run shared legal/illegal transition cases against SQLite and `internal/nell`; include two stale-`from` contenders, state reload, and audit evidence under `-race` | Predict `2/2` adapters reject stale `from`, one winner, unchanged loser, and one matching audit record. Current `Store.Transition` and `Adapter.Transition` ignore `from`; classify that observation as current/open until corrected and accepted. |
|
||||
| Is a protocol compatible? | Preserve canonical bytes/messages; run malformed, partial, multi-message, timeout, EOF, and cancellation cases; then run an official or independent peer | Predict handshake/result bytes and error identity. A fake peer using Archie's `readMessage`/`writeMessage` cannot satisfy independence. |
|
||||
| Is cancellation/concurrency safe? | Use barriers/channels to force ordering; test cancel-before-start, cancel-while-blocked, close/send, retry, and shutdown; run `go test -race ./internal/<area>/... -count=1` | Predict terminal result, side-effect count, retry count, resource closure, and absence of races. Wall-clock sleep alone is not a schedule proof. |
|
||||
| Do NellDB scans meet a requirement? | Define fixture sizes `N` and `10N`; benchmark the exact adapter query with fixed data, cache state, and run count; capture `-benchmem` | Predict latency/allocation slope and acceptance bound before running. `internal/nell/adapter.go` has 14 `AllDocs` call sites as of 2026-07-28; that is structural evidence of scans, not a performance result. |
|
||||
| Did maintainability improve? | Compare owner count, production paths, package edges, public surface, config consumers, complexity findings, and files a future feature must understand; inspect every changed non-test file | Predict which counts fall, stay equal, or may rise with rationale. Linter silence and a lower aggregate score do not prove cohesion, readability, or artfulness. |
|
||||
| Is a migration parity-safe? | Build an old/new matrix across config forms, stored data, modes, peers, errors, restart/recovery, rollback, and deletion criteria; execute every supported row | Predict `M` rows and exact observable parity. A PRD or candidate branch cannot satisfy a live row. Permanent duplicate authoritative paths after cutover must be `0`. |
|
||||
|
||||
Replace `<area>` and `<file:line:column>` with concrete values recorded in the
|
||||
research packet. Use `archie-diagnostics-and-tooling` when a metric needs a
|
||||
repeatable helper rather than an ad hoc shell pipeline.
|
||||
|
||||
## Learn from settled failures
|
||||
|
||||
| Lesson | Archie evidence | Research rule |
|
||||
|---|---|---|
|
||||
| Mirrored peers can validate the same wrong protocol | MCP `Content-Length` work in `f2768eb`/`3ad57c9` passed a server using the same helpers; `dda4cde` moved live framing to newline-delimited JSON and `TestDesktopCommanderClientCompatibility` supplies an opt-in external peer | Require independent bytes or peer behavior before claiming compatibility. |
|
||||
| Green loader tests do not prove shipped wiring | `internal/config/feature_config_test.go` exercises `LoadDir`, while `cmd/archied/main.go` selects `LoadOverlay` as of the dated snapshot | Trace from a real entrypoint through the effect. |
|
||||
| A linter name is not a semantic verdict | `86cfc19` records eleven `nilerr` findings whose errors were deliberately carried through text, envelopes, shutdown, or best-effort behavior; live sites explain local suppressions | Predict the contract consequence per site before changing it. |
|
||||
| Diagnostics can measure the environment instead of the code | Listener-denied sandboxes, inherited GPG settings, read-only temp paths, and stale editor diagnostics have produced different failures from host runs | Freeze environment and confirm with real build/test output; never waive the blocked evidence. |
|
||||
| A local dependency can make a local result unreproducible | `07fb291` removed a machine-local NellDB `replace` that CI/container builds could not resolve | Use the published module and checksum path; label local-checkout evidence candidate. |
|
||||
| “Cleanup” can change behavior while looking mechanical | `308c199` changed the skillscript wrapper to `sh -c` with argument placement that now yields only a newline in the focused test | Treat every cleanup diff as authored semantics and keep the pre-change baseline. |
|
||||
|
||||
## Fence off wrong paths
|
||||
|
||||
- Do not choose success criteria after seeing output.
|
||||
- Do not let a client and fake server import the same framing, parser, or
|
||||
constants and call the result compatibility.
|
||||
- Do not change implementation, tests, config, or fixtures during baseline
|
||||
capture.
|
||||
- Do not treat a candidate branch, commit subject, comment, PRD, or old
|
||||
architecture document as live proof.
|
||||
- Do not infer dead code from text search or `U1000` alone.
|
||||
- Do not equate coverage, lint silence, or green TDD with production wiring,
|
||||
one coherent owner, or maintainability.
|
||||
- Do not suppress a negative result because the attempted slice was small.
|
||||
- Do not reduce artfulness to one complexity score; measure locality and then
|
||||
review names, ownership, cohesion, failure clarity, and deletion.
|
||||
|
||||
## Provenance and maintenance
|
||||
|
||||
Re-verify current versus target authority: `sed -n '1,180p' docs/prds/01-project-management.md && sed -n '1,180p' docs/prds/architecture/package-review.md`
|
||||
|
||||
Re-verify module and gate boundaries: `find . \( -path './.git' -o -path './.references' -o -path './.claude/worktrees' -o -name node_modules \) -prune -o -name go.mod -print && sed -n '1,180p' Taskfile.yml`
|
||||
|
||||
Re-verify configuration selection: `rg -n 'config\.(Load|LoadOverlay|LoadDir)\(' cmd internal --glob '*.go'`
|
||||
|
||||
Re-verify execution modes: `rg -n 'case "inprocess"|case "subprocess"|case "nats"|agent\.mode' cmd/archied internal/config --glob '*.go'`
|
||||
|
||||
Re-verify transition semantics: `sed -n '255,285p' internal/store/store.go && sed -n '268,290p' internal/nell/adapter.go`
|
||||
|
||||
Re-verify NellDB scan candidates: `rg -n 'AllDocs\(' internal/nell/adapter.go`
|
||||
|
||||
Re-verify protocol independence: `rg -n 'readMessage|writeMessage|TestDesktopCommanderClientCompatibility|newline-delimited|Content-Length' internal/tools --glob '*.go'`
|
||||
|
||||
Re-verify the cleanup regression: `env GOTMPDIR=/tmp GOCACHE=/tmp/archie-research-gocache GIT_CONFIG_GLOBAL=/dev/null go test ./internal/skillscript -run '^TestRunWrapsExternalCommand$' -count=1 -v`
|
||||
@@ -1,4 +0,0 @@
|
||||
interface:
|
||||
display_name: "Archie Research Methodology"
|
||||
short_description: "Turn Archie hunches into reproducible evidence"
|
||||
default_prompt: "Use $archie-research-methodology to design a falsifiable Archie experiment and decision record."
|
||||
@@ -1,400 +0,0 @@
|
||||
---
|
||||
name: archie-technical-accountability
|
||||
description: Prove that an Archie change is maintainable, owned, reachable, reversible, and simpler than the code it replaces. Use when designing, implementing, reviewing, or accepting a feature, refactor, configuration path, registry, adapter, interface, or cleanup; when tests are green but code quality is uncertain; or when duplicate paths, dead code, one-use abstractions, supersession, production wiring, or concern ownership may be hidden.
|
||||
---
|
||||
|
||||
# Archie Technical Accountability
|
||||
|
||||
Accept behavior only after proving both correctness and maintainability. Treat a
|
||||
green test as evidence about the tested seam, never as proof that production
|
||||
uses the seam or that the design has one coherent owner.
|
||||
|
||||
Use imperative runbook voice in the resulting review. Mark every conclusion as
|
||||
`proven`, `candidate`, or `open`. Do not convert absence of evidence into proof.
|
||||
|
||||
## Route the work
|
||||
|
||||
Load the sibling skill named for each responsibility:
|
||||
|
||||
| Need | Load instead or next |
|
||||
| --- | --- |
|
||||
| Select domains, boundaries, ownership, or a migration shape | `archie-architecture-planning-campaign` first |
|
||||
| Traverse an unfamiliar area, its AST, consumers, runtime paths, or history | `archie-codebase-discovery` first |
|
||||
| Classify the change and determine required gates and reviewers | `archie-change-control` |
|
||||
| Prove tests, lint, formatting, race behavior, or acceptance thresholds | `archie-validation-and-qa` |
|
||||
| Triage an active failure or unexplained runtime symptom | `archie-debugging-playbook` first |
|
||||
| Reconstruct a historical failure, revert, rejected fix, or settled dead end | `archie-failure-archaeology` first |
|
||||
|
||||
Do **not** use this skill as:
|
||||
|
||||
- a substitute for architecture planning before ownership is decided;
|
||||
- a substitute for deep codebase discovery or AST-aware call-path analysis;
|
||||
- a debugging playbook for an active incident;
|
||||
- permission to implement before the repository's change-control and TDD rules;
|
||||
- a reason to keep an obsolete path "for safety"; define a real rollback and
|
||||
deletion plan instead.
|
||||
|
||||
## Define the evidence vocabulary
|
||||
|
||||
- **Owner**: the one domain or capability accountable for a behavior, its
|
||||
vocabulary, state, rules, settings, and required service contracts.
|
||||
- **Source of truth**: the only authoritative implementation or mutable record
|
||||
for one meaning. Adapters may translate it; they must not reimplement it.
|
||||
- **Consumer**: production code, test code, generated code, or an external
|
||||
process that calls, imports, decodes, registers, or depends on the subject.
|
||||
- **Production wiring**: the executable path from a real `cmd/*` entry point,
|
||||
configuration source, or inbound adapter through composition to an observable
|
||||
effect.
|
||||
- **Parallel path**: another implementation that can satisfy the same intent or
|
||||
mutate the same state, even when names and types differ.
|
||||
- **One-shot abstraction**: an interface, wrapper, registry, service, or helper
|
||||
introduced for one call or implementation without owning policy, lifecycle,
|
||||
translation, isolation, or a stable boundary.
|
||||
- **Deletion criterion**: an observable condition that permits removing a
|
||||
legacy or compatibility path.
|
||||
- **Archaeology**: history evidence explaining why a seam exists, what it
|
||||
replaced, and which failed approach must not be repeated.
|
||||
|
||||
## Produce one accountability record
|
||||
|
||||
Attach one record to the change artifact selected by
|
||||
`archie-change-control`. Do not create an ad hoc TODO document. Complete the
|
||||
record before implementation, then update it from the final diff.
|
||||
|
||||
### Header
|
||||
|
||||
| Field | Required content |
|
||||
| --- | --- |
|
||||
| Requested outcome | One behavior stated without naming an implementation |
|
||||
| Change class | Classification from `archie-change-control` |
|
||||
| Owner | One current owner and, during migration, one approved target owner |
|
||||
| Source of truth | Current authoritative code/state and the post-change authority |
|
||||
| Scope | Packages, entry points, settings, persisted records, and contracts touched |
|
||||
| Accountable actors | Implementer and independent adversarial reviewer |
|
||||
| Status | `proven`, `candidate`, or `open` |
|
||||
|
||||
### Consumer and path inventory
|
||||
|
||||
Record every row; use `none proven` rather than leaving a cell blank.
|
||||
|
||||
| Consumer/path | Entry | Dispatch or translation | Authority called | Effect | Evidence |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| Production | command, channel, worker, poller, or startup | exact functions | exact owner | state/output | file:line and test |
|
||||
| Alternate process | subprocess, NATS worker, container, or RPC | exact contract | exact owner | state/output | file:line and test |
|
||||
| Dynamic | registry, plugin, Yaegi, callback, reflection, or config | registration/load seam | exact owner | state/output | file:line and test |
|
||||
| Tests | focused, integration, contract, race | seam exercised | fake or real authority | assertion | test name |
|
||||
| Generated/docs | generator or schema consumer | source contract | owner | artifact | generator path |
|
||||
|
||||
Block acceptance if a production row stops at a constructor, parser, registry,
|
||||
schema, test fake, or helper subcommand without reaching the running
|
||||
composition path.
|
||||
|
||||
## Run the accountability workflow
|
||||
|
||||
### 1. Freeze the behavioral claim
|
||||
|
||||
Write one sentence:
|
||||
|
||||
> When `<real entry>` receives `<input>`, `<owner>` performs `<behavior>` and
|
||||
> produces `<observable result or failure>`.
|
||||
|
||||
Reject claims such as "add manager," "add interface," or "support YAML." Those
|
||||
name an implementation, not an outcome.
|
||||
|
||||
List the behavior that must remain unchanged. Include persistence, errors,
|
||||
timeouts, concurrency, process boundaries, authorization, and compatibility
|
||||
when applicable.
|
||||
|
||||
### 2. Establish the owner and source of truth
|
||||
|
||||
Read the approved architecture requirements and the live code. Keep the two
|
||||
states distinct. As of 2026-07-28:
|
||||
|
||||
- `docs/prds/architecture/organisation.md` defines the approved target
|
||||
organization.
|
||||
- `docs/prds/architecture/dependencies-and-contracts.md` defines strict target
|
||||
dependency direction and contract ownership.
|
||||
- `docs/prds/architecture/configuration.md` requires dissolution of the current
|
||||
shared `internal/config` model; this is an approved target, not completed
|
||||
live behavior.
|
||||
- `docs/prds/architecture/package-review.md` requires current-state research
|
||||
before package decisions.
|
||||
|
||||
Answer:
|
||||
|
||||
1. Which cohesive job owns this behavior?
|
||||
2. Which mutable record or function is authoritative now?
|
||||
3. Which authority will remain after the change?
|
||||
4. Is another package allowed to mutate the same meaning?
|
||||
5. Does the proposed location reduce or increase required knowledge?
|
||||
|
||||
Block if the answer is "shared," "config," "utils," "manager," or "registry"
|
||||
without naming the behavior owner. Mechanics may be shared; domain meaning may
|
||||
not.
|
||||
|
||||
### 3. Inventory all consumers and call paths
|
||||
|
||||
Start with text and package evidence:
|
||||
|
||||
```bash
|
||||
rg -n '\bMessageEvent\b' --glob '*.go' .
|
||||
rg -n '\bMessageEvent\b' --glob '*.go' --glob '!**/*_test.go' .
|
||||
go doc github.com/samcharles93/archie-core/internal/gateway.MessageEvent
|
||||
go list -f '{{.ImportPath}}: {{join .Imports " "}}' ./...
|
||||
go list -deps ./cmd/archied ./cmd/archie-agent
|
||||
go -C tools list ./...
|
||||
```
|
||||
|
||||
Replace `MessageEvent` and its package path with the subject under review.
|
||||
Separate production, test, generated, and documentation hits. An imported
|
||||
package proves only package reachability, not function reachability. The
|
||||
`tools` directory is a nested Go module, so root `go list ./...` does not include
|
||||
it; inspect it separately whenever the change touches generation tooling.
|
||||
|
||||
Trace each real path in both directions:
|
||||
|
||||
1. Start at `cmd/archied`, `cmd/archie-agent`, or an inbound adapter.
|
||||
2. Follow construction, registration, translation, dispatch, and callbacks.
|
||||
3. Continue through interfaces to every implementation.
|
||||
4. End at persisted state, outbound I/O, or a user-visible result.
|
||||
5. Walk backward from the effect to find alternate writers.
|
||||
|
||||
Use `archie-codebase-discovery` for AST traversal. `rg` cannot resolve
|
||||
interface dispatch, method expressions, callbacks, reflection, generated
|
||||
registries, Yaegi-loaded code, or config-selected implementations. Never declare
|
||||
code dead from text search alone.
|
||||
|
||||
### 4. Detect duplicate, parallel, and superseded paths
|
||||
|
||||
Search by domain language and effects, not only symbol names:
|
||||
|
||||
```bash
|
||||
rg -n -i 'message|conversation|session|reply|acknowledg' internal cmd --glob '*.go'
|
||||
rg -n -i 'insert|update|put|delete|transition|publish|enqueue' internal cmd --glob '*.go'
|
||||
rg -n 'TODO|FIXME|HACK|XXX' internal cmd docs --glob '*.go' --glob '*.md'
|
||||
```
|
||||
|
||||
Narrow those searches to the changed behavior. Compare:
|
||||
|
||||
- inputs and outputs;
|
||||
- state read and written;
|
||||
- retry, timeout, error, and fallback semantics;
|
||||
- authorization and identity;
|
||||
- startup, shutdown, and health behavior;
|
||||
- process-specific implementations;
|
||||
- test doubles that may mirror the implementation rather than the contract.
|
||||
|
||||
Complete this supersession table:
|
||||
|
||||
| Existing path | Proposed relation | Production caller | Parity needed | Deletion criterion |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| exact path | retain, adapt, merge, supersede, or delete | exact entry | named semantics | observable condition |
|
||||
|
||||
Block if new work overlaps an existing path without one explicit relation.
|
||||
Block any indefinite "temporary" compatibility path. A dual path requires a
|
||||
named cutover, authoritative side, observation method, and deletion criterion.
|
||||
|
||||
### 5. Prove production wiring
|
||||
|
||||
For every feature, prove this complete chain:
|
||||
|
||||
```text
|
||||
real input -> loader/adapter -> application composition -> owner
|
||||
-> side effect -> observable success/failure
|
||||
```
|
||||
|
||||
Require all of:
|
||||
|
||||
- a source citation at each handoff;
|
||||
- one focused behavior test;
|
||||
- one composition, integration, or contract test that crosses the handoff;
|
||||
- a negative test proving the old/unconfigured/failed path does not masquerade
|
||||
as success;
|
||||
- an operator- or caller-visible failure when silent fallback would hide loss.
|
||||
|
||||
A decode test proves decoding. A constructor test proves construction. A
|
||||
registry test proves registration. None proves production wiring.
|
||||
|
||||
For protocols, validate against an independent implementation, published
|
||||
fixture, or official SDK. A client tested only against a server using the same
|
||||
framing/parser proves self-consistency, not interoperability.
|
||||
|
||||
### 6. Hold configuration to concern ownership
|
||||
|
||||
Classify every behavioral value as the approved configuration requirements
|
||||
direct:
|
||||
|
||||
| Class | Meaning |
|
||||
| --- | --- |
|
||||
| Invariant | Changing it changes a domain concept or wire meaning |
|
||||
| Runtime setting | An installation, identity, domain, plugin, or deployment may choose it |
|
||||
| Policy value | It controls permission, limits, routing, retry, protection, or gates |
|
||||
| Derived value | It is computed and not independently mutable |
|
||||
| Runtime state | A domain command changes it during operation |
|
||||
|
||||
For each new or changed setting, require:
|
||||
|
||||
- one domain/plugin owner;
|
||||
- type, units, constraints, safe bounds, default, and derivation;
|
||||
- startup-only, reloadable, or restart-required semantics;
|
||||
- scope: installation, identity, repository, workflow, channel, or plugin;
|
||||
- secret/sensitive/reportable classification;
|
||||
- external DTO decoding separated from the owner's runtime settings;
|
||||
- composition translation and validation;
|
||||
- an exact production consumer;
|
||||
- compatibility and last-known-good behavior;
|
||||
- documentation and tests for invalid, omitted, and explicit values;
|
||||
- removal of any superseded field or a bounded migration plan.
|
||||
|
||||
Do not deepen `internal/config` merely because it is convenient. If migration
|
||||
timing forces a compatibility edit there, label it transitional and route the
|
||||
ownership decision through `archie-architecture-planning-campaign`.
|
||||
|
||||
### 7. Challenge every abstraction and dead-path candidate
|
||||
|
||||
Use this table during manual review:
|
||||
|
||||
| Signal | Required challenge | Accept only when |
|
||||
| --- | --- | --- |
|
||||
| Interface has one implementation and one consumer | Why is dynamic substitution required? | It owns a consumer need, stable boundary, or useful test seam |
|
||||
| Wrapper delegates one operation | What policy, translation, lifecycle, or isolation does it own? | The added responsibility is named and tested |
|
||||
| Manager/registry exists without lifecycle wiring | Who starts, uses, observes, and stops it? | Production composition and failure paths are proven |
|
||||
| Exported type appears only in tests/generation | Is it a contract or an abandoned future path? | A real external consumer is cited or it is removed/labeled candidate |
|
||||
| Config field is decoded but never consumed | What running behavior changes? | Exact constructor/operation use is cited and tested |
|
||||
| Branch/fallback has no constructible input | What reaches it? | A real path and negative test exist |
|
||||
| Replacement leaves old reads/writes | Which side is authoritative? | Cutover and deletion criteria are explicit |
|
||||
| Helper exists for one call | Would direct code be clearer? | The helper names a stable concept or removes real duplication |
|
||||
|
||||
Do not keep an abstraction for hypothetical reuse. Do not delete a dynamic path
|
||||
until AST, registry, plugin, configuration, and runtime evidence are checked.
|
||||
|
||||
### 8. Justify interfaces and locations
|
||||
|
||||
Require a one-paragraph location decision:
|
||||
|
||||
1. Name the behavior and owner.
|
||||
2. Name the dependencies it may import.
|
||||
3. Name the smallest contract it needs.
|
||||
4. State why the contract belongs with the domain/capability that defines its
|
||||
meaning.
|
||||
5. State why infrastructure representations do not leak through it.
|
||||
6. State what future change should remain local to this package.
|
||||
|
||||
Reject ceremonial `entities`, `repositories`, or `services` layers; the
|
||||
approved organization document prohibits them. Reject an interface that merely
|
||||
duplicates a concrete API without narrowing authority.
|
||||
|
||||
### 9. Review readability and artfulness
|
||||
|
||||
Treat artful code as code with an obvious owner, a small surface, explicit
|
||||
consequences, and no cleverness tax. Review every changed non-test file and
|
||||
answer:
|
||||
|
||||
- Can a zero-context mid-level engineer explain the behavior without traversing
|
||||
unrelated domains?
|
||||
- Do names use the domain vocabulary rather than `helper`, `manager`, `data`,
|
||||
`thing`, or transport vocabulary?
|
||||
- Does each function perform one coherent step at the right abstraction level?
|
||||
- Are error, rollback, cancellation, and shutdown paths adjacent and visible?
|
||||
- Do comments explain why a constraint exists rather than narrate syntax?
|
||||
- Can a reader distinguish authority from adapter, DTO, projection, and cache?
|
||||
- Did the change remove more accidental concepts than it added?
|
||||
|
||||
Block if the reviewer cannot summarize owner, input, decision, effect, and
|
||||
failure in five plain sentences. Simplify before adding comments that explain a
|
||||
convoluted path.
|
||||
|
||||
### 10. Prove reversibility and deletion
|
||||
|
||||
Do not use retained dead code as rollback. Record:
|
||||
|
||||
| Concern | Required proof |
|
||||
| --- | --- |
|
||||
| Source rollback | Known-good release/change and behavioral compatibility |
|
||||
| Data rollback | Migration direction, backup, forward/backward readability, and loss risk |
|
||||
| Runtime rollback | Health signal, observation period, bounded retry, and last-known-good behavior |
|
||||
| Compatibility | Authoritative path, expiry/cutover, and removal owner |
|
||||
| Deletion | No production/test/generated consumers, parity evidence, config/docs removal, regression guard |
|
||||
|
||||
The approved recovery requirements are in
|
||||
`docs/prds/architecture/safe-change-and-recovery.md`; exact runtime-supervision
|
||||
mechanics remain under design as of 2026-07-28. Label unimplemented mechanics
|
||||
`open`; do not describe them as available.
|
||||
|
||||
### 11. Perform post-change archaeology
|
||||
|
||||
Re-run discovery against the final diff:
|
||||
|
||||
```bash
|
||||
git diff --name-status
|
||||
git diff --stat
|
||||
git log --all --date=short --oneline -- internal/gateway
|
||||
git log -S'MessageEvent' --all --oneline -- internal/gateway
|
||||
git blame internal/gateway/messageevent.go
|
||||
rg -n '\bMessageEvent\b' --glob '*.go' .
|
||||
```
|
||||
|
||||
Replace the example path and symbol. Record:
|
||||
|
||||
- which historical decision the change preserves or overturns;
|
||||
- what old path became obsolete;
|
||||
- what was actually deleted;
|
||||
- what remains transitional and why;
|
||||
- which regression test or architecture check prevents reintroduction;
|
||||
- which uncertainty still requires production evidence.
|
||||
|
||||
Then route validation through `archie-validation-and-qa` and acceptance through
|
||||
`archie-change-control`. The implementer must not self-certify the adversarial
|
||||
maintainability review.
|
||||
|
||||
## Apply blocking acceptance rules
|
||||
|
||||
Return `BLOCK` when any row lacks evidence:
|
||||
|
||||
| Blocking proof | Minimum evidence |
|
||||
| --- | --- |
|
||||
| Owner | One behavior owner; current and target separated |
|
||||
| Source of truth | One authoritative implementation/record after cutover |
|
||||
| Consumers | Production, alternate-process, dynamic, test, and generated paths classified |
|
||||
| Wiring | Real entry-to-effect chain plus integration/contract evidence |
|
||||
| Supersession | Every overlap marked retain/adapt/merge/supersede/delete |
|
||||
| Deletion | Objective criteria for every legacy/compatibility path |
|
||||
| Configuration | Owner, translation, validation, consumer, reload, and compatibility semantics |
|
||||
| Boundary | Interface and package location justified |
|
||||
| Failure semantics | Errors, cancellation, rollback, health, and observability reviewed |
|
||||
| Readability | Independent reviewer can state the path plainly |
|
||||
| Reversibility | Source, state, runtime, and compatibility rollback addressed |
|
||||
| Archaeology | Relevant history and rejected paths recorded |
|
||||
| Validation | Required evidence from `archie-validation-and-qa` |
|
||||
|
||||
Return `ACCEPT` only when all rows are proven and the fresh adversarial reviewer
|
||||
reports no surviving blocking or important maintainability finding. Return
|
||||
`CANDIDATE` for an explicitly experimental seam that is not production-wired;
|
||||
never call it shipped or complete.
|
||||
|
||||
## Learn from repository incidents
|
||||
|
||||
Treat these as evidence patterns, not legends:
|
||||
|
||||
| Incident | Repository evidence | Accountability lesson |
|
||||
| --- | --- | --- |
|
||||
| Richer message path exists beside the live path | `internal/gateway/messageevent.go`; `docs/prds/architecture/messaging-and-work-intake.md` states that adapters use `gateway.Message` while richer `MessageEvent` is unused; production-only `rg` finds no concrete live adapter use as of 2026-07-28 | Tests and a rich contract do not establish adoption; inventory callers and delete or cut over the competing contract |
|
||||
| Feature YAML loader is not the daemon loader | `internal/config/feature_config.go` defines `LoadDir`; its hits are tests, while `cmd/archied/main.go` calls `config.LoadOverlay` as of 2026-07-28 | Parsed and heavily tested configuration can still be unwired |
|
||||
| Indexing arrived as an isolated feature/settings island | `ddf624d` added indexing; `f934ef5` records undiscoverable settings and silent degradation; as of 2026-07-28 `cmd/archied` uses indexing only in the helper subcommand and does not construct `indexing.Manager` | Prove configuration surface, running composition, and observable failure separately |
|
||||
| Mirrored MCP server validated the same wrong protocol | Before `dda4cde`, the test helper in `internal/tools/mcp/transport_test.go` called the same `readMessage`/`writeMessage` functions as the client; `dda4cde` replaced LSP-style `Content-Length` with MCP newline-delimited JSON for official-SDK interoperability | A mirrored fake can preserve a shared misconception; require independent contract evidence |
|
||||
| A green tool registry needed eight adversarial fixes | `9f6c36c` records deadlock, shared-reference mutation, shallow copies, incomplete AST literal parsing, abort-on-first-error, and an over-broad register-call matcher | Test reentrancy, ownership/aliasing, partial failure, and AST false positives—not only happy-path registration |
|
||||
| Mechanical cleanup broke a focused behavior | `308c199` changed `exec.Command("echo", "wrapped")` to `exec.CommandContext(ctx, "sh", "-c", "echo", "wrapped")`; `wrapped` became shell `$0`, and `TestRunWrapsExternalCommand` returns only `"\n"` as of 2026-07-28. The same commit added 237 tracked `docs-2/node_modules` symlinks | A broad cleanup needs semantic diff review, artifact review, and focused tests; "mechanical" is not a lower evidence class |
|
||||
| Autofix nearly changed timeout semantics | `9b44bac` records `golangci-lint --fix` changing an assignment to a shadowing declaration in `internal/memory/manager.go`; it was manually restored | Inspect every automated rewrite; compilation is necessary but does not prove preserved semantics |
|
||||
|
||||
Re-verify volatile status before reusing any "as of" claim.
|
||||
|
||||
## Provenance and maintenance
|
||||
|
||||
- Re-verify architecture status: `sed -n '1,180p' docs/prds/architecture/{package-review,organisation,configuration,dependencies-and-contracts,safe-change-and-recovery}.md`
|
||||
- Re-verify live entry points and config loaders: `rg -n 'func (main|run)\b|config\.(Load|LoadOverlay|LoadDir)\(' cmd internal --glob '*.go'`
|
||||
- Re-verify message-path consumers: `rg -n '\b(Message|MessageEvent)\b' cmd internal --glob '*.go'`
|
||||
- Re-verify indexing wiring: `rg -n 'indexing\.|IndexingConfig|cfg\.Indexing' cmd internal --glob '*.go'`
|
||||
- Re-verify incident commits: `git show -s --format='%H%n%B' 9f6c36c dda4cde f934ef5 9b44bac 308c199`
|
||||
- Re-verify cleanup regression: `go test ./internal/skillscript -run '^TestRunWrapsExternalCommand$' -count=1`
|
||||
- Re-verify repository gates: `sed -n '1,140p' Taskfile.yml && sed -n '90,145p' CLAUDE.md`
|
||||
- Re-verify this skill structurally with the skill validator available in the active agent environment.
|
||||
@@ -1,4 +0,0 @@
|
||||
interface:
|
||||
display_name: "Archie Technical Accountability"
|
||||
short_description: "Prove maintainability before accepting changes"
|
||||
default_prompt: "Use $archie-technical-accountability to audit this Archie change for maintainability, ownership, supersession, production wiring, and dead paths."
|
||||
@@ -1,397 +0,0 @@
|
||||
---
|
||||
name: archie-validation-and-qa
|
||||
description: "Design, run, interpret, and review defensible validation evidence for archie-core. Use when adding or assessing Go tests, proving a red-then-green change, choosing focused versus repository-wide gates, validating production wiring or protocols, investigating race/cancellation/state-transition behavior, distinguishing sandbox failures from code regressions, or deciding whether an implementation has enough evidence to be accepted."
|
||||
---
|
||||
|
||||
# Archie validation and QA
|
||||
|
||||
Prove the behavior, integration, and maintainability claim. A passing unit test
|
||||
is necessary evidence; it is not proof that production selects the code, a
|
||||
protocol interoperates, concurrency is safe, or the superseded path is gone.
|
||||
|
||||
## Route work before testing
|
||||
|
||||
| Need | Load instead or alongside this skill |
|
||||
|---|---|
|
||||
| Classify risk, authorize mutation, choose mandatory gates, or accept/close work | `archie-change-control` |
|
||||
| Find duplicate, dead, misplaced, or unmaintainable code and test whether the change is locally comprehensible | `archie-technical-accountability` |
|
||||
| Triage an unexplained runtime or test symptom | `archie-debugging-playbook` |
|
||||
| Decide ownership, boundaries, migration, configuration responsibility, or deletion of competing paths | `archie-architecture-planning-campaign` |
|
||||
|
||||
Do **not** use this skill:
|
||||
|
||||
- to turn a design dispute into a test implementation;
|
||||
- to waive a gate because a focused test passes;
|
||||
- to diagnose an unfamiliar failure without the debugging playbook;
|
||||
- to certify maintainability without technical-accountability review;
|
||||
- to run `task check` during a read-only review or in a shared dirty tree: it
|
||||
rewrites Go files.
|
||||
|
||||
## Define the evidence terms
|
||||
|
||||
| Term | Meaning here |
|
||||
|---|---|
|
||||
| Right-reason red | The intended behavioral assertion fails against compiling code because the capability is absent or wrong. |
|
||||
| Focused test | One named test or one owning package used for fast iteration. |
|
||||
| Root suite | `go test ./... -count=1` in the repository root module. |
|
||||
| Tools suite | `go -C tools test ./... -count=1` in the separate `tools` Go module. |
|
||||
| Composition test | A test that crosses the real construction or dispatch handoff used by a binary. |
|
||||
| Independent peer | A protocol implementation, official SDK, executable, or conformance fixture that does not reuse the code under test. |
|
||||
| Environmental failure | The test cannot acquire a required host resource, such as a listener, writable keyring, executable, or cache. |
|
||||
| Code regression | The test reached the behavior under test and observed the wrong result. |
|
||||
| Evidence packet | The exact commands, outputs, tree identity, test design, integration proof, and independent review used for acceptance. |
|
||||
|
||||
## Recheck the volatile baseline
|
||||
|
||||
Treat this as a dated warning, not a permanent exception.
|
||||
|
||||
As of **2026-07-28**:
|
||||
|
||||
- A recorded unrestricted run of `go test ./... -count=1` has one code failure:
|
||||
`internal/skillscript.TestRunWrapsExternalCommand` gets `"\n"` instead of
|
||||
`"wrapped\n"`.
|
||||
- The root suite excludes `tools` because `tools/go.mod` starts a nested module.
|
||||
- No separate integration-test task or build tag exists. Embedded NATS servers,
|
||||
loopback HTTP/SMTP servers, and Git fixture commits run inside the ordinary
|
||||
root suite.
|
||||
- `TestDesktopCommanderClientCompatibility` is the one explicit external
|
||||
integration opt-in found; it skips unless
|
||||
`ARCHIE_TEST_DESKTOP_COMMANDER=1`.
|
||||
- `task check` runs `gofumpt -w .`, `go fix ./...` twice, `go vet ./...`,
|
||||
the two binary builds, and the root suite. It does **not** run
|
||||
`golangci-lint`, race tests, the `tools` module, docs generation, or the docs
|
||||
build.
|
||||
- The Gitea deploy workflow builds and pushes images, and the GitHub docs
|
||||
workflow builds VitePress. Neither workflow runs the Go quality gate.
|
||||
|
||||
This baseline means the repository-wide suite is not green. Prove local
|
||||
non-regression if work must continue, but never report the full gate as passing
|
||||
until the failure is fixed and the unrestricted suite is rerun. Route any
|
||||
acceptance decision through `archie-change-control`.
|
||||
|
||||
## Choose the required evidence surface
|
||||
|
||||
Apply every row that matches the change.
|
||||
|
||||
| Change surface | Minimum additional evidence |
|
||||
|---|---|
|
||||
| One genuinely isolated package | Right-reason red and green; whole-package test; scoped lint; formatting/fix check; prove no cross-package runtime contract changed. |
|
||||
| Cross-package behavior or shared contract | Root suite; full lint; vet/build; race suite; composition test at each changed handoff. |
|
||||
| `cmd/archied` or `cmd/archie-agent` wiring | Test from real configuration/construction through selected implementation and observable result; test missing/invalid wiring. |
|
||||
| Protocol, RPC, MCP, NATS, subprocess, or wire schema | Malformed, partial, multiple, out-of-order, timeout, cancellation, and peer-exit cases; at least one independent-peer or conformance test. |
|
||||
| Mutable shared state | Deterministic concurrency test plus `-race`; ownership/aliasing test; cancellation and shutdown proof. |
|
||||
| Store or lifecycle transition | Legal/illegal transition table; stale-`from` contenders; atomic state-and-audit proof; adapter parity where both SQLite and NellDB implement the contract. |
|
||||
| Configuration | Default, explicit, absent, invalid, compatibility, precedence, secret-reference, and production-passthrough tests. |
|
||||
| `tools/**` or generated contracts | Tools suite and lint; generator determinism/drift check; root consumer tests; docs build when rendered data changes. |
|
||||
| Docker/Compose/deployment | Configuration-to-container passthrough, network/volume/health behavior, failure visibility, and last-known-good recovery evidence. |
|
||||
| External integration | Hermetic tests first; then an explicitly authorized live compatibility run with version, environment, and observed output recorded. |
|
||||
|
||||
Do not call a change isolated merely because only one file changed. Trace its
|
||||
callers and consumers with the architecture campaign or technical-accountability
|
||||
skill first.
|
||||
|
||||
## Execute red then green
|
||||
|
||||
### 1. Freeze one behavioral claim
|
||||
|
||||
Write:
|
||||
|
||||
> Given `<input and state>`, when `<real entry point>` is called, `<owner>`
|
||||
> produces `<observable result or error>` while preserving `<invariants>`.
|
||||
|
||||
Name the failure surface, production consumer, and superseded behavior. If
|
||||
ownership or the affected paths are unclear, stop and run the architecture
|
||||
campaign.
|
||||
|
||||
### 2. Establish the pre-change baseline
|
||||
|
||||
Run the nearest existing tests before adding the repro. Record the current
|
||||
commit or supplied tree identity, existing dirty paths, command, exit status,
|
||||
and failures. Do not assign a concurrent or pre-existing failure to the change
|
||||
without a before/after comparison.
|
||||
|
||||
### 3. Write the test first
|
||||
|
||||
Make the test compile against the intended public or package contract. Exercise
|
||||
the behavior, not a private implementation sequence. Then run only the named
|
||||
test and prove:
|
||||
|
||||
- the assertion fails;
|
||||
- the failure message names the wrong behavior;
|
||||
- the fixture reached the intended branch;
|
||||
- the cause is not compilation, a missing executable, a listener denial, GPG,
|
||||
a timeout chosen too tightly, or stale generated data.
|
||||
|
||||
A compile error is not red. A test that panics in setup is not red. Deliberately
|
||||
corrupting unrelated code to manufacture red is not TDD.
|
||||
|
||||
For a behavior-preserving refactor, retain green characterization tests. Add a
|
||||
structural test only for a stable, load-bearing architecture constraint; do not
|
||||
invent a brittle implementation assertion merely to manufacture red. Have
|
||||
`archie-change-control` classify the work before proceeding.
|
||||
|
||||
### 4. Implement the smallest coherent change
|
||||
|
||||
Make the named test green, then run the owning package. “Smallest” does not mean
|
||||
leaving a second active implementation or a one-call wrapper with no boundary
|
||||
purpose. Use `archie-technical-accountability` to inspect deletion,
|
||||
supersession, dependency direction, and comprehensibility.
|
||||
|
||||
### 5. Complete the test matrix
|
||||
|
||||
Use table-driven cases. Put identities, repositories, configuration values,
|
||||
durations, states, and expected results in case fields or fixture builders.
|
||||
Never couple tests or implementation to live identities such as production bot
|
||||
names. Use named constants only when the value is itself a contract.
|
||||
|
||||
Test every reachable error path. At minimum consider:
|
||||
|
||||
- empty, malformed, duplicate, and boundary inputs;
|
||||
- missing configuration, environment references, credentials, and resources;
|
||||
- downstream returned errors, partial results, and peer exit;
|
||||
- timeout before work, cancellation during blocked work, and shutdown;
|
||||
- partial side effects, retry, idempotency, and recovery;
|
||||
- unauthorized identity or cross-scope access;
|
||||
- old configuration, stored data, or wire forms when compatibility is claimed.
|
||||
|
||||
Assert the result **and** the consequence: returned error identity/wrapping,
|
||||
persisted state, emitted event, audit entry, side-effect count, and absence of
|
||||
silent fallback.
|
||||
|
||||
## Test the seams models commonly miss
|
||||
|
||||
### Prove production wiring
|
||||
|
||||
Trace and test this chain:
|
||||
|
||||
```text
|
||||
real input -> decode/load -> binary composition -> selected owner
|
||||
-> state or side effect -> observable success/failure
|
||||
```
|
||||
|
||||
A decoder test proves decoding. A constructor test proves construction. A
|
||||
registry test proves registration. None proves that `cmd/archied` or
|
||||
`cmd/archie-agent` selects the implementation.
|
||||
|
||||
Add one test at the owning behavior and one composition/contract test across
|
||||
each changed handoff. Include a negative case showing that absent or failed
|
||||
wiring cannot report success. Structural source-string tests may protect an
|
||||
especially fragile seam, but they cannot be the only production-wiring proof.
|
||||
|
||||
### Test protocols independently
|
||||
|
||||
Do not validate a client only against a fake that calls the same framing,
|
||||
parser, constants, or helpers. That proves self-consistency.
|
||||
|
||||
Use, in ranked order:
|
||||
|
||||
1. the supported real peer pinned to an explicit version;
|
||||
2. an official SDK or independent reference implementation;
|
||||
3. published conformance vectors or captured wire fixtures;
|
||||
4. a deliberately independent minimal peer that encodes from the written
|
||||
contract without importing the implementation.
|
||||
|
||||
Keep fast in-process fakes for malformed and failure cases. Add boundaries for
|
||||
split/coalesced frames, multiple buffered messages, unknown fields, peer EOF,
|
||||
stderr noise, slow response, cancellation, and restart. For MCP, the live
|
||||
Desktop Commander opt-in is compatibility evidence; a helper server that uses
|
||||
Archie's own `readMessage`/`writeMessage` is not.
|
||||
|
||||
### Test aliasing and ownership
|
||||
|
||||
For maps, slices, schemas, options, registries, and configuration projections:
|
||||
|
||||
1. mutate the input after construction and prove owned state does not change;
|
||||
2. mutate the returned value and prove internal state does not change;
|
||||
3. mutate nested maps/slices, not only the top level;
|
||||
4. run concurrent readers/writers under `-race` when sharing is permitted.
|
||||
|
||||
### Test concurrency and cancellation deterministically
|
||||
|
||||
Use barriers, channels, fakes, and explicit clocks to force ordering. Do not use
|
||||
`time.Sleep` as the sole synchronization proof.
|
||||
|
||||
Cover:
|
||||
|
||||
- cancellation before work starts;
|
||||
- cancellation while blocked on I/O, a stream, child process, or queue;
|
||||
- child and grandchild termination for subprocesses;
|
||||
- no retry after caller cancellation;
|
||||
- start/stop and close/send races;
|
||||
- bounded drain and no goroutine leak;
|
||||
- same-repository serialization and permitted cross-repository overlap;
|
||||
- defensive copies around shared mutable state.
|
||||
|
||||
Run the race detector after deterministic tests pass. `-race` can reveal a race;
|
||||
it cannot prove the intended ordering or state machine.
|
||||
|
||||
### Test transitions as compare-and-set operations
|
||||
|
||||
For every state-changing method, table legal and illegal transitions. Assert
|
||||
that:
|
||||
|
||||
- the supplied `from` state or version is enforced;
|
||||
- two contenders starting from the same state cannot both succeed;
|
||||
- the new state and audit/event record are one atomic outcome;
|
||||
- retries are idempotent or explicitly rejected;
|
||||
- failure leaves neither partial state nor a false success record;
|
||||
- every live adapter preserves the same semantics.
|
||||
|
||||
Do not accept a test that only shows `queued -> running` succeeds. It misses
|
||||
lost updates, invalid transitions, and state/audit divergence.
|
||||
|
||||
## Run exact gates
|
||||
|
||||
Create writable, task-specific caches once:
|
||||
|
||||
```bash
|
||||
mkdir -p /tmp/archie-qa-tmp /tmp/archie-qa-gocache /tmp/archie-qa-lintcache
|
||||
```
|
||||
|
||||
### Iterate on one test and package
|
||||
|
||||
Replace the placeholders with real names:
|
||||
|
||||
```bash
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go test ./internal/<package>/... -run '^TestName$' -count=1 -v
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go test ./internal/<package>/... -count=1
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache GOLANGCI_LINT_CACHE=/tmp/archie-qa-lintcache golangci-lint run ./internal/<package>/...
|
||||
```
|
||||
|
||||
Use the same command for red and green. Record both outputs.
|
||||
|
||||
### Run the root evidence
|
||||
|
||||
Run `task check` only in an authorized, isolated tree. It mutates source with
|
||||
`gofumpt -w .` and `go fix ./...`, and writes binaries under `bin/`. Inspect
|
||||
the complete before/after diff; never let its broad rewrite hide concurrent
|
||||
changes.
|
||||
|
||||
```bash
|
||||
git status --short
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache task check
|
||||
git status --short
|
||||
gofumpt -l .
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go fix -diff ./...
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache GOLANGCI_LINT_CACHE=/tmp/archie-qa-lintcache golangci-lint run ./...
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go test -race ./... -count=1
|
||||
```
|
||||
|
||||
Expected acceptance output:
|
||||
|
||||
- `gofumpt -l .`: no paths;
|
||||
- `go fix -diff ./...`: no diff and exit zero;
|
||||
- lint: zero findings;
|
||||
- tests, vet, and builds: exit zero;
|
||||
- race suite: exit zero and no race report.
|
||||
|
||||
Do not say `task check` covers lint or race. It does not.
|
||||
|
||||
### Run the nested tools and documentation evidence
|
||||
|
||||
Run this when `tools/**`, published contracts, generated data, or their root
|
||||
consumers change:
|
||||
|
||||
```bash
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go -C tools test ./... -count=1
|
||||
(cd tools && env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache GOLANGCI_LINT_CACHE=/tmp/archie-qa-lintcache golangci-lint run ./...)
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go -C tools run ./docsgen
|
||||
git diff --exit-code -- docs-2/data/generated/contracts.json
|
||||
(cd docs-2 && pnpm install --frozen-lockfile)
|
||||
(cd docs-2 && pnpm build)
|
||||
```
|
||||
|
||||
The current docsgen command generates data only. Do not use target-only
|
||||
`docsgen all` or `docsgen check` commands from the architecture PRD until the
|
||||
live binary implements them.
|
||||
|
||||
## Separate environment failures from regressions
|
||||
|
||||
| Symptom | Classify first as | Required next action |
|
||||
|---|---|---|
|
||||
| `listen tcp ... operation not permitted`, `httptest: failed to listen`, or NATS “Unable to start” | Restricted sandbox lacks loopback/listener access | Rerun the same command in an environment that permits local listeners. Do not weaken or skip the test. |
|
||||
| Git fixture commit fails with GPG/keybox read-only errors | Inherited host `commit.gpgSign`, inaccessible keyring | Rerun with the temporary Git config override below; do not modify global Git configuration. |
|
||||
| Go or lint cache reports read-only/permission errors | Environment/cache | Use the writable cache paths above. If the module cache itself is read-only, use a prewarmed writable `GOMODCACHE`; a dependency-download failure is still environmental evidence, not a product result. |
|
||||
| Desktop Commander test is skipped | Expected default | Run the explicit opt-in only with authorization for `npx` network/download and external process execution. |
|
||||
| `TestRunWrapsExternalCommand` returns `"\n"` | Known 2026-07-28 code baseline | Treat as a real failure until fixed; do not group it with sandbox denials. |
|
||||
| Assertion reports wrong state/output after setup completed | Probable code regression | Minimize with the named test, compare pre-change baseline, and use `archie-debugging-playbook`. |
|
||||
|
||||
Use this non-persistent signing override for tests that spawn Git commits:
|
||||
|
||||
```bash
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgSign GIT_CONFIG_VALUE_0=false go test ./internal/workflow/... -count=1
|
||||
```
|
||||
|
||||
Run the external MCP compatibility check only when explicitly authorized:
|
||||
|
||||
```bash
|
||||
env ARCHIE_TEST_DESKTOP_COMMANDER=1 GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go test ./internal/tools/provider/mcp -run '^TestDesktopCommanderClientCompatibility$' -count=1 -v
|
||||
```
|
||||
|
||||
Record the external package version, network availability, platform, and
|
||||
whether the failure occurred during download/startup or after MCP exchange.
|
||||
|
||||
## Require adversarial review after green
|
||||
|
||||
Use a fresh reviewer with no implementation narrative. Give it the request,
|
||||
diff, governing contract, and raw gate outputs. Do not give it the author's
|
||||
defense of the design.
|
||||
|
||||
Require the reviewer to:
|
||||
|
||||
- rerun or inspect all applicable gates;
|
||||
- read every changed non-test file and its production callers/consumers;
|
||||
- find dead or duplicate paths and identify what the feature supersedes;
|
||||
- inspect unchecked errors, nil risks, hardcoded identity/config, and partial
|
||||
side effects;
|
||||
- inspect interface satisfaction, ownership, aliasing, cancellation,
|
||||
goroutine/process leaks, races, and state transitions;
|
||||
- verify real composition, protocol independence, deployment passthrough, and
|
||||
negative cases;
|
||||
- report findings without silently fixing them.
|
||||
|
||||
Fix blocking and important findings in a separate implementation pass. Rerun
|
||||
all affected gates, then have the reviewer verify that **zero surviving
|
||||
findings** remain. The implementer never self-certifies this pass.
|
||||
|
||||
## Enforce acceptance thresholds
|
||||
|
||||
Build this evidence packet:
|
||||
|
||||
| Evidence | Threshold |
|
||||
|---|---|
|
||||
| Scope and tree identity | Exact change claim, affected packages/processes, commit or supplied tree identity, and pre-existing dirty paths recorded. |
|
||||
| Red | Named test fails for the intended assertion; compile/setup/environment failures: `0`. |
|
||||
| Green | Named test and owning package pass; unexpected failures: `0`. |
|
||||
| Error behavior | Every reachable error path in scope has an assertion on error and consequence; unexplained paths: `0`. |
|
||||
| Wiring | At least one composition/contract test per changed handoff plus a negative wiring case. |
|
||||
| Protocol | At least one independent-peer/conformance result for changed protocol semantics. |
|
||||
| Concurrency/state | Deterministic ordering/transition tests pass; race reports: `0`; partial state/audit outcomes: `0`. |
|
||||
| Formatting/fix/lint | Formatter paths: `0`; fix diff: `0`; lint findings: `0`. |
|
||||
| Applicable suites | Scoped or root gate, race, tools, docs, and external checks selected by the matrix above; unexplained failures/skips: `0`. |
|
||||
| Maintainability | Superseded paths have keep/delete/cutover dispositions; unexplained duplicate or dead production paths: `0`. |
|
||||
| Review | Fresh adversarial reviewer has zero surviving blocking or important findings. |
|
||||
| Uncertainty | Every unproved claim is labeled `open` or `candidate`; hidden assumptions: `0`. |
|
||||
|
||||
Do not average evidence. One surviving race, wiring gap, unexplained skip,
|
||||
state-transition flaw, or blocking review finding blocks acceptance even when
|
||||
hundreds of unit tests pass. Route the completed packet through
|
||||
`archie-change-control`; testing does not itself authorize closure, deployment,
|
||||
or migration.
|
||||
|
||||
## Provenance and maintenance
|
||||
|
||||
Grounded on 2026-07-28 in `CLAUDE.md`, `Taskfile.yml`, root and `tools` module
|
||||
manifests, both workflow directories, the ordinary test suite, the Desktop
|
||||
Commander opt-in, and the live docsgen command. Recheck volatile facts before
|
||||
using them:
|
||||
|
||||
```bash
|
||||
sed -n '1,120p' Taskfile.yml
|
||||
find . -name go.mod -print | sort
|
||||
rg -n '^//go:build|ARCHIE_TEST_[A-Z0-9_]+' --glob '*_test.go' .
|
||||
rg -n 'task check|go test|golangci-lint|go vet|pnpm build' .github/workflows .gitea/workflows Taskfile.yml
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go test ./... -count=1
|
||||
env GOTMPDIR=/tmp/archie-qa-tmp GOCACHE=/tmp/archie-qa-gocache go -C tools test ./... -count=1
|
||||
go -C tools run ./docsgen -h
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
interface:
|
||||
display_name: "Archie Validation and QA"
|
||||
short_description: "Build defensible test and quality evidence"
|
||||
default_prompt: "Use $archie-validation-and-qa to design and run the evidence needed to accept this archie-core change."
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "docs-2/**"
|
||||
- "docs/**"
|
||||
- "tools/**"
|
||||
- ".github/workflows/docs.yml"
|
||||
workflow_dispatch:
|
||||
@@ -34,28 +34,28 @@ jobs:
|
||||
with:
|
||||
node-version: latest
|
||||
cache: pnpm
|
||||
cache-dependency-path: docs-2/pnpm-lock.yaml
|
||||
cache-dependency-path: docs/pnpm-lock.yaml
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: docs-2/.vitepress/cache
|
||||
key: ${{ runner.os }}-vitepress-${{ hashFiles('docs-2/**', 'docs-2/pnpm-lock.yaml') }}
|
||||
path: docs/.vitepress/cache
|
||||
key: ${{ runner.os }}-vitepress-${{ hashFiles('docs/**', 'docs/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-vitepress-
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: docs-2
|
||||
working-directory: docs
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build docs site
|
||||
working-directory: docs-2
|
||||
working-directory: docs
|
||||
run: pnpm build
|
||||
|
||||
- uses: actions/configure-pages@v5
|
||||
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs-2/.vitepress/dist
|
||||
path: docs/.vitepress/dist
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
|
||||
export default defineConfig({
|
||||
title: "Archie",
|
||||
description: "Documentation for the Archie personal agent platform.",
|
||||
lastUpdated: true,
|
||||
cleanUrls: true,
|
||||
srcDir: ".",
|
||||
srcExclude: ["README.md"],
|
||||
outDir: ".vitepress/dist",
|
||||
|
||||
head: [["link", { rel: "icon", href: "/favicon.svg" }]],
|
||||
|
||||
themeConfig: {
|
||||
logo: "/favicon.svg",
|
||||
nav: [{ text: "Architecture", link: "/architecture/" }],
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
footer: {
|
||||
message: "Built with VitePress.",
|
||||
copyright: "Archie",
|
||||
},
|
||||
},
|
||||
});
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/@algolia/autocomplete-plugin-algolia-insights
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../search-insights@2.17.3/node_modules/search-insights
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-search@5.55.1/node_modules/@algolia/client-search
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../algoliasearch@5.55.1/node_modules/algoliasearch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-search@5.55.1/node_modules/@algolia/client-search
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../algoliasearch@5.55.1/node_modules/algoliasearch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-node-http
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-node-http
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/client-common
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@babel+types@7.29.7/node_modules/@babel/types
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@babel+helper-string-parser@7.29.7/node_modules/@babel/helper-string-parser
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/react
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../preact@10.29.3/node_modules/preact
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-core
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-preset-algolia
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@docsearch+css@3.8.2/node_modules/@docsearch/css
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../algoliasearch@5.55.1/node_modules/algoliasearch
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../search-insights@2.17.3/node_modules/search-insights
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@iconify+types@2.0.0/node_modules/@iconify/types
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/engine-javascript
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/engine-oniguruma
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+types@2.5.0/node_modules/@shikijs/types
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@types+hast@3.0.4/node_modules/@types/hast
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../hast-util-to-html@9.0.5/node_modules/hast-util-to-html
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+types@2.5.0/node_modules/@shikijs/types
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../oniguruma-to-es@3.1.1/node_modules/oniguruma-to-es
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+types@2.5.0/node_modules/@shikijs/types
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+types@2.5.0/node_modules/@shikijs/types
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+types@2.5.0/node_modules/@shikijs/types
|
||||
-1
@@ -1 +0,0 @@
|
||||
../../../@shikijs+core@2.5.0/node_modules/@shikijs/core
|
||||
Loaded 100 of 376 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user