Skip to content

Commit 1d9eaae

Browse files
hyperpolymathclaude
andcommitted
docs: align README, EXPLAINME, TOPOLOGY, quickstarts, contractiles with Squad Audit v1
- README: Squad Audit thesis; listings out of scope; v0 marked legacy - EXPLAINME: fix two false claims (.ac.uk IS enforced; scoring is weighted-factor, not dot-product) - TOPOLOGY: replace fictional completion dashboard with honest state - QUICKSTART-USER + llm-warmups: fix flat-mate-fix naming, phantom recipes - contractiles: provisional substitution pending estate respec programme; statuses probe-verified - stapeln.toml: annotate entrypoint drift Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 87495cd commit 1d9eaae

11 files changed

Lines changed: 179 additions & 140 deletions

File tree

.machine_readable/contractiles/Adjustfile.a2ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Adjustfile — Drift-tolerance contract for rsr-template-repo
2+
# Adjustfile — Drift-tolerance contract for flat-mate
33
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
#
5+
# Provisional substitution 2026-06-11 pending estate machine-readable respec programme
6+
#
57
# Cumulative-drift catchment: tolerance bands + corrective actions.
68
# Authority: advisory (Yard) — continue-with-warnings; auto_fix where deterministic.
79
# Run with: adjust check
810
# Fix with: adjust fix (applies deterministic patches; advisory otherwise)
911

1012
@abstract:
11-
Drift tolerances and corrective actions for rsr-template-repo. Unlike
13+
Drift tolerances and corrective actions for flat-mate. Unlike
1214
MUST (hard gate), ADJUST tracks cumulative drift against tolerance bands
1315
and proposes corrective actions. Advisory — it warns and trends, it does
1416
not block.
Lines changed: 61 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Intentfile (A2ML Canonical) — north-star contractile for rsr-template-repo
2+
# Intentfile (A2ML Canonical) — north-star contractile for flat-mate
33
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
#
5+
# Provisional substitution 2026-06-11 pending estate machine-readable respec programme
6+
#
57
# Paired runner: intend.ncl
68
# Verb: intend
79
#
@@ -20,80 +22,99 @@
2022
# contractile for hard gates.
2123

2224
@abstract:
23-
North-star contractile for rsr-template-repo. This repository is the
24-
canonical template for Rhodium Standard Repository compliance. It provides
25-
the scaffold that all hyperpolymath repos should copy and customize.
25+
North-star contractile for flat-mate. v1 is the Squad Audit: an
26+
already-formed student friend group (the UK "second-year cliff"; target
27+
wave Jan–May 2027, London) gets a harmony + feasibility audit, an
28+
auto-drafted house agreement, and a search brief — upstream of SpareRoom,
29+
hosting no listings. The product never promises a "stable matching"
30+
(typically nonexistent in roommate markets) and stores no Art. 9
31+
special-category fields by schema construction, on an epistemic-typed
32+
VerisimDB server with conceal-lattice disclosure tiers.
2633
@end
2734

2835
## Purpose
2936

30-
The rsr-template-repo serves as the master template for all hyperpolymath
31-
repositories. It contains the complete set of contractile files, machine-readable
32-
specifications, and governance documentation that define the Rhodium Standard.
37+
flat-mate audits already-formed student friend groups for lease survival:
38+
a pairwise harmony + feasibility audit, a house agreement drafted from the
39+
group's actual divergence points, and a search brief to take to the
40+
listings market. It sits upstream of listings platforms, serving the UK
41+
"second-year cliff" — first-years who must form private-market households
42+
with people they met weeks earlier.
3343

34-
Every new repository in the hyperpolymath estate should be initialized by
35-
copying this template and substituting the placeholder values with
36-
repo-specific content.
44+
The authoritative product spec is docs/design/squad-audit-v1.adoc; where
45+
code and that document disagree, the document wins until amended.
3746

3847
## Anti-Purpose
3948

4049
This repository is NOT:
41-
- A general-purpose project scaffold for external use (hyperpolymath-only)
42-
- A replacement for per-repo customization (all files must be bespoke)
43-
- A static template that never changes (evolves with RSR spec)
44-
- A runtime library or framework (build-time only)
50+
- A listings platform or SpareRoom rival (output is a vetted household plus a search brief; no listings hosted)
51+
- A "stable matching" guarantee (stable matchings are typically nonexistent in roommate markets; product copy must never promise one)
52+
- A store of Art. 9 special-category data (no such fields exist by schema construction)
53+
- A stranger-discovery swipe app in v1 (the v0 swipe+listings flow stays in-tree as LEGACY pending a quarantine decision; discovery is deferred roadmap)
4554

4655
## If In Doubt
4756

