Commit Graph

105 Commits

Author SHA1 Message Date
d51f76aee0 docs: mark M8.2 skill system deliverables complete in milestones.md 2026-04-07 02:25:29 +02:00
4a37e84114 feat(skill): enhanced coordinator prompt with fan-out and concurrency guidance 2026-04-07 02:24:49 +02:00
338d4a12b8 feat(skill): pipe mode support and main.go wiring 2026-04-07 02:19:42 +02:00
71b0cf9490 feat(skill): TUI integration — /skillname invokes skills, /skills lists them 2026-04-07 02:18:12 +02:00
995b26ffe7 feat(skill): registry with multi-directory loading and precedence 2026-04-07 02:17:17 +02:00
42fc2adcd8 feat(skill): bundled /batch skill with go:embed 2026-04-07 02:16:35 +02:00
327e4d74c0 feat(skill): template rendering with Go text/template 2026-04-07 02:15:51 +02:00
106694e36a feat(skill): core Skill type and YAML frontmatter parser 2026-04-07 02:05:49 +02:00
62e1e4f11d chore: add gopkg.in/yaml.v3 for skill frontmatter parsing 2026-04-07 02:04:36 +02:00
8fdad3dd31 docs: mark M8.1 hook system deliverables complete in milestones.md 2026-04-07 01:09:07 +02:00
a9df023732 feat: wire hook dispatcher in main.go — SessionStart, SessionEnd, PreCompact 2026-04-07 01:08:40 +02:00
03d3a5d016 feat: engine hook integration — PreToolUse, PostToolUse, Stop 2026-04-07 01:02:55 +02:00
cf792c7059 feat: AgentExecutor — elf-based hook evaluation via elf.Manager 2026-04-07 00:55:19 +02:00
1aa1d83e9e feat: PromptExecutor — LLM-based hook evaluation via router 2026-04-07 00:53:53 +02:00
7d0b9c222f feat: ParseHookDefs — config to HookDef conversion with validation 2026-04-07 00:52:00 +02:00
d27dea5ee0 feat: hook config schema with user+project merge ordering 2026-04-07 00:50:53 +02:00
5701bc2033 feat: Dispatcher — handler chain dispatch, filtering, transform chaining 2026-04-07 00:48:08 +02:00
bf50aa234f feat: CommandExecutor — shell hook execution with stdin/stdout protocol 2026-04-07 00:38:48 +02:00
345fa5bbd4 feat: hook payload marshal/unmarshal helpers 2026-04-07 00:37:40 +02:00
ff9fd8c294 feat: hook core types — EventType, Action, CommandType, HookDef, Executor 2026-04-07 00:36:18 +02:00
451c79aaf6 docs: M8.1 hook system design spec 2026-04-06 02:42:34 +02:00
ada9c5c442 docs: mark M7 deliverables complete in milestones.md 2026-04-06 00:59:16 +02:00
9b1d6ca100 test: M7 audit — quality feedback, coordinator, agent tool coverage
Quality feedback integration: TestQualityTracker_InfluencesArmSelection
verifies that 5 successes vs 5 failures tips Router.Select() to the
high-quality arm once EMA has enough observations. Companion test
confirms heuristic fallback below minObservations.

Coordinator tests expanded from 2 → 5: added guidance content check
(parallel/serial/synthesize present), false-positive table extended with
7 cases including the reordered keywords from the previous fix.

Agent tool suite: tool interface contracts for all four tools (Name,
Description, Parameters validity, IsReadOnly). Extracted duplicated
2000-char truncation into truncateOutput() helper (format.go), removing
the inline copies in agent.go and batch.go. Four boundary tests cover
empty, short, exact-max, and over-max cases.
2026-04-06 00:59:12 +02:00
15345540f2 fix: ClassifyTask priority ordering — orchestration below operational types
Operational task types (debug, review, refactor, test, explain) now gate
before orchestration in the keyword cascade. Previously, prompts like
"review the orchestration layer" or "refactor the pipeline dispatch"
matched "orchestrat"/"dispatch" and misclassified as TaskOrchestration.
Planning is also moved below the operational types.

Expanded orchestration keywords to cover common intent that the original
four keywords missed: "fan out", "subtask", "delegate to", "spawn elf".

