Commit Graph
8 Commits
Author SHA1 Message Date
sam 0d6b26244e fix: remove all hardcoded MaxSteps — inherit from config budget 2026-07-23 16:15:01 +10:00
sam c0d108a5d0 feat: add Yaegi-based plugin system (gates, custom stages, skill scripts)
Implements the full PRD (docs/prds/yaegi-plugin-system.md): repos can
now define .archie/gate.go for diff-inspecting quality rules shell
commands can't express, .archie/stages/*.go for custom pipeline steps,
and skills can ship Go scripts run via a new run_go_script agent tool —
all interpreted in-process with Yaegi, with panics recovered so a bad
script can't take down the daemon. Hot reload (phase 4) needed no code:
every loader reads from disk per call and every task gets a fresh
clone, so nothing is ever cached to go stale.
2026-07-22 00:54:46 +10:00
sam a8d005a6f6 feat: extract agent execution boundary 2026-07-21 22:16:50 +10:00
sam 251cc7022c feat: add configurable forge and workflow behavior 2026-07-21 15:03:41 +10:00
sam 748d9aa9ad feat: per-repo protected suffixes, requeue flag, templ-aware gate config
The first feature run parked exactly as designed but for an avoidable
reason: todo is a templ project and the agent edited generated
_templ.go files, leaving literal template placeholders in rendered
HTML. Systemic fixes, all environmental:

- repos gain protect = ["_templ.go"]: suffixes agents can never write
  (agentloop.ProtectPaths), forcing edits to the sources; the gate's
  new leading ["templ","generate","./components/"] command
  regenerates. AgentStage.ProtectPaths now composes with the repo list
  and takes TaskContext like every other stage hook.
- archied -requeue <task-id>: the retry path for parked/waiting tasks
  (keeps the task's workflow; Requeue with empty workflow preserves it,
  clears the park reason).

Retry of the parked feature task drove the full loop home: PRD-guided
plan -> builder edited components.templ (generated file write-blocked),
gate regenerated + tested -> PR #8 with 109 lines of tests.
2026-07-21 04:34:53 +10:00
sam 239b8eda42 feat: feasibility workflow — assess, PRD, human go/no-go loop
Routed via the feature label. Stages: assess (read-only agent with a
structured decide tool — verdict as a tool call, not parsed prose;
not-a-fit closes the issue as won't-do with reasons) -> PRD (read-only
agent; problem, solution, surface, acceptance criteria, non-goals) ->
deliver (PRD posted as the watched issue comment, optional [notify]
webhook POST for n8n->email, task -> waiting_human).

The daemon's cycle now watches waiting_human tasks: replies after the
watch comment (excluding the bot) are judged by an LLM (triage role,
APPROVE/REJECT/UNCLEAR + reason — never keyword matching). Approvals
requeue under implement (whose planner now treats an existing PRD as
prior context); rejections close with the reasoning acknowledged;
unclear replies keep waiting.

Supporting changes: forge.Comment returns the comment id;
forge.RepliesAfter; store watch_comment_id (additive migration),
WaitingTasks, Requeue; Route honours a pre-assigned workflow;
AgentStage.Extra for stage-specific tools.

Live: todo#7 assessed fit -> PRD delivered -> waiting_human.
2026-07-21 04:27:17 +10:00
sam 94a58e11b6 feat: assignee-driven pickup + repro proof on TDD PRs
- Issues are picked up by assigning them to the bot (tink-bot style)
  instead of by label; labels now only influence workflow routing
- TDD: capture the failing 'go test' output after the repro stage
  (parking if it unexpectedly passes) and post it on the PR as a code
  block — evidence the bug was reproduced before the fix
- TDD fix stage now write-protects *_test.go via agentloop.ProtectPaths
  (environmental enforcement, replacing the advisory prompt rule)
- OpenPR extracted so stages can act after the PR exists in the same
  stage (the engine stops at the first stage with an outcome)
2026-07-21 04:10:27 +10:00
sam 5465442cb3 feat: TDD workflow for bugfixes — failing repro before fix
Routed via the bug label. Stages: analyse (read-only problem-surface
analysis) -> repro-tests behind the INVERTED gate (go vet must pass,
go test ./... must FAIL — GateCommand.ExpectFailure proves the repro
captures the bug) -> repro committed separately -> fix behind the
repo's full gate with the repro declared immutable in the rules ->
push, diff cap, PR. Two-commit PRs tell the story: test first, fix
second. Zero engine or step-library changes — the workflow is pure
composition, per the reusability requirement.

Proven live on samcharles93/todo#5 (empty todos bug): repro gate
pushed back once, fix stage blocked twice by the full gate before
green; PR #6 (~103k tokens total).
2026-07-21 04:07:21 +10:00