Implements issue #1548. The agents session show command now displays the Automation field and success message per specification.
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Implements issue #1524. The agents actor remove command now displays the spec-required Actor Removed, Impact, and Cleanup panels, plus success message.
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Implements issue #1525. The agents actor list command now displays the spec-required Summary panel with statistics and success message.
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Implements issue #1552. Reorders the command synopsis in the specification to logically group validation commands separately from regular commands for better clarity.
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Implements issue #1520. The version command now displays the actual git commit SHA to help identify which version of the code is running.
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
The LangChainChatProvider class defined name and model_id as read-only
properties without setters, causing AttributeError when PlanService
attempted to set these properties after provider instantiation.
Root Cause:
- LangChainChatProvider.name and .model_id were @property without @setter
- PlanService._resolve_ai_provider_for_actor() attempts to mutate these
properties at lines 411 and 413
- This caused: AttributeError: property 'name' of 'LangChainChatProvider'
object has no setter
Solution:
Added property setters for both name and model_id:
@name.setter
def name(self, value: str) -> None:
self._name = value
@model_id.setter
def model_id(self, value: str) -> None:
self._model_id = value
This allows PlanService to correctly resolve provider names and model IDs
without raising AttributeError.
Impact:
- Fixes the agents build command crash when using agents tell
- No regression: existing functionality unchanged
- Properties remain type-safe (str -> str)
ISSUES CLOSED: #1553
- CHANGELOG: add [Unreleased] entries for TUI first-run experience (#1391),
session Markdown export (#1004), and UKO provenance/temporal versioning (#891)
- README: add first-run experience and Markdown transcript export bullets
- docs/api/tui.md: new TUI API reference covering first-run, persona system,
input routing, slash commands, session export/import, and widgets
- docs/api/index.md: add TUI entry to module index
- docs/api/resource.md: document DatabaseResourceHandler and DevcontainerHandler
full protocol implementations with method tables and examples
- docs/architecture.md: expand UKO section with provenance/temporal versioning
details; update TUI design decision summary
- mkdocs.yml: add TUI page to API Reference nav
ISSUES CLOSED: #1391#1004#891
Adds two new agent types to the autonomous system, bringing the total
from 11 to 13 supervisors launched by the product-builder via prompt_async.
New agents:
1. ca-test-infra-improver (12th supervisor — pool with N workers):
Dual-mode agent following the ca-bug-hunter pattern. In pool mode,
dispatches N parallel workers via prompt_async to analyze 8 aspects
of the testing infrastructure: CI execution time, coverage gaps, test
architecture (BDD quality), flaky tests, CI pipeline optimization,
test data quality, missing test levels (Behave/Robot/ASV per
CONTRIBUTING.md), and dependency security. Workers file actionable
Type/Testing or Type/Task issues. Hard constraint: never disables
or weakens existing checks — only proposes additions and optimizations.
Uses Gemini 2.5 Pro for large context. Follows all established patterns
(clone isolation, bash sleep, prompt_async dispatch, session resume,
bot signature).
2. ca-project-owner (13th supervisor — singleton, no pool):
Acts as autonomous project owner. Continuously triages State/Unverified
issues following CONTRIBUTING.md's 6-step triage process. Assigns
MoSCoW labels (Must Have / Should Have / Could Have) based on the
specification and milestone goals. Makes strategic priority decisions.
Tags specific developers with questions in Forgejo comments (discovers
expertise from git history and Forgejo assignments). Periodically
re-evaluates MoSCoW labels as the project evolves. Follows up on
unanswered questions after 48 hours. Single instance, not a pool —
one project owner is sufficient. Uses Opus for nuanced strategic
judgment. Launched via prompt_async like all other supervisors.
Modified files:
- product-builder.md: Updated from 11 to 13 supervisors in all locations
(architecture table, Phase C.2 launch list with entries #12 and #13,
validation count, checkpoint text, self-coordinate table). Added
test-infra-pool to pool supervisors list and project-owner to singletons.
- ca-human-liaison.md: Clarified MoSCoW responsibility split — the liaison
only adjusts MoSCoW labels when relaying explicit human feedback. The
ca-project-owner handles autonomous MoSCoW assignment.
Renames `plan lifecycle-list` to `plan list` and `plan lifecycle-apply` to `plan apply` to align with the specification's canonical command names. Removes legacy V2 plan commands that occupied those names.
- Renamed CLI command registrations from lifecycle-list/lifecycle-apply to list/apply
- Removed legacy V2 apply and list commands (~200 lines)
- Updated apply shortcut in main.py to delegate to v3 lifecycle
- Added defensive null check for plan existence in apply command
- Updated 63+ test, doc, and benchmark files for consistency
Closes#881
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Mid-day refresh: 47 open PRs (+2), 289 open issues (+15 new UAT/refactor
issues in v3.7.0 backlog). v3.5.0 advanced to 78% (164/209, +2 closed).
v3.7.0 at 60% (36/60, +1 new issue). 50 open bugs stable.
Updated sections: Gantt chart update log, footer, risk register legend,
Current Status Summary, What Remains To Be Done, Day 53 schedule adherence
entry (task inventory with per-developer breakdown).
Add docs/api/ with per-module API documentation for core, a2a, actor,
skills, tool, mcp, resource, and config packages. Add docs/architecture.md
with a developer-oriented system overview including component map, layer
diagram, plan lifecycle, and key design decisions. Update mkdocs.yml nav
to expose both new sections.
ISSUES CLOSED: #N/A
The product-builder was ignoring the prompt_async instructions and falling
back to the Task tool for launching supervisors. It was also only launching
a few supervisors instead of all 11 because the pseudocode was too abstract.
Root cause: All 11 supervisor agents were listed in the task permissions,
so the LLM had a choice between Task (familiar, simpler) and bash curl
(correct but unfamiliar). It chose Task every time.
Fix — three changes:
1. REMOVED all 11 supervisor agents from task permissions. The product-
builder physically cannot invoke them via the Task tool anymore. Only
one-shot agents remain in task permissions (ca-epic-planner,
ca-session-persister, ca-product-verifier, ca-ref-reader, etc.).
2. REWROTE Phase C.2 as concrete curl command templates instead of
abstract pseudocode. The agent now has the exact curl pattern to
copy-paste for each supervisor, with clear variable placeholders.
Added a mandatory validation step: wc -l the tracking file and
confirm exactly 11 entries before proceeding.
3. ADDED aggressive warnings at three levels:
- Top of file: bold mandatory notice about prompt_async
- Phase C.2: large boxed warning block prohibiting the Task tool
- Coordination rules: explicit statement that supervisors are
removed from task permissions
- Monitoring loop: reminder to use bash curl for re-launches
Agents were failing when trying to run complex bash commands (curl with
pipes to python3, multi-command pipelines, etc.) because their bash
permissions were set to '"*": deny' with only specific simple patterns
allowed (e.g., "curl *": allow). Shell pipelines like:
curl -s http://localhost:4096/session | python3 -c "import json..."
don't match any single allow pattern and get denied.
Changed 17 agent files from restrictive bash permissions to '"*": allow'.
This includes all agents that need to:
- Run curl pipelines with python3 for prompt_async session management
- Create Forgejo dependency links via REST API curl calls
- Execute complex git operations with pipes
- Run bash sleep for polling loops
Only 3 truly read-only analysis agents remain restricted:
ca-difficulty-evaluator, ca-implementation-reviewer, ca-issue-analyzer.
These don't need bash access at all.
Issues and PRs created by agents were missing required labels, milestones,
and Forgejo dependency links per CONTRIBUTING.md. This commit adds explicit
API call instructions and a continuous compliance audit to fix the gaps.
Changes across 6 agent definitions:
- ca-new-issue-creator: Added curl bash permission. Added explicit
post-creation compliance steps: set labels (State/Unverified, Type/*,
Priority/*) via forgejo_add_issue_labels, set milestone via
forgejo_update_issue, create parent Epic dependency link via REST API
(POST /issues/{child}/blocks with parent Epic number — correct direction:
child blocks parent). Added compliance verification step.
- ca-epic-planner: Added curl bash permission. Added post-creation API
call checklists for both Epics (labels, Legendary link) and child issues
(labels, milestone, Epic dependency link, inter-issue dependency links).
Added compliance verification step.
- ca-backlog-groomer: Added curl and sleep bash permissions. Expanded
Pass 4 (Label Quality) to auto-fix missing labels (State, Type, Priority)
and milestones via Forgejo API. Added PR label/milestone compliance
checking. Added new Pass 9 (Dependency Link Compliance) to auto-fix
missing parent Epic links, PR-to-issue links, and wrong dependency
direction. Added new Pass 10 (Issue Body Compliance) to flag missing
Metadata, Subtasks, and Definition of Done sections.
- ca-pr-api-creator: Added curl bash permission. Replaced vague "add
dependency" instruction with explicit REST API curl call for creating
PR-blocks-issue dependency link. Added post-creation compliance
verification step.
- ca-agent-evolver: Added Priority/Backlog label and milestone assignment
to proposal issues.
- ca-spec-updater: Added Priority/Backlog label and milestone assignment
to proposal issues.
Both the spec-updater and agent-evolver previously skipped straight to
creating PRs with 'needs feedback' for proposed changes. The user needs
a two-step human-approval workflow:
Step 1: Agent creates a PROPOSAL ISSUE with 'needs feedback' label
describing what it wants to change and why. No branch, no code changes.
Step 2: Human reviews the issue and approves it (by removing 'needs
feedback', adding 'State/Verified', or commenting with approval).
Step 3: Agent detects approval, normalizes labels, creates branch + PR
(also with 'needs feedback') implementing the approved change.
Step 4: Human reviews the PR and merges it.
Changes across 3 agent definitions:
- ca-agent-evolver: Step 4 split into proposal issue creation (Step 4)
and approved-proposal implementation (Step 5). Added pending_proposals
and pending_prs state tracking. Approval detected via 3 signals:
label removal, State/Verified addition, or human approval comment.
- ca-spec-updater: Removed the minor/major classification and the
"commit directly to master" path. ALL spec changes now go through
proposal issues first (Step 6a creates issue, Step 7 monitors for
approval). Added pending_spec_proposals and rejected_proposals state.
Approval check runs every cycle before checking for new merged PRs.
- ca-human-liaison: Added Step 4 guard — issues with 'needs feedback'
label are NOT auto-verified. The liaison acknowledges them with a
comment but does not change state labels. Only issues WITHOUT 'needs
feedback' proceed to the normal auto-verify flow (now Step 5).
Add lifecycle management and sandbox support for MCP tools:
- McpClient: lazy start, configurable idle timeout with auto-stop, health monitoring with automatic restart
- McpRegistry: namespace-isolated tracking of multiple MCP servers
- SandboxPathRewriter: bi-directional file path rewriting between host and sandbox workspaces
- MCPCapabilityMetadata: structured exposure of full MCP server capabilities
- 26 BDD scenarios covering lifecycle, sandbox rewriting, and edge cases
ISSUES CLOSED: #938
Four changes in one commit across 27 agent files:
1. POOL SUPERVISOR PROMPT_ASYNC: All 4 pool supervisors (issue-implementor,
ca-continuous-pr-reviewer, ca-uat-tester, ca-bug-hunter) now dispatch
their internal workers via the OpenCode Server's prompt_async endpoint
instead of the Task tool. This eliminates the wait_for_all bottleneck
at the supervisor level — workers run independently, and a 10-second
polling loop detects completions and immediately refills vacant slots.
Added curl/sleep bash permissions where needed. Each supervisor keeps
N workers running at all times with zero idle slots.
2. SESSION RESUME INSTEAD OF CLEANUP: The product-builder and all 4 pool
supervisors now RESUME existing sessions from a previous interrupted
run instead of aborting them. Phase C.0 queries the server for sessions
titled "[CA-AUTO] supervisor:*" and adopts any that are still active
into the monitoring loop. Pool supervisors similarly adopt existing
"[CA-AUTO] worker-*" sessions. This enables "continue where you left
off" — restarting the product-builder reconnects to running supervisors
and workers rather than duplicating them.
3. DEDICATED CLEANUP AGENT: New ca-session-cleanup.md primary agent for
explicit fresh-start cleanup. Run this BEFORE the product-builder when
you want to abort all previous sessions and start completely fresh. It
finds all "[CA-AUTO]" sessions, aborts them, and deletes them. This is
the ONLY way to kill old sessions — the product-builder never does it
automatically.
4. BOT SIGNATURES: All 26 agents that post content to Forgejo now include
a mandatory "Bot Signature" section requiring every comment, issue body,
PR description, and review to end with:
---
**Automated by CleverAgents Bot**
Supervisor: <category> | Agent: <agent-name>
24 agents have hardcoded categories. 2 shared agents (ca-new-issue-creator,
ca-epic-planner) use a parameter-based category from their caller's prompt.
When the product-builder is interrupted mid-run (Ctrl+C, crash, timeout),
supervisor sessions launched via prompt_async survive independently on the
OpenCode server. Restarting the product-builder without cleanup creates
duplicate supervisors — 22 agents competing for the same work, causing
duplicate PR reviews, conflicting git pushes, and wasted resources.
Added Phase C.0 (runs before planning or launching) that:
1. Queries GET /session for all server sessions
2. Filters for sessions with titles starting with "[CA-AUTO] supervisor:"
3. Aborts any that are still active via POST /session/:id/abort
4. Deletes the stale sessions via DELETE /session/:id
5. Cleans up the /tmp/ca-supervisor-sessions.env tracking file
6. Logs the cleanup count to the session state issue
Also changed the supervisor session title convention from
"supervisor: <name>" to "[CA-AUTO] supervisor: <name>" to reliably
distinguish product-builder-managed sessions from user-created ones.
- Updated Day 53 entry with end-of-day data (32 PRs merged today)
- Open PRs: 119 → 86 (down 33)
- Open bugs: 40 → 65 (up 25, UAT testing discovered new issues)
- Milestone progress: M3 74%→79%, M4 74%→75%, M5 78%→87%, M6 69%→74%, M7 61%→71%, M8 50%→54%
- Updated gantt chart completion percentages and risk register
- Updated Current Status Summary with end-of-day figures
- Added Day 53 merge wave bullet to What Has Been Completed
- Updated What Remains To Be Done with current open counts
- Updated Schedule Risk Summary with UAT findings
Add kubeconform manifest validation to the existing helm CI job.
The helm job already had helm lint and helm template steps (added in
#1085). This commit completes the optional acceptance criterion from
#1089 by adding kubeconform v0.7.0 to validate rendered manifests
against the Kubernetes 1.29.0 schema in strict mode.
Closes#1089
- CHANGELOG.md: extend [3.7.0] section with 15 new entries covering
PermissionsScreen, ThoughtBlock, UKO runtime services, ACMS Phase 2
protocol aliases, DevcontainerHandler protocol completion,
DatabaseResourceHandler CRUD/checkpoint, estimation lifecycle hook,
user_identity domain events, PLAN_APPLIED/PLAN_CANCELLED enrichment,
server serve subcommand, async audit refactor, and CLI flag fixes
- README.md: extend Highlights with permissions screen, thought blocks,
UKO runtime, database handler, and estimation lifecycle
- docs/reference/uko_runtime.md: new reference for UKOQueryInterface,
UKOInferenceEngine, and UKOGraphPersistence (issue #891)
- docs/reference/tui_permissions.md: new reference for PermissionsScreen,
PermissionRequestService, and all domain models (issue #996)
- docs/reference/tui_thought_block.md: new reference for ThoughtBlock
domain model and ThoughtBlockWidget (issue #1001)
- docs/reference/database_handler.md: new reference for
DatabaseResourceHandler CRUD and checkpoint methods (issue #1241)
- docs/reference/devcontainer_resources.md: add DevcontainerHandler
protocol methods section (delete, list_children, diff, create_sandbox)
(issue #1242)
- docs/reference/tui.md: extend architecture table and add Permissions
Screen and Actor Thought Blocks sections
ISSUES CLOSED: #1393
- DomainEvent: add user_identity and correlation_id fields (PR #1257)
user_identity carries authenticated user in server mode (None in local
mode); correlation_id is a ULID linking related events in one request
chain. Both were implemented but missing from the spec model.
- EventType: promote to StrEnum, add PLAN_ESTIMATION_COMPLETE,
CORRECTION_APPLIED, CONFIG_CHANGED, ENTITY_DELETED, AUTH_SUCCESS,
AUTH_FAILURE, TIER_PROMOTED, TIER_DEMOTED, TIER_EVICTED,
VALIDATION_FIX_ATTEMPTED, VALIDATION_FIX_SUCCEEDED,
VALIDATION_FIX_EXHAUSTED (all present in implementation, missing from
spec enum).
- Audit log event details: enrich plan_applied row with changeset
statistics (lines_added, lines_removed, resources_modified,
apply_duration) per PR #1300; enrich plan_cancelled row with progress
context (cancelled_phase, last_completed_step, subplan_count) and
resource cleanup context (sandbox_refs, changeset_id,
resources_pending_cleanup) per PR #1301.
- Estimation actor: document 4-level fallback chain wired in
use_action() (PR #1310) and Strategize-to-Estimate lifecycle hook
that emits PLAN_ESTIMATION_COMPLETE on success.
ISSUES CLOSED: #1310#1300#1301#1257
Add Markdown export format for sessions alongside the existing JSON export.
Implement TUI slash command routing for /session:export and /session:import.
- Add Session.as_export_markdown() domain method producing a human-readable
Markdown transcript (lossy, not importable — for sharing/documentation)
- Extend CLI 'agents session export' with --format flag (json|md)
- Extend TuiCommandRouter._session_command() to handle 'export' and 'import'
subcommands, delegating to the session service via the DI container
- Add 16 Behave scenarios covering domain model, CLI, and TUI command paths
Closes#1004
Two fundamental architectural changes that solve the "supervisor exits and
never gets relaunched" problem:
1. PROMPT_ASYNC LAUNCH: The product-builder no longer uses the Task tool to
launch supervisors. The Task tool blocks until ALL parallel tasks return,
meaning if one supervisor exits, the product-builder can't relaunch it
until all 10 others also exit. Instead, supervisors are now launched via
the OpenCode Server HTTP API's POST /session/:id/prompt_async endpoint,
which returns 204 immediately (true fire-and-forget). The product-builder
then enters a bash-driven monitoring loop that checks session status
every 60 seconds via curl and relaunches any dead supervisor instantly
— independently of whether the other 10 are still running.
Requires: opencode started with --port 4096 (fixed known port).
Added curl and sleep to product-builder's bash allow list.
2. BASH SLEEP FOR GENUINE WAITING: All 11 supervisors now use the Bash
tool with "sleep N" (and explicit timeout > sleep duration) for real
blocking waits between polling cycles. Previously, pseudocode "wait N
minutes" was interpreted by the LLM as "I'm done, return to caller" —
causing supervisors to exit after their first idle cycle. The bash sleep
call genuinely blocks the agent for the specified duration, then the
agent resumes its loop. Every supervisor has a prominent instruction
block explaining this mechanism and warning against returning to caller.
All idle break/exit conditions removed across all 11 supervisors.
Supervisors now loop forever: poll Forgejo → do work → bash sleep → repeat.
Changes across 12 agent definitions:
- product-builder: Phase C.2 rewritten to use curl + prompt_async.
Phase C.3 rewritten as bash sleep + curl monitoring loop (checks every
60s, relaunches dead supervisors, checks convergence every 10 min).
Phase C.4 simplified to cleanup only.
- All 11 supervisors: Added "CRITICAL: Bash Sleep" instruction block.
Replaced all pseudocode "wait N" with bash("sleep N", timeout=N*1.5).
Removed all idle break/exit conditions — agents now sleep and re-poll
instead of exiting.
Add Markdown export format for sessions alongside the existing JSON export.
Implement TUI slash command routing for /session:export and /session:import.
- Add Session.as_export_markdown() domain method producing a human-readable
Markdown transcript (lossy, not importable — for sharing/documentation)
- Extend CLI 'agents session export' with --format flag (json|md)
- Extend TuiCommandRouter._session_command() to handle 'export' and 'import'
subcommands, delegating to the session service via the DI container
- Add 16 Behave scenarios covering domain model, CLI, and TUI command paths
Closes#1004
Implements the first-run experience for the TUI as specified in the
specification's 'First-Run Experience' section (§ TUI Architecture).
On first launch (no personas configured), a centered ActorSelectionOverlay
widget is displayed guiding the user to select an actor. The overlay
supports keyboard navigation (j/k), fuzzy search (/), and confirmation
(enter). Selecting an actor creates a default persona and dismisses the
overlay.
Changes:
- Add src/cleveragents/tui/first_run.py: is_first_run() detection helper
and create_default_persona_for_actor() setup helper
- Add src/cleveragents/tui/widgets/actor_selection_overlay.py:
ActorSelectionOverlay widget with show/hide/navigate/search/confirm API
and render_actor_selection() pure rendering function
- Update src/cleveragents/tui/app.py: integrate first-run check in
on_mount(), yield ActorSelectionOverlay in compose(), add
_complete_first_run() method
- Update src/cleveragents/tui/widgets/__init__.py: export
ActorSelectionOverlay
- Add features/tui_first_run.feature + features/steps/tui_first_run_steps.py:
comprehensive Behave BDD tests covering all public API paths
ISSUES CLOSED: #1007
Implements the four missing protocol methods on DevcontainerHandler required by Epic #825 (ResourceHandler Protocol Completion):
- delete(): uses 'devcontainer exec rm -rf' to delete files/dirs inside the container; returns DeleteResult(success=False) for missing/stopped containers rather than raising.
- list_children(): uses 'devcontainer exec ls -1' to enumerate workspace entries; returns an empty list on container failure.
- diff(): compares content hashes between the devcontainer workspace and another filesystem location; uses EMPTY_CONTENT_HASH sentinel to treat both-absent as no-change.
- create_sandbox(): delegates to BaseResourceHandler.create_sandbox with lazy activation (same DETECTED/STOPPED/FAILED guard as resolve()).
All methods raise ValueError for resources with no location.
Adds 18 Behave BDD scenarios covering success paths, failure/stopped-container paths, empty-path edge cases, and ValueError guards.
ISSUES CLOSED: #1242
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Enriches the PLAN_APPLIED domain event with SEC7 audit-logging statistics per docs/specification.md §Audit Logging (issue #716).
Changes:
- PlanLifecycleService.complete_apply() now accepts optional keyword arguments: files_changed, lines_added, lines_removed, resources_modified, apply_duration_seconds (all default to 0). These are included in the PLAN_APPLIED event details dict alongside the existing action_name, phase, and project_names fields.
- PlanApplyService.apply_with_validation_gate() computes changeset statistics from SpecChangeSet.summary() and measures apply duration, then passes all statistics to complete_apply().
- New BDD feature features/plan_applied_event_enrichment.feature with 13 scenarios.
Closes#716
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>