4857
If you are unsure whether a change is in scope, ask. Sensitive areas:
4958
- .machine_readable/ contractile definitions
50-
- RSR specification files
51-
- Governance templates
59+
- docs/design/squad-audit-v1.adoc (product spec — source of truth)
60+
- packages/shared/src/matching/ (engine + conceal/redaction rules)
5261
- License policy documents
5362

5463
## Committed Next-Actions
5564

56-
### repo-initialization
57-
- description: Provide just copy-and-substitute template for new repos
58-
- probe: test -f scripts/init-repo.sh
65+
### squad-audit-design-record
66+
- description: Decide and document the v1 product (Squad Audit) as the authoritative spec
67+
- probe: test -f docs/design/squad-audit-v1.adoc
68+
- status: done
69+
- notes: Decided 2026-06-11; spec wins over code until amended
70+
71+
### scoring-v2-engine
72+
- description: Split feasibility from harmony, behaviour/tolerance directional scoring, banded verdicts
73+
- probe: grep -rq "cleanlinessTolerance" packages/shared/src/matching/
5974
- status: done
60-
- notes: Run with source scripts/init-repo.sh <new-repo-name>
75+
- notes: Landed 2026-06-11 (engine v2, 35 tests green); spec at docs/design/squad-audit-v1.adoc
6176

