@dreamforgestudiollc/emet 0.0.0-stage → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +136 -0
- package/CHANGELOG.md +296 -0
- package/CHARTER.md +125 -0
- package/LICENSE +22 -0
- package/README.md +783 -2
- package/docs/AUTHORSHIP.md +26 -0
- package/docs/BENCHMARKS.md +261 -0
- package/docs/BOOTSTRAP.md +127 -0
- package/docs/BOTS.md +79 -0
- package/docs/COVERAGE.md +64 -0
- package/docs/DEPLOY.md +246 -0
- package/docs/DISCIPLINES.md +29 -0
- package/docs/GUARDRAILS-AND-MONORAILS.md +107 -0
- package/docs/GUIDED-SETUP.md +296 -0
- package/docs/PERMISSIONS.md +118 -0
- package/docs/ROADMAP.md +59 -0
- package/docs/SETUP.md +259 -0
- package/guides/NEURODIVERGENT_SUPPORT.md +278 -0
- package/package.json +70 -4
- package/server.json +39 -0
- package/src/aleph.js +395 -0
- package/src/annotations.js +135 -0
- package/src/approve-throttle.js +54 -0
- package/src/atlas-role.js +58 -0
- package/src/conformance.js +688 -0
- package/src/content_analyzer.js +450 -0
- package/src/database.js +811 -0
- package/src/disciplines.js +26 -0
- package/src/dispatch.js +279 -0
- package/src/env.js +52 -0
- package/src/floor.js +187 -0
- package/src/gaps.js +476 -0
- package/src/guides.js +48 -0
- package/src/http-remote.js +269 -0
- package/src/index.js +390 -0
- package/src/invites.js +167 -0
- package/src/layers.js +449 -0
- package/src/lessons-to-checks.js +366 -0
- package/src/logger.js +299 -0
- package/src/metadata.js +61 -0
- package/src/module-path.js +32 -0
- package/src/mongo-connect.js +48 -0
- package/src/named-items.js +208 -0
- package/src/oauth-provider.js +838 -0
- package/src/persons.js +116 -0
- package/src/provenance.js +257 -0
- package/src/redact.js +231 -0
- package/src/request-log.js +124 -0
- package/src/scopes.js +97 -0
- package/src/security-headers.js +26 -0
- package/src/session-graph.js +945 -0
- package/src/session.js +1097 -0
- package/src/setup.js +1313 -0
- package/src/startup-pages.js +354 -0
- package/src/startup-payload.js +126 -0
- package/src/tools.js +4271 -0
- package/src/transcript-session.js +106 -0
- package/src/validation.js +1163 -0
- package/src/version.js +2 -0
- package/templates/BOARD.md +72 -0
- package/templates/BOTHANDOFF.md +57 -0
- package/templates/CHARACTER.md +30 -0
- package/templates/HANDOFF.md +63 -0
- package/templates/IDENTITY.md +29 -0
- package/templates/INDEX.md +82 -0
- package/templates/INSTALL.md +29 -0
- package/templates/PROCEDURE.md +39 -0
- package/templates/ROSTER.md +43 -0
- package/templates/SEED.md +65 -0
- package/templates/STAGING.md +37 -0
- package/templates/STANDARD.md +99 -0
- package/templates/THREAD.md +43 -0
- package/templates/USER.md +29 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# EMET TEMPLATE STANDARD
|
|
2
|
+
|
|
3
|
+
**Template control:** id `templates/STANDARD.md` · revision: the store's version governs · status: IN FORCE · approved: user · 2026-09-11 · a decision record · owner: EMET (base) · decision record: the owner's
|
|
4
|
+
**Governs:** every base template shipped with EMET, every extension an install adds to one, and every new template an install creates.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. PURPOSE
|
|
9
|
+
|
|
10
|
+
A template is a control. It puts the answer in front of whoever fills it before the moment a field could be skipped. This standard exists so that anything added beyond the shipped base is built the same way, without a review gate. **The standard is the control.**
|
|
11
|
+
|
|
12
|
+
## 2. TERMS
|
|
13
|
+
|
|
14
|
+
- **Base template** — ships with EMET. Its required sections are fixed.
|
|
15
|
+
- **Extension** — a section or field an install adds to a base template.
|
|
16
|
+
- **Local template** — a new template an install creates for a document type the base does not cover.
|
|
17
|
+
- **Record** — a document filled from a template. HANDOFF, the board, a thread, a seed.
|
|
18
|
+
- **User** — the person the install serves. **Assistant** — the model working through EMET.
|
|
19
|
+
|
|
20
|
+
## 3. RULES FOR BASE TEMPLATES
|
|
21
|
+
|
|
22
|
+
1. **Must be followed.** Every required section appears, in order, in every record.
|
|
23
|
+
2. **An install may not** remove, rename, reorder, merge, or make optional any required section or field.
|
|
24
|
+
3. **An install may expand** — add sections, add fields, or make an optional field required. **Tighten, never loosen.**
|
|
25
|
+
4. **Extensions sit after the required sections they relate to** and are marked `[EXTENSION — <install>]` so a reader can always tell base from local.
|
|
26
|
+
5. A base template changes only by an EMET release. An install that needs a base change proposes it upstream; it does not patch its copy.
|
|
27
|
+
|
|
28
|
+
## 4. RULES FOR NEW TEMPLATES (local)
|
|
29
|
+
|
|
30
|
+
A local template is valid only if it carries all of the following:
|
|
31
|
+
|
|
32
|
+
1. **Template control block** (§6).
|
|
33
|
+
2. **The recorded failure it prevents** — a specific incident or entry, not a general benefit. **No named failure, no template.**
|
|
34
|
+
3. **Its required sections, in priority order** — most consequential first.
|
|
35
|
+
4. **The completion rules** (§5), unmodified. A local template may add rules; it may not relax these.
|
|
36
|
+
5. **Plain naming** — the file name says what the document is.
|
|
37
|
+
|
|
38
|
+
## 5. COMPLETION RULES — apply to every record from every template
|
|
39
|
+
|
|
40
|
+
1. **Every required section appears.** Nothing is omitted because it seems empty.
|
|
41
|
+
2. **Every field is answered.** "None" is valid. A blank is not. "N/A" carries a one-line reason.
|
|
42
|
+
3. **Every "none / nothing / clear" states its scope** — what was checked, against what. An unscoped negative is a nonconformance.
|
|
43
|
+
4. **Carried items are carried, not rebuilt.** Where a template carries a list forward, an item leaves only with a written disposition and its evidence.
|
|
44
|
+
5. **A section that could not be completed says so:** `NOT COMPLETED — <reason>`. An honest gap conforms; a silent one does not.
|
|
45
|
+
|
|
46
|
+
## 6. CONTROL BLOCKS
|
|
47
|
+
|
|
48
|
+
**Every template opens with a template control block:**
|
|
49
|
+
template id · revision · status (DRAFT / IN FORCE / RETIRED) · **approved** (who · date · decision record — required before status can be IN FORCE; ISO 13485 §4.2.4 and ISO 9001 §7.5.2, review and approval before issue; added 2026-09-11, architecture pass) · owner (EMET or the install) · failure it prevents · supersedes
|
|
50
|
+
|
|
51
|
+
**Every record opens with a record control block:**
|
|
52
|
+
template id and revision used · record revision · session id · source tag · written (local date and time) · scope of the session or author, one line
|
|
53
|
+
|
|
54
|
+
## 7. CHANGE CONTROL
|
|
55
|
+
|
|
56
|
+
- Templates and records are revised through the versioned document store: each revision archives the prior copy.
|
|
57
|
+
- **Nothing is deleted.** A template no longer used is marked RETIRED; its content is retained.
|
|
58
|
+
- A record is corrected by a later revision or a later record, never by rewriting what earlier revisions said.
|
|
59
|
+
|
|
60
|
+
## 8. WHAT THIS STANDARD DOES NOT DO
|
|
61
|
+
|
|
62
|
+
- It does not claim conformity with any external standard. It puts document control into practice.
|
|
63
|
+
- It does not restate rules held in server code (the floor, the layer charter, the write path). It points to them.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 9. VALIDATION — NOT OPTIONAL (the user, 2026-09-10)
|
|
68
|
+
|
|
69
|
+
*"There needs to be a document template validation tool that isn't optional either freestanding or incorporated into established regular processes."*
|
|
70
|
+
|
|
71
|
+
**Every record from a templated document type is validated against its template. No caller can skip it.**
|
|
72
|
+
|
|
73
|
+
**Design — priced 2026-09-10; v1 scope APPROVED by the user 2026-09-11; not yet built. Build detail and limits are kept in the owner's store.**
|
|
74
|
+
- **Where it cannot be skipped:** the write path. Every document write already passes one door (redaction, digests, read-back, receipt). Validation runs there on every write to a templated type.
|
|
75
|
+
- **Which documents are templated:** by the record control block's template id, **and** by a document-id map (`HANDOFF.md` → HANDOFF, `STATE.md` → BOARD, `seeds/*` → SEED, `threads/*` → THREAD, `staging/*` → STAGING, `procedures/*` → PROCEDURE …). The map means leaving out the control block cannot evade validation.
|
|
76
|
+
- **Where it is also visible:** the write receipt carries the verdict; reads carry it per document (as integrity is carried today); session start counts nonconforming documents (as record gaps are counted today).
|
|
77
|
+
- **Freestanding use:** the same check callable on demand — to audit existing records, migrate old ones, and check a new local template against this standard.
|
|
78
|
+
|
|
79
|
+
**What v1 checks (approved scope):** control block present · a template set IN FORCE carries its approval (who · date · record) · every required section present and in order · no empty required section · no unfilled template placeholder left in the record · `NOT COMPLETED` carries a reason · a template's own checks where it names them (the BOARD's counts must match its rows) · **carry-forward — every item on the previous revision's list is still present or carries a disposition row.** The prior revision is already archived, so this is a comparison, not a judgment. (This check alone would have caught the two board items that were dropped.)
|
|
80
|
+
|
|
81
|
+
**What a machine cannot fully check:** whether a "none" states its scope honestly, or whether an answer is true. Those remain the author's and the reader's. The tool checks form and continuity, not truth.
|
|
82
|
+
|
|
83
|
+
**DECIDED — the user, 2026-09-10 (a decision record): *"Mark for audit and review."*** A nonconforming write is **not rejected.** It lands, carries a visible nonconformance marker listing what failed, and stays counted and surfaced at session start until it is **reviewed and dispositioned** — either **corrected** by a later revision (which clears the marker by passing), or **accepted** with a written reason recorded on the document. A marker is never cleared silently.
|
|
84
|
+
|
|
85
|
+
### 9a. LOCKS — nothing may weaken a template's function (the user, 2026-09-11: *"lock it down and reduce opportunities to weaken it's function as a template"*)
|
|
86
|
+
|
|
87
|
+
Each lock names the weakening it prevents. L1 is the user's decision; L2–L6 are the assistant's design under his direction, included in v1 scope. **L4 and L5 confirmed by the user 2026-09-11** after the architecture pass flagged them as preventing evasions no one had attempted — kept on a small footprint: *"either way by function or fault they provide something vs nothing by their exclusion."*
|
|
88
|
+
|
|
89
|
+
- **L1 — The shipped copy governs base templates.** Required sections **and status** are read from the copy that ships with the release, never from the store copy. A store copy missing a shipped section, or stating a different status, is itself marked nonconforming. *Prevents:* loosening a template by editing the store copy; switching validation off by flipping a template to DRAFT or RETIRED. **The same lock applies to `CHARTER.md`** — stated in the charter's §9.
|
|
90
|
+
- **L2 — No off switch.** No setting, environment variable or tool argument disables validation or exempts a document. *Prevents:* "not optional" becoming optional by configuration.
|
|
91
|
+
- **L3 — The map only tightens.** Settings may add document-to-template mappings; they may not remove or redirect a base mapping. The board and handoff mappings follow the same settings that session start and session close use, so the document startup reads is always the document that is validated. *Prevents:* unmapping the board, or moving it to an id nothing checks.
|
|
92
|
+
- **L4 — A declared template adds, never replaces.** If a record's control block names a different template than the map, the record is validated against both and the disagreement is a warning. *Prevents:* declaring a weaker local template to evade the base.
|
|
93
|
+
- **L5 — Rename and retire do not escape.** Renaming a mapped document to an unmapped id marks the renamed document; retiring a base template's store copy is marked. *Prevents:* validation evaded by moving or retiring the thing it checks.
|
|
94
|
+
- **L6 — An acceptance covers one revision.** `accept_nonconformance` applies only to the revision it names; the next revision is validated fresh. Accepted markers stay counted at session start, separately from open ones. *Prevents:* one acceptance becoming a standing waiver, or hiding the marker.
|
|
95
|
+
|
|
96
|
+
## OPEN — to be priced, not assumed
|
|
97
|
+
- **How base templates ship — DECIDED 2026-09-11 (the user):** the repository carries the base templates and the setup interview writes them into each new store. The only shape in which a stranger's install gets templates at all.
|
|
98
|
+
- **Where local templates live** in an install's store — still open.
|
|
99
|
+
- **Base-template drift in the store — DECIDED 2026-09-11 (the user): the shipped copy governs.** Now lock L1 in §9a.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# TEMPLATE — THREAD
|
|
2
|
+
|
|
3
|
+
**Template control:** id `templates/THREAD.md` · revision: the store's version governs · status: IN FORCE · approved: user · 2026-09-11 · a decision record · owner: EMET (base) · built to `templates/STANDARD.md` · supersedes: none
|
|
4
|
+
**Fills:** `threads/<name>.md` — the working document for one project or line of work: its current position, its decisions and their reasons, and a dated log.
|
|
5
|
+
**Failure it prevents:** threads grown by appended sections until the current state sat under hundreds of kilobytes of history (reference install: two threads at 147 KB and 328 KB). A phone session did not read one — the mobile startup skips threads by rule — so the board marked its career rows `NOT COMPLETED` (2026-09-10); whether a phone session could read a thread that size was never tested. When it was read, its priority list still told the user to submit an application that had been submitted two weeks earlier — the current state was never rewritten, only appended to.
|
|
6
|
+
**Completion rules:** `templates/STANDARD.md` §5, unmodified.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## HOW TO FILL — rules specific to this template
|
|
11
|
+
|
|
12
|
+
1. **§1 is replaced, never appended.** Every update that changes the project's position rewrites §1 in full, with its as-of date. History goes to §4.
|
|
13
|
+
2. **The board holds status; the thread holds detail.** Open items live on the board as rows. The thread refers to them by id and holds what a row cannot: context, options, reasoning. An item that is open in the thread and absent from the board is a nonconformance — open the row.
|
|
14
|
+
3. **§1 through §3 must be readable on a phone.** When the whole document passes 64 KB — **a chosen limit on what a thread costs to load into context on any interface, not a measured one; revise it if it is ever measured** — the oldest §4 entries move to a log record `threads/<name>--log-<first date>-to-<last date>.md`, and §5 lists it. Nothing is deleted: the moved entries stay in the log record and in the document history.
|
|
15
|
+
4. **Decisions carry the user's words.** A recommendation the user has not accepted is not in §3.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## §0 RECORD CONTROL
|
|
20
|
+
- Template: `templates/THREAD.md` rev __ · Thread revision: the store's version governs
|
|
21
|
+
- Last updated: __ (local) · Session id: __ · Source tag: __
|
|
22
|
+
- **What this thread is for, one line:** __
|
|
23
|
+
|
|
24
|
+
## §1 CURRENT STATE — as of __
|
|
25
|
+
- **Phase:** __
|
|
26
|
+
- **What is true now:** three to eight lines. Each claim says how it was verified and when, or is marked unverified.
|
|
27
|
+
- **Board rows for this thread:** ids and their one-line next actions — or *"None open — checked against board v__."*
|
|
28
|
+
- **Waiting on:** who or what, and since when — or *"Nothing."*
|
|
29
|
+
|
|
30
|
+
## §2 KEY FACTS AND CONSTRAINTS
|
|
31
|
+
Standing facts a new reader needs before acting: people, systems, limits, fixed dates. Each points to its record (layer entry id, document) where one exists. Or *"None beyond §1."*
|
|
32
|
+
|
|
33
|
+
## §3 DECISIONS
|
|
34
|
+
| Date | Decision | User's words, verbatim | Recorded as |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
Or *"No decisions recorded."* A decision reversed later stays in the table; its reversal is a new row naming the one it replaces.
|
|
38
|
+
|
|
39
|
+
## §4 LOG — newest last
|
|
40
|
+
Dated entries, append-only. Each opens with `### YYYY-MM-DD — <one-line summary> (session id)`. What happened, what changed on the board, what was learned. A correction is a new entry that names the one it corrects; earlier entries are not rewritten.
|
|
41
|
+
|
|
42
|
+
## §5 LOG RECORDS
|
|
43
|
+
Earlier log entries moved out under rule 3: document id · date range — or *"None."*
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# TEMPLATE — USER
|
|
2
|
+
|
|
3
|
+
**Template control:** id `templates/USER.md` · revision: the store's version governs · status: IN FORCE · approved: user · 2026-09-26 · a decision record · owner: EMET (base) · built to `templates/STANDARD.md` · supersedes: none
|
|
4
|
+
**Fills:** `bootstrap/USER.md` — who the install serves. Written at the first-run interview from the user's answers.
|
|
5
|
+
**Failure it prevents:** a store that knows an assistant name and not the person, or that relearns spelling and working preferences every session because they had no standing home (interview keys `user_name`, `user_context`, `user_preferences`; user 2026-09-26: structure ships, personal data does not).
|
|
6
|
+
**Completion rules:** `templates/STANDARD.md` §5, unmodified.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## HOW TO FILL — rules specific to this template
|
|
11
|
+
|
|
12
|
+
1. **The name is used in the form the user gave.** Spelling and form are the user's.
|
|
13
|
+
2. **Preferences are standing, not session mood.** Delivery (length, codes vs plain words, when to ask) lives here so it survives a change of host.
|
|
14
|
+
3. **Machine paths and family names are this install's data.** They belong in the filled record, never in this template.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## §0 RECORD CONTROL
|
|
19
|
+
- Template: `templates/USER.md` rev __ · Record revision: the store's version governs
|
|
20
|
+
- Session id: __ · Source tag: __ · Written (local): __
|
|
21
|
+
|
|
22
|
+
## §1 NAME
|
|
23
|
+
The user's name, and any spelling or form they want used.
|
|
24
|
+
|
|
25
|
+
## §2 WHAT THIS MEMORY IS FOR
|
|
26
|
+
The use they named at interview — work, a project, personal continuity, or their words.
|
|
27
|
+
|
|
28
|
+
## §3 PREFERENCES
|
|
29
|
+
How they want to be worked with: length, directness, being asked before changes — or *"None stated."*
|