Commit graph

95 commits

Author SHA1 Message Date
Virgil
c75911be67 fix(agentic): run language-specific workspace prep
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 09:45:11 +00:00
Virgil
24bb3b26c6 feat(agentic): add forge PR close action
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 19:18:58 +00:00
Virgil
57ee930717 feat(agentic): add fleet event SSE surface
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 19:04:06 +00:00
Virgil
f45e8552ab feat(agentic): add RFC compatibility aliases
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 15:52:31 +00:00
Virgil
b84e5692a2 feat(agentic): add content platform compatibility surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 15:27:15 +00:00
Virgil
8ed911eb27 feat(agentic): add issue and sprint platform surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 15:12:33 +00:00
Virgil
9d90e7532f feat(agentic): add plan template compatibility tools
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 14:39:40 +00:00
Virgil
27928fc9b4 feat(agentic): add platform auth compatibility surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 14:23:12 +00:00
Virgil
cccc02ed64 feat(agentic): add RFC plan compatibility surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 13:58:57 +00:00
Virgil
c27af1435d feat(agentic): add session replay and shared state tools
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 13:39:24 +00:00
Virgil
671a0872ef feat(agentic): add session lifecycle surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 12:06:40 +00:00
Virgil
2a1e13662d fix(agentic): align platform action aliases
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 11:42:02 +00:00
Virgil
f37980bd4a fix(agentic): register plan named actions
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 11:22:36 +00:00
Virgil
85f3a02361 feat(agentic): add fleet platform actions and commands
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 11:02:11 +00:00
Virgil
6c69005aff feat(agent): implement fleet and sync RFC surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 07:27:15 +00:00
Virgil
7c8542d730 fix(ax): tighten remaining source examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 06:20:14 +00:00
Virgil
e8249c590e fix(ax): rename ambiguous prep helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 06:12:53 +00:00
Virgil
2b7159da7f fix(ax): remove legacy core injection helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:55:02 +00:00
Virgil
998b6094ca fix(ax): trim remaining comment narration
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:34:44 +00:00
Virgil
e8cb1f2d39 fix(ax): trim remaining implementation comments
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:28:26 +00:00
Virgil
06ae13d92b fix(ax): align remaining comments with AX principles
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 04:33:36 +00:00
Virgil
bd12c0a31a fix(ax): align code comments with AX principles
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 22:54:19 +00:00
Virgil
b8e948f2d6 fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 22:40:28 +00:00
Virgil
40a26ca28c fix(ax): continue AX comment cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 22:30:05 +00:00
Virgil
32c2a33284 fix(ax): align service comments with AX examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:47:44 +00:00
Virgil
5e5e19d6de fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:41:45 +00:00
Virgil
da25b6f79f fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:37:15 +00:00
Virgil
e825550a90 fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:30:49 +00:00
Virgil
1cc8fb50e1 fix(ax): continue workspace naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:22:54 +00:00
Virgil
f9eca5e395 fix(ax): align runtime names with AX principles
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:53:36 +00:00
Virgil
7d6fd8af5e fix(ax): make agentic status reads Result-native
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:40:31 +01:00
Virgil
b8466fb56d fix(ax): make workspace extraction Result-native
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:14:57 +01:00
Virgil
faf6b8b6fb fix(ax): unify home-path resolution
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 19:54:17 +01:00
Virgil
3c2575f45b fix(ax): remove proc.go wrapper layer
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 15:48:21 +00:00
Virgil
7672e0922f fix(ax): align plan IDs and validation helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 14:32:01 +00:00
Virgil
3d2fa035a9 refactor(agentic): migrate workflow helpers to core.Result
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 07:30:42 +00:00
Virgil
6c246a7165 docs(ax): add remaining usage examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 00:20:03 +00:00
Virgil
54581dcbd7 fix(ax): register named agentic commands
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 23:37:28 +00:00
Virgil
cef4d5d1f6 docs(ax): add remaining usage examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 23:14:26 +00:00
Virgil
2f7ca89d80 fix(ax): name handlers and align process coverage
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 21:56:45 +00:00
Virgil
4cc763176f fix(ax): share workspace path helpers across services
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 21:19:37 +00:00
Virgil
6ac195c2e6 fix(agentic): align workspace flow with AX design
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 20:15:58 +00:00
Snider
1762620a43 fix(prep): pull latest on workspace resume instead of stale clone
When a workspace already exists (resumed=true), checkout main and
pull origin before creating the feature branch. Prevents agents
from working on stale code after previous runs merged.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 09:22:58 +01:00
Snider
95c104f7b3 feat(workspace): add PHP CODEX.md template + language-aware prep
Workspace prep now detects repo language and copies the right CODEX.md:
- Go repos get CODEX.md.tmpl (existing — Core primitives, banned imports)
- PHP repos get CODEX-PHP.md.tmpl (CorePHP patterns, lifecycle events,
  Actions, BelongsToWorkspace, Flux Pro, FA Pro, UK English)