62-
### contractile-completeness
63-
- description: Every RSR contractile has an a2ml and ncl implementation
64-
- probe: ls .machine_readable/contractiles/*.a2ml | wc -l | grep -q "^6$"
65-
- status: in_progress
66-
- notes: Currently 6 contractile verbs: intend, must, trust, adjust, bust, dust
77+
### group-audit-core
78+
- description: auditGroup() — full pairwise matrix, budget intersection, dispersion detection
79+
- probe: grep -rq "auditGroup" packages/shared/src/matching/
80+
- status: done
81+
- notes: Landed 2026-06-11; catches the Bloomsbury Three internal-dealbreaker fixture
6782

68-
### automation-scripts
69-
- description: All repetitive tasks have just recipes
70-
- probe: grep -c "^# " Justfile | grep -q "^[6-9][0-9]*$"
71-
- status: in_progress
83+
### conceal-lattice
84+
- description: Disclosure tiers T0/T1/T2 with reciprocity (effectiveTier = min of both)
85+
- probe: grep -rq "effectiveTier" packages/shared/src/matching/
86+
- status: done
87+
- notes: Landed 2026-06-11; mirrors proven-servers/protocols/proven-epistemic (machine-checked reference)
88+
89+
### legacy-v0-quarantine
90+
- description: Mark the v0 swipe+listings flow LEGACY in-tree until a quarantine/removal decision
91+
- probe: grep -rq "LEGACY" packages/shared/src/matching/discovery.js
92+
- status: declared
7293

7394
## Wishes
7495

7596
### Near Horizon
7697

77-
#### cross-repo-validation
78-
- description: Tooling to validate all repos against RSR spec
79-
- horizon: near
80-
- status: declared
81-
82-
#### automated-substitution
83-
- description: Script to automate repo-specific substitution in template
98+
#### solo-top-up-discovery
99+
- description: Solo top-up discovery for groups with open slots (conceal tiers + consent lifecycle)
84100
- horizon: near
85101
- status: declared
86102

87103
### Mid Horizon
88104

89-
#### formal-verification
90-
- description: Idris2 proofs for all critical contractile invariants
105+
#### da-rounds-solo-joins-household
106+
- description: Deferred-acceptance rounds for the bipartite solo-joins-household sub-market
107+
- horizon: mid
108+
- status: declared
109+
110+
#### calibration-flywheel
111+
- description: Outcome events on anonymised aggregates; fitted weights, one cycle per academic year
91112
- horizon: mid
92113
- status: declared
93114

94115
### Far Horizon
95116

96-
#### ecosystem-visualization
97-
- description: Interactive graph of all hyperpolymath repos and dependencies
117+
#### blocking-pair-stability-audit
118+
- description: Advisory blocking-pair stability audit over the discovery graph (private, pair-bounded)
98119
- horizon: far
99120
- status: declared

.machine_readable/contractiles/Mustfile.a2ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Mustfile — Physical state contract for rsr-template-repo
2+
# Mustfile — Physical state contract for flat-mate
33
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
#
5+
# Provisional substitution 2026-06-11 pending estate machine-readable respec programme
6+
#
57
# What MUST be true about this repository. Hard requirements.
68
# Run with: must check
79
# Fix with: must fix (where a deterministic fix exists)
810

911
@abstract:
10-
Physical-state invariants for rsr-template-repo. This is the canonical
11-
RSR template repository. These are hard requirements — CI and pre-commit
12+
Physical-state invariants for flat-mate, the Squad Audit student-housing
13+
harmony platform. These are hard requirements — CI and pre-commit
1214
hooks fail if any check fails.
1315
@end
1416

.machine_readable/contractiles/Trustfile.a2ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Trustfile — Trust boundaries and integrity invariants for rsr-template-repo
2+
# Trustfile — Trust boundaries and integrity invariants for flat-mate
33
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
#
5+
# Provisional substitution 2026-06-11 pending estate machine-readable respec programme
6+
#
57
# Defines what LLM/SLM agents are trusted to do without asking, and
68
# integrity invariants that verify the repo has not been tampered with.
79

810
@abstract:
9-
Trust boundaries and integrity checks for rsr-template-repo. This file
11+
Trust boundaries and integrity checks for flat-mate. This file
1012
combines the trust-level definitions from the original TRUST.contractile
1113
with the integrity invariants from the old Trustfile.a2ml. It defines
1214
what AI agents may do autonomously and what requires human approval,
@@ -15,7 +17,7 @@ plus checks that verify repository integrity.
1517

1618
## Trust Levels
1719

18-
The rsr-template-repo operates at trust level: maximal
20+
The flat-mate repo operates at trust level: maximal
1921

2022
Trust levels:
2123
- maximal: Agent may read, build, test, lint, format, heal freely.

EXPLAINME.adoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ Profiles, listings, and swipe events are stored as hexads in VeriSimDB. The API
1616
on Deno; the web client uses React + Vite; the mobile client uses Expo. See
1717
link:docs/architecture.md[] and link:TOPOLOGY.md[] for the full architecture.
1818

19-
**Caveat:** This is an MVP. University email verification (`.ac.uk`) is stubbed but not
20-
yet enforced server-side, and the compatibility scoring uses a simple dot-product rather
21-
than a trained model.
19+
**Caveat:** This is an MVP. University email validation (`.ac.uk`) *is* enforced
20+
server-side — every profile write runs `validateProfileInput`
21+
(`packages/shared/src/domain.js`), which rejects non-`.ac.uk` addresses — but it is a
22+
domain-suffix check only: no confirmation email is sent, so address ownership is not
23+
verified. Compatibility scoring is explicit weighted-factor arithmetic (budget ×0.4,
24+
lifestyle ×0.4, preferences ×0.2), not a dot-product and not a trained model; the
25+
profile vector is used only for candidate retrieval in VeriSimDB. The planned evolution
26+
is literature-seeded weights with an outcome-calibration flywheel, not a trained model.
27+
28+
The flow described above is the legacy v0 marketplace; the current product design is
29+
the Squad Audit — see link:docs/design/squad-audit-v1.adoc[].
2230

2331
=== Evidence
2432

QUICKSTART-USER.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-License-Identifier: MPL-2.0
22
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3-
= Flat Mate Fix — User Quickstart
3+
= flat-mate — User Quickstart
44
:toc: preamble
55

6-
Get up and running in 60 seconds.
6+
Clone and explore in 60 seconds.
77

88
== Prerequisites
99

@@ -14,10 +14,9 @@ Get up and running in 60 seconds.
1414

1515
[source,bash]
1616
----
17-
git clone https://github.com/hyperpolymath/flat-mate-fix
18-
cd flat-mate-fix
17+
git clone https://github.com/hyperpolymath/flat-mate
18+
cd flat-mate
1919
just doctor # check toolchain
20-
just heal # auto-install missing tools
2120
----
2221

2322
== First Run
@@ -32,4 +31,4 @@ just help-me # see common workflows
3231

3332
* `just help-me` — common workflows
3433
* `just doctor` — diagnose toolchain issues
35-
* https://github.com/hyperpolymath/flat-mate-fix/issues — report bugs
34+
* https://github.com/hyperpolymath/flat-mate/issues — report bugs

README.adoc

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,47 @@ image:https://img.shields.io/badge/OpenSSF-Best_Practices-green?logo=openssource
88
:toc: preamble
99
:icons: font
1010

11-
London-first flatmate matching + room listings for students.
11+
Squad Audit for student house-shares: bring the friend group you already
12+
have; `flat-mate` tells you whether it survives a lease, then drafts the
13+
house agreement and search brief to make sure it does.
1214

1315
This repo includes:
1416

15-
* `apps/api` — Node API using `verisimdb` as the persistence/search layer.
17+
* `apps/api` — Deno API using `verisimdb` as the persistence/search layer.
1618
* `apps/web` — React + Vite web client.
1719
* `apps/mobile` — Expo React Native mobile client.
18-
* `packages/shared` — Domain models, compatibility scoring, and verisimdb encoding helpers.
20+
* `packages/shared` — Domain models, matching/scoring rules, and verisimdb encoding helpers.
1921

20-
== Why this MVP
22+
== Why this product (v1 = Squad Audit)
2123

22-
Student renters in London need two things at once:
24+
UK first-years are allocated halls; by January they must form private-market
25+
groups of 3–6 with people they met eight weeks earlier, with no compatibility
26+
input. No incumbent serves that moment. `flat-mate` audits an
27+
*already-formed* group — harmony + feasibility check, auto-drafted house
28+
agreement, search brief — and sits *upstream* of SpareRoom and its peers.
29+
Listings are explicitly *out of scope*: flat-mate hosts none and is not a
30+
SpareRoom rival. Target wave: Jan–May 2027, London second years.
2331

24-
* *matching*: who to live with.
25-
* *listing*: where to live.
32+
The earlier swipe + listings flow (v0) remains in-tree as *legacy* code until
33+
a quarantine/removal decision. It is not the product. Authoritative spec:
34+
link:docs/design/squad-audit-v1.adoc[].
2635

27-
`flat-mate` handles both in one flow, with profile compatibility and listing
28-
discovery centered around London boroughs and universities.
36+
*What we never promise:* a "stable matching" — typically nonexistent in roommate markets; see the theory constraints in link:docs/design/squad-audit-v1.adoc[].
2937

3038
== Architecture
3139

32-
`flat-mate` writes profiles, listings, and swipe events as hexads in `verisimdb`:
40+
`flat-mate` writes entities as hexads in `verisimdb` (`POST /hexads`,
41+
`GET /search/text`, `POST /search/vector`). Because current `verisimdb` API
42+
responses are compact, the app stores encoded payloads in searchable document
43+
titles as an MVP strategy.
3344

34-
* `POST /hexads` for writes.
35-
* `GET /search/text` to retrieve encoded entities.
36-
* `POST /search/vector` for compatibility feed ranking.
45+
The in-tree profile/listing/swipe write paths are the legacy v0 flow. The v1
46+
target is an epistemic-typed server: per-field governance metadata,
47+
conceal-lattice disclosure tiers, no special-category fields by schema
48+
construction — see the design doc. Matching rules live in
49+
`packages/shared/src/matching/`, never in UI components.
3750

38-
Because current `verisimdb` API responses are compact, the app stores encoded
39-
payloads in searchable document titles as an MVP strategy.
40-
41-
See `docs/architecture.md`.
51+
See `docs/architecture.md`, link:TOPOLOGY.md[], and link:EXPLAINME.adoc[].
4252

4353
== Quick Start
4454

@@ -93,30 +103,29 @@ VERISIMDB_BASE_URL=http://127.0.0.1:8080
93103
VERISIMDB_VECTOR_DIM=384
94104
----
95105

96-
Optional web variable: `VITE_API_BASE_URL=http://127.0.0.1:4000`
97-
98-
Optional Expo variable: `EXPO_PUBLIC_API_BASE_URL=http://127.0.0.1:4000`
106+
Optional: `VITE_API_BASE_URL=http://127.0.0.1:4000` (web),
107+
`EXPO_PUBLIC_API_BASE_URL=http://127.0.0.1:4000` (Expo).
99108

100109
Profiles require a `.ac.uk` `studentEmail` for student verification in the first pilot.
101110

102111
== Product Scope (First Instance)
103112

104-
* Student profile creation with compatibility preferences.
105-
* Swipe-style profile matching.
106-
* Listing creation and browsing.
107-
* Match discovery from mutual likes.
113+
* Group creation and member questionnaires, eliciting both *behaviour* and *tolerance* per dimension.
114+
* Pairwise harmony audit across the group, with internal dealbreaker detection.
115+
* Feasibility by budget *intersection* (`[max(mins), min(maxes)]`, never by mean).
116+
* House-agreement draft generated from the group's actual divergence points.
117+
* Search brief to take to the listings market.
108118

109119
== Next Product Increments
110120

111-
* University email verification (`.ac.uk`).
112-
* Safety workflows (reporting, blocklist, check-in sharing).
113-
* Built-in chat and viewing scheduler.
114-
115-
== Architecture
116-
117-
See link:TOPOLOGY.md[TOPOLOGY.md] for a visual architecture map and completion dashboard.
121+
Deferred roadmap, in liquidity order (see the design doc):
118122

119-
Wondering how this works? See link:EXPLAINME.adoc[].
123+
. Solo *top-up* discovery for groups with open slots, gated by
124+
conceal-lattice disclosure tiers and a mutual-consent lifecycle.
125+
. Deferred-acceptance rounds for solo-joins-household — the one genuinely
126+
bipartite, theory-clean centralized mechanism.
127+
. Calibration flywheel: anonymised outcome events so scoring weights become
128+
fitted rather than literature-seeded.
120129

121130
== License
122131

0 commit comments

Comments
 (0)