Skip to content

feat(pi): lean substrate tool surface; feat(decisions): openlore decisions record CLI - #508

Open
laurentftech wants to merge 3 commits into
mainfrom
feat/pi-lean-tool-surface
Open

laurentftech wants to merge 3 commits into
mainfrom
feat/pi-lean-tool-surface

Conversation

@laurentftech

@laurentftech laurentftech commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two related changes that give Pi and default-preset collaborators the same experience as the Claude Code default.

1. Pi starts with the substrate tool surface (closes #505)

  • A Pi session now activates only the MCP substrate preset tools plus openlore_configure and the new openlore_activate_tools. Before, all 45 tools were active.
  • openlore_activate_tools turns on task groups (specs, memory, review, quality, inspect), by group name or by any tool name in the group. It never turns on a tool the host allowlist excluded, and it never changes non-OpenLore tools.
  • All tools stay registered, so the parity guard and the daemon (--preset full) are unchanged.
  • "pi": { "toolSurface": "all" } in .openlore/config.json keeps every tool active.
  • One-line promptSnippets replace the duplicated full descriptions. CI budgets bound the standing context: lean ≈ 3,089 tokens against 7,445 for all (chars/4 estimate).
  • A test keeps the Pi lean set equal to TOOL_PRESETS.substrate.
  • Decision: ADR-0034 (848b360d). OpenSpec change archived as 2026-09-15-add-pi-lean-tool-surface; mcp-quality spec synced.

2. openlore decisions record

  • The substrate default does not expose record_decision, so collaborators on default settings could not record a decision for the commit gate.
  • The new CLI command calls the same handler as the MCP tool: same ids, scope inference, anchors, already-decided verdict, and background consolidation.
  • Fixes two CLI hints (including the commit-gate message) that named a non-existent openlore decisions --record.
  • Generated agent guidance names the CLI command when record_decision is not wired.
  • OpenSpec change archived as 2026-09-15-add-decisions-record-cli; cli spec synced.

Test plan

  • tsc --noEmit: no errors
  • ESLint on changed files: no issues
  • Vitest: 239 passed, 0 failed (Pi extension, decisions record CLI, decisions handler and autopilot, guidance coherence, TLS coverage, doc-claim sync, config schema)
  • openspec validate cli|mcp-quality --type spec --strict: valid
  • Manual (Pi 0.85.1, dev build via global shim): session starts with read/bash/edit/write + the 17 lean OpenLore tools; openlore_activate_tools(["specs"]) activates the 6 specs tools and openlore_list_spec_domains returns 16 domains from the daemon; repeating it reports alreadyActive: ["specs"] with no change; ["openlore_remember"] activates the whole memory group; hostExcluded: []

Not in this PR

  • openlore decisions --sync drops an approved decision that maps to no spec domain and has component/local scope. It reports "Synced", writes nothing, and purges the decision from the store. Found while syncing ADR-0034; to be tracked separately.

🤖 Generated with Claude Code

laurentftech and others added 3 commits September 15, 2026 23:00
A Pi session now activates only the MCP `substrate` preset tools plus
openlore_configure and the new openlore_activate_tools. The activator turns
on task groups (specs, memory, review, quality, inspect) by group or tool
name. Tools stay registered, so the parity guard and daemon are unchanged.

- pi.toolSurface: "all" in .openlore/config.json keeps every tool active
- one-line prompt snippets replace the duplicated full descriptions
- CI budgets bound the Pi standing context for the lean and all surfaces
- a test keeps the Pi lean set equal to TOOL_PRESETS.substrate

Closes #505. Decision: ADR-0034 (848b360d).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Recording a decision needed the record_decision MCP tool, which the default
`substrate` preset does not expose, so collaborators on default settings were
blocked by the decisions gate. The new command calls the same handler, so ids,
scope inference, anchors, the already-decided verdict, and background
consolidation match the MCP tool on any preset.

- validates --title, --rationale, --scope, and --constraints-file before writing
- --json prints the handler result on stdout
- gate and rejection hints named a non-existent `decisions --record`; they now
  name the real command, and a test keeps it that way
- generated guidance names the CLI command when record_decision is not wired

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ecord

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Implement Dynamic Tool Registration in Pi Extension for Parity with Claude Code MCP

1 participant