Adds regression tests for false-positive cases and positive tests for new
keywords.
2026-04-06 00:58:54 +02:00
32c8691a43 docs: document session persistence, resume flags, and incognito mode 2026-04-06 00:30:37 +02:00
8f10b92ae1 feat: interactive session picker for /resume and --resume 2026-04-06 00:22:52 +02:00
2d41c2d46c fix: session security and correctness — path traversal, turn count restore, incognito quality leak
- store: validate session ID against store root to block path traversal in Load/Save
- local: seed turnCount from LocalConfig.TurnCount so resumed sessions keep correct turn count
- main: pass TurnCount from snapshot to LocalConfig on resume
- main: suppress quality.json save when --incognito is active
- main: handle UserConfigDir error in quality save defer instead of silently using wrong path
- test: add TestSessionStore_Load/Save_RejectsPathTraversal
2026-04-06 00:04:09 +02:00
87f8d2697f feat: wire --resume/-r CLI flags, SessionStore, quality persistence
- Add --resume/-r flags; empty = list sessions, ID = restore specific session
- Create SessionStore from config.ProjectRoot() and cfg.Session.MaxKeep
- Wire SessionID and Store into session.NewLocal
- Restore QualityTracker EMA data from ~/.config/gnoma/quality.json at startup
- Persist QualityTracker data to quality.json via defer on process exit
2026-04-05 23:52:05 +02:00
4597d4cb08 feat: /resume TUI command + SessionStore in tui.Config
- Add SessionStore field to tui.Config
- Add /resume slash command: lists sessions or restores by ID
- Pass SessionStore to tui.New in main.go
- Update /help text to include /resume
- Add .gnoma/sessions/ to .gitignore
2026-04-05 23:51:48 +02:00
16193de4fc feat: LocalConfig + auto-save hook in session.Local
Refactor NewLocal to accept LocalConfig (matching engine/router patterns),
add persistence fields (SessionID, Store, Incognito, Logger), capture
finalState before releasing the lock to avoid data races, and auto-save
a Snapshot after each successful turn when a store is configured.
Add SessionID() to the Session interface and three new tests covering
auto-save, no-store no-panic, and SessionID accessors.
2026-04-05 23:46:48 +02:00
ca163dc8d4 feat: QualityTracker.Snapshot/Restore + Router.QualityTracker() for cross-session persistence 2026-04-05 23:40:19 +02:00
20fb045cba feat: Engine.SetHistory/SetUsage/SetActivatedTools for session restore 2026-04-05 23:39:38 +02:00
bbd7791428 feat: add Session config section (max_keep for session retention) 2026-04-05 23:37:10 +02:00
8b489d429a test: snapshot JSON round-trip with multi-turn conversation 2026-04-05 23:35:25 +02:00
3cf5cdeeb6 feat: SessionStore — save/load/list/prune session snapshots to .gnoma/sessions/ 2026-04-05 23:34:29 +02:00
ef2d058cc0 feat: JSON serialization for Message and Content (session persistence blocker)
Add custom MarshalJSON/UnmarshalJSON on Content using string type discriminant
("text", "tool_call", "tool_result", "thinking"). Add json tags to Message.
2026-04-05 23:31:25 +02:00
3f258a1bc7 feat: coordinator mode — system prompt injection for orchestration tasks 2026-04-05 23:07:56 +02:00
8d3d498245 feat: coordinator mode — system prompt injection for orchestration tasks 2026-04-05 23:06:23 +02:00
dd9f4e390a feat: accurate context window sizing from arm capabilities + prefix token baseline + tokenizer wiring 2026-04-05 22:26:31 +02:00
27ca12f863 feat: tokenizer-aware Tracker.CountTokens/CountMessages replaces EstimateMessages in compaction 2026-04-05 22:21:12 +02:00
62112cff55 feat: list_results + read_result tools for coordinator artifact discovery 2026-04-05 22:19:05 +02:00
7c991a9c68 feat: list_results + read_result tools for coordinator artifact discovery 2026-04-05 22:15:04 +02:00
6cf5e92957 feat: QualityTracker — EMA router feedback from elf outcomes, ResultFilePaths tracking 2026-04-05 22:08:08 +02:00
8a846bd024 fix: restore import order in main.go 2026-04-05 22:02:23 +02:00
d251dd7507 feat: wire persist.Store into engine, elf manager, and agent tools 2026-04-05 21:59:55 +02:00
eab5f26407 test: tokenizer cached encoding path coverage 2026-04-05 21:53:05 +02:00
f7782215dc feat: tiktoken tokenizer — accurate BPE token counting with provider-aware encoding 2026-04-05 21:46:43 +02:00
fbb28de0b8 fix: persist.Store — sanitize callID, log save errors, document List filter semantics 2026-04-05 21:44:03 +02:00
ace3716204 feat: persist.Store — session-scoped /tmp tool result persistence 2026-04-05 21:38:45 +02:00
01a05fba4e docs: M6/M7 close-out implementation plan — 8 tasks, TDD, full file map 2026-04-05 21:33:42 +02:00