Commit Graph
76 Commits
Author SHA1 Message Date
Denton Social 927f66b696 dashboard: show answer feedback and auto-select the resumed run
The answer flow ran the whole resume + LLM assessment synchronously before
the frontend cleared the input or flashed anything, so a slow answer looked
like a no-op. Make it optimistic: clear input, disable the button, and show
an in-flight 'answering…' state immediately; then persist a consumed-feedback
line (with a hint when the skill re-asks the same question) and auto-select
the run in the timeline so the answered/assessed/needs_input events are
visible. build_status now carries the pending run_id to drive that selection.
2026-09-25 12:10:40 -05:00
Denton Social 87438c881a async skill-body authoring: single-slot codegen worker, restart, re-dispatch
create_skill now authors the stub synchronously and returns immediately;
the runnable body is written by a single-slot background worker (the gate
stays free for new input). On success the body is materialized and
hot-merged, the leaf's writing flag clears, and the original request is
re-queued at its scored weight and re-runs navigation onto the new leaf.
On failure the leaf stays a restartable stub and the user is notified.

- scheduler: _dispatch_skill launches the async write instead of blocking;
  _run_skill guards writing/stub leaves (no silent no-op); restart_skill
  re-kicks a write for an empty not-in-progress leaf (reuses the stored
  request_text); RLock guards tree/queue/current across worker and main
  thread; awaiting_skill_body meta guard stops a re-dispatched request
  from authoring a second skill.
- skills: Skill.writing + status/is_noop via module-level no-op sentinels;
  registry entries persist the originating request_text.
- engine: call/generate serialized with a Lock so the worker's degeneration
  checks never race main-thread navigation/scoring on one llama.cpp context.
- cli: restart <category> <skill> command; REPL drains the queue after input.
- dashboard: POST /api/restart; /api/tree carries per-skill status; tree
  rows + skill_write_failed flow nodes get restart buttons; reads snapshotted.
- tests: async end-to-end (real CodegenClient vs fake SSE endpoint), restart,
  loop guard, status derivation, dashboard endpoint/status; integration chain
  test rewritten to poll for async completion + assessed.
