Skip to content

Commit 8ace8c1

Browse files
hyperpolymathclaude
andcommitted
docs: close-out — CHANGELOG 0.2.0, TEST-NEEDS, READINESS, ROADMAP, architecture, quickstarts
- CHANGELOG: 0.2.0 entry (engine v2, design record, realignment, TruffleHog) - TEST-NEEDS: 5 files / 35 tests with coverage map; real run commands - READINESS (new): CRG C — engine tested; apps unwired/untested, marked X - ROADMAP (new): NOW/NEXT/THEN/LATER in liquidity order, Jan-May 2027 wave, never-promise-stable-matching constraint - architecture.md: honest two-layer state (legacy v0 wired, engine v2 not) + epistemic-typed server target - quickstarts: real commands only, phantom recipes and wrong names removed All claims execution-verified by the authoring agents (tests run, recipes checked against Justfile/deno.json). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5808ecb commit 8ace8c1

7 files changed

Lines changed: 304 additions & 56 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,25 @@ this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0
5555
- ci: update SHA pins for codeql-action and trufflehog
5656
- ci: deploy missing standard workflows (10 added)
5757

58+
## [0.2.0] - 2026-06-11
59+
60+
### Added
61+
62+
- feat(matching): land matching engine v2 at `packages/shared/src/matching/` — directional behaviour/tolerance scoring (weakest direction governs), feasibility/harmony split scores with banded verdicts, `auditGroup` (pairwise matrix, budget intersection, dispersion detection, shared-space minimum forecast), conceal lattice disclosure tiers T0/T1/T2 with `effectiveTier = min`, house-agreement + search-brief generators; 35 unit tests across 5 test files
63+
64+
### Changed
65+
66+
- chore: retain legacy v0 swipe+listings stack (`domain.js`/`encoding.js`, `apps/api`, `apps/web`, `apps/mobile`) in-tree, marked LEGACY, pending a quarantine/removal decision — apps are NOT yet wired to engine v2
67+
68+
### Documentation
69+
70+
- docs(design): add Squad Audit v1 design decision record (`docs/design/squad-audit-v1.adoc`) — product spec: harmony+feasibility audit for already-formed groups, upstream of SpareRoom, no listings, Jan–May 2027 London target wave
71+
- docs: realign README and docs to the Squad Audit posture (drop the "matching + listings in one flow" claim)
72+
73+
### CI
74+
75+
- ci: standardize TruffleHog secret scanning
76+
5877
## Pre-history
5978

6079
Prior commits to this file's introduction are recorded in git history but not formally classified into Keep-a-Changelog sections. To backfill, run `git cliff -o CHANGELOG.md` locally using the canonical [`cliff.toml`](https://github.com/hyperpolymath/standards/blob/main/templates/cliff.toml) — this is one-shot mechanical work.

QUICKSTART-DEV.adoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 — Developer Quickstart
3+
= flat-mate — Developer Quickstart
44
:toc: preamble
55

66
Clone, build, test, contribute.
@@ -9,16 +9,16 @@ Clone, build, test, contribute.
99

1010
* Git 2.40+
1111
* just (command runner)
12-
* See `just doctor` output for language-specific requirements
12+
* Deno 2.x
13+
* See `just doctor` output for further requirements
1314

1415
== Setup
1516

1617
[source,bash]
1718
----
18-
git clone https://github.com/hyperpolymath/flat-mate-fix
19-
cd flat-mate-fix
19+
git clone https://github.com/hyperpolymath/flat-mate
20+
cd flat-mate
2021
just doctor # verify toolchain
21-
just heal # auto-install missing tools
2222
----
2323

2424
== Development Workflow
@@ -27,8 +27,14 @@ just heal # auto-install missing tools
2727
----
2828
just tour # understand the codebase
2929
just help-me # see available commands
30+
deno task check # type-check + lint (api + shared)
31+
deno task dev:api # run the API locally
32+
deno task dev:web # run the web app locally
3033
----
3134

35+
Run the matching-engine tests (engine v2, the only tested code) with
36+
`deno test packages/shared/src/matching/ --allow-read` (or `deno task test`).
37+
3238
== Before Committing
3339

3440
[source,bash]

