The State Store's task and event-capture stores and the conversation store
read by archied and served by archie-gateway now open on database_url.
Every serving process refuses to start when legacy SQLite data exists and no
import completion is recorded, naming archie-state-store import; a fresh
install records completion itself. The Gateway holds its Postgres serve
claim for its lifetime and releases it before the pool closes.
internal/infrastructure/postgres opens a pgx pool, checks server_version_num >= 180000, and applies goose migrations with a Postgres session advisory lock so processes starting together apply each migration once. internal/infrastructure/postgres/pgtest starts postgres:18 through testcontainers per test binary and gives each test its own database. Adds jackc/pgx/v5 v5.11.0, pressly/goose/v3 v3.28.0 and testcontainers-go v0.44.0. The database URL config, sqlc, the Compose service and the ownership lock move to archie-core-7r0x.2, where they have consumers.
Approved design for orgs and workspaces, people and agents as identities, the Cedar policy chain (instance with network rules, org, workspace, identity and workflow, object), server-derived credential scope, and one run credential per agent run. Secrets move from agent profiles to identities; event-automation.md is marked superseded where it said otherwise.
Nothing moved a binding out of draft except an unrelated edit, so a newly created binding could not be approved and the dashboard showed no Approve button. Draft is removed; existing draft rows are promoted to pending_approval when the EDA store opens.
Beads sync to a Dolt remote, so anything written into one is published.
Two beads filed earlier today named an operator host, its internal
address and its filesystem paths -- the tracker was treated as a private
store, which it is not.
The rule is stated where the tracker is described, next to the existing
one about .beads/ never reaching a commit, because it is the same class:
the tracker is not a private store. Host-specific facts belong in the
operator's memos instance, which a bead may point at.
The maintainer approved task-run-master-detail.md after the
adversarial-review round; its status moves Draft -> Approved while the
work it describes is completed and verified.
A stage filter is a command scoped to the attempt it was made on: the
rail set it against that attempt's stage list. selectAttempt and
performRetry left filters untouched, so a stage selected on attempt 2
carried into attempt 1 -- a same-named stage there rendered as selected
without ever being commanded, or the log stayed narrowed to a stage the
new attempt does not have. The stage filter now resets when the selected
attempt changes; the level filter is attempt-agnostic and survives.
The master-detail PRD absorbs the adversarial review's verified findings:
the reload claim is narrowed to the URL contract (filters are not in the
URL), the unimplemented scroll and pinned claims are dropped, the
unnamed-stage and level-filter contracts are stated, the rail inventory
is corrected, and the acceptance list gains criteria for the
command-not-binding rule, attempt-switch reset, and keyboard selection.
The five tabs gave the stage rail less than a third of the screen and
disconnected the log stream from the stage that produced it. The stage
rail is now the page's master pane, always visible; the four context
panels are the inspector and own the tab bar. Selecting a stage commands
the inspector to the log tab with that stage's filter set; clicking the
selected stage clears it. Selection is a command, not a binding -- the
operator can change the filter afterwards.
No endpoint, RPC or contract changed. tab=stages still resolves, to the
log tab; every inspector tab and attempt deep-link survives a reload.
Below the shell's 900px frame breakpoint the rail stacks above the
inspector. Design of record: docs/prds/task-run-master-detail.md (Draft,
per-run panel contracts unchanged from task-run-detail.md).
Moves event capture, mappings and bindings onto PocketBase-owned collections
in internal/infrastructure/edastore, and adds the read-only stateadmin
surface over the task database. Follow-ups included:
- the event feed cursor becomes a total order over a fixed-width timestamp
with an opaque string cursor, so it no longer depends on rowid
monotonicity;
- cron schedules get next-run arithmetic, so a cron job fires instead of
returning ErrScheduleUnsupported;
- binding and mapping edits announce on the activity stream, so a dashboard
edit is visible without a manual refresh;
- an unresolvable task identity fails closed rather than falling back to the
root forge's credential;
- tool_call events project into the tool_calls collection, which had a
schema and no writer.
Also: the branch is brought back to a passing task check, which it had not
been for the whole migration -- two pre-existing failures, an unrecorded
int64-to-string proto break and a stale generated docs artifact.
e0becd52 added docs/prds/artifact-sender.md without regenerating the
artifact, so docs:artifact:check failed at that commit. Generated from a
clean worktree at e0becd52.
docs:artifact:check has failed on this branch since 024dfbbe deleted
ARCHITECTURE.md and moved its normative content into docs/architecture;
the generated dev-docs artifact was never regenerated, so task check could
not pass. Regenerated from a clean tree (no untracked docs present).
ARCHITECTURE.md duplicated the docs/architecture tree and had drifted badly
against it: "internal/ holds ~36" against 112 packages, two of the seven
binaries listed, a Forge table listing `RepliesAfter` (deleted from the tree),
and a stated invariant ("No daemon-internal cron") contradicted by the
scheduling engine that internal/app/archied/scheduling.go composes and
main.go starts.
It was also the sole home of three pieces of still-authoritative content, so
those move rather than disappear:
- plugin engine rule (strict), the memory engine family, and the
internal/plugin/architecture_test.go enforcement note ->
docs/architecture/plugins-and-extensions.md
- intake provenance: forge poll/webhook dedup through
TaskEnvelope.IdempotencyKey, binding-stamped chat/playbook enqueue, and the
single-identity webhook-intake rejection ->
docs/architecture/messaging-and-work-intake.md
Live references are repointed from CLAUDE.md (AGENTS.md is a symlink to it),
docs/architecture, docs/guides, seven PRDs, and four .agents skills. The
heading "## Plugin engine rule (strict)" is preserved in its new home so the
existing #plugin-engine-rule-strict citations keep resolving. Generated docs
artifacts regenerated.
RELEASING.md still described two independently versioned components, GATEWAY
and RUNTIME release inputs, and a `task release:prepare` invocation that no
longer exists. It is the file someone reads to cut a release, so a stale one is
worse than none.
The PRD's version computation carried a real flaw: a commit whose scope is the
repository's own machinery could still bump the product's version, so the first
improvement anyone made to the release process would inflate it -- which is
exactly what `feat(release)` would have done to this cut. Non-product scopes
(`release`, `ci`, `docs`, `build`, `test`) now contribute no bump.
CHANGELOG.archied.md and CHANGELOG.archie.md were two version streams that
drifted: a release that moved both components had two numbers, two pages and
two tags, and a reader had to visit two files to learn what shipped.
The merged history holds 65 versions from 64 archied and 34 archie sections --
33 that both components released, 31 only archied, one only archie -- so 98
published pages become 65. A version's date is the newest of its sections'
dates, and a component whose own date differs carries it on its label, because
the history has two dates and the merge must not invent one. `## [Unreleased]`
is not a release: it gets no page, and it stays at the top of the file.
A level-two heading is where the merge could silently drop a section, so the
merge is verified by content rather than by the generator: section counts per
source, the merged version set against the exact union, and every source `###`
title present both as a substring and, after stripping the component prefix, as
an identical heading. Counting `##` headings rather than releases overcounts by
one here, which is how the empty `[Unreleased]` block was caught.
- newsgen reads one file and writes `docs/news/<version>.md`, the index, the
canonical `releases.json`, and `docs/news/redirects.json`. The redirect table
is what keeps the retired `/news/<component>/<version>/` URLs alive; it is
generated beside the pages so it cannot drift from them.
- release.sh takes one `--version`, keeps commit and tag (the Woodpecker
pipeline that will own them does not exist yet), and exits 3 when the commit
set justifies no release, so a pipeline can finish green without tagging.
- The consumers of the two files follow: the deploy workflow's tag gate and
release-notes extraction, the zip contents, the update check's changelog
links, the packaged-path note, the docs skill, and newsgen's tests.
The per-component detail survives as labelled sections inside each release, so
a reader still learns whether archied or the agent changed; what goes away is
the separate numbers and the separate pages.
A version both components released carries one heading and one date: the newest among
its sections, because a version's date is when its last part shipped. Where a
component's own date differs, that component's section label carries its own, so the
per-component fact survives the merge instead of being collapsed into the heading.
The ambiguity is historical only -- one version stream with one tag gives a version
exactly one date -- so the rule represents the merged past rather than a design that
must hold.
The same section records how the merge is verified: by content, not by the generator
exiting zero. The section count per source, the merged version set equal to the union
of both, and every title still present; a generator agreeing with the file it just
wrote is evidence of nothing.
Adding a release workflow to this repository and enabling the repository in
Woodpecker are two steps, and only the first is a file in this tree. A pipeline that
is correct and never runs is invisible until someone asks why no release happened, so
the second step is stated as a prerequisite of the design rather than left as an
assumption behind it.
The unification in this PRD is what makes a release pipeline possible, so the
pipeline design belongs in the same document rather than a second one that would
have to agree with it.
The spine: a Woodpecker workflow gates, generates the release page, runs the reviewer
over it, commits the changelog and generated pages, tags, pushes, publishes images
and triggers the site's artifact sync -- with no operator step. It triggers on a push
to main rather than a manual run, which is both what "none of it done manually" asks
for and the only trigger this estate's Woodpecker configurations are proven on.
The version is computed from conventional commits since the last release, which is
what the commit rules in this document exist for, and "no release" is a legitimate
outcome rather than an invented version. One tag also removes two of the three builds
a release starts, because concurrency keyed on a commit identifier treats an
annotated tag as a distinct ref -- a consequence of one version stream, not a
separate fix.
The part that cannot be retrofitted cheaply is tools/release.sh, so its shape is
decided here: no prompts, a version that is an argument and a reported result, a
distinct exit code for "nothing to release", and no commit, tag or push of its own
because the pipeline owns those and the script runs on every push to main.
The three CI surfaces are assigned authorities here, so the pipeline is not built in
three places with one authority. The pipeline itself is implemented next; this commit
is the design it will be built from.
Verified: prdlint caught a temporal hedge in the first draft of this text and the
gate refused the commit -- the chain works, and the finding is fixed rather than
suppressed.
A decisive one-page PRD for the release-pipeline change, per AGENTS.md's rule that a
change to settled process starts with a decision rather than a refactor.
The load-bearing decision is one version stream: GATEWAY and RUNTIME stop being
release inputs, so an operator names one version and per-component detail survives as
sections inside the release rather than as separate numbers and pages. A three-way
release forces skip values for components that did not change and lets two
components' tags drift a release apart.
It supersedes the two-component sections of docs/prds/news-and-releases.md and says
so by name, rather than leaving two documents disagreeing about how many components
there are.
The reviewer step is written from a verified invocation, not from the help text: tl
rules --lint reports "corpus ok", and tl review on a generated page reports "0
findings (0 high, 0 medium) · 1/1 files reviewed · clean". --fail-on defaults to
never, so the PRD requires the level to be passed explicitly -- without it the step
cannot refuse anything.
Documented-but-unimplemented is the deliberate state: the PRD is the artifact this
change is required to start with, and the implementation follows separately.
The v1.36.0 release note carried four things a reader cannot use. The dashboard's
seven in-browser tools and the installtype fix stay; the withheld judgement verbs,
the consequentialHint limitation and the two silent-failure notes are removed from
the release feed and moved to where an implementer looks.
- The four verbs are withheld because an agent that can approve can approve its
own work. That is settled design, so it now sits in docs/architecture/identity.md,
beside the approval-path conflict it belongs with, stated as the constraint it is:
attribution, not capability, is what releasing them depends on.
- The browser-tool surface had no home in docs/architecture, so it has one now:
docs/architecture/dashboard-agent-tools.md holds what a tool call can be
attributed to, why confirmation is a signal rather than a control, and the two
ways the surface fails silently.
Audited 1.35.0, 1.36.0 and 1.37.0 for the same class. 1.37.0 is clean. 1.35.0 carried
two build notes: a bullet recounting that a guard had never been written because it
failed, and a clause about a manager "finally" having a production writer. Both are
gone; the capabilities they were attached to remain.
RELEASING.md now carries the rule so the next release reads it: release notes state
what a reader gets, and design constraints, withheld capabilities and failure modes
belong in docs/architecture/, because a note about an absence reads as a feature to
someone who never had the thing.
docs/news/** is regenerated by task news, never hand-edited. task check passed before
this commit: the chain runs it, so a failing gate commits nothing.
Infra decoded real tokens from both clients, and two of the three facts changed
this code.
A machine token carries NO sub at all: it names its caller by client_id, and the
identity is that client. A person's token carries sub, the provider's stable
identifier for the person. The subject is now derived explicitly -- sub when
present, else client_id -- and a verified token asserting neither is refused
rather than accepted as an anonymous caller, because accepting it would let any
token the provider ever signed act as whoever the binding happened to hold. A
machine identity is therefore per client registration, one identity per client,
which is what makes per-agent identity a configuration decision rather than a code
change.
Scopes are read from either claim shape. The standard is a space-delimited scope
string and this provider also emits an scp array; reading only one shape yields no
scopes at all, which is worse than reading none deliberately.
The audience-at-authorisation-endpoint trap is pinned by a test: a token minted
without the requested audience arrives with aud empty, and the audience check
refuses it. That refusal is correct and the fix is the request the human flow
builds, not a weaker check here -- a test now fails if anyone weakens it.
The PRD records both as constraints: a person's client and an agent's client are
registered separately because a shared registration collapses the distinction the
attribution rests on, and a person's token requests the audience at the
authorisation endpoint as well as the token endpoint.
Verified: task check exit 0; internal/infrastructure/oidc passes, including
subject derivation for both token shapes and every refusal.
One identity record covers users, agents, external agents, service accounts and the
system. Authentication is delegated to the estate's OIDC provider and attribution
stays archie's. Nothing that verifies a credential, issues a session, stores a
password or checks a permission is built here, per Sam's hard requirement that
authentication and authorisation are OSS archie integrates.
Authelia is the only provider, because the estate already runs it in front of the
dashboard and it issues credentials for both kinds of caller: authorization code
for humans and client_credentials for machines, whose subject is the client's own
identifier. Each agent is its own client, so two agents are distinguishable in the
audit trail and revocable separately. SPIFFE/SPIRE is rejected on operational fit
rather than quality: it is adopted and its attestation is strictly stronger, but it
adds a control plane archie does not have and answers a threat archie does not face
while its agents run in containers the operator launches.
internal/domain/identity survives and is not replaced by the provider's directory,
because it carries what the directory does not: lifecycle, bindings and
attribution. archie owns the subject binding that ties an identity to the provider
subject asserting it -- the same bridge identity_aliases already provides from a
legacy name -- plus the lifecycle, the attribution and the identity audit trail. It
owns no credential, password, session, token, signing key or permission rule.
How an agent proves who it is: it presents a token the provider issued to its own
client, archie validates it against the provider's published keys and takes the
subject as the acting identity, so an agent holds the secret and archie holds only
public keys. A WebMCP tool call cannot be a proof of agent identity and cannot be
made one -- a page can invoke its own tools, so an agent's call and a page script's
call arrive identically and the difference does not exist on the wire. It is
attributed to the identity the request presented with its source as a hint, and it
never records that an agent acted or that a human approved. Agent-initiated action
therefore arrives on a surface that carries a credential.
Task actions gain both attributions: the acting identity, derived from the
credential and never from a supplied string, and the authorising principal whose
authority the action used. The event kind describes the actor, so
KindHumanApproved is recorded only when a human acted; an agent acting under a
standing approval records itself as actor and the human as authorising principal.
An action with no authorising principal is unattributed rather than attributed to
the actor's own authority, and the review gate's approver is the approval's
authorising principal, not the surface they used.
External agents are first-class: the same record, kind service_account, bound to
its own provider client, at the cost of a client registration and a secret to
rotate per peer. Authorisation is deferred: no engine, no policy language, no
decision point, with the credential's scopes as the only input; the decision point
goes behind a single archie interface when per-skill limits are needed.
The PRD is a development-audience page, so it regenerates dev-docs.json to 69
pages. Verified: task check exit 0, including docs:prds.
Sam's decision, recorded as requirements rather than options. A2A carries
agent-to-agent work: discovery of what a remote agent offers, delegation of a unit
of work, progress on it, and the artifacts it produces. MCP stays the tool layer --
the two are complementary, and internal/tools/provider already registers MCP
providers as optional capabilities. A2A rides archie's existing transports, which
the protocol permits: its canonical data model is Protocol Buffer messages and it
defines a gRPC binding, so archie speaks it over the gRPC and NATS it already runs.
The boundaries are requirements. internal/domain/messaging stays the human and
channel layer, because a Conversation is a ChannelID and a ThreadID and its
participants are people. internal/agentexec stays the daemon-to-worker execution
protocol, whose Request, Result, gate and budget policy A2A never carries. A2A is
an edge protocol that composes with both.
The load-bearing decision, and the one that constrains everything downstream:
archie's work lifecycle is MAPPED to A2A's, not expressed in it. An A2A task is a
view over archie's own task, and archie's status stays the record of truth. Three
gaps make the mapping partial, and each is a fact A2A's states cannot hold: A2A's
terminal states describe what the agent did, while archie's merged and rejected
describe what a forge did afterwards; pr_open hands work to a human reviewer, while
A2A's input-required means the CLIENT must send more input; and declined, parked
and dead are outcomes of archie's own policy. Adopting A2A's state names as the
persisted task status is rejected outright -- it would migrate the task store and
drop the forge outcomes that tell a caller whether the work was accepted.
An A2A agent is an Identity: the actor archie persists, versions and scopes
credentials to. A persona is prompt text with no endpoint; an agent container is
task-scoped and ephemeral; the daemon is the process that serves the identity. The
Gateway serves the card for the identity it is configured as, over the gRPC
binding's Get Agent Card operation, and the card is derived -- skills from the
catalog, identity from configuration, capabilities from what the process already
advertises -- never hand-written, and carries no secret.
archie is a server first, because the work a peer would delegate exists only inside
archie. An inbound call is authenticated at the transport by the bearer-token
interceptor the Gateway already applies: A2A carries no identity in its payload, so
the transport credential is the identity. Authorization is per skill, which is
A2A's own model. Task-scoped grants are not A2A credentials -- reusing one would let
a peer act with a worker's authority -- and the dashboard's authentication gates an
operator interface, not an agent endpoint.
The new PRD is a development-audience page, so it regenerates the development
artifact rather than the public one: dev-docs.json goes to 68 pages and
docs.json is unchanged.
Verified: task check exit 0, including docs:prds, and both docsite checks.
The site's sidebar held the landing page and one guide next to seventeen
architecture records, the migration register, the review procedure and five
PRDs. Nothing there is secret -- every development page may be read by anyone --
but a reader who wants to know what Archie is and how to point an event at it
was meeting contributor material with no signal that it was not for them.
One source tree now yields two sets: public (index, guides/) under /docs/, and
development (architecture/, prds/) under /dev/, each with its own artifact and
its own derived sidebar. archive/, inspiration/, news/ and the credential notes
stay out of both, unchanged.
Selective PRD publication is gone rather than carried over. It existed only
because settled architecture cites PRDs and a link to a held-back target fails
the generator, so five PRDs published to keep those citations alive; with both
halves of every such citation in the development set, the exception has no work
left to do. Both sets are generated in one pass over one url map, so a citation
that crosses between them resolves to the base its target is served under, and
the refusal now fires only for a target genuinely in neither set.
Widening the set exposed a scanner bug worth its own note: the link regex
matched `Resolve[T](i, src, exportPath)` inside a code span and refused the page
for a link to `i,`. Code spans and fenced blocks are now skipped, because what a
renderer draws as a link is the only thing this tool may rewrite or refuse a
page for.
docs/prds/public-and-dev-docs.md records the decision. Draft: the three choices
in it are the maintainer's, the write-up is not yet reviewed.
The landing page still opened with "archied is a resident daemon that polls a
forge", which is wrong twice over. A deployment is a set of contracted services,
not one process, and a forge is one event source among several: signed webhooks
from any sender and chat-channel messages reach the same playbook routing that a
GitHub or Gitea issue does. GitHub/Gitea was the first case, not the shape of the
product.
The intro now leads with the event path (event -> playbook -> workflow in an
isolated worktree) and says outright that sources, their fields, and the workflows
they reach are configuration rather than code. "What runs where" names the actual
services and which contract each owns. The stray "Work arrives as events." line
went with it, since the intro now states that.
Claims are held to what ships: module actions load and type-check but are not
dispatched yet, so the page promises one outcome per event, not a fan-out.
The intro stated per-task sandbox and credential isolation and daemon-owned
git to a reader who has no reason to act on it. Keep the event framing; the
enforcement detail stays in What runs where and ARCHITECTURE.md.
Regenerate docs/data/generated/docs.json with task docs:artifact.
MkDocs retires and the Astro app becomes the only public site, so the artifact is
the product and the Markdown stays the source -- the split tools/newsgen already
states for releases. tools/docsite walks the published set and writes
docs/data/generated/docs.json: every page's directory-style url, title, section and
raw Markdown body, plus the sidebar tree derived from the layout.
Three things the artifact has to get right, each of which was wrong in a draft:
- LINKS. The published pages carry relative .md links that MkDocs rewrote at build
time and nothing else will. Each is rewritten to the target page's url using the
same function that builds urls, so a link and its target cannot disagree; anchors
and scheme-qualified links pass through; assets resolve by the same rule and none
are referenced.
- FRAGMENTS. A link can resolve to a page and still be broken, because a fragment
matching no heading lands the reader at the top of a long document. Each is
checked against the target's headings, by the slug rule a table of contents uses.
- REFUSAL. A link whose target the set holds back, or whose fragment matches no
heading, fails the generator naming the file, the line and the target. This found
three citations from settled architecture pointing at two PRDs the blanket prds/*
exclusion withheld -- links that were already 404s on the published site, so the
exclusion broke citations rather than withholding drafts. Both targets are now
published, for a reason distinct from the three ratified PRDs already published.
The published set moves out of mkdocs.yml into the generator with its reasons: a
renderer reading the artifact cannot see why a page is absent. docs/data/generated
is accounted for by docsgen's generatedArtifacts, which now names this file beside
contracts.json -- one ownership registry for the directory rather than one per
writer, so neither tool reports the other's artifact as unaccounted.
docs:artifact regenerates; docs:artifact:check reproduces into memory and fails on
drift without touching the tree, wired into task check beside news:check. The
existing docs:site target is MkDocs and was left alone -- a first attempt at that
name silently ran MkDocs and produced nothing.
Verified: task check exit 0, docs:artifact:check reporting 23 pages. The artifact
carries 23 pages, no archive/ inspiration/ or news/ entry, and the five PRDs the
set declares. Coverage: the published set and its count, url derivation, the nav
tree, both refusal paths, and check's no-write guarantee.
* feat(workflow): post line-anchored review comments with suggested fixes
Bead archie-core-q9au (docs/prds/inline-review.md). A review's findings reached
the operator only as a flat list in the PR body, so the author had to map every
finding back to its line by hand and apply mechanical fixes by hand. Now the
line-anchored findings are also posted as inline review comments, carrying a
one-click suggestion when the reviewer could state the fix.
Domain (internal/domain/workflow):
- ReviewFinding gains Suggestion; Validate rejects one on anything but a
confirmed finding, so the agent's record_finding call is refused with
something it can act on. Validate splits into validateAnchor /
validateClassification / validateDisposition, which also brings it back under
the cyclop limit the gate enforces.
- StagePostReviewComments runs after StageOpenPR in the implement workflow. It
posts only line-anchored findings (Line > 0); a whole-file finding has no line
to attach to and stays in the body list, which remains the complete record.
It is best-effort: the PR is open and the body already lists every finding, so
a failed comment is logged, never a park -- the same reasoning as OpenPR's
existing best-effort LinkBranch call.
- The suggestion fence is gated on Verdict == confirmed where the fence is
written, because it is a one-click apply: a wrong suggestion breaks the code
and the author has to notice.
Forge (internal/forge): ReviewCommentWriter + GitHub/Gitea implementations,
type-asserted like PullRequestReader so a forge that cannot is skipped rather
than faked (NoopForge is pinned as not satisfying it). GitHub loops one
CreateComment per comment and joins the failures, so one refused anchor cannot
drop the rest; Gitea carries them on a single COMMENT-state review.
Two deliberate departures from the PRD's sketch, both recorded in it:
- The interface is batch (CreateReviewComments), not one call per comment:
Gitea's only inline shape is one submitted review, and the set then crosses
NATS once instead of once per finding.
- The head SHA is resolved inside each forge implementation rather than by the
caller. The stage runs in archie-agent, which holds no forge credentials and
has no PullRequestReader; the daemon-side forgerpc handler is the only place
that does.
Transport (internal/forgerpc): workflow.Forger gains the method, so the agent
reaches the daemon over the new create_review_comments subject; the server
type-asserts the writer and answers an incapable forge with an error the stage
logs. This is the one proxied method whose absence on an image skew does not
park a task.
The reviewer prompt and record_finding schema ask for a suggestion on a
confirmed, mechanically fixable defect only.
Regenerating the wfextract symbol table -- the documented way a new exported
workflow symbol reaches interpreted stage plugins -- also picked up symbols that
were missing from the committed table (the Status* and Source* constants,
ReviewCheck, Store, Task, and the _Store wrapper). Nil-guards were re-applied to
every wrapper afterwards, as that file's header requires.
Evidence: task check exit 0 (incl. 229 UI tests). Three mutations of the new
stage logic each fail a test that names the behaviour -- dropping the
confirmed-only gate, dropping the Line > 0 filter, and letting a posting failure
escape -- so the tests discriminate rather than passing vacuously.
* fix(build): drop the Dockerfile pin assertion
The guard fetched golangci-lint's go.mod at image build time to fail the build
when GOLANGCI_LINT_VERSION and GOFUMPT_VERSION disagreed. It only ever tripped
on self-inflicted pin drift, but it added a network fetch and a new failure
mode to the release build, which is not where that belongs.
The pins stay correct (golangci-lint 2.13.2, whose vendored gofumpt v0.11.0
equals GOFUMPT_VERSION) and the comment above them still states the invariant,
so the reasoning survives without the build-time machinery. The pin change
itself reaches the agent image through the normal release path: CI rebuilds
and pushes archie-agent on an archie/vX.Y.Z release, and a gateway-only
release deliberately does not.
* feat(workflow): add the remediate workflow for PR review remediation
Implements step 5 of docs/prds/pr-review-remediation.md: a remediate
workflow that resumes the task's existing worktree onto its PR branch
(worktree.Manager.Resume, not Prepare's refresh), runs a builder agent
against the review's actionable comments, commits and pushes to the
same branch, and replies via the forge's ReplyToReview. Task.RetryCount
doubles as the remediation round counter, capped by the repo's
max_retries; the round-cap stage parks the task and posts one comment
when it's hit.
Task gains a ReviewPayload field (JSON-encoded review unit) with full
store/proto/staterpc plumbing. workflow.Forger gains Comment and
ReplyToReview, proxied to archie-agent via a new forgerpc RPC. Resume
and its Dir lookup are added as an unexported optional Trees capability
rather than widening the exported interface, which is already at
golangci-lint's interfacebloat cap and is projected into wfextract's
Yaegi symbol table for repository-authored stage plugins.
The daemon-side reaction consumer that dispatches into this workflow
(subscribing ARCHIE_REACTIONS, grouping comments by review, enforcing
per-task serialization) is tracked separately in archie-core-8li9.4.
* feat(messaging): extract standalone messaging service binary and process composition
* feat(messaging): adapt channel frontends to consume Gateway ChatContract
* feat(messaging): remove in-process channels and Router from daemon bootstrap
Telegram, email and webhook now run only in the Messaging Service, which
reaches this process through the Gateway's ChatContract. The daemon builds
no channel and no gateway.Router, so the wiring that existed only to serve
them goes with it: setupGateways, setupEmailGateway, setupWebhookGateway,
setupTelegramGateway, buildTelegramRouter, makeTelegramReload and the
release-announcement path helper.
The seams those paths owned move to where they can still be honoured:
- Channel ValidateConfig runs in archiemessaging.compose, which now returns
an error, so a configured-but-invalid front-end fails the service rather
than being dropped silently.
- The inbound rate limiter moves to the Gateway process, which owns the only
Router and therefore the only place a per-sender budget applies to every
channel's turns.
- The daemon's gateway readiness probe becomes a ContractProbe against the
Gateway. It cannot observe a channel lifecycle it no longer runs, and a
channel-count probe would have reported every daemon degraded.
- telegramSetup is now chatSetup (in chat_setup.go), trimmed to the fields a
chat turn runner actually reads.
Telegram operator features that were wired only in the daemon (/update,
release announcements, version reporting, SIGHUP reload) are not yet wired
in the Messaging Service: archie-core-8cda.6.6. Channel lifecycle reporting:
archie-core-8cda.6.8. The Gateway process builds no worktree manager, so
review_pr is unadvertised on every channel: archie-core-8cda.6.7.
* feat(messaging): re-wire the Telegram operator surface in the Messaging Service
setupTelegramGateway satisfied eight telegram.Gateway seams from the daemon's
own process. Each is resolved by where the fact it needs is owned, not by
where it used to be built; the decision table is in
docs/architecture/migration-decisions.md.
Wired here: /update (built from this service's own [chat.telegram] check and
install commands), the update-report relay (same sha256(bot_user)[:8] path the
daemon wrote, so a pending report is found rather than written afresh),
show_tool_calls, and /restart's config reload, which re-resolves the token and
allowlist from this service's own file and refuses a reload that resolves to
an empty token.
/version is sourced from the Gateway: ChatSnapshot gains a Version field
carrying the Gateway's rendered build block, read per call and bounded by the
dependency timeout. cmd/archie-messaging deliberately takes no version
ldflags, so it cannot report a partial upgrade as a matched one.
RunningVersions and ReleaseAnnouncements stay nil. Both need a component's
real running version, and the only versions this process can obtain are a
different binary's stamps -- reporting them would manufacture exactly the
false success the update check exists to catch, and the announcer without
parseable versions is a no-op that reads as configured. archie-core-8cda.6.9
carries the contract that unblocks them. Dangerous stays nil: no composition
has ever supplied a command authority.
Enrich is dropped from the update service: componentInstallTypeEnricher read
[nats], which this service must not decode, so the check command's own
reported install type stands.
* fix(workflow): guard inline review comments against head drift
Two findings from the review of q9au.
A comment's line numbers describe exactly one revision of the branch, but the
forge resolved the pull request's head at posting time -- after the review had
already read the worktree. A push in that window (a collaborator, a retry) meant
the findings were anchored to whatever now occupied those lines, mislabelling
instead of failing. The revision the review measured now travels with the
comment set: OpenPR records it from the same worktree read it already performs
(TaskContext.ReviewedHeadSHA), StagePostReviewComments threads it through
Forger to forgerpc, and the forge refuses the whole set once the head it reads
has moved off it -- which the best-effort stage logs, the PR body remaining the
record. An unmeasured revision posts unverified rather than dropping every
finding, so a worktree that cannot report one degrades instead of regressing.
Suggestion was documented single-line only, because GitHub applies a suggestion
fence up to its first line and a multi-line replacement would silently corrupt
the file. Only the verdict was validated, so a multi-line suggestion reached the
renderer and posted as that truncated fence. Validate now rejects an embedded
newline, which makes record_finding refuse it with feedback the model can act on
instead of the reviewer discovering the corruption later.
The selection criteria alone left workflow optional and defaulted an omitted
or unrecognised value to implement, so a decide call could still skip the
decision and send an unsettled capability straight to the builder.
Omission is now a retryable rejection: CaptureTool gains RequiredWhenTrue, a
conditional requirement a flat RequiredFields entry cannot express, because
the close-without-change branch has no workflow to name and must not be made
to invent one. A rejected call is not recorded, so it does not consume
MaxCalls and the model retries with the field.
A value outside the enum now fails the stage rather than degrading to
implement: reaching OnResult with one means the model ignored its own schema.
Splits validateCaptureArgs into per-constraint checks (cyclop) and carries
the regenerated contracts.json.
All ten `archie-*` skills carried claims that no longer matched the
checkout. Re-verified each against code, git history, and the shipped
configuration, then corrected the drift.
Structural changes the skills had not caught up with:
- Composition root moved: `cmd/archied/main.go` is a ~30-line dispatcher
into `internal/app/archied.Run()` with wiring in `bootstrap.go`. The
skills still described `cmd/archied` as the wiring site, which also
silently zeroed the diagnostics delivery snapshot.
- Config decoding moved out of `internal/config` into
`internal/infrastructure/configuration`. `config.Load` / `config.LoadDir`
no longer exist; the loader is `configuration.New` + `Loader.Resolve`.
- Task contract moved to `internal/domain/storecontract`, with
`internal/store/interface.go` holding aliases only. The task type is
`internal/domain/workflow/task.Task`.
- `internal/workflow` became `internal/domain/workflow`; `internal/storerpc`
became gRPC `internal/infrastructure/staterpc`; `internal/policy` does not
exist.
- `Store.Transition` now guards on `from` and writes status plus history in
one transaction. Three skills still described the old non-atomic behavior
as current and open.
- `internal/domain/{messaging,workflow,workintake}`, `internal/eventbus`,
`internal/app`, and `internal/infrastructure` now exist.
`internal/domain/{agent,identity}` and `internal/policy` remain target-only.
Tooling and environment facts:
- Go 1.27.0 (root and tools modules), golangci-lint 2.13.2, staticcheck
2026.2.1; snapshot dates and HEAD moved to 2026-09-18 / 2e1e1549.
- Re-ran the bundled diagnostics and re-baselined its snapshot table.
Confirmed 78.6% store coverage, a clean race run, and zero dupl findings.
- Corrected the claim that no `.dockerignore` exists; it does.
- Replaced skill script paths that pointed at the untracked `.claude/skills`
symlink with the canonical tracked `.agents/skills` location.
- Fixed the delivery-snapshot comment's wrong commit hash for the Gitea
workflow removal (dd9bddc2, not e539048).
Findings the verification closed:
- The VitePress site and `.github/workflows/docs.yml` were removed
(84b32694); the Gitea workflow was dropped (dd9bddc2).
- The changelog `vX.Y.Z`-vs-`X.Y.Z` contradiction is settled, not open: both
changelogs and the CI gate agree on `## [<version>]`.
- Tracked `docs/node_modules` and the skill-script test regression are
settled, not current.
- The six unmerged `origin/fix/*` and `origin/feat/*` candidate branches no
longer exist.
Also regenerates `docs/data/generated/contracts.json`, which the
verification found stale since 4b340d2b: docsgen emits 11 schemas now, and
`MediaAttachment.raw` plus an `AgentExecutionResult.required` field were
missing. `cmp` passes after regeneration.
Verified with `task check` (green).
Task runs now preserve real model context limits, provider usage, baseline-repair spend, commit identity, durable agent-finish telemetry, and useful timeline details without imposing a token cap. Dashboard forge links are canonical per owning GitHub or Gitea identity. Chat turn claims acquire SQLite writer intent before reading, eliminating the concurrent SQLITE_BUSY snapshot race.
Render completed ToolCallEvents as Telegram-safe streaming blocks
with compact name/status and a short cleaned preview. Summarize
file contents and listings instead of dumping source or quoted
JSON. Collapse repeated legacy turn-budget failures.
Remove max_tokens turn gating and the 200000 turn_budget_chars
default so absent or commented config cannot restore an aggregate
cap. Keep per-result max_result_chars and spill.
Confine find/grep discovery to the active workspace/worktree.
Refs #604
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.