1. Executive Summary
Squish is a local-first memory runtime for coding agents, written in
TypeScript for Bun. It stores memories in SQLite and serves them through
an MCP server, a CLI and plugins for Claude Code, Codex, OpenCode,
OpenClaw and Hermes. Notable: recall attaches a rule-based confidence to
every result, and the MCP recall contract drops results under 0.60 and
answers NO CONFIDENT MATCH instead of padding. Weak: a
heuristic resolver retires an older memory on every write by word
overlap, with no audit row and no way back. The calibration figure the
project leads with does not survive its own committed data as a measure
of discrimination.
The confidence claim, checked against the committed artifacts:
- The 0.055 figure recomputes, from a superseded
baseline. The repository description quotes ECE 0.055. The
per-query baseline committed on 25 August 2026
(
tests/golden/baseline-report.jsonatea0b70e6) recomputes to 0.0550. The README now says not to reuse 0.055 as a current result. The baseline at the pin recomputes to 0.0429, matchingdocs/BENCHMARK.md. - The confidence does not separate hits from misses. On the 46-query golden fixture at the pin, the top result is right for 40 queries in every committed baseline. The six misses score between 0.80 and 0.96. The lowest-confidence query, at 0.215, is a hit. The area under the ROC curve for hit against miss is 0.502. A constant confidence of 0.87 would score an ECE of zero on this fixture.
- The fixture is in-sample. Sixty memories and 46
queries, the same file under
tests/golden/andbenchmark/datasets/golden/, with no held-out split. The pin's baseline records a dirty tree, query expansion on, and a commit that is not in the history. benchmark/reports/v2.1.0-benchmark.mdcontradicts itself. It states ECE 0.055 above a five-band table that recomputes to 0.027, and whose band hit rates imply about 0.45 against the Hit@1 of 0.870 it also reports.
The description also calls Squish the only runtime that tells an agent how much to trust each result. That is a market claim and is not assessed here.
Three integration defects at the pin:
- The Claude Code SessionStart hook injects nothing.
It calls
squish contextwith no topic, which exits 1, and reads a JSON key the command never emits (plugins/claude-code/scripts/session-start.sh:8-13,cli/commands/context.ts:26-40). The Codex session-start and pre-compact hooks have the same shape. - The Codex prompt gate discards its own search. It
spawns
squish contextdetached with output ignored (cli/commands/gate.ts:84-93). - The installer reads hook templates from
plugin/, which the 7 November commit deleted (bin/installer-core.mjs:37-38).
Licence. MIT in LICENSE,
package.json and both plugin manifests. A 1 October 2026
commit is titled "fix: license MIT->AGPLv3"; every declaration at the
pin says MIT.
Five marks: trust_state, bitemporal,
scope_enforced, audit_log,
negative_eval. Section 9 gives why
tombstone and human_review are withheld, and
why trust_state rests on beliefs and not on memories.
2. Mental Model
A memory is believed from the moment it is written until
something retires it. rememberMemoryInternal
inserts the row as active and is_active = 1
with confidence_level at its column default,
speculative (core/memory/memory-write.ts:732,
db/bootstrap.ts:105). Nothing has to confirm it first. It
is retrievable as soon as the call returns.
It stops being believed in four ways:
- Supersession on write. Before the write returns,
resolveContradictionscompares the new text with up to 100 active rows of the same project, chosen with no ordering, using Jaccard word overlap in seven scenarios (core/memory/contradiction-resolver.ts:375-394,:442-570). A near-duplicate above 0.85 retires the older row.applySupersessionsets itsuperseded,is_active = 0, ends itsvalid_toat the new row'svalid_from, and links the two (:698-760). An optional model validator can only veto, and is off by default. - Merge. Nightly dedup auto-merges pairs at 0.95 similarity, up to 25 a run.
- Expiry.
expires_ator a closedvalid_todrops the row from both SQL legs at the request's reference time. - Deletion.
forget, or the nightly stale step: an active, unpinned row older than 30 days withimportance_score <= 40andconfidence_levelofspeculativeoroutdatedis deleted outright (core/memory/stale-cleaner.ts:1212-1252,core/consolidation.ts:203-230).
Beliefs are a second, slower layer. Each write
queues an analyze_memory job. The hourly worker extracts
beliefs and strategies into the knowledge table, each with
a status (core/memory/fact-extraction-worker.ts:393-396). A
belief can be disputed and stay on record without being
served. Memories have no such state: one is either live or retired.
Recall confidence is attached at read time and never
stored. attachRecallConfidence derives a number
per result from agreement between the vector, lexical and graph legs,
the margin over the runner-up, conflict and freshness signals
(core/scoring/recall-confidence.ts:1-19). Tiers are HIGH at
0.90, QUALIFIED at 0.60 and LOW below. It ranks nothing and filters only
at the MCP boundary.
Diagram source
%% caption: a memory is believed on write, retired by word overlap before the call returns, and filtered by confidence only at the MCP boundary
flowchart TD
W["squish_remember<br/>or a plugin hook"]
W --> A["active, is_active 1<br/>confidence speculative"]
A --> J["analyze_memory job<br/>queued"]
A --> R{"resolver: Jaccard vs<br/>100 unordered rows"}
R -->|"overlap above<br/>scenario threshold"| S["older row superseded<br/>is_active 0, valid_to set"]
R --> RET["returns to the agent"]
J -->|"hourly worker"| B["belief: active<br/>or disputed"]
A -->|"nightly: 30 days old,<br/>importance 40 or less"| D["deleted"]
Q["squish_recall"] --> L["FTS5, vector and<br/>active-belief legs"]
A --> L
B --> L
L --> X["supersession filter,<br/>then neighbour expansion"]
S -.->|"supersedes edge"| X
X --> C["recall confidence<br/>per result"]
C -->|"under 0.60"| N["dropped; NO CONFIDENT<br/>MATCH if none left"]
C -->|"0.60 and over"| OUT["returned with tier"]3. Architecture
- Core.
core/holds the write path, the retrieval pipeline, the contradiction resolver, the knowledge layer, the scheduler and maintenance. The runtime facade iscore/squish-runtime.ts. - Storage.
db/drizzle/schema-sqlite.tsdefinesmemories,knowledge,knowledge_edges, associations, edit proposals, jobs andtrust_audit_log.audit_logis created on first write bycore/knowledge/audit.ts:34-66. A PostgreSQL schema exists for team mode. Embeddings are stored on the row and searched by cosine in process. - Retrieval.
core/memory/hybrid-search.tsruns a fixed stage list: routing, vector, keyword and belief legs, RRF fusion, boosts, graph boost, supersession, association expansion, multi-hop graph, temporal validity, rerankers, dedup, MMR, scoring, recall confidence and a top-score gate (:1075-1118). - Surfaces. An MCP stdio server (
mcp/, 19 tools, 20 with maintenance), a CLI (cli/), and plugins underplugins/for Claude Code, Codex, OpenCode, OpenClaw and Hermes.server.jsonis an npm MCP manifest. - Background. An in-process cron scheduler
(
core/scheduler/cron-scheduler.ts) runs while the server runs, withcronEnabledon by default (core/config.ts:640-641). - Trust policy.
local-compatibleby default;strictbinds a verified caller, signs provenance withSQUISH_PROVENANCE_PRIVATE_KEY, and disables several unscoped surfaces (core/acl/trust-policy.ts:4-10).
Deployment and ergonomics
The README withholds installation instructions for the 2.2.0 source;
the published npm package is 1.9.0. From source it needs Bun and a local
SQLite file, with no API key on the default local embedding path.
Optional model providers enable query expansion, reranking and the
contradiction validator. The store is a plain SQLite file. The plugins
assume a squish binary on PATH, and the Claude
Code plugin ships committed __pycache__ files beside its
scripts.
4. Essential Implementation Paths
- Write.
rememberMemoryInternalbinds the caller under strict trust, embeds synchronously, computes importance, inserts the row, creates the knowledge projection and the analysis job in one transaction, runs write-time dedup, emitsmemory:stored, then awaits contradiction resolution (core/memory/memory-write.ts:329-1301). - Supersession.
resolveContradictions,detectContradictionsandapplySupersession(core/memory/contradiction-resolver.ts:375-760). - Recall.
squish_recallresolves the project, routes a UUID query togetByIdand everything else tosearch(mcp/tools/memory.ts:381-444), thenbuildRecallResponseapplies the floor (core/retrieval/recall-response.ts:28-61). - Confidence.
assessRecalland the tier constants (core/scoring/recall-confidence.ts:264-286,:516-560). - Belief extraction.
processMemoryAnalysisJobs(core/memory/fact-extraction-worker.ts) andextractBeliefs(core/knowledge/extractor.ts). - Maintenance.
runFullMaintenancesteps decay, score, tiers, dedup, prune-links and stale (core/consolidation.ts:63-230);runAutoClean(core/memory/stale-cleaner.ts:1525). - Edits.
squish_editsproposals with approve, reject, correct and history (mcp/tools/edits.ts:23-112).
5. Memory Data Model
Memory
(db/drizzle/schema-sqlite.ts:57-264). Content,
type (note by default), project, user and team
ids, tier, sector,
visibility_scope, read_scope,
write_scope, status (active,
superseded, merged, expired,
archived), is_active, confidence
and confidence_level (certain,
speculative, outdated),
importance_score 0-100, expires_at,
valid_from, valid_to,
recorded_at, superseded_by, merge fields and
the embedding.
Knowledge (:700-894). One table for
three kinds: memory (a projection of each memory row),
belief and strategy. Beliefs carry a status
from active, superseded,
deprecated, experimental,
disputed (core/knowledge/types.ts:60-61),
confidence, valid time and recorded_at.
Edges. knowledge_edges
(:896-927) carry valid_from,
valid_to, recorded_at and
recorded_to. Memory associations carry a type, such as
supersedes or updates, and a weight.
Audit. audit_log (knowledge id, action,
agent, project, session, details, time) records mutations of the
knowledge layer. trust_audit_log (:1389-1400)
records access decisions under strict trust with hashed actor and
resource.
Scope. Project id, with NULL meaning
shared across projects; team id with NULL meaning personal;
user id for the ACL.
6. Retrieval Mechanics
Candidates. The keyword leg runs FTS5; the vector
leg runs cosine over stored embeddings. Both exclude
expired and archived, require
is_active = 1, require
valid_from <= T < valid_to and an unexpired
expires_at at the request's reference time, and exclude
consolidated sources
(core/memory/keyword-search.ts:164-190,
core/memory/vector-search.ts:213-253). The belief leg reads
active beliefs and strategies. RRF fuses the three.
Supersession and expansion. The supersession stage
drops rows marked superseded or merged, using an id list capped at 1,000
rows with no ordering that fails open to an empty set
(core/memory/search-scoring.ts:136-159). It is relaxed for
past-referencing queries. Association expansion runs after it. For each
of the top three results it fetches up to five neighbours by id with no
project, is_active or superseded predicate,
skipping only expired and archived
(core/associations.ts:582-611,
core/memory/search-scoring.ts:386-441).
applySupersession creates a supersedes edge
from replacement to predecessor, so a retired row can re-enter the
candidate list whenever its replacement ranks in the top three.
Time. With latestOnly the temporal
stage is a hard point-in-time filter; validTimeFrom and
validTimeTo are a hard window; a natural-language time
reference only boosts
(core/memory/hybrid-search.ts:794-873).
Confidence and abstention. Each result gets a recall
confidence and tier. The pipeline's own gate empties the result only
when the best score is under 0.3 (:1017-1027). The MCP
recall response then drops every result with a numeric confidence under
0.60, keeps results without one, and reports ok,
partial or none with the query parts left
unmatched (core/retrieval/recall-response.ts:28-61).
squish recall on the CLI uses the same contract;
squish context, which the hooks call, does not.
7. Write Mechanics
A write blocks on embedding and on the resolver. The
embedding is awaited in the call
(core/memory/memory-write.ts:556).
resolveContradictions and applySupersession
are awaited before the call returns, on SQLite, outside strict trust and
unless SQUISH_SKIP_CONTRADICTION is set
(:1288-1301). With the model validator enabled, up to five
validator calls join the write
(core/memory/contradiction-resolver.ts:278-282).
Supersession has no confidence floor and no review.
Any scenario match supersedes. The 100 compared rows are whatever SQLite
returns first, so on a large project the row that should have been
retired may not be compared at all. With no project, every active memory
is a candidate. The update is a direct UPDATE with no audit
row. No verb un-supersedes. Deleting the replacement clears
superseded_by and leaves the predecessor
superseded and inactive
(core/memory/stale-cleaner.ts:193, :1364);
merged sources are restored on the same path, superseded ones are
not.
Belief extraction is asynchronous. The
analyze_memory job is written in the memory's transaction
and run by the hourly worker in batches of ten
(core/scheduler/cron-scheduler.ts:224-230), so a belief
appears up to an hour after its memory.
Hooks capture by excerpt. The Claude Code Stop hook
writes a transcript excerpt of at most 2,048 bytes as
--type context --place inbox; SessionEnd writes another to
archive
(plugins/claude-code/scripts/session-stop.sh:12,
session-end.sh:12, session_excerpt.py:11).
Operational cost
- Every write waits for an embedding and a comparison against up to 100 rows, plus model calls when the validator is enabled.
- A memory is retrievable immediately; its beliefs follow within the hour.
- The nightly job rewrites the store.
auto_maintenanceruns at 03:00 withdryRun: false, although its comment says the stale step is a dry run. It recalculates importance for every active row, re-tiers, merges, prunes links and deletes (core/scheduler/cron-scheduler.ts:174-187). Weekly and monthly jobs add consolidation and inbox processing. - What the delete reaches. Importance is
0.5 × base + 0.3 × surprise + 0.2 × emotion, and the recalculation fixes surprise at 0.5 (core/memory/importance.ts:157-190,:218-297). Anoteorobservationnever recalled and with no emotion keyword scores40 + R/2, where the recency term R starts at 30 and halves every 30 days; it rounds to 40, and becomes eligible, about 147 days after it was written. Acontextrow, which is what the hooks write, never falls below 43.
8. Agent Integration
The MCP server exposes squish_remember,
squish_recall, squish_feedback,
squish_edits, squish_dedup,
squish_team and others. squish_remember
accepts observedAt or occurredAt, a source id,
a team and outcome fields (mcp/tools/memory.ts:170-376).
squish_recall takes the project, team, user, reference
date, latestOnly and a valid-time window from the caller
(:381-444).
The plugins are where the integration is thinnest at the pin:
- Claude Code. SessionStart runs
squish context --json --limit 5 --projectwith no topic.contextexits 1 withProvide a topic or --file, a casetests/cli/context-command.test.ts:105-106asserts. The script then readsdurableMemories, which the command never emits, and prints nothing. Stop and SessionEnd capture. - Codex.
UserPromptSubmitprints{"continue":true,"suppressOutput":true}and spawnssquish gate --json --execdetached with output ignored (plugins/codex/scripts/new-hook.js:49,:59). When the gate decides to search, it spawnssquish context <hint>withstdio: 'ignore'. The session-start and pre-compact scripts repeat the topic-less call. - Installer.
bin/installer-core.mjs:37-38readsplugin/templates/hooksandpackage.jsonpublishesplugin, a directory absent at the pin.
The working path at the pin is the MCP server called by the model.
9. Reliability, Safety, and Trust
Strict and local-compatible
Under strict, writes and reads bind a verified caller,
team membership is checked, provenance is signed, association expansion
and graph stages are switched off, and unscoped maintenance is denied.
Under the default local-compatible, scope is whatever the
tool call names and the ACL read gate logs decisions without filtering
unless SQUISH_ACL_ENFORCE=true
(core/acl/read-gate.ts:5-7, :71-75). The two
policies are different products; the marks below are earned under the
default.
The resolver is the risk
A word-overlap match retires a memory before the agent's call returns, without an audit row, a confidence floor, a review step or an undo. The candidate set is capped without ordering. A wrong retirement is invisible to recall except through association expansion, which can bring the retired row back.
Calibration
The confidence is honest about what it is: the module calls itself rules over agreement signals, not a probability. What it does not do on the committed fixture is rank misses below hits. A low ECE on 46 in-sample queries, 40 of them hits, is consistent with a near-constant score. The abstention floor is a reasonable mechanism; whether 0.60 is the right floor is not established by the artifacts.
Data loss
The nightly stale step deletes rows without a dry run. Supersession
of the wrong row is not reversible from any tool. CI lets typecheck and
lint fail (.github/workflows/ci.yml:48,
:51).
Marks
trust_state— awarded, on beliefs only. Belief status is discrete, includesdisputed, has producers on reachable paths and is a filter on the belief leg. Memories have no epistemic state; recall confidence is a score.bitemporal— awarded. Valid time comes from the caller and record time from the clock, and supersession closes the interval instead of overwriting it. Knowledge edges keep both axes properly: a change closesrecorded_toand appends a corrected row (core/memory/temporal-facts.ts:150-176). On memories, record time is overwritten on supersession, and a past-time recall cannot reach a superseded row because the SQL legs requireis_active = 1.scope_enforced— awarded. Project and team are SQL predicates on both legs. Association expansion bypasses them.audit_log— awarded. Insert-only rows on create, update and delete of the knowledge layer. Supersession, expiry and merges are not recorded.negative_eval— awarded. Populated filter cases in CI.tombstone— withheld. No record keyed on a rejected value. A rejected edit proposal is a status on the proposal; a forgotten memory is deleted and the same text written again is a new active row.human_review— withheld.squish_editsoffersapproveandrejectto the model that proposed the edit,squish_dedupoffersapproveandreverse, andcorrectwrites without a proposal (mcp/tools/edits.ts:23,:98-112,mcp/tools/dedup.ts:32). Strict trust withholds approve, but nothing distinguishes a human from the agent; the only stdin TTY check in the tree is the gate's.
10. Tests, Evals, and Benchmarks
The suite is large: 339 bun test files and 46 Python test functions.
CI runs a named subset, including tests/core/memory,
tests/db and tests/mcp/recall-surface.test.ts,
with --pass-with-no-tests.
tests/core/retrieval, where the temporal-update cases live,
is not in it.
tests/core/memory/search-candidate-filters.test.ts is
the strongest file: it seeds live and dead rows that match the same
query and asserts the dead ones absent on every leg. It also asserts
that superseded rows remain SQL candidates by status alone
(:133-143), which is true only for rows superseded with
is_active left at 1.
The calibration evidence is in section
1. The committed per-query baselines make it checkable. Across four
committed baselines ECE moved from 0.093 to 0.041 to 0.055 to 0.043
while Hit@1 stayed at 40/46, so the changes are in the confidence
mapping. docs/BENCHMARK.md ties its run to a commit absent
from the history and names a bench/runners/ path that does
not exist; the runner is benchmark/runners/retrieval.ts. A
LoCoMo figure of 49% covers 200/1,540 questions with no committed
artifact.
No paper describes Squish.
Missing before relying on it: a held-out calibration set with enough misses to measure discrimination; a test that a superseded row does not return through association expansion; a test that the SessionStart hook prints memories; a test of what the nightly stale step deletes.
11. For Your Own Build
Steal
- A recall contract that can say nothing. Drop
results under a floor, report
noneorpartial, and list the query parts no result covered. - Commit the per-query baseline with the score. Squish's golden baselines are what make its own headline figure checkable.
- Close the predecessor's valid time at the replacement's start, and refuse a supersession that would leave an empty interval.
- A strict policy that turns off whole stages — association expansion, graph traversal, unscoped maintenance — when it cannot scope them.
Avoid
- Supersession on the write path by word overlap, with no floor, no review, no audit and no undo. Detect on write; resolve where someone can see it.
- A capped candidate scan with no
ORDER BY, in the resolver and the superseded-id list both. - Reporting ECE without discrimination. On a fixture with 87% hits, a constant scores well. Report AUROC or a reliability plot with miss counts.
- Graph expansion after the lifecycle filter. Expand first, filter last.
- A maintenance job labelled dry-run that deletes.
Fit
Squish suits a single developer who will call it through MCP from one
agent, wants hybrid recall with an explicit "no confident match", and
can tolerate a memory occasionally disappearing behind a newer one. It
assumes a maintainer who reads the code: at the pin the hooks do not
load memory, the installer is broken, and the release that matches the
source is not published. A team that needs every retirement explained,
or an old fact kept retrievable after it is superseded, should not adopt
it as shipped; at minimum it needs
SQUISH_SKIP_CONTRADICTION=true and the scheduler off.
12. Open Questions
- Does a superseded row brought back by association expansion survive the MCP floor, given that it enters with no similarity of its own?
- Is the 2.2.0 installer expected to regenerate
plugin/, or is the package layout mid-migration? - Will the golden fixture gain a held-out split and enough misses to measure discrimination?
- Is the stale step's
dryRun: falseintended?
Appendix: File Index
- Write:
core/memory/memory-write.ts,core/memory/importance.ts,mcp/tools/memory.ts - Supersession:
core/memory/contradiction-resolver.ts,core/associations.ts - Retrieval:
core/memory/hybrid-search.ts,core/memory/keyword-search.ts,core/memory/vector-search.ts,core/memory/belief-search.ts,core/memory/search-scoring.ts,core/scoring/recall-confidence.ts,core/retrieval/recall-response.ts,core/retrieval/profiles.ts - Knowledge:
core/knowledge/types.ts,extractor.ts,knowledge-crud.ts,audit.ts,core/memory/fact-extraction-worker.ts,core/memory/reinforcement.ts - Maintenance:
core/scheduler/cron-scheduler.ts,core/consolidation.ts,core/memory/stale-cleaner.ts - Trust:
core/acl/trust-policy.ts,core/acl/read-gate.ts,mcp/tools/edits.ts,mcp/tools/dedup.ts - Schema:
db/drizzle/schema-sqlite.ts,db/bootstrap.ts - Plugins:
plugins/claude-code/hooks/hooks.json,plugins/claude-code/scripts/session-start.sh,plugins/codex/scripts/new-hook.js,cli/commands/context.ts,cli/commands/gate.ts,bin/installer-core.mjs - Benchmarks:
docs/BENCHMARK.md,docs/calibration-report.md,benchmark/reports/v2.1.0-benchmark.md,benchmark/runners/retrieval.ts,benchmark/scoring/calibration.ts,tests/golden/baseline-report.json,tests/golden/golden-set.json - Tests:
tests/core/memory/search-candidate-filters.test.ts,tests/core/memory/reinforcement.test.ts,tests/knowledge/audit.test.ts,tests/cli/context-command.test.ts,.github/workflows/ci.yml
Recorded searches
Run from the repository root at the pinned commit with
/usr/bin/git grep.
- No tombstone.
git grep -n -i tombstone -- core db mcp clireturns nothing; the controlgit grep -c -i supersed -- core/memory/contradiction-resolver.tscounts 57. - audit_log is never changed.
git grep -n -E "(DELETE FROM|UPDATE) audit_log" -- core db mcp clireturns nothing; the controlgit grep -n "INSERT INTO audit_log" -- corereturnscore/knowledge/audit.ts:123. - Audit producers.
git grep -n -E "logAuditEntry\(" -- corereturnsknowledge-crud.ts:350,:454,:478,edit-workflow.ts:384andstale-cleaner.ts:1017besides the definition; none incontradiction-resolver.ts, which has twoUPDATE knowledgestatements. - No un-supersede.
git grep -n -i -E "unsupersede|restoreSuperseded|reviveSuperseded" -- core mcp clireturns nothing; the controlgit grep -n restoreMergedSourcesAfterCanonicalDeletion -- corereturnsstale-cleaner.ts:1033and:1340. - One TTY check.
git grep -n -E "isTTY" -- core mcp clireturnscli/colors.ts:13andcli/commands/gate.ts:51. - No test that the belief leg withholds a disputed
belief.
git grep -l -E "beliefSearch|belief-search" -- tests | xargs grep -l -E "disputed|superseded|deprecated"returns nothing; the controlgit grep -n disputed -- tests/core/memory/reinforcement.test.tsreturns:110,:117and:228. - No paper, no submodules.
.gitmodulesandCITATION.cffare absent;git grep -n -i -E "arxiv|bibtex|@article|@misc|doi\.org" -- README.md docsreturns nothing.
History
2026-12-02 — d78b074a….
First reading, read at the user's request from the 2026-12-02 triage
shortlist, from a full clone at the head of main, read
only. Screened: four auto-run surfaces
(plugins/claude-code/.claude-plugin/plugin.json,
plugins/claude-code/hooks/ and its hooks.json,
which registers SessionStart, Stop and SessionEnd scripts, and
server.json, an MCP manifest with a start command); no
build-time execution; nothing inside the cooldown; 30 floating ranges in
package.json beside its lockfile and one in
plugins/opencode/package.json with no lockfile. Nothing was
installed, built or run, and no test was run. I ran Python scripts under
python3 -I over committed JSON artifacts
(tests/golden/baseline-report.json at four commits) to
recompute ECE and the AUROC of top-1 confidence for hits against misses.
Five marks (section
9).