M7.2: share the loop's parts #148

Merged
dongar merged 1 commits from share-loop into main 2026-10-13 21:52:34 +00:00
Collaborator

Development Plan M7.2, using the approach we agreed: share the loop's parts, not its scheduler. nisse-review will get its own small scheduler. Nothing changes in behaviour.

What moves into nisse-core

  • loop.driver. The driver run, with two seams:
    • each run is told which tools end it (waiting=); nisse-dev passes WAITING_TOOLS;
    • execution goes to any Executor (nisse-dev's Workspace is one), and ToolOutcome moves along with it.
  • loop.tools. The tool() helper and names(), plus the control tools any agent offers: read_note, list_notes, search_notes, remember, forget, memory_done and ask_expert. nisse-dev keeps its own tools: restate, the milestone tools, reply, propose_* and the others.
  • loop.expert. ask_expert, moved from nisse_dev/expert.py together with its tests.
  • knowledge.handlers. A Knowledge class built from what LoopAgent used to do inline: the vault and memory control tools, the memory index shown once per item, and the vault and memory prompt text. Notes stay limited to the item's own project. The agent supplies its own opening for the memory pass, then the shared instructions follow.
  • config. ConfigError, file reading, ${VAR} references, people lists, the vault section, the LLM's numbers, and a generic parser that reads tuning sections from the agent's own dataclass. nisse-dev's AgentConfig is now built from these pieces.

What stays in nisse-dev

  • the scheduler, items, milestones, preflight and the go-ahead reader;
  • its fast-path rules;
  • the classifier, until nisse-ops needs it;
  • delegation, profiles and projects.

New core tests

  • test_driver: a run with an executor that isn't a workspace, plus the agent's own waiting set. A tool that waits in nisse-dev doesn't end the run unless the agent names it.
  • test_knowledge: the Knowledge class on its own, covering tools, labelled results, the project-only rule and provenance.
  • test_shared_config: the shared config pieces, tested against a made-up agent's tuning sections.

Locally, all 831 unit tests pass and ruff is clean. The PR is labelled e2e:full because it touches the loop's core (the driver and memory pass).

Docs

  • The Development Plan marks M7.2 done.
  • Architecture Part L names the loop parts, and says each agent keeps its own scheduler.
  • The nisse-core README lists the new parts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk

Development Plan M7.2, using the approach we agreed: share the loop's parts, not its scheduler. nisse-review will get its own small scheduler. Nothing changes in behaviour. **What moves into `nisse-core`** - **`loop.driver`.** The driver run, with two seams: - each run is told which tools end it (`waiting=`); nisse-dev passes `WAITING_TOOLS`; - execution goes to any `Executor` (nisse-dev's `Workspace` is one), and `ToolOutcome` moves along with it. - **`loop.tools`.** The `tool()` helper and `names()`, plus the control tools any agent offers: `read_note`, `list_notes`, `search_notes`, `remember`, `forget`, `memory_done` and `ask_expert`. nisse-dev keeps its own tools: `restate`, the milestone tools, `reply`, `propose_*` and the others. - **`loop.expert`.** `ask_expert`, moved from `nisse_dev/expert.py` together with its tests. - **`knowledge.handlers`.** A `Knowledge` class built from what `LoopAgent` used to do inline: the vault and memory control tools, the memory index shown once per item, and the vault and memory prompt text. Notes stay limited to the item's own project. The agent supplies its own opening for the memory pass, then the shared instructions follow. - **`config`.** `ConfigError`, file reading, `${VAR}` references, people lists, the vault section, the LLM's numbers, and a generic parser that reads tuning sections from the agent's own dataclass. nisse-dev's `AgentConfig` is now built from these pieces. **What stays in nisse-dev** - the scheduler, `items`, `milestones`, `preflight` and the go-ahead `reader`; - its fast-path rules; - the classifier, until nisse-ops needs it; - `delegation`, profiles and projects. **New core tests** - `test_driver`: a run with an executor that isn't a workspace, plus the agent's own waiting set. A tool that waits in nisse-dev doesn't end the run unless the agent names it. - `test_knowledge`: the `Knowledge` class on its own, covering tools, labelled results, the project-only rule and provenance. - `test_shared_config`: the shared config pieces, tested against a made-up agent's tuning sections. Locally, all 831 unit tests pass and `ruff` is clean. The PR is labelled `e2e:full` because it touches the loop's core (the driver and memory pass). **Docs** - The Development Plan marks M7.2 done. - Architecture Part L names the loop parts, and says each agent keeps its own scheduler. - The `nisse-core` README lists the new parts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
dev-agent added the e2e:full label 2026-10-13 21:31:30 +00:00
dev-agent added 1 commit 2026-10-13 21:31:30 +00:00
M7.2: share the loop's parts
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 2m21s
CI / e2e (pull_request) Successful in 11m45s
f32ccf9881
Shared parts, not a shared scheduler (agreed): nisse-review will have its
own small scheduler; a common one waits until two exist to compare.

- nisse_core.loop.driver: the driver run, moved; the agent names its
  waiting tools per run (nisse-dev's are WAITING_TOOLS), and execution
  goes to any Executor (ToolOutcome moves with it).
- nisse_core.loop.tools: the tool helper and the tools any agent offers
  (notes, memory, memory_done, ask_expert); nisse_core.loop.expert.
- nisse_core.knowledge.handlers: Knowledge, the vault and memory as
  control tools, the index and prompt text, out of LoopAgent.
- nisse_core.config: file reading, references, people, tuning sections of
  the agent's own, LLM numbers, the vault.
- New core tests: a driver run with a non-workspace executor and the
  agent's own waiting set; Knowledge alone; the shared config pieces.

Docs: the Development Plan marks M7.2 done; Architecture Part L and the
nisse-core README name the new parts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
dongar approved these changes 2026-10-13 21:52:31 +00:00
dongar merged commit fc71d3da75 into main 2026-10-13 21:52:34 +00:00
dongar deleted branch share-loop 2026-10-13 21:52:34 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#148