QUICKSTART-MAINTAINER.adoc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 — Maintainer Quickstart
3+
= flat-mate — Maintainer Quickstart
44
:toc: preamble
55

66
Packaging, deployment, and release management.
@@ -17,25 +17,20 @@ This project uses GitHub Actions. Workflows are in `.github/workflows/`.
1717

1818
Key workflows:
1919

20+
* `ci.yml` — Deno fmt/check/test (`deno task fmt:check`, `check`, `test`)
2021
* `hypatia-scan.yml` — Neurosymbolic security scanning
21-
* `codeql.yml` — Code analysis
22-
* `scorecard.yml` — OpenSSF Scorecard
22+
* `scorecard-enforcer.yml` — OpenSSF Scorecard enforcement
23+
* `secret-scanner.yml` — Secret scanning
24+
* `governance.yml` — Governance checks
2325
* `mirror.yml` — GitLab/Bitbucket mirroring
2426

2527
== Releasing
2628

27-
1. Update version in project config
29+
1. Update version in `deno.json`
2830
2. Update CHANGELOG.md
2931
3. Tag: `git tag -s v<VERSION>`
3032
4. Push: `git push origin main --tags`
3133

32-
== Container Build (if applicable)
33-
34-
[source,bash]
35-
----
36-
podman build -f Containerfile -t flat-mate-fix:latest .
37-
----
38-
3934
== Mirrors
4035

4136
This repo is mirrored to GitLab and Bitbucket (hyperpolymath accounts)

READINESS.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
5+
# flat-mate Component Readiness Assessment
6+
7+
**Standard:** [Component Readiness Grades (CRG) v1.0](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)
8+
**Assessed:** 2026-06-11
9+
**Assessor:** Jonathan D.A. Jewell
10+
11+
**Current Grade:** C
12+
13+
Grade carried over from the prior TEST-NEEDS.md claim (CRG C, 2026-04-04) and
14+
re-assessed 2026-06-11. The grade applies to the matching engine library only —
15+
see honest notes below.
16+
17+
## Grade Reference
18+
19+
| Grade | Name | Release Stage | Meaning |
20+
|-------|-----------------------|--------------------|------------------------------------------------------|
21+
| X | Untested || No testing performed. Status unknown. |
22+
| F | Harmful / Wasteful || Reject, deprecate, or delegate. |
23+
| E | Minimal / Salvageable | Pre-alpha | Barely functional. Needs redesign or major work. |
24+
| D | Partial / Inconsistent| Alpha | Works on some things but not systematically. |
25+
| C | Self-Validated | Beta | Dogfooded and reliable in home context. |
26+
| B | Broadly Validated | Release Candidate | Tested on 6+ diverse external targets. |
27+
| A | Field-Proven | Stable | Real-world feedback confirms value. No harm in wild. |
28+
29+
## Component Assessment
30+
31+
| Component | Grade | Release Stage | Evidence Summary | Last Assessed |
32+
|------------------------------------|-------|---------------|---------------------------------------------------------------------------|---------------|
33+
| `packages/shared/src/matching` (engine v2) | C | Beta | 35 unit tests passing across 5 test files; deterministic seed fixtures incl. a deliberately-broken group; lint/fmt clean. | 2026-06-11 |
34+
| `apps/api` | X || No tests; not wired to engine v2; no auth. | 2026-06-11 |
35+
| `apps/web` | X || No tests; legacy v0 UI; not wired to engine v2. | 2026-06-11 |
36+
| `apps/mobile` | X || No tests; Expo app; not wired to engine v2. | 2026-06-11 |
37+
| `packages/shared/src/domain.js` (legacy v0) | X || No tests; legacy swipe domain pending quarantine decision. | 2026-06-11 |
38+
39+
## Detailed Assessment
40+
41+
### `packages/shared/src/matching` (engine v2)
42+
43+
- **Grade:** C (Beta)
44+
- **Last assessed:** 2026-06-11
45+
- **Evidence:** 35 unit tests covering directional behaviour/tolerance scoring,
46+
dealbreakers, group audit (pairwise matrix, budget intersection, dispersion,
47+
shared-space minimum forecast), conceal tiers T0/T1/T2, agreement + brief
48+
artifacts, and the missing-data policy. Run with
49+
`deno test packages/shared/src/matching/ --allow-read`.
50+
- **Known limitations:** Library only — no app consumes it yet. Weights are
51+
literature-seeded, not fitted (calibration flywheel is roadmap LATER). No
52+
property-based tests.
53+
- **Promotion path:** Wire `apps/web` to `auditGroup`, real-cohort dogfooding
54+
in the Jan–May 2027 wave, external validation targets.
55+
- **Demotion risk:** Low — pure functions, deterministic fixtures.
56+
57+
## Notes
58+
59+
- **Not production-ready.** The tested engine is a library; the apps are
60+
unwired, untested, and have no authentication.
61+
- The legacy v0 swipe+listings stack remains in-tree (marked LEGACY) pending a
62+
quarantine/removal decision — see ROADMAP.adoc NEXT.
63+
- Grades are per-component, not per-project; the headline C reflects the
64+
engine library, the only dogfooded component.
65+
- See the [full CRG standard](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades) for complete definitions, evidence requirements, and transition criteria.

