diff --git a/docs/timeline.md b/docs/timeline.md index 0d9ec035..5d7f3950 100644 --- a/docs/timeline.md +++ b/docs/timeline.md @@ -1948,11 +1948,13 @@ This section provides a high-level overview of the CleverAgents implementation r ### Current Status Summary -As of Day 14 (2026-02-22), the **Day 14 rebaseline plan** is authoritative and **88 of 182 COMMIT checklist items are complete** (~48.35%). The foundational layers — domain models, persistence, YAML schemas, CLI commands, quality automation, and CI/CD — are substantially built out. The primary blocker for the first end-to-end milestone remains the **tool-aware execute/apply pipeline**: the actor runtime that drives LLM-based plan execution, ChangeSet capture, and the sandbox merge path that commits changes to real resources with validation gating. +As of Day 16 (2026-02-24), the project has **~77 closed issues out of ~120 active rebaseline issues** (excluding pre-rebaseline and organizational issues). The foundational layers — domain models, persistence, YAML schemas, CLI commands, quality automation, and CI/CD — are substantially built out. Recent progress includes decision domain model and context snapshots (Hamza, PR #385 merged), resource registry with DAG metadata, resource handler runtime for git-checkout and fs-directory, and phase reversion state machine. -!!! warning "Critical Priority: v2 Feature Restoration" +The primary blocker for M1 completion remains the **sandbox merge/apply pipeline with validation gating** and the **E2E source-code smoke test suite**. The actor runtime, tool-calling, and execute pipeline are now partially functional. The M2 blocker is the **actor compiler** (YAML -> LangGraph StateGraph) and **MCP adapter** runtime. - During the transition from the earlier v2 architecture to the current v3 spec-aligned design, approximately 4,000 lines of LangGraph agent infrastructure were stubbed or removed. **Restoring these v2 capabilities** — specifically the LangGraph-based execution actors, tool-calling runtime, and actor graph compilation — is the highest-priority blocker for reaching a minimal working version. Until the actor runtime can invoke tools through the LLM, persist decisions, and capture changes into a ChangeSet, the plan execute/apply lifecycle cannot function end-to-end. +!!! warning "Schedule Risk: 7-9 Days Behind" + + The project is running **7-9 days behind** the original aggressive schedule. M1 (target Feb 15) is overdue by 9 days; M2 (target Feb 22) is overdue by 2 days. The team needs to focus aggressively on M1 completion items before moving to M2 work. Any `MoSCoW/Could Have` items in M1-M2 should be deferred to avoid further slippage. ### Parallel Workstreams @@ -1961,9 +1963,9 @@ Development is organized into six concurrent workstreams plus continuous quality | Track | Focus Area | Status | | :---- | :--------- | :----- | | **A** — Plan Lifecycle | Action/plan domain models, persistence, CLI alignment, execute/apply wiring | Core models and persistence done; execute/apply pipeline in progress | -| **B** — Projects & Resources | Resource registry, project model, resource types, sandbox strategies, CLI | Registry tables, models, and basic CLI done; handler runtime and auto-discovery remaining | -| **C** — Actors, Tools, Skills | Actor YAML schema/loader/compiler, tool registry/runtime, skill framework, MCP adapter, validation runner | Schemas, loaders, tool runtime, and file/git/search tools done; actor compiler, MCP runtime, and validation runner remaining | -| **D** — Decisions & Apply | Decision tree model, change tracking, diff review, apply pipeline, correction engine | Change tracking models and diff artifacts done; decision persistence, correction engine, and apply pipeline remaining | +| **B** — Projects & Resources | Resource registry, project model, resource types, sandbox strategies, CLI | **Substantially complete.** Registry, models, CLI, handler runtime (git-checkout + fs-directory), DAG metadata all done. Auto-discovery remaining. | +| **C** — Actors, Tools, Skills | Actor YAML schema/loader/compiler, tool registry/runtime, skill framework, MCP adapter, validation runner | Schemas, loaders, tool runtime, file/git/search tools done. MCP adapter in progress (Aditya). Actor compiler and validation runner remaining. | +| **D** — Decisions & Apply | Decision tree model, change tracking, diff review, apply pipeline, correction engine | Decision domain model and context snapshots done (PR #385). Decision persistence in progress (Hamza). Correction engine models done. Apply pipeline partially done. | | **E** — Subplans | Subplan domain model, orchestration, parallel execution, three-way merge | Domain model done; orchestrator and merge logic remaining | | **F** — ACMS & Context | UKO ontology, CRP protocol, context strategies, assembly pipeline, hot/warm/cold tiers | Not yet started; scheduled for later milestones | | **Q** — Quality & CI | Pre-commit hooks, Forgejo CI/CD, coverage enforcement (97%), security scanning | Complete and ahead of schedule | @@ -1973,60 +1975,68 @@ Development is organized into six concurrent workstreams plus continuous quality The following major areas are fully or substantially implemented: -- **Domain models**: Plan (with full lifecycle and subplan hierarchy), Action (with YAML schema and typed arguments), Tool and Validation (with resource bindings and capability metadata), Skill (with resolver and cycle detection), Session (with message ordering and token tracking), Resource (with DAG edges and type constraints), ChangeSet and ToolInvocation tracking models. -- **Persistence layer**: SQLite database with Alembic migrations for actions, plans, sessions, session messages, tools, tool resource bindings, validation attachments, resources, resource types, and resource edges. Repository classes with retry decorators and referential integrity guards. +- **Domain models**: Plan (with full lifecycle and subplan hierarchy), Action (with YAML schema and typed arguments), Tool and Validation (with resource bindings and capability metadata), Skill (with resolver and cycle detection), Session (with message ordering and token tracking), Resource (with DAG edges and type constraints), Decision (with 12 decision types and context snapshots), ChangeSet and ToolInvocation tracking models, Correction (revert/append modes), AutomationProfile (8 built-in profiles with confidence thresholds), Invariant (with scoped precedence). +- **Persistence layer**: SQLite database with Alembic migrations (20 versions) for actions, plans, sessions, session messages, tools, tool resource bindings, validation attachments, resources, resource types, resource edges, and decision tables. Repository classes with retry decorators and referential integrity guards. - **YAML configuration schemas**: Action config schema with env var interpolation and key normalization, Actor config schema with three actor types (LLM/TOOL/GRAPH) and graph topology validation with cycle detection, Skill config schema with MCP server and Agent Skills folder support. All schemas include loader/validator Pydantic models with `from_yaml()` factory methods. -- **CLI commands**: Action (create/list/show/archive), Plan (use/execute/apply/status/list/cancel/diff/artifacts), Skill (add/remove/list/show/tools), Session (create/list/show/delete/tell/export/import), Actor (run/add/remove/list/show with context management), Tool, LSP, Resource, Validation, Config, and Invariant command groups — all with multi-format output support (rich/json/yaml/plain/table/color). +- **CLI commands**: Action (create/list/show/archive), Plan (use/execute/apply/status/list/cancel/diff/artifacts), Skill (add/remove/list/show/tools), Session (create/list/show/delete/tell/export/import), Actor (run/add/remove/list/show with context management), Tool, LSP, Resource, Validation, Config, Invariant, Automation-Profile, Audit, and Cleanup command groups — all with multi-format output support (rich/json/yaml/plain/table/color). - **Tool runtime**: Tool registry with thread-safe operations, tool runner with four-stage lifecycle (discover/activate/execute/deactivate), built-in file tools (read/write/edit/delete/list/search), git tools (status/diff/log/blame), tool call router for multi-provider format normalization (OpenAI/Anthropic/LangChain), and path traversal prevention. -- **Sandbox infrastructure**: Sandbox protocol with status transitions, NoSandbox implementation for non-sandboxable resources, sandbox factory, thread-safe sandbox manager with plan-scoped tracking, and three merge strategies (git, sequential, JSON deep-merge). -- **Actor loader**: Thread-safe discovery with SHA-256 content-hash caching, namespace normalization, duplicate detection, and tool reference resolution. -- **Automation levels**: Manual, review-before-apply, and full-automation modes with plan-level overrides, settings resolution, pause/resume, and auto-progression. -- **Security hardening**: All `eval()`/`exec()` calls replaced with named operation registries, config security scanner detecting 15 disallowed patterns, AST-based code validation, Jinja2 sandboxed environments. +- **Sandbox infrastructure**: Sandbox protocol with status transitions, NoSandbox implementation for non-sandboxable resources, git_worktree and copy-on-write sandbox strategies, sandbox factory, thread-safe sandbox manager with plan-scoped tracking, and three merge strategies (git, sequential, JSON deep-merge). +- **Actor system**: Actor loader with thread-safe discovery, SHA-256 content-hash caching, namespace normalization, duplicate detection, and tool reference resolution. Actor registry with CRUD operations and built-in generation. Jinja2 YAML template engine with sandboxed rendering. +- **Resource system**: Resource registry with DAG metadata, handler runtime for git-checkout and fs-directory resource types, resource type schema loader, project-resource linking. +- **Decision system**: Decision domain model with 12 decision types, context snapshot capture, influence DAG support, and `with_superseded_by()` helper for frozen model mutation. +- **Automation levels**: Manual, review-before-apply, and full-automation modes with plan-level overrides, settings resolution, pause/resume, and auto-progression. 8 built-in automation profiles with guard logic. +- **Correction engine**: Correction model with revert/append modes, BFS impact analysis, dry-run reporting. +- **Phase reversion**: State machine for constrained apply -> back to strategize transitions. +- **Security hardening**: All `eval()`/`exec()` calls replaced with named operation registries, config security scanner detecting 15 disallowed patterns, AST-based code validation, Jinja2 sandboxed environments, secrets masking and validation. - **Quality automation**: Pre-commit hooks (12 hooks across 5 categories), Forgejo CI/CD pipeline with 10 nox-routed jobs, nightly quality monitoring, ADR compliance checking, 97% test coverage enforcement, and comprehensive security scanning (Bandit + Semgrep + Vulture). ### What Remains To Be Done The majority of the specification's domain models, services, CLI commands, and infrastructure modules are now implemented. The following areas still require completion or have only partial implementations: -- **Actor compiler**: A standalone compiler module that transforms actor YAML configurations into runnable LangGraph StateGraph instances (graph node wiring, conditional routing, subgraph invocation). The actor loader, registry, and schema infrastructure exist; the compilation step from YAML to executable graph is the remaining gap. -- **MCP runtime adapter**: Live connection to MCP servers for external tool discovery and invocation at runtime. Schema and domain models for MCP server definitions (stdio, SSE, streamable-http transports) exist; the runtime bridge that actually connects to and communicates with MCP servers is pending. -- **Validation runner pipeline**: A dedicated module for executing required and informational validations attached to resources, with pass/fail gating on the apply phase. Validation CLI commands and tool-level schema validation exist; the standalone validation pipeline runner is pending. +- **Actor compiler**: A standalone compiler module that transforms actor YAML configurations into runnable LangGraph StateGraph instances (graph node wiring, conditional routing, subgraph invocation). The actor loader, registry, and schema infrastructure exist; the compilation step from YAML to executable graph is the remaining gap. **This is the M2 critical-path blocker.** +- **MCP runtime adapter**: Live connection to MCP servers for external tool discovery and invocation at runtime. Aditya has active work on `develop-aditya-2` branch. Schema and domain models exist; the runtime bridge is pending. +- **Decision persistence**: Hamza has active work on `feature/m4-decision-persistence`. The domain model and context snapshots are now merged; the database persistence layer (tables, repositories, CRUD) is next. +- **Decision recording service**: Wire decision recording into the strategize/execute phases so decisions are automatically captured during plan execution. +- **Validation runner pipeline**: A dedicated module for executing required and informational validations attached to resources, with pass/fail gating on the apply phase. - **Estimation actor logic**: The `estimation_actor` field is plumbed through Plan, Action, CLI, and service layers, but no actual estimator implementation exists to compute cost/risk estimates before execution. - **ACMS v1 full pipeline**: Context policy with phase-scoped views and the context service exist. Still pending: Universal Knowledge Ontology (UKO) with RDF-based resource representation, Context Request Protocol (CRP), pluggable context strategies, the full ten-component Context Assembly Pipeline, and hot/warm/cold tiered storage with per-actor scoped views. - **Large-project context management**: Indexing 10,000+ file codebases with bounded memory context assembly, skeleton compression for parent-to-child context propagation, and performance validation at scale. +- **Sandbox merge/apply with validation gating**: The apply service exists but needs validation gating hooks and conflict resolution for the sandbox merge pipeline. +- **E2E smoke test suites**: Per-milestone E2E verification suites (#402-#407) need to be written to validate milestone success criteria. The following areas are substantially implemented and are no longer blocking: -- Resource abstraction (types, registry, handlers, auto-discovery, CLI) +- Resource abstraction (types, registry, handlers with git-checkout and fs-directory, DAG metadata, CLI) - Sandbox strategies (git_worktree, copy-on-write, no-sandbox, factory, merge) - Tool system (runner, registry, built-in file/git/changeset tools, schema validation, lifecycle, router) -- Security hardening (config scanner, sandboxed Jinja2 templates, input validation, credential redaction) +- Security hardening (config scanner, sandboxed Jinja2 templates, input validation, credential redaction, secrets masking) - Apply pipeline (plan_apply_service with diff review, merge, changeset capture) -- Decision tree (embedded in Plan model with decision_root_id, decision log, used by correction engine) +- Decision domain model (12 decision types, context snapshots, influence DAG, frozen model helpers) - Correction engine (revert/append modes, BFS impact analysis, dry-run reporting) - Invariant reconciliation (domain model with scopes, merge with precedence, enforcement service) - Subplan orchestration (domain models for config, status, merge strategies, failure handling) +- Phase reversion (constrained apply -> back to strategize state machine) - Checkpointing (CheckpointScope, profile flags, cleanup pruning, integrated throughout) -- Automation profiles (8 built-in profiles, guard logic, 4-level precedence service) +- Automation profiles (8 built-in profiles, guard logic, 4-level precedence service, CLI commands) - Agent Skills loader (registry, protocol, built-in skills, SKILL.md schema support) - LSP integration (stub modules with registry, models, tool adapter — runtime deferred to server mode) - Server connectivity stubs (ACP HTTP transport stub, ACP facade, local-mode routing) ### Milestone Roadmap -#### Milestone 1: Minimal Plan Execution (~Day 16) +#### Milestone 1: Minimal Plan Execution (Target: Feb 15, ETA: ~Feb 25) **Goal**: A minimally usable local-mode flow where a user can register an action from YAML, link a git repository resource to a project, and run a plan end-to-end (`plan use` -> `plan execute` -> `plan diff` -> `plan apply`) with a sandboxed workspace and tool-based change capture. -**Current status**: ~82% of M1 tasks complete. The primary gap is the tool-aware execution pipeline — the actor runtime must be able to invoke the LLM, route tool calls, and capture the resulting changes. This depends directly on restoring the v2 LangGraph execution infrastructure. +**Current status**: ~86% of M1 tasks complete (7 open out of ~157 total M1 issues). Resource handler runtime (git-checkout, fs-directory) now done. Actor runtime and tool-calling partially operational. **Key remaining work**: -- Restore v2 LangGraph agent runtime with tool-calling support -- Wire plan execute to actor runtime with ChangeSet capture via tool invocations -- Implement sandbox merge/apply pipeline with validation gating hooks -- Complete resource handler runtime and tool/resource bindings -- End-to-end source-code smoke test suite +- Sandbox merge/apply pipeline with conflict resolution and validation gating hooks (#155) +- E2E source-code plan lifecycle smoke test suite (#156) +- FakeListLLM default removal and provider cost controls (#323, #324) +- Docs reorganization completion (#408, #409) #### Milestone 2: Actor Compiler + Full LLM Integration (~Day 20) @@ -2125,13 +2135,28 @@ The gap is expected to **narrow** in later milestones because the foundational i | Developer | Role | Primary Focus Areas | Notes | |-----------|------|---------------------|-------| -| **Jeff** | CTO/Lead Architect | Critical path items, architectural decisions, complex integrations | Fastest, most expert developer - handles blocking issues | -| **Luis** | Senior Python Architect | Domain models, persistence, algorithms, state machines | Good architecture but can be pedantic - needs clear requirements | -| **Aditya** | Domain Expert (Agents/LLMs) | Actor YAML configs, hierarchical actors, skill execution | Understands topic best but code may need cleanup | -| **Hamza** | Python/RDF Expert | Resources, sandbox, database, general Python | Well-rounded, no agent experience - assign infrastructure | -| **Rui** | Fast Developer | Testing (Behave/Robot), simpler implementations (post-2026-02-27) | New to Python; unavailable 2026-02-13 to 2026-02-27 | -| **Brent** | Quality Specialist | Code review, linting, type checking, documentation | Slow but detail-oriented - low contention independent work | -| **Mike/Brian** | Sysadmins | Deployment, infrastructure setup | Minimal coding tasks | +| **Jeff** (freemo) | CTO/Lead Architect | Critical path items, architectural decisions, complex integrations | Fastest, most expert developer - handles blocking issues | +| **Luis** (CoreRasurae) | Senior Python Architect | Domain models, persistence, algorithms, state machines | Good architecture but can be pedantic - needs clear requirements | +| **Aditya** (aditya) | Domain Expert (Agents/LLMs) | Actor YAML configs, hierarchical actors, skill execution | Understands topic best but code may need cleanup | +| **Hamza** (hamza.khyari) | Python/RDF Expert | Resources, sandbox, database, general Python | Well-rounded, no agent experience - assign infrastructure | +| **Rui** (hurui200320) | Fast Developer | Testing (Behave/Robot), simpler implementations (post-2026-02-27) | New to Python; unavailable 2026-02-13 to 2026-02-27 | +| **Brent** (brent.edwards) | Quality Specialist | Code review, linting, type checking, E2E tests, documentation | Slow but detail-oriented - low contention independent work | +| **Mike** (mngrif) / **Brian** (brian) | Sysadmins | Deployment, infrastructure setup, CI/CD | Minimal coding tasks | + +### Current Developer Workload (Day 16 — 2026-02-24) + +| Developer | Open Issues | Story Points | M1 | M2 | M3 | M4 | M5 | M6 | Post-MVP | Unscoped | +|-----------|-------------|-------------|-----|-----|-----|-----|-----|-----|----------|----------| +| **Jeff** (freemo) | 41 | ~1200 | 1 | 7 | 0 | 1 | 7 | 4 | 1 | 20 | +| **Luis** (CoreRasurae) | 33 | 272 | 3 | 5 | 4 | 6 | 1 | 7 | 7 | 0 | +| **Hamza** (hamza.khyari) | 20 | 150 | 0 | 0 | 4 | 1 | 6 | 2 | 7 | 0 | +| **Brent** (brent.edwards) | 16 | 56 | 2 | 3 | 3 | 2 | 2 | 2 | 1 | 1 | +| **Aditya** (aditya) | 7 | 53 | 0 | 6 | 0 | 0 | 1 | 0 | 0 | 0 | +| **Mike** (mngrif) | 1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | +| **Totals** | **118** | **~1734** | **6** | **21** | **11** | **10** | **17** | **15** | **16** | **22** | + +> **Note**: Jeff's high point total includes all Epics and Legendaries (organizational tracking items, not direct coding). +> Unscoped column includes Epics, Legendaries, and cross-cutting PRs not assigned to a specific milestone. ## Weekly Development Schedules @@ -2525,3 +2550,43 @@ Each schedule update entry must include: timeline reference, summary, milestone | M6 | 0/3 | 0/0 | 0/5 | 0/2 | 3/4 | 0/0 | 3/14 | | M6+ | 0/1 | 0/0 | 0/7 | 0/7 | 0/1 | 0/1 | 0/17 | | Total | 43/62 | 8/14 | 8/29 | 2/24 | 13/21 | 0/1 | 74/151 | + +### 2026-02-24 (Day 16 since kickoff on 2026-02-09) +- Timeline reference: Day 7/M1 = 2026-02-15, Day 14/M2 = 2026-02-22, Day 18/M3 = 2026-02-26, Day 22/M4 = 2026-03-02, Day 26/M5 = 2026-03-06, Day 30/M6 = 2026-03-10. +- Summary (Team | Status | Risk | Notes): Behind ~7-9d | HIGH | Decision domain model + context snapshots merged (Hamza PR #385); resource registry + DAG metadata + handler runtime merged; phase reversion landed; MCP adapter in progress (Aditya); decision persistence in progress (Hamza); docs reorganization in progress (Jeff). 17 stale pre-rebaseline issues closed during tracker cleanup. +- Milestone forecast (Target -> ETA | Delta | Risk): + - M1 (2026-02-15) -> ETA 2026-02-26 | +11d | HIGH — 7 open issues remain; sandbox apply + E2E suite are blockers + - M2 (2026-02-22) -> ETA 2026-03-01 | +7d | HIGH — actor compiler + MCP adapter + agent skills + changeset persistence + - M3 (2026-02-26) -> ETA 2026-03-05 | +7d | MED-HIGH — decision persistence/recording + validation pipeline + invariant enforcement + - M4 (2026-03-02) -> ETA 2026-03-08 | +6d | MED-HIGH — subplan orchestrator + parallel execution + three-way merge + - M5 (2026-03-06) -> ETA 2026-03-11 | +5d | MEDIUM — ACMS pipeline + context scaling + checkpointing + - M6 (2026-03-10) -> ETA 2026-03-13 | +3d | MEDIUM — autonomy hardening + server stubs + E2E porting test +- Track forecast (Track | Status | ETA | Risk | Blocking): + - Track A (Plan lifecycle) | mostly done, config service remaining | ETA 2026-03-06 | LOW | A9 config deferred to M5 + - Track B (Resources + sandbox) | substantially complete | ETA done | LOW | auto-discovery remaining only + - Track C (Actors/tools/skills/MCP) | behind ~6-7d | ETA 2026-03-01 | HIGH | actor compiler + MCP adapter + - Track D (Decisions/validations) | behind ~7-8d | ETA 2026-03-05 | HIGH | decision persistence + validation runner + - Track E (Corrections/subplans) | behind ~6-8d | ETA 2026-03-08 | MED-HIGH | subplan scheduler + parallel exec + - Track F (ACMS/context) | not started | ETA 2026-03-11 | MEDIUM | dependent on M3 completion + - Track Q (Quality automation) | complete | N/A | LOW | maintenance only + - Track T (Testing) | at risk (Rui returns Feb 27) | ETA ongoing | MEDIUM | E2E suites needed per milestone +- Developer forecast (Name | Days Ahead/Behind | Availability | Risk | Focus): + - Jeff | -2d behind | available | HIGH | M1 completion (sandbox apply), actor compiler (#158), docs (#408) + - Luis | -3d behind | available | HIGH | validation pipeline (#175, #176), changeset persistence (#163), sandbox merge (#155) + - Hamza | -1d behind | available | MED-HIGH | decision persistence (#171), decision recording (#172), plan explain CLI (#174) + - Aditya | +1d ahead | available | MEDIUM | MCP adapter (#159), agent skills (#160), actor YAML extensions (#157) + - Brent | on track | available | MEDIUM | E2E suites (#156, #169, #402-#407), DB parallelism fix (#410) + - Rui | N/A (unavailable until Feb 27) | returning 2026-02-27 | MEDIUM | Behave/Robot tests after return + - Mike/Brian | N/A | standby | LOW | ASV runner fix (#388) +- Task inventory (Milestone x Developer, current rebaseline): + Note: Each cell is **completed/total issues** for that milestone/owner per Forgejo tracker. Completed counts reflect closed issues; totals equal closed plus open. Updated to reflect 17 stale issue closures. + | Milestone | Jeff | Aditya | Luis | Hamza | Brent | Rui | Total | + |-----------|------|--------|------|-------|-------|-----|-------| + | M1 | 23/25 | 1/1 | 1/2 | 3/3 | 4/5 | 0/0 | 32/36 | + | M2 | 5/9 | 0/5 | 0/2 | 1/2 | 0/1 | 0/0 | 6/19 | + | M3 | 12/13 | 7/7 | 5/9 | 1/5 | 5/7 | 0/0 | 30/41 | + | M4 | 3/6 | 0/0 | 1/3 | 0/1 | 0/1 | 0/0 | 4/11 | + | M5 | 0/5 | 0/1 | 1/1 | 0/6 | 1/2 | 0/0 | 2/15 | + | M6 | 0/3 | 0/0 | 0/5 | 0/2 | 3/4 | 0/0 | 3/14 | + | M6+ | 0/1 | 0/0 | 0/7 | 0/7 | 0/1 | 0/1 | 0/17 | + | **Total** | **43/62** | **8/14** | **8/29** | **5/26** | **13/21** | **0/1** | **77/153** |