Added lib.WorkspaceFile() helper for reading individual template files.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-27 06:50:54 +00:00
Snider
f7397324b1 feat(prep): clone core/docs into workspace for agent reference
Agents now get the full ecosystem docs (core.help) at
.core/reference/docs/ in their workspace. 349 markdown files
covering architecture, guides, specs — not just the RFC.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-27 04:39:06 +00:00
Snider
0fc6eeb4cc feat(runner): extract dispatch runner into independent Core service
Moves concurrency, queue drain, workspace lifecycle, and frozen state
from agentic/prep into pkg/runner/ — a standalone Core service that
communicates via IPC Actions only.

- runner.Register wires Actions: dispatch, status, start, stop, kill, poke
- runner.HandleIPCEvents catches AgentCompleted → ChannelPush + queue poke
- Agentic dispatch asks runner for permission via c.Action("runner.dispatch")
- Dispatch mutex moved to struct-level sync.Mutex (fixes core.Lock init race)
- Registry-based concurrency counting replaces disk scanning
- TrackWorkspace called on both queued and running status writes
- SpawnQueued message added for runner→agentic spawn requests
- ChannelPush message in core/mcp enables any service to push channel events
- 51 new tests covering runner service, queue, and config parsing

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:00:47 +00:00
Snider
ba281a2a2d feat: clone workspace dependencies + Docker cleanup
- cloneWorkspaceDeps: reads go.mod, clones Core ecosystem modules from Forge
  into workspace alongside ./repo, rebuilds go.work with all use directives
- Deduplicates deps (dappco.re + forge.lthn.ai map to same repos)
- Container chmod: workspace files made writable before exit so host can clean up
- GONOSUMCHECK for local workspace modules (bypass checksum for dev branches)
- Removed stale OLLAMA_HOST env from container

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 07:37:43 +00:00
Snider
19d849aa75 fix: use Core PerformAsync for agent monitoring — app stays alive
The monitoring goroutine that waits for agent completion was a raw `go func()`
that Core didn't know about. ServiceShutdown killed it immediately on CLI exit.

Now uses PerformAsync which registers with Core's WaitGroup:
- ServiceShutdown waits for all async tasks to drain
- `core-agent workspace dispatch` blocks until agent completes
- Agent lifecycle properly tracked by the framework

Also whitelist agentic.monitor.* and agentic.complete in entitlement checker.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 07:16:48 +00:00
Snider
537226bd4d feat: AX v0.8.0 upgrade — Core features + quality gates
AX Quality Gates (RFC-025):
- Eliminate os/exec from all test + production code (12+ files)
- Eliminate encoding/json from all test files (15 files, 66 occurrences)
- Eliminate os from all test files except TestMain (Go runtime contract)
- Eliminate path/filepath, net/url from all files
- String concat: 39 violations replaced with core.Concat()
- Test naming AX-7: 264 test functions renamed across all 6 packages
- Example test 1:1 coverage complete

Core Features Adopted:
- Task Composition: agent.completion pipeline (QA → PR → Verify → Ingest → Poke)
- PerformAsync: completion pipeline runs with WaitGroup + progress tracking
- Config: agents.yaml loaded once, feature flags (auto-qa/pr/merge/ingest)
- Named Locks: c.Lock("drain") for queue serialisation
- Registry: workspace state with cross-package QUERY access
- QUERY: c.QUERY(WorkspaceQuery{Status: "running"}) for cross-service queries
- Action descriptions: 25+ Actions self-documenting
- Data mounts: prompts/tasks/flows/personas/workspaces via c.Data()
- Content Actions: agentic.prompt/task/flow/persona callable via IPC
- Drive endpoints: forge + brain registered with tokens
- Drive REST helpers: DriveGet/DrivePost/DriveDo for Drive-aware HTTP
- HandleIPCEvents: auto-discovered by WithService (no manual wiring)
- Entitlement: frozen-queue gate on write Actions
- CLI dispatch: workspace dispatch wired to real dispatch method
- CLI: --quiet/-q and --debug/-d global flags
- CLI: banner, version, check (with service/action/command counts), env
- main.go: minimal — 5 services + c.Run(), no os import
- cmd tests: 84.2% coverage (was 0%)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 06:38:02 +00:00
Snider
f83c753277 feat(v0.8.0): full AX migration — ServiceRuntime, Actions, quality gates, transport
go-process:
- Register factory, Result lifecycle, 5 named Action handlers
- Start/Run/StartWithOptions/RunWithOptions all return core.Result
- core.ID() replaces fmt.Sprintf, core.As replaces errors.As

core/agent:
- PrepSubsystem + monitor.Subsystem + setup.Service embed ServiceRuntime[T]
- 22 named Actions + agent.completion Task pipeline in OnStartup
- ChannelNotifier removed — all IPC via c.ACTION(messages.X{})
- proc.go: all methods via s.Core().Process(), returns core.Result
- status.go: WriteAtomic + JSONMarshalString
- paths.go: Fs.NewUnrestricted() replaces unsafe.Pointer
- transport.go: ONE net/http file — HTTPGet/HTTPPost/HTTPDo/MCP transport
- All disallowed imports eliminated from source files (13 quality gates)
- String concat eliminated — core.Concat() throughout
- 1:1 _test.go + _example_test.go for every source file
- Reference docs synced from core/go v0.8.0
- RFC-025 updated with net/http, net/url, io/fs quality gates
- lib.go: io/fs eliminated via Data.ListNames, Array[T].Deduplicate

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 01:27:46 +00:00