ROADMAP.adoc

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// SPDX-License-Identifier: MPL-2.0
2+
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= flat-mate Roadmap
4+
:author: Jonathan D.A. Jewell
5+
:revdate: 2026-06-11
6+
7+
== Current State
8+
9+
flat-mate v1 is **Squad Audit**: an already-formed student group gets a
10+
harmony + feasibility audit, an auto-drafted house agreement, and a search
11+
brief to take to the listings market. flat-mate sits upstream of SpareRoom and
12+
hosts no listings. Authoritative spec: `docs/design/squad-audit-v1.adoc`
13+
(where code and that document disagree, the document wins).
14+
15+
Engine v2 is a tested library at `packages/shared/src/matching/` (10 modules,
16+
5 test files, 35 unit tests passing). The apps (`apps/api`, `apps/web`,
17+
`apps/mobile`) are **not yet wired to it**; the legacy v0 swipe+listings stack
18+
remains in-tree marked LEGACY pending a quarantine decision.
19+
20+
**Target wave: Jan–May 2027** London second-year wave; one university to seed;
21+
legal posture resolved by December 2026.
22+
23+
**What we never promise:** a "stable matching" — the roommate market is
24+
non-bipartite, stable matchings typically do not exist at scale
25+
(Chin & Michelen 2026), couples make existence NP-complete, and households of
26+
3+ are hedonic games whose core stability is Σ₂ᵖ-complete to decide. Product
27+
copy and mechanism design must respect this.
28+
29+
The roadmap below is sequenced by **liquidity**: each stage needs more
30+
marketplace participation than the one before it.
31+
32+
== NOW -- done 2026-06-11
33+
34+
* [x] Squad Audit v1 design decision record (`docs/design/squad-audit-v1.adoc`)
35+
* [x] Matching engine v2 (`packages/shared/src/matching/`): directional
36+
behaviour/tolerance scoring, feasibility/harmony split with banded verdicts,
37+
`auditGroup` (pairwise matrix, budget intersection, dispersion detection,
38+
shared-space minimum forecast), conceal lattice T0/T1/T2 with
39+
`effectiveTier = min`, agreement + brief generators; 35 tests
40+
* [x] proven-epistemic reference core — the conceal/disclosure semantics
41+
mirror the formally verified Idris2 core in proven-servers
42+
(ADR: `proven-servers/docs/decisions/0002-add-proven-epistemic-disclosure-core.md`)
43+
44+
== NEXT
45+
46+
* [ ] Wire `apps/web` to `auditGroup` — audit-first UI (the apps currently do
47+
not call engine v2 at all)
48+
* [ ] Legacy v0 quarantine decision — swipe+listings stack
49+
(`domain.js`/`encoding.js`, `apps/api`, `apps/web`, `apps/mobile`):
50+
quarantine, rewrite, or remove
51+
* [ ] Privacy notice + retention schedule + verified VerisimDB erasure and
52+
subject-access-export story (Art. 25 obligations named in the design record)
53+
* [ ] ICO controller registration decision
54+
55+
== THEN
56+
57+
* [ ] Solo **top-up** discovery for groups with open slots — conceal tiers
58+
(built in v1) plus a consent lifecycle (Proposal -> mutual accept -> Match),
59+
restoring the mutuality property the v0 swipe domain had
60+
* [ ] **DA rounds** for solo-joins-household — the one theory-clean
61+
centralized mechanism (genuinely bipartite); one vacancy per household per
62+
round; couples via heuristic + blocking-pair verification, never a
63+
guarantee path
64+
65+
== LATER
66+
67+
* [ ] **Calibration flywheel** — anonymised outcome telemetry (moved in;
68+
1-month / 3-month satisfaction); literature-seeded weights become fitted;
69+
one learning cycle per academic year
70+
* [ ] **Blocking-pair stability audit** over the discovery graph (advisory,
71+
private, bounded to pair deviations)
72+
* [ ] Borough/commute **prefilters** in candidate generation when discovery
73+
lands (London-only invariant stands; the audit flow is location-light)
74+
75+
== Estate invariants (unchanged)
76+
77+
VerisimDB sole persistence; London-first; Deno JS-first with the four-file TS
78+
carve-out in `apps/api` (see `.claude/CLAUDE.md`); MPL-2.0; mobile via Expo.

