Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
38457a2
Refresh AGENTS.md for the implementation phase: navigation map, statu…
darko-mijic Jun 7, 2026
eb6bf2a
Impement Session 1 — Bootstrap + Phase 0 (the protocol as typed code)
darko-mijic Jun 7, 2026
6136fb4
Produce initial version of the hardening plan after first implementat…
darko-mijic Jun 7, 2026
b93c122
Refine the hardening plan with founding-ideation layer
darko-mijic Jun 7, 2026
f83e872
Reinforce the hardening plan with additional founding-ideation layer …
darko-mijic Jun 7, 2026
478cc00
Execute Phase 0 hardening Wave A — decision-free fidelity + simplific…
darko-mijic Jun 7, 2026
c8a7ce0
Split the hardening plan into execution / decisions / concept; absorb…
darko-mijic Jun 7, 2026
b0f902a
Introduce WIP fomalization plan
darko-mijic Jun 7, 2026
4bc5645
Fold-A: restructure the UL into a lean glossary; rehome the model int…
darko-mijic Jun 10, 2026
e6f0a20
Archive review artifacts from gitignored scratch into tracked reviews/
darko-mijic Jun 10, 2026
4638089
Fold-B: resolvable-now sweep - specTest binding-only (R3), MD-8/MD-9 …
darko-mijic Jun 10, 2026
b60542c
chore: exempt archived reviews/ from prettier (verbatim historical re…
darko-mijic Jun 10, 2026
8d010de
Finalize plans 02/04 + AGENTS nav after the pre-grill folds
darko-mijic Jun 10, 2026
24db2ad
Grill: D1-D4/D7/D8 resolved as MD-10..MD-15; base reconciled; Wave B …
darko-mijic Jun 10, 2026
2d44b0f
Consistency + consolidation pass after the fold/grill sessions
darko-mijic Jun 10, 2026
907c75a
Wave B executed: typed sections, kind-conditional floor table, de-pad…
darko-mijic Jun 10, 2026
47cf2da
Post-Wave-B adversarial pass (MD-16): promoted evidence must be carri…
darko-mijic Jun 10, 2026
5b467ee
De-temporalize code (plan 05 §1): deferredInSession1 -> evaluatedOver…
darko-mijic Jun 10, 2026
01f5e14
De-temporalize docs (plan 05 §2): cite decisions not events in 02/04/…
darko-mijic Jun 10, 2026
f6e4332
DECISIONS.md ratified-name registry (plan 05 §3); bare MD-n refs in 0…
darko-mijic Jun 10, 2026
c9d5b73
Curation annotations + admission bar (plan 05 §4): R-series RETIRE-AT…
darko-mijic Jun 10, 2026
953f98c
Wire check:temporal guard into npm run check (plan 05 §5): banned tem…
darko-mijic Jun 10, 2026
5a96b26
Plan 05 done-record + lint fix: simplify graph-clause assertion (lite…
darko-mijic Jun 10, 2026
d1e5fd8
Harden the temporal guard (post-review): fail-closed Node wrapper rep…
darko-mijic Jun 10, 2026
caa324b
Guard round 2 (post-review): sweep inverts to all tracked files minus…
darko-mijic Jun 10, 2026
3d1d6b0
Guard round 3 (post-review): self-exemption narrowed to line-level us…
darko-mijic Jun 10, 2026
2d04aff
Guard round 4 (post-review): self-allowance is exact-line equality, a…
darko-mijic Jun 10, 2026
f16159f
Phase 0 wrap-up (internal review): ref() doc-comment cites the decisi…
darko-mijic Jun 10, 2026
8e6753d
Fix CI typecheck hermeticity: map the package name to src/index.ts in…
darko-mijic Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
pull_request:

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Temporal guard
run: npm run check:temporal

- name: Typecheck
run: npm run typecheck

- name: Typecheck examples
run: npm run typecheck:examples

- name: Lint
run: npm run lint

- name: Format check
run: npm run format:check

- name: Test
run: npm test

- name: Build
run: npm run build
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# Local planning artifacts — kept on disk for working notes, out of the published repo
plans/
# plans/

# User's scratchpad
.tmp-scratch/

# Tooling outputs
node_modules/
dist/
generated/
.sisyphus/evidence/

# OmO plans and state
.sisyphus/
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AGENTS.md
CLAUDE.md
docs/**
jtbd-stories/**
plans/**
.sisyphus/**
.tmp-scratch/**

# Archived review artifacts - verbatim historical records, not format-policed
reviews/
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 100
}
189 changes: 107 additions & 82 deletions AGENTS.md

Large diffs are not rendered by default.

202 changes: 202 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
60 changes: 60 additions & 0 deletions check-temporal.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { spawnSync } from "node:child_process";

// The temporal-token guard: durable artifacts carry current truth, so calendar and session tokens
// (session/wave/fold handles, ISO dates, numbered plan-file refs) are banned from every tracked
// file. Only the temporal-by-genre artifacts are exempt: the dated decision diary, the per-session
// plan done-records, the archived reviews — plus the machine-generated lockfile (derived, not
// authored prose). `Slice N` / `Phase 0` (roadmap-relative capability names) and `MD-n` citations
// are allowed.
const pattern =
"Session[ -][0-9]|Wave[- ][A-Z]|Fold-[A-Z]|deferredInSession|plans/[0-9]+|20[0-9]{2}-[0-9]{2}-[0-9]{2}";
const pathspecs = [
".",
":(exclude)docs/concept/DECISIONS.md",
":(exclude)plans",
":(exclude)reviews",
":(exclude)package-lock.json",
];

const result = spawnSync("git", ["grep", "-nE", pattern, "--", ...pathspecs], {
encoding: "utf8",
});

if (result.error !== undefined) {
throw result.error;
}

// `git grep` exit codes: 1 = no matches, 0 = matches found, anything else = the command itself
// failed. A guard that errors must never pass — fail closed.
if (result.status !== 0 && result.status !== 1) {
console.error(`check:temporal — git grep failed (exit ${result.status}); failing closed.`);
if (result.stderr !== "") {
console.error(result.stderr);
}
process.exit(1);
}

// This file is swept like every other; its single allowance is line-level use–mention: the guard
// must name the tokens it bans, so exactly one line — the pattern literal, alone on its line — is
// permitted. The predicate is exact-content equality, so a copied regex with anything else beside
// it on the line, or a second copy of the literal, is a violation like any other. (If this file is
// renamed, the allowance stops matching and the pattern line fails loudly: fail closed.)
const matches = result.status === 0 ? result.stdout.split("\n").filter(Boolean) : [];
const allowedSelfLine = `"${pattern}";`;
let selfAllowanceUsed = false;
const violations = matches.filter((line) => {
const selfMatch = /^check-temporal\.mjs:\d+:(.*)$/.exec(line);
if (selfMatch !== null && selfMatch[1].trim() === allowedSelfLine && !selfAllowanceUsed) {
selfAllowanceUsed = true;
return false;
}
return true;
});

if (violations.length > 0) {
console.error("check:temporal — banned temporal tokens found:\n");
console.error(violations.join("\n"));
process.exit(1);
}

process.exit(0);
4 changes: 2 additions & 2 deletions docs/concept/00-vision-scope-and-mvp-boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ The MVP proves the founding principle — *one regenerable graph derived from th

- **Typed `Spec` DSL** in TypeScript: `spec()`, `pack()`, sections, relations, the three descriptors (`kind` · `altitude` · `readiness`), enrichment-in-place, refinement into child specs. One primitive, stable IDs, no artifact migration.
- **Generic source anchors** that bind any code location (class, function, route, module) to a spec ID + optional component. Framework-neutral — *how* the runtime is wired is an extractor detail, not a job.
- **The `ts-morph` one-graph extractor**: one canonical, regenerable graph from `/specs/**/*.spec.ts` + anchors + basic test discovery, with honest edge `claim`s.
- **The `ts-morph` one-graph extractor**: one canonical, regenerable graph from `/specs/**/*.sdp.ts` + anchors + basic test discovery, with honest edge `claim`s.
- **Core conformance + honesty checks**: referential integrity (no dangling ID references), duplicate-ID detection, honest readiness (against the readiness floor), orphan detection, `verifies` linkage from tests to specs, and authoring-shape honesty (no hand-authored derived edges or delivery facts). CI fails on errors.
- **One generated read-only view**: a derived, regenerable human-readable projection (spec tree + per-spec detail with readiness, relations, impact list, source links).
- **Bidirectional spec↔test trace**: query "what verifies this spec?" and "what does this test cover?" from the graph.

**The MVP write-path is "edit TypeScript + git."** No patch loop, no codemod. You change a `.spec.ts` file or an anchor, re-run `sdp build`, and the view updates. CI rejects PRs that break links or state readiness the spec has not earned.
**The MVP write-path is "edit TypeScript + git."** No patch loop, no codemod. You change a `.sdp.ts` spec file or an anchor, re-run `sdp build`, and the view updates. CI rejects PRs that break links or state readiness the spec has not earned.

**"Done" for the MVP:** you can write specs in TS, anchor implementing code and tests with stable IDs, run `sdp build`, get a graph that passes the conformance + honesty checks, and open a generated view that correctly shows intent, implementation links, verification status, and impact — and CI rejects the PR if any of it is broken or incomplete. Delete `generated/` and rebuild identically.

Expand Down
Loading
Loading