Skip to content

Phase 2 · install-wide world-fact-cap tier (#100 carry-forward) - #101

Closed
nandanito wants to merge 1 commit into
mainfrom
feat/install-wide-world-fact-cap
Closed

Phase 2 · install-wide world-fact-cap tier (#100 carry-forward)#101
nandanito wants to merge 1 commit into
mainfrom
feat/install-wide-world-fact-cap

Conversation

@nandanito

Copy link
Copy Markdown
Contributor

What

Fills the deferred middle tier of the world-fact cap — the install-wide default — mirroring the already-shipped three-tier recall budget (#60 / PR #83). This is the small, unblocked carry-forward tracked in #100 (item 3).

Before: resolveWorldFactCap = per-agent override ?? DEFAULT_WORLD_FACT_CAP (two tiers). After: per-agent override ?? install-wide default ?? DEFAULT_WORLD_FACT_CAP (three), exactly as resolveRecallBudget already layers its three.

Changes

  • Kernel
    • install_settings gains a world_fact_cap column (additive, idempotent migration; fresh DBs get it from SCHEMA).
    • InstallSettingsRepository gains getWorldFactCap / setWorldFactCap / clearWorldFactCap, each touching only its own column so the two install-wide defaults (recall budget + world-fact cap) coexist on the single row.
    • resolveWorldFactCap becomes the full three-tier resolution.
    • InstallSettings type gains worldFactCap?.
  • CLI (surfaced CLI-only, like the install-wide recall budget — no HTTP/console surface exists for either)
    • asterism config world-fact-cap --default <n> — set / --default --unset / --default to show, dispatched the same way as recall-budget --default (handles both --default 40 and --default=40).
    • The per-agent verb now reports the effective fallback (install-wide default vs default) in its clear/show messages.
    • config show gains an Install-wide world-fact cap: header and the [install-wide default] per-agent label.
    • help + docs/commands.md updated (incl. the previously-missing recall-budget --default synopsis).

Tests

  • install-settings.test.ts: world-fact-cap set/clear/validate + a coexistence test (the two install-wide defaults don't clobber each other).
  • world-facts.test.ts: three-tier resolveWorldFactCap precedence (per-agent > install-wide > constant, with fall-back on each clear).
  • cli.test.ts: the install-wide world-fact-cap suite (set, inline --default=, show+clear, reject non-positive, precedence) — replaces the old "not available yet" rejection test.

Suite 1112 → 1123, tsc clean, verify:node + verify:deno 15/15. Verified end-to-end through the real CLI binary.

Notes

  • Confinement / golden rules unchanged: install_settings is the existing, deliberate narrow non-agent-scoped exception (it carries no agent data); per-agent caps stay agentId-scoped and still win. No change to the cap's semantics (loud write-rejection, never eviction).
  • Carried from Phase 2 deferred follow-ups (carried from #57) #100 (Phase 2 deferred follow-ups). The install-wide world-fact-cap item is now done.

🤖 Generated with Claude Code

Fill the deferred middle tier of the world-fact cap: the install-wide
default, mirroring the already-shipped three-tier recall budget (#60/PR #83).

- `install_settings` gains a `world_fact_cap` column (additive, idempotent
  migration); `InstallSettingsRepository` gains get/set/clearWorldFactCap,
  each touching only its own column so the two install-wide defaults coexist.
- `resolveWorldFactCap` is now three tiers:
  per-agent override ?? install-wide default ?? DEFAULT_WORLD_FACT_CAP.
- Surfaced CLI-only (like the install-wide recall budget — no HTTP/console
  surface): `asterism config world-fact-cap --default <n>` (set/--unset/show),
  the per-agent verb now reports the install-wide default as the effective
  fallback, and `config show` gains the install-wide header + the
  `[install-wide default]` label. Help + docs updated.
- Tests: install-settings world-fact-cap (set/clear/validate/coexistence),
  3-tier resolveWorldFactCap precedence, and the CLI install-wide suite
  (replacing the old "not available yet" rejection test).

Suite 1112 → 1123, tsc clean, verify:node + verify:deno 15/15.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nandanito

Copy link
Copy Markdown
Contributor Author

Superseded by #102 — the combined v0.4.0 release PR includes this commit (6a29692) alongside the docs gate and version bump, reviewed together via Codex.

@nandanito
nandanito deleted the feat/install-wide-world-fact-cap branch June 30, 2026 16:35
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.

1 participant