TEST-NEEDS.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,36 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
1010

1111
| Category | Count | Notes |
1212
|----------|-------|-------|
13-
| Test files | 0 | Current state |
13+
| Test files | 5 | All in `packages/shared/src/matching/` (engine v2) |
14+
| Unit tests | 35 | All passing (verified 2026-06-11) |
15+
| App tests (api/web/mobile) | 0 | Apps are NOT wired to engine v2 and have no tests |
1416

1517
## What's Covered
1618

17-
- [ ] No test files found
19+
Engine v2 library only (`packages/shared/src/matching/`):
20+
21+
- [x] Directional behaviour/tolerance scoring — weakest direction governs; drinking as interaction not distance; budget overlap-coefficient (containment scores 1, no-overlap scores 0 + warns) (`compatibility.test.js`)
22+
- [x] Dealbreakers — symmetric firing, behaviour-not-tolerance targeting (v1 regression locked), structured attribution, uncheckable-rule warnings (`compatibility.test.js`)
23+
- [x] Group audit — pairwise matrix catches the shipped broken "Bloomsbury Three" fixture; budget by INTERSECTION never mean; weakest pair named; group validation (`group.test.js`)
24+
- [x] Dispersion detection — bimodal groups reported as SPLIT not averaged; shared-space forecast at the MINIMUM member standard, naming friction nodes (`group.test.js`)
25+
- [x] Conceal tiers — `effectiveTier` lattice meet (symmetric, idempotent, never above either grant); T0 band leaks verdict only; T1 relational leaks no names/attribution/habit values; T2 unredacted (`conceal.test.js`)
26+
- [x] Artifacts — universal agreement sections for every group, divergence sections from actual gaps, markdown rendering; brief budget intersection, HMO scaling, zero-stored-data guarantor/scam checklist (`artifacts.test.js`)
27+
- [x] Missing-data policy — nulls score neutral WITH a warning, never favourably; corrupt enum values throw; weight sums asserted = 1 (`compatibility.test.js`)
28+
- [x] Discovery boundary — structural group detection, solo-to-group scoring, not_viable filtering, tier redaction at the boundary (`discovery.test.js`)
1829

1930
## Still Missing (for CRG B+)
2031

21-
- [ ] Add unit tests
22-
- [ ] Add integration tests
23-
- [ ] Zig FFI tests (if applicable)
24-
- [ ] CI/CD test automation
25-
- [ ] Property-based tests
26-
- [ ] Edge case coverage
32+
- [ ] `apps/api` integration tests (service is untested and not wired to engine v2)
33+
- [ ] `apps/web` tests — none exist
34+
- [ ] `apps/mobile` tests — none exist
35+
- [ ] Legacy `packages/shared/src/domain.js` (v0 swipe domain) tests — none; pending the v0 quarantine decision
36+
- [ ] Property-based tests (e.g. conceal-lattice monotonicity, scoring bounds)
37+
- [ ] CI fuzz placeholder
2738

2839
## Run Tests
2940

3041
```bash
31-
# Tests needed
42+
deno task test # = deno test --allow-read packages/shared/src/matching/
43+
deno task check # typecheck + lint (engine, legacy domain, API)
44+
deno task fmt:check # format check (engine)
3245
```

0 commit comments

Comments
 (0)