2026-09-25 03:08:33 -05:00
Denton Social d866d94d04 record revivable SKILL.md git-ref provenance on skill_writing (guardrail item 7) 2026-09-25 00:20:32 -05:00
Denton Social 90fda9f2a4 teach codegen that skills are reusable modules with self-owned data (guardrail item 9) 2026-09-24 23:45:52 -05:00
Denton Social db7d431976 ship exact token accounting via include_usage (codegen guardrail item 3) 2026-09-24 23:12:12 -05:00
Denton Social d18f0ccdb6 ship codegen sampler params + escalation ladder per Qwen3.8 card
CodegenClient now sends temperature/top_p/presence_penalty/frequency_penalty
(card-endorsed high presence_penalty, temp 0.7 instead of greedy 0.0) and
generate_skill_body escalates on invalid parse with an escalated sampler
(temp 0.5/presence 2.0) and a fresh short corrective prompt, up to max_attempts.
Degeneration aborts are a distinct DegenerationError(CodegenError) that
propagates without retry; retry-on-degeneration is left open. Marks guardrail
items 5/6 per the model card.
2026-09-24 20:24:20 -05:00
Denton Social 7c5cd2b685 add SemIf degeneration watchdog for codegen streams
CodegenClient accepts a per-chat degeneration_check callback polled every
interval chars against the last window chars of content+reasoning (bounded
rolling buffer); a non-None return aborts the stream. build_scheduler wires a
2-option SemIf continue/stop decision (P(stop) >= threshold aborts) recorded
as a trace-only codegen event, degrading to keep-going when the engine is
unavailable.
2026-09-24 19:38:01 -05:00
Denton Social 3661443184 parse ollama /api/show parameters string 2026-09-24 18:38:42 -05:00
Denton Social 0076b3d0f9 auto-detect context window and enforce layered token budget 2026-09-24 18:20:44 -05:00
Denton Social 9152c47a5d enforce total budget on streaming codegen 2026-09-24 17:33:41 -05:00
Denton Social 63922c1fad REPL when skill_create needs user input 2026-09-24 05:46:23 -05:00
Denton Social e92b3e7228 idle timeout for codegen 2026-09-24 04:53:06 -05:00
Denton Social 0a9b602ec7 print reasoning tokens to console during testing 2026-09-24 04:09:24 -05:00
Denton Social 8c10a94c32 codegen output token stream prints to console in testing 2026-09-24 03:48:03 -05:00
Denton Social bb97a09caa fix codegen timeout 2026-09-24 03:39:48 -05:00
Denton Social 300c20714b deterministically execute create_skill from create_category, execute skill after creation 2026-09-24 02:31:12 -05:00
Denton Social 5bdfa1d91d Fix integration test: assign generated body to draft.code before materializing 2026-09-24 01:29:18 -05:00
Denton Social 9e365446a3 Drop max_tokens cap on codegen; qwen3 reasoning truncation left content empty
qwen38-iq3s reasons extensively before emitting the skill body. A max_tokens
cap truncated the hidden reasoning (finish_reason: length) leaving content
empty, so the body write failed with 'skill body is empty'. Omit max_tokens
so the model runs to completion (~7 min); reasoning is filtered automatically
since only content is read. Client timeout default raised to 1200s.
2026-09-24 01:20:18 -05:00
Denton Social 440e49e76e Author runnable skill bodies via OpenAI-compatible codegen model
create_skill now writes a real predict/act body: the small decision model
still authors title + description (engine.generate), then a larger
OpenAI-compatible model (default qwen38-iq3s) writes the runnable code
against the SKILL.md contract. Bodies persist to data/skills/<cat>/<name>.py,
are hot-loaded via importlib, merged into the running tree, and the request
re-dispatches to the new leaf. The dashboard decision-flow view shows the
title/description with a writing badge while the body is being written.
Codegen failure degrades to a navigable stub.
2026-09-24 00:36:35 -05:00
Denton Social 789ed4ae25 Allow dotted skill titles (category.skill) in create_skill drafts
The model follows the repo's existing dotted naming (email.compose,
tracking.check) and proposed titles like tracking.status_lookup, which the
strict alnum-only check rejected. Accept dotted snake_case names.
2026-09-23 23:45:52 -05:00
Denton Social e68c56dca4 Fix create_skill wedge: short-circuit single-option navigation, never leave scheduler busy
An empty category produced a one-option SemIf leaf decision; the backend rejects
<2 options, the ValueError unwound past the current-process reset, and every
later request queued forever behind a phantom current. Navigation now
short-circuits empty trees/categories straight to the create branch (no SemIf
decision when there's nothing to choose), and the scheduler clears its current
process even when dispatch raises. Authoring generation is capped at 128 tokens.
2026-09-23 23:41:38 -05:00
Denton Social 225b4df959 Make create_skill author a skill leaf stub like create_category 2026-09-23 23:02:59 -05:00
Denton Social fcefb971f8 Fix SemIfEngine.generate: sample from the low-level llama.cpp backend 2026-09-23 22:32:48 -05:00
Denton Social ea2e5b8045 Automate create_category via normal-mode generation of the decision model 2026-09-23 20:45:28 -05:00
Denton Social 0db41241be Add browser dashboard, run tracing, and logged navigation decisions
- dashboard.py: stdlib http.server + JSON API (tree/trace/dream/status,
  POST submit/relabel); static/ single-page Redux-DevTools-style inspector
- trace.py: runs.jsonl lifecycle events keyed by run_id
- scheduler/skills/skill: every decision carries run_id; navigation choices
  now logged (navigate:category/leaf); requeues stamp meta.parent_run
- cli: 'dashboard' subcommand; config.json untracked per-machine (see
  config.example.json)
2026-09-23 13:43:39 -05:00
semif-agent 4e0e0534c4 Add basic version: SemIf decision engine, urgency queue, skill tree, skill loop, decision log, dream pass, CLI 2026-09-23 03:01:45 -05:00