41 Commits
Author SHA1 Message Date
sam 4db38e0d2a chore: add .codebase-memory plugin to .gitignore 2026-11-19 10:09:54 +11:00
sam 99a3d675a8 chore(deploy): staging stack for the single binary on nebula (#1998) 2026-11-15 17:05:53 +11:00
sam b509397e8d build: add task dist, build the dashboard once, cache Go in image builds
`task dist` builds the binaries release.json names into dist/ with the
compiler flags `build` uses, so after the gate has built bin/ it only links.
`build` is now static (CGO_ENABLED=0), like what ships.

`ui` runs once per task invocation: check built the dashboard, then build's
dependency built it again under the Go steps that embed it.

Both Dockerfiles compile with cache mounts for Go's module and build caches.
2026-11-10 10:56:12 +00:00
sam 514219b6a5 chore: ignore the pnpm store agents create in the worktree
deploy / plan (push) Failing after 4s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-08 23:53:17 +11:00
sam f759387eb7 chore: ignore the fleet run directory 2026-11-08 02:48:29 +11:00
sam d6ca6a72a5 build(ui): build the dashboard in CI and the Taskfile instead of committing ui/dist
deploy / gate (push) Successful in 4m28s
Quality / check (push) Canceled after 1m27s
deploy / archied-image (push) Successful in 3m29s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
2026-11-01 22:07:36 +11:00
sam ec9bf5feb2 docs: track work in Gitea issues instead of beads
Every one of the 1709 tracker issues was created in Gitea and checked field by
field against its source record: title, body, state, label set, assignee,
comments, dependency edges and epic label. All 1729 beads are closed, citing the
issue that carries each one, and .beads is removed.

Three differences are deliberate: Gitea truncates titles at 253 characters, so
three long titles keep their full text in the issue body; Gitea refuses a mutual
dependency, so five symmetric relates-to links exist in one direction; issue 497
carries its fix from e3b1103f.
2026-10-29 23:22:35 +11:00
sam 3e437d4275 chore: remove dashboard-v2, archived out of tree 2026-10-27 01:54:05 +11:00
sam c7e12b56d0 feat(dashboard-v2): scaffold Astryx app with system status slice 2026-10-26 23:40:47 +11:00
sam 35e72d81ff chore: ignore archipelago marketplace symlink 2026-10-03 23:20:13 +10:00
sam 7e98ca254c chore: remove obsolete gitignore entries
The diff only trims three ignore rules (`.impeccable/`, `.serena/`, `/site/`) and their associated comment from `.gitignore`, so a single subject line captures the whole change.
2026-10-03 23:07:24 +10:00
sam 0d35e753b5 refactor: format markdown files using prettier, fix spelling concerns, reduce Taskfile bloat 2026-09-25 01:10:28 +10:00
sam 5b7232c19f chore: ignore local development certificates
An mkcert-generated private key was created in the repository root while
setting up a secure context for local WebMCP work. It was untracked and
unignored, so any 'git add -A' would have committed it; the key now lives in
~/.config/archie/tls and these patterns keep the next one out.
2026-09-22 14:11:55 +10:00
sam c1ebc23985 docs(site): make docs/ buildable as a documentation site
Adds an mkdocs.yml, a landing page, and `task docs:site` / `task docs:serve`.
Deliberately hosting-agnostic: MkDocs is the same input Backstage TechDocs
consumes, so choosing where this lands later costs nothing.

exclude_docs holds back four subtrees, since everything under docs/ would
otherwise be published. archive/ is superseded design and would compete with
the current architecture for a reader's attention; inspiration/ discusses
other products by name; prds/ are open decisions rather than settled design;
github-token.md is credential setup. One PRD is let back through because
architecture/migration-decisions.md links to it three times, and a page
excluded out from under a live link is just a 404 with extra steps.

No nav block. MkDocs derives it from the directory layout, so a new page
under docs/architecture/ publishes without a second edit, and there is no
hand-maintained tree to drift against the repository.

Builds --strict, so a dead internal link fails rather than ships.
2026-09-18 13:16:09 +10:00
sam fa8b608c1f chore(tools): add reachaudit reachability report tool
Reports completion state rather than intent: walks the tree, finds
code no shipped binary can reach, and attributes each finding to its
package with provenance and tracker status, so "is it implemented?"
and "is it reachable?" are separately answerable.

Advisory only; it never proposes deletion.

Also ignore .local/ (gh CLI state created inside the tree).
2026-09-13 14:48:17 +10:00
sam de150f2068 chore(docs): remove the VitePress site and its build step
The docs site was never published: GitHub Pages is not configured for this
repository, so the workflow built and uploaded a site nobody served. docs/ is
repository documentation — Markdown read in the repository, an editor, or the
forge's file view — and does not need a renderer.

Removed:

- docs/.vitepress/config.mts, docs/package.json, docs/pnpm-lock.yaml (1620
  lines), docs/pnpm-workspace.yaml
- docs/index.md (the site's landing page)
- .github/workflows/docs.yml (pnpm install, VitePress build, Pages deploy)
- the docs build-artefact ignores from .gitignore

Kept and corrected:

- docs/prds/01-project-management.md linked its decision documents with
  VitePress root-absolute paths (/architecture/...), which only resolve under a
  site build. Repointed to repository-relative paths.
- docs/architecture/generated-documentation.md named VitePress as the renderer
  throughout. Now records the renderer and publishing surface as an open
  decision, with the consequences stated: reference pages unrendered, no link
  checker, no authoring server. Also corrected three claims that were never
  true — the docsgen all/check subcommands and the docs:* tasks do not exist,
  and no pre-commit hook is installed.
- .agents skills: build-and-env and docs-and-writing no longer describe a docs
  site to build; the diagnostics scripts drop .vitepress skip rules and the
  dead github_docs_build scan.

Generated output is unchanged: docs/data/generated/contracts.json and the
docsgen toolchain are untouched, and tools/ remains its own module.
2026-09-12 01:01:12 +10:00
sam 32a73deafe chore: update gitignore 2026-09-09 23:29:11 +10:00
sam 659e914cf1 chore(beads): stop tracking issues.jsonl/interactions.jsonl in git
Dolt is the source of truth and already syncs via its own git+ remote
(bd dolt push/pull). Committing the JSONL export separately produced a
steady stream of no-op "chore(beads)" commits that skewed commit counts
without adding information. Untrack the export files, disable
export.auto/git-add, and drop the beads-commit step from CLAUDE.md's
Session Completion Protocol.
2026-09-05 20:37:45 +10:00
sam 61e7fd3068 feat(webui): dashboard-aware chat — Archie sees the page, points you there
The web chat is now a persistent slide-over drawer available on any page
(not just the /chat route), and the agent is told which dashboard page the
operator is on so it can point them to the relevant page with a clickable chip.

Backend (gateway):
- Message gains a per-message Page field; the system prompt renders it in
  the <env> block (Current page), so Archie knows where the operator is.
- New dashboard_tools.go: a DashboardPages registry plus two web-only tools
  — page_index (lists every page and what it shows) and dashboard_navigate
  (validates a path, returns {path,label}; rejects unknown/empty paths).
- The web chat sink emits a dedicated navigate stream event when the model
  calls dashboard_navigate, independent of ShowToolCalls.

Frontend (webui):
- chat sends currentPage() (location.hash) with each stream request; a
  dashboard_navigate result renders as a clickable link chip (href=#/path).
- The chat is mounted once in a slide-over drawer with a topbar launcher,
  scrim and Esc-to-close; /chat opens the drawer instead of a second page.
- ui/dist rebuilt (committed) with the bundled changes.
- .gitignore: ignore .impeccable/ (impeccable tool critique snapshots).

New capability (per scope discipline): designed in
docs/prds/dashboard-aware-chat-navigation.md.

Tests: dashboard_tools_test (registry, resolve/reject, web-only gating),
prompt page-line cases, webui Message.Page + navigate-frame capture, and
chat-tools chip tests. task check is green.
2026-08-28 22:28:10 +10:00
sam cb4434c5ef bd init: initialize beads issue tracking 2026-08-14 01:59:56 +10:00
sam 9187f023c3 chore: drop residual beads tooling from build and lint config
Beads was removed as the issue tracker in 8bf0f6b, but five files still
referenced it. The Dockerfile one had real cost: every agent container
downloaded and installed bd v1.1.2 into the image for a tool the project
no longer uses.

- Dockerfile: remove the beads install stanza
- .golangci.yml: the godox comment told agents `bd create`; tracked work
  now lives in GitHub Issues
- .air.toml, .dockerignore, .gitignore: drop .beads exclusions

Old archie-core-xxx identifiers in git history do not resolve to anything;
all 416 issues were migrated by title, which is how they must be matched.
2026-08-09 18:10:11 +10:00
sam 68ba3456ee feat(webui): chat from the dashboard
Brings the chat surface to the Web UI: /api/chat with its own handlers
and tests, a self-contained ui/src/chat feature folder, and the shared
plumbing to reach the same router Telegram uses.

Includes a dangerous-command approval path (internal/gateway/dangerous.go,
internal/webui/dangerous.go, and the Telegram counterpart) so /rollback
and /stop are gated the same way on both surfaces, persona handling for
web sessions, and release-update formatting split out of the Telegram
service so both can render it.

web_parity_test.go pins that the two surfaces expose the same commands.

Authored in a parallel session; committed here so it lands with the rest
rather than sitting uncommitted while other work builds on top of it.
task check passes with it in place.

Screenshots used while building are gitignored (*.png) rather than
committed, matching the call made on the earlier design reference.
2026-08-05 10:48:51 +10:00
sam d6e00415fa chore: drop the opspulse design reference
The screenshot was a one-off reference for the dashboard rebuild, never
committed, and its gitignore entry only existed to keep it out. Both are
gone.
2026-08-05 04:04:23 +10:00
sam 170fe0250b fix: close the duplicate-work loop and the dead paths around it
Applies the four-reviewer pass over the forge/dashboard-actions work.
The through-line is that several capabilities were wired but inert, and
one of them could cost real work.

DUPLICATE WORK. "Closes #N" was dropped from PR bodies in favour of
LinkBranch, which is sidebar linkage on Gitea and a no-op stub on
GitHub -- neither closes anything, and nothing else did either. So a
merged task left its issue open, labelled and assigned; the next poll
re-enqueued it, and once the dashboard's Clear removed the task row that
became a second implementation and a second PR for work already merged.
reconcilePRs now closes the issue on merge, and a rejected task closes
its issue too. A PR closed without merging deliberately leaves the issue
open: that usually means "try again".

MAX RETRIES. Configured, defaulted and reported by /api/config, and
enforced nowhere -- markDead was unreachable and EffectiveMaxRetries had
no callers, so the dashboard's retry incremented retry_count forever.
The retry action now retires a task to dead at the cap.

DEAD ON ARRIVAL. Tasks() never selected plan or source, so the
"Decision required" panel could not render and chat tasks -- whose issue
number is synthetic -- linked to forge issues that do not exist.

COSMETIC FAILURE, FATAL RESULT. OpenPR failed the whole stage when
LinkBranch errored, so the pull request was never opened and the task
parked; a retry re-links the same branch, which Gitea answers with a
conflict, so every retry parked again. It is best-effort now.

INVISIBLE ACTIONS. Approve/retry/reject wrote store rows and nothing
else, so the timeline and activity stream never showed that a human had
intervened. They emit events now.

Also: store write failures answer 500 rather than 409; the dashboard
surfaces the server's actual reason instead of "409 Conflict"; action
buttons stop propagation (acting on a task no longer also expands it),
disable in flight, keep per-task errors instead of one shared string,
and confirm before rejecting.

Removed: the maybeRetryParked shim and markDead with their now-vacuous
tests, WaitingTasks (no consumers; its tests were rewritten to assert
the same routing through TaskByID), write-only Daemon.Runtime, and
dir/dirs response bloat from /api/skills. skillSource checked workDir
before sharedDir, mislabelling every shared skill when the two are equal.
DefaultRoots now dedupes roots differing only by a trailing separator.

The air build rule claiming to keep ui/dist current never ran -- it
required one file to satisfy include_dir and include_file together, and
ui/ is excluded from the walk. Deleted with the comment that promised it.
task test:ui joins task check and CI; it ran nowhere before, so the
dashboard suite could rot silently.

Docs corrected where they described behaviour that no longer exists:
parks no longer comment on the issue, state labels no longer drive
retries, and forgerpc's doc claimed four proxied methods while listing
three of five.
2026-08-05 03:54:25 +10:00
sam 4d44ef76f5 feat(webui): rebuild the dashboard
The old UI was a single 200-line Go file serving one hand-written HTML
page of task rows. It showed that archied was running and almost nothing
about what it was doing -- skills, workflows, memory, channels, logs and
configuration were all invisible unless you read the source or the
config file.

The dashboard now covers each of those as its own section, built as a
Vite app under ui/ at the repo root: it is a separate artefact from the
Go daemon, not an internal package of it. dist/ is committed so building
archied never needs a Node toolchain, and the !no_ui build tag keeps an
embed-free build available.

Both sides are split by concern rather than by layer -- one Go file per
API area, one folder per UI section with its own CSS -- so a change to
logs cannot disturb tasks.

Pages report consequences, not just state: an empty memory page says
Archie starts every conversation with no recollection of earlier ones,
and the setup checklist names what is missing in plain language instead
of showing a grid of zeroes. Nothing greets by a hardcoded name; the
operator comes from [chat], which is deployment data.

Auth is exposure control, not capability control -- the agent already
holds this user's authority through its own tools. So a loopback bind
needs no token, and only a reachable bind mints one and logs a URL,
which means an instance cannot be exposed merely by omitting config.

Container startup now degrades instead of aborting, for the reason
resolveForge already does: a missing agent image should not deny the
operator chat and the dashboard, and under Restart=on-failure it turns a
recoverable problem into a crash loop with the real error scrolling past.

`task dev` runs the daemon under air and the Vite server together in one
terminal.
2026-08-04 01:45:36 +10:00
sam cfec693716 chore: update NellDB to v0.3.0
- Add .pi-subagents/ to gitignore
2026-08-03 19:08:10 +10:00
sam f4bf755727 chore: untrack build artefacts and local agent tooling
None of these belong in the repo, and .gitignore already said so for
three of them -- adding a pattern does not untrack what is already
committed.

- .codex/: bd init's Codex hook wiring, local tooling
- .references/skills-implementation.md: one stray from an ignored dir
- task.json: a runtime artefact, not config. The daemon writes one per
  task into the container's worktree mount; this was a leftover brief
  for issue #57 that an agent committed from its own checkout.
- archie-agent: a 50MB host-built binary. /archied was ignored but
  /archie-agent was not.
2026-07-31 01:13:30 +10:00
sam 2eae457e7b chore: untrack committed docs node_modules
248 pnpm files were tracked under docs-2/node_modules. Untrack them and
ignore node_modules, vitepress cache/dist, and crew scratch.
2026-07-29 03:17:32 +10:00
sam 18948ac0e3 chore: remove accidentally-committed build/test scratch artifacts
.gotmp/ (Go build cache and test temp-dir output, created as a
workaround for a tmpfs disk-quota issue in this environment) got swept
into a prior commit by a broad `git add -A`. Remove it and gitignore
the directory so this doesn't recur.
2026-07-27 04:43:37 +10:00
sam b95993c44a fix: address adversarial review findings (21v + 19v)
Session persistence (21v):
- Mutex coverage on all nellSessionStore read operations
- Router.Store nil guard in handleStatus()

Config (19v):
- Remove dead code no-op in finalize() (Label='' assignment)
- Nil guard on loadFeatureFile() cfg parameter

40/40 packages pass with -race.
2026-07-26 13:56:25 +10:00
sam 0314955587 feat: wire memory, guardrails, and tool registry into daemon agent loop
Memory:
- MemoryManager created in main.go with built-in file-backed provider
- SystemPromptBlock() injected into every agent stage request via ExtraRules
- memoryPrompt() helper on Daemon, threaded through TaskContext.SystemPrompt

Guardrails:
- GuardrailEngine created from DefaultGuardrailConfig in main.go
- RecordSuccess/RecordFailure called after every agent stage run
- Threaded through TaskContext.Guardrails for per-task guardrail enforcement

Tool registry:
- NewRegistry() created at startup, MCP servers started from config
- Passed to Daemon.ToolRegistry for dynamic tool discovery

Daemon changes:
- Memory, Guardrails, ToolRegistry fields added (nil-safe, backward compat)
- TaskContext gains SystemPrompt + Guardrails fields
- Agent stage injects memory context into ExtraRules
- Agent stage records guardrail state after each run

Telegram LLM routing deferred (TODO comment) — gateway commands work.
All 38 packages pass with -race.
2026-07-26 10:25:07 +10:00
sam 3985f042c5 chore: commit beads state, gitignore local Dolt DB
.beads/issues.jsonl + .beads/interactions.jsonl are the sync
mechanism — they're passive exports committed to git and synced
via refs/dolt/data on the remote. The local Dolt database
(embeddeddolt/) is gitignored as binary state.

227 total issues, 101 ready to work.
2026-07-26 01:07:20 +10:00
sam 4d9e260046 fix: update gitignore 2026-07-24 17:43:00 +10:00
sam 17307ef96e chore: ignore build and task directories 2026-07-24 13:51:00 +10:00
sam 8f8d0188b8 fix: host bind mounts for worktree to fix Docker container mount paths 2026-07-24 12:31:31 +10:00
sam 423eb78fef feat: add CreateIssue to Forge interface with Gitea implementation 2026-07-23 19:12:12 +10:00
sam 954822ca85 bd init: initialize beads issue tracking 2026-07-23 02:17:09 +10:00
sam 0a15d62a3d chore: update gitignore 2026-07-22 01:11:14 +10:00
sam 865a2bab9f chore: update gitignore 2026-07-21 17:28:08 +10:00
sam 251cc7022c feat: add configurable forge and workflow behavior 2026-07-21 15:03:41 +10:00
sam c2c8e92304 feat: archied walking skeleton — poll, store, worktree, workflow engine, bootstrap PR
Repurposes archie-core as the archie orchestrator daemon (the old
Pocketbase PM-backend plan is archived under .references/).

- cmd/archied: -config, -once (single cycle for timers/testing)
- internal/config: TOML; per-repo gate command lists; role->model refs
- internal/store: SQLite (modernc, WAL) task state machine with
  transitions audit, idempotent enqueue, crash recovery (running ->
  queued, attempt++)
- internal/forge: go-github v78 — labelled-issue polling, invitation
  auto-accept, push verification, PR create/state, comments, close
- internal/worktree: fresh clone per task, bot identity, askpass token
  handling, diff-size stats, cleanup on merge/reject
- internal/workflow: extensible engine (stages over TaskContext, shared
  step library, label routing bug->tdd feature->feasibility default->
  implement); parks always comment on the issue. Bootstrap workflow
  (deterministic marker-file PR) proves the plumbing without LLM spend.

Store and worktree round-trips covered by tests (local bare remote).
2026-07-21 03:46:06 +10:00