Step-2 PR A: the approval loop end to end with a stub agent, no LLM and no network. - transport.py: Transport interface per A1 (send_message, send_approval_request, ask_question, on_message) with an InMemoryTransport; no platform SDK outside an implementation - gates.py: PlanRevision with monotonic rev-N tags; Gate.evaluate enforces revision binding (stale tags refused with a notice), operator allowlisting, and approve-word-only semantics; any other reply is rejection feedback. Channel seam ready for Gitea/Vikunja approval sources - control.py: B1 state machine subset with structural gating — the agent's only actions are SubmitPlan (ends its turn) and AskHuman; no proceed tool exists. Gate state, revision counters, task_id, and pending questions checkpoint through StateStore, and boot resumes an open gate or gates to AWAIT_INPUT, never blind-resumes - gate.open/approve/reject A9 events complete the log taxonomy - CLAUDE.md: record the plan-first working convention - Tests: 15 unit (gates + orchestrator flows), 2 integration (mid-gate restart with revisions intact; unresolved intents gate the whole boot) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Nisse
Monorepo for two self-hosted AI agents (nisse-dev, nisse-ops) over a shared
library (nisse-core), one package per directory.
Read the architecture before making design decisions. The system-level
specification is docs/Architecture-Build-Spec.md. Requirements that look like
free choices — gating structure, state durability, LLM access paths, permission
policy — are usually settled there.
Working conventions
- Ask when anything is unclear. Do not assume the operator always knows exactly what they want; surfacing ambiguity beats guessing.
- Plan first. Before implementing a build-order step or any nontrivial change, present a short implementation plan (scope, layout, API sketch, deferrals) and get operator sign-off. Code lands as a Gitea PR afterwards.
- Script repeated tasks. If a job takes the same multiple commands more than
once, save it as a shell script (e.g. in
~/bin) instead of retyping it. - Strongly prefer automated tests over manual testing. Every new feature or bug fix includes at least one new test verifying its behavior.