Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
486e0d5
kres: don't override settings.models.slow when --slow is unset
Apr 21, 2026
a4a4d50
kres-repl: reset the scroll region around the /edit editor spawn
Apr 21, 2026
b709d52
kres-repl: pause the status-row repainter while /edit holds the tty
Apr 21, 2026
b2c3476
kres-repl: block rustyline readline while /edit holds the terminal
Apr 21, 2026
d2f06ff
kres-repl: serialise readline against the main command loop
Apr 21, 2026
577d8af
kres-repl: skip reaper inference chain while /stop is latched
Apr 21, 2026
8163c85
slow-code-agent-coding: forbid patch-file artifacts for fix tasks
Apr 21, 2026
68fc5a9
tools: add Claude-Code-style edit primitive for in-place fixes
Apr 22, 2026
6369fa5
main-agent: document the read tool's line-range args
Apr 22, 2026
3f82fed
consent: don't strip leading dot from relative-path mentions
Apr 22, 2026
4339a28
main-agent: accept pattern/glob on find, end_line on read
Apr 22, 2026
d5fa179
reaper: surface apply_code_edits outcomes into analysis trailer
Apr 22, 2026
2c56099
main-agent: return read-tool body inline, not just a size header
Apr 22, 2026
86aca4f
main-agent: gate non-MCP actions behind an allowlist, bash off by def…
Apr 22, 2026
4a118d1
README: document coding mode, code_edits, and the action allowlist
Apr 22, 2026
e667878
README.md: add a NEWS section
Apr 22, 2026
ad23595
agents: embed + override ~/.kres/system-prompts for every LLM system …
Apr 22, 2026
6a7ba38
agents: slash-command templates via ~/.kres/commands (review/summary/…
Apr 22, 2026
47b7cb4
repl: fix review findings on the slash-commands landing (6a7ba38)
Apr 22, 2026
8422418
README.md: news update
Apr 22, 2026
e1bb752
review-template: target is above, not below
Apr 22, 2026
12d99ed
pipeline: stop the fast loop from spinning on unanswerable work
Apr 22, 2026
b7393cd
mcp: skip jsonrpc notifications interleaved with responses
Apr 22, 2026
d97d570
review-template: require exhaustive per-lens enumeration
Apr 22, 2026
b9ad50a
kres: plans — per-prompt decomposition shared across agents
Apr 22, 2026
0282e19
kres: require --resume to load a prior session
Apr 22, 2026
af8d38d
skills: note subsystem paths in kernel skill
Apr 22, 2026
8074ed4
README: break into topic docs, keep overview + quick start
Apr 22, 2026
472a58f
docs: tighten topic guides and fix drifted line citations
Apr 22, 2026
dfb16bb
docs: drop dead planning.md link, fix /summary role description
Apr 22, 2026
3e1150d
core: preserve Done todos across goal-met / turns / /stop drains
Apr 22, 2026
957a091
agents: rescue slow-agent prose replies via fast-agent translation
Apr 22, 2026
cd093a3
docs: fold semcode + review-prompts into configuration.md, drop NEWS.md
Apr 22, 2026
deebf04
chore: cargo fmt + quiet rust-1.94.0 clippy lints
Apr 22, 2026
1c461d9
summary: rename output to summary.{txt,md}, stage oversized prompts
Apr 22, 2026
7dcdeb0
kres-agents: narrow cache prefix to skills only
Apr 23, 2026
be1ecac
llm: surface transport failures so offline runs aren't silent
leitao Apr 23, 2026
339a2a4
kres-agents: feed the plan into define_goal
Apr 23, 2026
a05b669
findings: overhaul to jsondb delta store + prose-to-findings audit
Apr 23, 2026
cbbd975
mode: rename Analysis to Audit
Apr 23, 2026
2717902
coding prompt: accept prose-document file writes too
Apr 23, 2026
3ccd425
mode: finish the Audit rename in goal.txt and related prompts
Apr 23, 2026
98d56c2
mode: make Generic the TaskMode default to match classifier policy
Apr 23, 2026
5acfd08
mode: pin Default=Generic and classifier-fallback behaviour with tests
Apr 23, 2026
fa2f029
goal.txt: disambiguate 'analysis flow' in the generic description
Apr 23, 2026
0032572
findings: add file-level task_prose for broader narrative
Apr 23, 2026
7668b69
embedded_prompts: translate legacy basename to post-rename key
Apr 23, 2026
d9623db
summary: derive from findings.json alone
Apr 23, 2026
34c0bce
Merge remote-tracking branch 'origin/pr/1'
Apr 24, 2026
16923a0
review-template.md: Adjust focus on the target area
Apr 24, 2026
9c7cab0
tools: surface empty git output so agents stop looping
Apr 24, 2026
acf20c5
kres: add --export DIR to emit a per-finding folder tree
Apr 24, 2026
7b08ccd
tui: switch the interactive REPL to ratatui
Apr 24, 2026
c861ed8
tui: colourise slow-agent markdown in the scrollback pane
Apr 24, 2026
2397599
tui/io: review follow-up on markdown sink
Apr 24, 2026
5ccf5a4
kres-repl: exit on idle when stdout is not a terminal
Apr 25, 2026
6a4c199
kres-repl: surface filename and subsystem in export metadata
Apr 25, 2026
e3b83b1
kres-repl: gate code_output absolute paths on the consent store
Apr 25, 2026
2ad5a0c
kres: add --one to exit after the work-stop condition fires
Apr 25, 2026
059ef7d
kres: embed triage template and stop granting consent on bare /
Apr 25, 2026
bbf5d17
summary: switch the embedded bug-summary template to plain statements
Apr 25, 2026
8995f02
summary: switch the markdown bug-summary template to plain statements
Apr 25, 2026
7d15274
templates: cleanup language and formatting
Apr 25, 2026
c5ff132
kres-repl: drop the auto /summary at REPL exit
Apr 25, 2026
bd090cd
kres: append pid to the default ~/.kres/sessions/<id> tag
Apr 25, 2026
8444836
kres-repl: add a Subsystem column to the --export INDEX.md table
Apr 25, 2026
1ed37b2
git: add commit-msg hook rejecting lines over 100 chars
Apr 25, 2026
5db9eee
findings-index: per-subsystem indexes + boolean search expressions
Apr 25, 2026
f687c5d
findings-index: drop the auto per-subsystem INDEX-<sub>.md fanout
Apr 25, 2026
0da396f
findings-index: prefer summary.md over FINDING.md in row links
Apr 25, 2026
4ddbd4d
kres-repl: install README.md alongside findings-index.py on --export
Apr 25, 2026
83adda7
export-README: link to INDEX.md from the top of the README
Apr 25, 2026
a6518b2
triage-template: cross-link FINDING.md / metadata.yaml from summary.md
Apr 25, 2026
3bf0f3f
scripts: add a generic xargs-timeout.py runner
Apr 26, 2026
75498a8
findings-index: load saved subset indexes from index-config.yaml
Apr 26, 2026
2253a32
findings-index: add file: and function: search clauses
Apr 26, 2026
5997c8a
kres-repl: halt on N consecutive task errors and surface them to the …
leitao Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Commit-msg hook for the kres repo.
#
# Rejects any commit whose message has a prose line longer than 100
# characters. Lines starting with `#` are git's editor template
# comments and are stripped before the message is recorded — they're
# skipped here so the hook matches what git actually stores.
#
# To install: git config core.hooksPath .githooks

set -euo pipefail

msg_file="$1"
limit=100

bad=$(awk -v limit="$limit" '
/^#/ { next }
{ if (length($0) > limit) printf " line %d (%d chars): %s\n", NR, length($0), $0 }
' "$msg_file")

if [[ -n "$bad" ]]; then
cat >&2 <<EOF
commit-msg: rejecting message — prose line(s) over ${limit} chars:
${bad}

Re-wrap the offending line(s) and retry. Use --no-verify only if you
must bypass.
EOF
exit 1
fi
43 changes: 38 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,34 @@ User prompt → Task created → Task thread starts
- Auto-progress checks goal after each completed task for early exit
- Deferred items (identified but not started when goal met) saved via `/followup`

### Plan + Session Persistence
- `kres_core::Plan` holds the planner's decomposition: `prompt`, `goal`,
`mode`, and `steps` (each with `id`, `title`, `status`, `todo_ids`
linking to `TodoItem` rows). Lives on `TaskManager` as
`Option<Plan>`; `sync_plan_from_todo` rolls up step status from
linked todo statuses.
- `kres_core::SessionState` (`<results>/session.json`) is the
resumable snapshot: plan + todo list + deferred list +
`completed_run_count` + last prompt. Written atomically (tmp +
fsync + rename) from the reaper tick and the various drain
paths.
- Resume: `kres --results <dir> --resume` loads the snapshot,
flips every `InProgress` todo/plan step back to `Pending` (its
prior executor is gone), and seeds the manager + deferred list
before the REPL starts. Without `--resume`, any existing
session.json is left untouched on disk and the REPL starts
clean; a note in the startup banner points at the file so the
operator knows the state is recoverable.
- InProgress drains: ctrl-c, the `--turns N` cap, goal-met, and
`--turns 0` follow-stagnation all call
`TaskManager::reset_in_progress_to_pending()` before moving items
to the deferred list, so a task that was mid-run when the drain
fired still ends up on `/followup` instead of being orphaned.
`/stop` is separate: it moves `Pending|Blocked|InProgress` items
to deferred directly via its own `matches!` pattern
(kres-repl/src/session.rs), so a resumed REPL picks them up via
`/continue`.

### Skills
- Loaded from `~/.kres/skills/*.md` at startup
- Skill files scanned for absolute paths in backticks — referenced files pre-loaded
Expand All @@ -73,8 +101,8 @@ this repo's `configs/` tree:
| `todo-agent.json` | Todo-list-maintenance agent (tools-disabled variant) |
| `mcp.json` | MCP server definitions (installed only when semcode-mcp is available) |
| `settings.json` | Per-user defaults (today: per-role model ids). CLI flags `--fast-model`, `--slow-model`, `--main-model`, `--todo-model` override the matching role; a known `--slow <tag>` (sonnet/opus) also overrides the slow model id unless `--slow-model` is given |
| `prompts/*.system.md` | System prompts referenced by each agent config |
| `prompts/bug-summary.md` | Bug-report template for `/summary` and `kres --summary` |
| `system-prompts/*.system.md` | Optional operator overrides for agent system prompts. Default prompts are embedded in the kres binary (`kres-agents/src/embedded_prompts.rs`); a file at `~/.kres/system-prompts/<basename>` shadows the embedded copy. Empty by default |
| `commands/<name>.md` | Optional operator overrides (or additions) for slash-command templates. Shipped commands `review`, `summary`, `summary-markdown` are embedded in the kres binary (`kres-agents/src/user_commands.rs`). A file at `~/.kres/commands/<name>.md` shadows the embedded copy; adding a new `<name>.md` creates a `/name` command invocable via `--prompt "name: extra"` or `--prompt "/name extra"`. Empty by default |
| `skills/*.md` | Domain knowledge files |

Rate limiters are shared across agents that use the same API key string.
Expand All @@ -85,9 +113,13 @@ Rate limiters are shared across agents that use the same API key string.
|---------|--------|
| `/tasks` `/task` | Show active tasks and states |
| `/todo` | Show pending items (ready/blocked) + completed count |
| `/plan` | Show the current plan + per-step status (produced by `define_plan`) |
| `/resume [PATH]` | Load a persisted `session.json` (defaults to `<results>/session.json.prev` → live file). Overwrites in-memory state |
| `/todo --clear` | Clear all todo items |
| `/cost` | Token usage by agent role and model |
| `/summary` | Main agent synthesizes accumulated findings |
| `/summary [FILE]` | Fast agent renders the run's report.md + findings.json into a summary via the embedded `summary` slash-command template. Output defaults to `summary.txt` in the results dir. Auto-chunks findings when the prompt exceeds the fast agent's `max_input_tokens` and runs a combine pass to merge the partials |
| `/summary-markdown [FILE]` | Same as `/summary` but uses the `summary-markdown` template and defaults the filename to `summary.md` |
| `/review <target>` | Compose the embedded `review` slash-command template with `<target>` and submit as a new task — CLI equivalent of `--prompt 'review: <target>'` |
| `/report <file>` | Write all findings to markdown file |
| `/followup` | Show deferred items (identified but skipped when goal met) |
| `/next` | Run next todo item |
Expand Down Expand Up @@ -148,9 +180,10 @@ Rate limiters are shared across agents that use the same API key string.
prompts/ # System prompts + bug-summary.md
skills/ # Skill files (kernel.md, …)
sessions/<ts>/ # Per-run artifacts when --results not set
findings.json # Cumulative findings (history in findings-N.json)
findings.json # jsondb-backed canonical findings (delta-applied, no history)
report.md # Append-only narrative
bug-report.txt # Output of /summary or kres --summary
session.json # Plan + todo + deferred + counters (resume state)
summary.txt # Output of /summary or kres --summary (summary.md with --summary-markdown)

.kres/logs/<session-uuid>/ # Next to cwd, one dir per REPL run
code.jsonl # All fast + slow agent turns
Expand Down
Loading