Commit Graph

462 Commits

Author SHA1 Message Date
bcbdc7d7cb feat: add thought_search tool for querying Timmy's thinking history (#260)
Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
2026-03-15 19:35:58 -04:00
80aba0bf6d [loop-cycle-63] feat: session_history tool — Timmy searches past conversations (#251) (#258) 2026-03-15 15:11:43 -04:00
dd34dc064f [loop-cycle-62] fix: MEMORY.md corruption and hot memory staleness (#252) (#256) 2026-03-15 15:01:19 -04:00
7bc355eed6 [loop-cycle-61] fix: strip think tags and harden fact parsing (#237) (#254) 2026-03-15 14:50:09 -04:00
f9911c002c [loop-cycle-60] fix: retry with backoff on Ollama GPU contention (#70) (#238) 2026-03-15 14:28:47 -04:00
7f656fcf22 [loop-cycle-59] feat: gematria computation tool (#234) (#235) 2026-03-15 14:14:38 -04:00
8c63dabd9d [loop-cycle-57] fix: wire confidence estimation into chat flow (#231) (#232) 2026-03-15 13:58:35 -04:00
a50af74ea2 [loop-cycle-56] fix: resolve 5 lint errors on main (#203) (#224) 2026-03-15 13:40:40 -04:00
b4cb3e9975 [loop-cycle-54] refactor: consolidate three memory stores into single table (#37) (#223) 2026-03-15 13:33:24 -04:00
4a68f6cb8b [loop-cycle-53] refactor: break circular imports between packages (#164) (#193) 2026-03-15 12:52:18 -04:00
b3840238cb [loop-cycle-52] feat: response audit trail with inputs, confidence, errors (#144) (#191) 2026-03-15 12:34:48 -04:00
96c7e6deae [loop-cycle-52] fix: remove all qwen3.5 references (#182) (#190) 2026-03-15 12:34:21 -04:00
efef0cd7a2 fix: exclude backfilled data from success rate calculations (#189)
Backfilled retro entries lack main_green/hermes_clean fields (survivorship bias). Now rates are computed only from measured entries. LOOPSTAT shows "no data yet" instead of fake 100%.

Co-authored-by: Kimi Agent <kimi@timmy.local>
Reviewed-on: http://localhost:3000/rockachopa/Timmy-time-dashboard/pulls/189
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 12:29:27 -04:00
766add6415 [loop-cycle-52] test: comprehensive session_logger.py coverage (#175) (#187) 2026-03-15 12:26:50 -04:00
56b08658b7 feat: workspace isolation + honest success metrics (#186)
## Workspace Isolation

No agent touches ~/Timmy-Time-dashboard anymore. Each agent gets a fully isolated clone under /tmp/timmy-agents/ with its own port, data directory, and TIMMY_HOME.

- scripts/agent_workspace.sh: init, reset, branch, destroy per agent
- Loop prompt updated: workspace paths replace worktree paths
- Smoke tests run in isolated /tmp/timmy-agents/smoke/repo

## Honest Success Metrics

Cycle success now requires BOTH hermes clean exit AND main green (smoke test passes). Tracks main_green_rate separately from hermes_clean_rate in summary.json.

Follows from PR #162 (triage + retro system).

Co-authored-by: Kimi Agent <kimi@timmy.local>
Reviewed-on: http://localhost:3000/rockachopa/Timmy-time-dashboard/pulls/186
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 12:25:27 -04:00
f6d74b9f1d [loop-cycle-51] refactor: remove dead code from memory_system.py (#173) (#185) 2026-03-15 12:18:11 -04:00
e8dd065ad7 [loop-cycle-51] perf: mock subprocess in slow introspection test (#172) (#184) 2026-03-15 12:17:50 -04:00
5b57bf3dd0 [loop-cycle-50] fix: agent retry uses exponential backoff instead of fixed 1s delay (#174) (#181) 2026-03-15 12:08:30 -04:00
bcd6d7e321 [loop-cycle-50] refactor: replace bare sqlite3.connect() with context managers batch 2 (#157) (#180) 2026-03-15 11:58:43 -04:00
bea2749158 [loop-cycle-49] refactor: narrow broad except Exception catches — batch 1 (#158) (#178) 2026-03-15 11:48:54 -04:00
ca01ce62ad [loop-cycle-49] fix: mock _warmup_model in agent tests to prevent Ollama network calls (#159) (#177) 2026-03-15 11:46:20 -04:00
b960096331 feat: triage scoring, cycle retros, deep triage, and LOOPSTAT panel (#162) 2026-03-15 11:24:01 -04:00
204a6ed4e5 refactor: decompose _maybe_distill() into focused helpers (#151) (#160) 2026-03-15 11:23:45 -04:00
f15ad3375a [loop-cycle-47] feat: add confidence signaling module (#143) (#161) 2026-03-15 11:20:30 -04:00
5aea8be223 [loop-cycle-47] refactor: replace bare sqlite3.connect() with context managers (#148) (#155) 2026-03-15 11:05:39 -04:00
717dba9816 [loop-cycle-46] refactor: break up oversized functions in tools.py (#151) (#154) 2026-03-15 10:56:33 -04:00
466db7aed2 [loop-cycle-44] refactor: remove dead code batch 2 — agent_core + test_agent_core (#147) (#150) 2026-03-15 10:22:41 -04:00
d2c51763d0 [loop-cycle-43] refactor: remove 1035 lines of dead code (#136) (#146) 2026-03-15 10:10:12 -04:00
16b31b30cb fix: shell hand returncode bug, delete worthless python-exec test (#140)
- Fixed `proc.returncode or 0` bug that masked non-zero exit codes
- Deleted test_run_python_expression — Timmy does not run python, test was environment-dependent garbage
- Fixed test_run_nonzero_exit to use `ls` on nonexistent path instead of sys.executable

1515 passed, 76.7% coverage.

Co-authored-by: Kimi Agent <kimi@timmy.local>
Reviewed-on: http://localhost:3000/rockachopa/Timmy-time-dashboard/pulls/140
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 09:56:50 -04:00
48c8efb2fb [loop-cycle-40] fix: use get_system_prompt() in cloud backends (#135) (#138)
## What

Cloud backends (Grok, Claude, AirLLM) were importing SYSTEM_PROMPT directly, which is always SYSTEM_PROMPT_LITE and contains unformatted {model_name} and {session_id} placeholders.

## Changes

- backends.py: Replace `from timmy.prompts import SYSTEM_PROMPT` with `from timmy.prompts import get_system_prompt`
- AirLLM: uses `get_system_prompt(tools_enabled=False, session_id="airllm")` (LITE tier, correct)
- Grok: uses `get_system_prompt(tools_enabled=True, session_id="grok")` (FULL tier)
- Claude: uses `get_system_prompt(tools_enabled=True, session_id="claude")` (FULL tier)
- 9 new tests verify formatted model names, correct tier selection, and session_id formatting

## Tests

1508 passed, 0 failed (41 new tests this cycle)

Fixes #135

Co-authored-by: Kimi Agent <kimi@timmy.local>
Reviewed-on: http://localhost:3000/rockachopa/Timmy-time-dashboard/pulls/138
Reviewed-by: rockachopa <alexpaynex@gmail.com>
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 09:44:43 -04:00
d48d56ecc0 [loop-cycle-38] fix: add soul identity to system prompts (#127) (#134)
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 09:42:57 -04:00
76df262563 [loop-cycle-38] fix: add retry logic for Ollama 500 errors (#131) (#133)
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 09:38:21 -04:00
f4e5148825 policy: ban --no-verify, fix broken PRs before new work (#139)
Changes:
- Pre-commit hook: fixed stale black+isort reference to ruff, clarified no-bypass policy
- Loop prompt: Phase 1 is now FIX BROKEN PRS FIRST before any new work
- Loop prompt: --no-verify banned in NEVER list and git hooks section
- Loop prompt: commit step explicitly relies on hooks for format+test, no manual tox
- All --no-verify references removed from workflow examples

1516 tests passing, 76.7% coverage.

Co-authored-by: Kimi Agent <kimi@timmy.local>
Reviewed-on: http://localhost:3000/rockachopa/Timmy-time-dashboard/pulls/139
Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
2026-03-15 09:36:02 -04:00
92e123c9e5 [loop-cycle-36] fix: create soul.md and wire into system context (#125) (#130) 2026-03-15 08:37:24 -04:00
466ad08d7d [loop-cycle-34] fix: mock Ollama model resolution in create_timmy tests (#121) (#126) 2026-03-15 08:20:00 -04:00
cf48b7d904 [loop-cycle-1] fix: lint errors — ambiguous vars + unused import (#123) (#124) 2026-03-15 08:07:19 -04:00
aa01bb9dbe [loop-cycle-30] fix: gitea-mcp binary name + test stabilization (#118) 2026-03-14 21:57:23 -04:00
082c1922f7 policy: enforce squash-only merges with linear history (#122) 2026-03-14 21:56:59 -04:00
9220732581 Merge pull request '[loop-cycle-31] feat: workspace heartbeat monitoring (#28)' (#120) from feat/workspace-heartbeat into main 2026-03-14 21:52:24 -04:00
66544d52ed feat: workspace heartbeat monitoring for thinking engine (#28)
- Add src/timmy/workspace.py: WorkspaceMonitor tracks correspondence.md
  line count and inbox file list via data/workspace_state.json
- Wire workspace checks into _gather_system_snapshot() so Timmy sees
  new workspace activity in his thinking context
- Add 'workspace' seed type for workspace-triggered reflections
- Add _check_workspace() post-hook to mark items as seen after processing
- 16 tests covering detection, mark_seen, persistence, edge cases
2026-03-14 21:51:36 -04:00
5668368405 Merge pull request 'feat: Timmy authenticates to Gitea as himself' (#119) from feat/timmy-gitea-identity into main 2026-03-14 21:46:05 -04:00
a277d40e32 feat: Timmy authenticates to Gitea as himself
- .timmy_gitea_token checked before legacy ~/.config/gitea/token
- Token created for Timmy user (id=2) with write collaborator perms
- .timmy_gitea_token added to .gitignore
2026-03-14 21:45:54 -04:00
564eb817d4 Merge pull request 'policy: QA philosophy + dogfooding mandate' (#117) from policy/qa-dogfooding-philosophy into main 2026-03-14 21:33:08 -04:00
874f7f8391 policy: add QA philosophy and dogfooding mandate to AGENTS.md 2026-03-14 21:32:54 -04:00
a57fd7ea09 [loop-cycle-30] fix: gitea-mcp binary name + test stabilization
1. gitea-mcp → gitea-mcp-server (brew binary name). Fixes Timmy's
   Gitea triage — MCP server can now be found on PATH.
2. Mark test_returns_dict_with_expected_keys as @pytest.mark.slow —
   it runs pytest recursively and always exceeds the 30s timeout.
3. Fix ruff F841 lint in test_cli.py (unused result= variable).
2026-03-14 21:32:39 -04:00
rockachopa
7546a44f66 Merge pull request 'policy: enforce PR-only merges to main + fix broken repl tests' (#116) from policy/pr-only-main into main 2026-03-14 21:15:00 -04:00
2fcaea4d3a fix: exclude slow tests from all tox envs (ci, pre-push, coverage) 2026-03-14 21:14:36 -04:00
750659630b policy: enforce PR-only merges to main + fix broken repl tests
Branch protection enabled on Gitea: direct push to main now rejected.
AGENTS.md updated with Merge Policy section documenting the workflow.

Also fixes bbbbdcd breakage: restores result= in repl test functions
which were dropped by Kimi's 'remove unused variable' commit.

RCA: Kimi Agent pushed directly to main without running tests.
2026-03-14 21:14:34 -04:00
24b20a05ca Merge pull request '[loop-cycle-29] perf: eliminate redundant LLM calls in agentic loop (#24)' (#115) from fix/perf-redundant-llm-calls-24 into main 2026-03-14 20:56:33 -04:00
b9b78adaa2 perf: eliminate redundant LLM calls in agentic loop (#24)
Three optimizations to the agentic loop:
1. Cache loop agent as singleton (avoid repeated warmups)
2. Sliding window for step context (last 2 results, not all)
3. Replace summary LLM call with deterministic summary

Saves 1 full LLM inference call per agentic loop invocation
(30-60s on local models) and reduces context window pressure.

Also fixes pre-existing test_cli.py repl test bugs (missing result= assignment).
2026-03-14 20:55:52 -04:00