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>
Remove the --mode/-m CLI flag from the validation attach command to align
with the specification, which defines validation mode as an inherent
property of the validation definition set at registration time via
validation add, not as a per-attachment override.
The service layer (ToolRegistryService.attach_validation) no longer
accepts mode as a parameter; instead it reads the mode from the
validation's registered definition. The ToolRegistryRepository
_to_legacy_domain now exposes the mode field so the service can access it.
All tests that passed --mode to the CLI or service have been updated or
removed. The invalid-mode validation scenarios were removed since the
mode is no longer caller-supplied. Coverage remains at 98.7%.
ISSUES CLOSED: #913
Co-authored-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Co-committed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Implements a write-behind queue with a background daemon thread in AuditService so that record() returns immediately without blocking the calling domain operation on a synchronous SQLite INSERT + COMMIT.
Changes:
- AuditService: add _writer_loop(), _write_payload(), flush() methods and a write-behind queue with a background thread
- record() enqueues the payload and returns a placeholder entry with id=-1 in async mode
- close() calls flush() to drain the queue before closing the session
- Settings: add audit_async (default True) and audit_queue_maxsize (default 10000) fields
- 20 BDD scenarios covering non-blocking record(), flush/close lifecycle, ordering, sync fallback, and settings
Closes#718
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Resolve the -f short flag conflict on `project delete` where --format claimed -f despite the specification reserving it for --force.
Changes:
- Add -f short alias to --force on the delete command, aligning with the spec: `agents project delete [--force|-f] [--yes|-y] <NAME>`
- Remove -f short alias from --format on delete (keep --format long form only); the spec does not define --format on this command
- Update module docstring to reflect spec-aligned flag signatures
- Add BDD scenario exercising -f via CliRunner to validate the Typer argument parser maps -f to --force (not --format)
ISSUES CLOSED: #911
Reviewed-by: reviewer-pool-1
Closes#911
Co-authored-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Co-committed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Remove three top-level fields from CorrectionDryRunReport that duplicated data already present in the embedded CorrectionImpact object:
- excluded_decisions → now accessed via report.impact.excluded_decisions
- rollback_tier_depth → now accessed via report.impact.rollback_tier_depth
- child_plans_to_rollback → now accessed via report.impact.affected_child_plans
The redundant fields created a divergence risk: both models are frozen=True Pydantic models, so post-construction mutation is impossible, but nothing prevented constructing an instance where the top-level copies disagreed with the impact sub-object.
Approach: Option B (nest-only) — remove the duplicated top-level fields and update all consumers to use the impact object's fields instead.
Closes#1087
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
The `cleveragents server serve` CLI subcommand already exists in server.py and Dockerfile.server already uses `python -m cleveragents` as its ENTRYPOINT with `server serve` as the CMD.
Add BDD scenarios to k8s_helm_chart.feature that explicitly verify:
- Dockerfile.server ENTRYPOINT uses `python -m cleveragents`
- Dockerfile.server CMD includes the `server serve` subcommand tokens
Add corresponding step definitions to k8s_helm_chart_steps.py.
Closes#1088
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Add a process-global `_INITIALIZED_DBS: set[str]` to `features/environment.py` that caches database URLs after `_fast_init_or_upgrade` has processed them. On subsequent calls with the same URL, the function returns immediately — skipping all URL parsing, path extraction, prefix matching, and `stat()` syscalls that previously executed on every new `UnitOfWork` instance.
The cache is cleared at the start of each scenario in `before_scenario` to prevent cross-scenario state leaks, since each scenario receives fresh temp-DB paths via `tempfile.mktemp()`.
Four new Behave scenarios validate cache hits on repeated calls, cache clearing between scenarios, and non-caching of non-matching-prefix URLs.
Estimated savings: ~65,000 unnecessary function-body executions eliminated per full test run (~7 UnitOfWork instantiations × ~10,700 scenarios).
ISSUES CLOSED: #735
Reviewed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Remove four empty stub packages that contained only __init__.py with
__all__ = [] and no functional code, violating CONTRIBUTING.md §Commit
Completeness. All four were audited against docs/specification.md:
- src/cleveragents/runtime/ — Spec defines four layers (Domain,
Application, Infrastructure, Presentation) with no Runtime Layer.
Runtime concepts (LSP Runtime, actor runtime) belong in Infrastructure.
- src/cleveragents/domain/repositories/ — Spec mentions repository
interfaces in Domain but mandates no separate subpackage. Empty with
no protocols defined; existing models cover the domain.
- src/cleveragents/domain/plans/ — Plan domain models already exist in
domain/models/planconfig, planfiles, and plansettings. Empty duplicate.
- src/cleveragents/application/workflows/ — Application logic already
served by application/services/. Empty stub added no value.
Updated test references in features/steps/module_coverage_steps.py,
features/steps/coverage_extras_steps.py, features/architecture.feature,
and robot/architecture.robot to remove the deleted packages from import
verification and architecture validation lists.
ISSUES CLOSED: #948
Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
Add the missing `-u` short-form alias for the `--update` option on the
`lsp add` command, aligning the implementation with the specification
(spec line 8645: `agents lsp add [--update|-u] (--config|-c) <FILE>`).
The Typer option declaration in `lsp.py` now includes `"-u"` alongside
`"--update"`. A new Behave scenario ("Add LSP server with -u short form
overwrites existing") and its step definition verify the short form works
end-to-end through the CLI runner.
No conflicts exist — `-u` was not claimed by any other option on
`lsp add` (existing short forms: `-c` for `--config`, `-f` for
`--format`).
ISSUES CLOSED: #912
Co-authored-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
Co-committed-by: Jeffrey Phillips Freeman <jeffrey.freeman@cleverthis.com>
- Update today marker to 2026-04-02 in both gantt charts
- Update gantt chart update log to Day 53 with Session 3 context
- Update risk register: M3-M9 completion percentages from Forgejo API
- Update footer: 40 open bugs, 119 open PRs, Session 3 active
- Update Current Status Summary: Day 53, 119 PRs, 114 issues, 40 bugs
- Update warning box: Session 3 launch with 16 workers / ~71 agents
- Update Parallel Workstreams: Testing track reflects current state
- Append What Has Been Completed: Day 50 reviewer blitz + Session 3 launch
- Update What Remains To Be Done: M8/M9 detail, 119 PRs, 40 bugs
- Update Schedule Risk Summary: Day 53 critical path blockers
- Append Day 53 Schedule Adherence entry with all required tables