Skip to content

docs: publish Flatbread positioning#177

Draft
tonyketcham wants to merge 27 commits intomainfrom
toeknee/flatbread-task-dag-instances-18a9
Draft

docs: publish Flatbread positioning#177
tonyketcham wants to merge 27 commits intomainfrom
toeknee/flatbread-task-dag-instances-18a9

Conversation

@tonyketcham
Copy link
Copy Markdown
Collaborator

@tonyketcham tonyketcham commented May 8, 2026

Summary of changes

Completes the Flatbread project-board stack through #169:

  • Product/docs/experiments: positioning, glossary, PMF rubric, command guidance, canonical quickstart, relation-first narrative, GraphQL-vs-TypeScript read interface guidance, local dev loop boundaries, edit-file/query-update demo, snapshot export docs, data ownership/exit story, starter benchmark, TypeScript safety experiment, export trust experiment, artifact retrieval benchmark, and validation-driven roadmap.
  • Agent artifact experiments: Effort Graph wire-up, adversarial multi-layout schema test, and retrieval leverage benchmark.
  • Core integrity/type safety: normalized ID semantics, missing-reference validation, duplicate-ID diagnostics, relation cardinality coverage, validation diagnostic snapshots, narrowed core content type surfaces.
  • Codegen/API: generated Flatbread content model types and prototype generated TypeScript read API alongside GraphQL, exercised by the Next.js example.
  • Portability: stable JSON collection export API and flat CSV collection export API.

Closes #142
Closes #143
Closes #144
Closes #145
Closes #146
Closes #147
Closes #148
Closes #149
Closes #150
Closes #151
Closes #152
Closes #153
Closes #154
Closes #155
Closes #156
Closes #157
Closes #158
Closes #159
Closes #160
Closes #161
Closes #162
Closes #163
Closes #164
Closes #165
Closes #167
Closes #168
Closes #169

Testing

  • pnpm build
  • pnpm lint
  • pnpm test:ava
  • pnpm -F @flatbread/codegen exec vitest run
  • pnpm --filter nextjs exec flatbread codegen --clear-cache --verbose
  • pnpm --filter nextjs build
  • pnpm --filter nextjs run demo:watch-query with demo:edit/demo:restore
  • Fresh-worktree starter benchmark completed in 49s; generated read API build verification completed in 18s.
  • Issue-scoped proof DAGs completed through dag-flatbread-165-roadmap-review-r2.

Notes

mergify stack push failed with the integration token (HTTPError 403 from /user), so commits were pushed to the agent branch and this draft PR was updated manually.

Open in Web Open in Cursor 

Summary of changes

- Reframe Flatbread as a Git-native relational content layer for TypeScript apps.
- Add docs/positioning.md as the canonical statement of ICP, jobs, non-goals, and GraphQL's role as an interface.
- Update package README intros so source and transformer packages describe their role in the relational content model instead of positioning GraphQL as the product.

Testing

- pnpm build
- pnpm lint
- proof DAG: dag-flatbread-142-positioning completed 4/4 tasks

Closes #142

Change-Id: Icc64caae46e919e9eca7a42f7659bc39f20386e3
Summary of changes

- Add docs/glossary.md with practical definitions for collection, record, ID, relation, cardinality, validation, and query interface.
- Link the glossary from the positioning page, package README, and Next.js example docs so onboarding has a shared vocabulary.
- Keep definitions scoped to Flatbread's Git-native content graph and explicitly avoid database/CMS replacement implications.

Testing

- pnpm lint
- proof DAG: dag-flatbread-143-glossary completed 4/4 tasks

Closes #143

Change-Id: I5e4396421ccb1b837b7c49428e54a0d72db82877
Summary of changes

- Add a PMF decision rubric comparing Flatbread with SQLite-style database workflows, hosted/headless CMS workflows, Contentlayer-like content workflows, and agent artifact/Effort Graph workflows.
- Include setup time, type safety, relation modeling, reference integrity, portability, local dev loop quality, and agent query ergonomics as explicit criteria.
- Link the rubric from positioning and PMF audit docs and state go/no-go signals for agent artifacts as a primary wedge.

Testing

- pnpm lint
- proof DAG: dag-flatbread-144-pmf-rubric completed 4/4 tasks

Closes #144

Change-Id: I6582bf947f99e327d1d36e4c4f2a3d6a92b320ea
Summary of changes

- Align root, contributor, package, and Next.js example docs around the current pnpm workspace workflow.
- Document `flatbread start` as the valid CLI command, clarify that `flatbread dev` is not a subcommand, and distinguish one-shot codegen from watch-only codegen.
- Update example generated paths, ports, package names, and onboarding guidance to match the current repository layout.

Testing

- pnpm lint
- proof DAG: dag-flatbread-146-readme-command-drift completed 4/4 tasks

Closes #146

Change-Id: I6baf6285ac0c2bd74a4e5b9c6d43a85d1e1cbc45
@cursor cursor Bot force-pushed the toeknee/flatbread-task-dag-instances-18a9 branch from 67e5770 to c0dbe34 Compare May 8, 2026 06:40
cursoragent added 21 commits May 8, 2026 06:44
Summary of changes

- Add an issue #167 experiment report mapping the in-repo Cursor proof skill layout to Effort Graph collections.
- Add representative Effort, Plan, Session, and Decision markdown fixtures that preserve the harness layout while exposing queryable frontmatter refs.
- Include a single GraphQL retrieval surface for blocking decisions with linked plan/session context and concrete follow-up issue drafts for friction points.

Testing

- pnpm lint
- proof DAG: dag-flatbread-167-effort-graph-wire-up completed 4/4 tasks

Closes #167

Change-Id: I07075abaab8248babc58df421dc6d3eeb9aad64b
Summary of changes

- Add an issue #168 adversarial schema report covering Claude-oriented, Cursor-oriented, and GCC-style harness layouts.
- Add representative layout snippets and an acceptance matrix to pressure-test one Effort Graph schema against three artifact conventions.
- Identify stable entities/fields, tool-specific mapping requirements, and recommend one canonical schema plus explicit layout profiles as viable.

Testing

- pnpm lint
- proof DAG: dag-flatbread-168-adversarial-effort-graph completed 4/4 tasks

Closes #168

Change-Id: I40a33f70c93e4e89b931293b7d972a5767d57238
Summary of changes

- Rewrite the root quickstart around the Next.js example as the canonical first-success path from the monorepo root.
- Lead with the posts/authors/tags content model, then introduce GraphQL codegen as the current read interface that produces a typed query result.
- Update contributing, example, glossary, positioning, and content docs so commands and terminology point back to the same onboarding path.

Testing

- pnpm lint
- proof DAG: dag-flatbread-145-root-quickstart completed 4/4 tasks

Closes #145

Change-Id: I72c4fb6e4d60345b6dc8ea867dd0120bb2ff6741
Summary of changes

- Expand the canonical quickstart into a relation-first trace from backing files to config to generated GraphQL/codegen output.
- Add glossary terms for tag facets versus Tag collections and generated schema/operation types.
- Update example content and Next.js docs so posts, authors, and tags point to one shared model and visible query-result shape.

Testing

- pnpm lint
- proof DAG: dag-flatbread-147-relation-first-narrative completed 4/4 tasks

Closes #147

Change-Id: I82bbc51a53766270ab783cedeb4386ad9a3ea95d
Summary of changes

- Add shared ID normalization helpers and use them across find-by-id, find-many, relation resolution, and top-level ID equality/membership filters.
- Switch GraphQL lookup arguments to the ID scalar so string and integer ID literals normalize through the same resolver path.
- Validate invalid and duplicate normalized record IDs before schema use, with aggregated diagnostics that include source paths.
- Document the current ID normalization rules and add AVA fixtures for accepted, rejected, and duplicate ID shapes.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*ID*'
- pnpm test:ava -- --match='*Sift*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-148-id-semantics-review-r3 completed 3/3 tasks

Closes #148

Change-Id: Iaf137000630587edc0b50908315207efcac97b62
Summary of changes

- Add collection reference validation during schema generation so missing refs fail before query-time relation surprises.
- Aggregate diagnostics with source collection, record context, ref field path, target collection, and missing/invalid target ID details.
- Add posts/authors/tags-style AVA fixtures covering missing array refs, missing tag refs, invalid scalar ref shapes, and clean successful refs.
- Correct bundled example content refs that the new validation surfaced as broken.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*reference*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-149-missing-reference-validation reached implementation before being terminated after runner stall
- proof DAG: dag-flatbread-149-reference-validation-review completed 3/3 tasks

Closes #149

Change-Id: I754093e78f1c1609557377a60cefb98701a0245c
Summary of changes

- Validate content IDs before returning cached schemas so content-only duplicate regressions cannot bypass pre-schema validation.
- Reset graphql-compose's global schema composer before fresh schema builds and serialize AVA files to avoid schema-building test races.
- Preserve source VFile paths after transformation so duplicate-ID diagnostics include stable source locations even if parsed content contains reserved context keys.
- Add a cache-regression test that proves duplicate IDs still fail after a warm schema generation.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*duplicate*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-150-duplicate-id-review-r3 completed 3/3 tasks

Closes #150

Change-Id: Ibeb96f5e9555b72c8ef0bf6da633a65f67543f47
Summary of changes

- Document supported relation cardinality shapes in the glossary: scalar one-to-one refs, list one-to-many refs, explicit reciprocal-list many-to-many modeling, and unsupported shapes.
- Add AVA coverage for scalar refs, list refs, explicit many-to-many list refs, object ref values, and nested-array ref values.
- Reuse missing-reference validation so unsupported cardinality shapes fail before schema use instead of resolving as nulls.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*cardinality*'
- pnpm test:ava -- --match='*reference*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-151-relation-cardinality-review-r2 completed 3/3 tasks

Closes #151

Change-Id: Ia6e0ecca5787ee252a6ddaf4b15ac78dfdd69648
Summary of changes

- Add validation diagnostic snapshot tests for missing references, unknown target collections, duplicate IDs, invalid relation shapes, and required ID errors.
- Add a required-field fixture for missing record IDs.
- Sort aggregated validation diagnostics before throwing so snapshot output remains deterministic.

Testing

- pnpm --filter @flatbread/core build
- pnpm exec ava packages/core/src/providers/test/validationSnapshots.test.ts --update-snapshots
- pnpm exec ava packages/core/src/providers/test/validationSnapshots.test.ts
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-152-validation-snapshots-review-r2 completed 3/3 tasks

Closes #152

Change-Id: I85369f9faa10f5851f74e8bc143ca50725f30b21
Summary of changes

- Append generated Flatbread content-model helper types to codegen output using the configured collections and refs.
- Emit collection-name, record-by-collection, relation-target collection, relation cardinality, and related-record helper types without requiring handwritten GraphQL documents.
- Keep the generated helper block idempotent across cache hits and add compile assertions proving the generated types match the representative config.

Testing

- pnpm --filter @flatbread/codegen build
- pnpm -F @flatbread/codegen exec vitest run
- pnpm lint
- proof DAG: dag-flatbread-153-ts-schema-types-review-r6 completed 3/3 tasks

Closes #153

Change-Id: I7205a76b8cc8c579c95e91dd5d5471dbf30a8621
Summary of changes

- Generate a prototype TypeScript read API alongside GraphQL codegen output, including collection readers, default schema-derived selections, relation metadata, and cache-versioned output.
- Regenerate the Next.js example types and add a read API helper that queries posts, authors, and tags through createFlatbreadReadApi while keeping the existing GraphQL path available.
- Exercise the generated read API from the Next.js home page, document the prototype, and fix example content refs surfaced by validation.
- Add compile/runtime-oriented codegen tests for generated content model/read API types, cache behavior, relation cardinality, and cache-busting output versioning.

Testing

- pnpm --filter @flatbread/codegen build
- pnpm -F @flatbread/codegen exec vitest run
- pnpm build
- pnpm --filter nextjs exec flatbread codegen --clear-cache --verbose
- pnpm --filter nextjs build
- pnpm lint
- proof DAG: dag-flatbread-154-ts-read-api-review-r8 completed 4/4 tasks

Closes #154

Change-Id: Ie93611adaef1dcc3b1b90bec40dfc7d7e30d57c3
Summary of changes

- Clarify when to use GraphQL operations versus the prototype generated TypeScript read API.
- Tie both read interfaces back to the typed content model and canonical posts/authors/tags quickstart.
- Align codegen and example docs with the prototype status and the current pnpm exec flatbread command style.

Testing

- pnpm --filter @flatbread/codegen build
- pnpm -F @flatbread/codegen exec vitest run
- pnpm --filter nextjs build
- pnpm lint
- proof DAG: dag-flatbread-155-graphql-interface-docs completed 3/3 tasks

Closes #155

Change-Id: I68a3c0dfd8e224a4765659bcb86206532156afe7
Summary of changes

- Narrow core public content surfaces from broad any types toward unknown, typed ContentEntry refs, typed Source fetch inputs, and typed Override resolve boundaries.
- Tighten resolver argument handling, sort typing, deep entry traversal, field overrides, transformKeys, and schema generation boundaries without changing valid content behavior.
- Add compile-time AVA type assertions for common record/relation/source/override paths and expand sift coverage for ID and array string filters.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*content types*'
- pnpm test:ava -- --match='*Sift*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-156-final-review completed 2/2 tasks

Closes #156

Change-Id: I66ef0a4af96378d3d92e90361bb0bb4c9bb13c8d
Summary of changes

- Add local dev loop documentation covering loader reload, schema rebuild, codegen refresh, and framework restart boundaries.
- Document the canonical Next.js two-terminal happy path and current manual restart requirements.
- Add a current reload matrix, failure semantics, draft unified watch design, known limitations, and implementation follow-up seams.
- Link the dev-loop contract from the root/package README and Next.js example docs.

Testing

- pnpm lint
- proof DAG: dag-flatbread-157-watch-loop-review-r2 completed 2/2 tasks

Closes #157

Change-Id: I3de62d3fdc3bbcb248ebbd4a449ad443fc15aa49
Summary of changes

- Add a reproducible edit-file-see-query-update demo for the canonical posts/authors/tags flow.
- Add a focused Next.js watcher script that rebuilds the Flatbread graph per file event and prints updated Markdown post plus YAML author relation query results without a manual restart.
- Add edit/restore helper scripts and document the clean-checkout commands and current limitations.

Testing

- pnpm build
- pnpm --filter nextjs exec flatbread codegen --verbose
- pnpm lint
- pnpm --filter nextjs run demo:watch-query with demo:edit/demo:restore; verified original, live-edit, and restored Markdown/YAML query output in /tmp/flatbread-watch-demo.log
- proof DAG: dag-flatbread-158-final-review-r3 completed 2/2 tasks

Closes #158

Change-Id: Id8909a3bf87bf5cb5f8de176e69123727ee39201
Summary of changes

- Add exportCollectionsAsJson to @flatbread/core for selected collection JSON snapshots.
- Normalize exported record IDs and configured relation fields with Flatbread ID semantics, sort collections/records/object keys deterministically, and emit source paths relative to pathRoot.
- Reuse schema validation before exporting so duplicate IDs and missing refs fail before output is returned.
- Add representative AVA coverage for selected exports, unknown collections, and validation failures, plus JSON export documentation.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*export*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-159-json-export-review-r2 completed 2/2 tasks

Closes #159

Change-Id: Ie21000ebbed3d35e6fe2ae66d260d3c92465f553
Summary of changes

- Add exportCollectionsAsCsv to @flatbread/core for flat selected collection CSV views.
- Include scalar fields and scalar arrays, keep relation fields as normalized reference IDs joined by a configurable separator, and omit nested object fields by design.
- Support comma, semicolon, and tab delimiters with CSV escaping.
- Document CSV behavior alongside JSON snapshots and add AVA coverage for headers, rows, escaping, relation IDs, and custom delimiters/separators.

Testing

- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*CSV*'
- pnpm test:ava
- pnpm lint
- proof DAG: dag-flatbread-160-csv-export-review completed 2/2 tasks

Closes #160

Change-Id: I29485ae56de6c80be6ea31db1abe5a3790c7caf3
Summary of changes

- Add a data ownership and exit story that frames raw files and Git history as the source of truth.
- Document JSON and CSV snapshots, GraphQL introspection, and generated TypeScript artifacts as portability surfaces with current limitations.
- Cross-link ownership guidance from positioning, snapshot export docs, and the main README.

Testing

- pnpm lint
- proof DAG: dag-flatbread-161-data-ownership-review-r2 completed 2/2 tasks

Closes #161

Change-Id: Ie01aa41c5b809005e5ee7cf194ba57035d9021e0
Summary of changes

- Add the relational starter benchmark report for the canonical posts/authors/tags path.
- Record a fresh-worktree install/build/codegen/demo query run completing in 49 seconds and a generated TypeScript read API build verification completing in 18 seconds.
- Capture observed friction and follow-up issue drafts for a network-cold benchmark and Next.js ESLint plugin warning.

Testing

- pnpm lint
- timed fresh-worktree benchmark: pnpm install, pnpm build, nextjs codegen, demo:watch-query
- timed read API verification: pnpm --filter nextjs build
- proof DAG: dag-flatbread-162-starter-benchmark-review-r4 completed 2/2 tasks

Closes #162

Change-Id: Ia44b7d6f5efcff6d303959acc0039a1c330d0972
Summary of changes

- Add a TypeScript safety experiment report for generated Flatbread model/read API types.
- Capture what works today, inference gaps, confusing helper names, nullability limitations, and PMF implications.
- Convert findings into follow-up issue drafts for typed selections, relation helper naming, and nullability alignment.

Testing

- pnpm --filter @flatbread/codegen build
- pnpm -F @flatbread/codegen exec vitest run
- pnpm --filter @flatbread/core build
- pnpm test:ava -- --match='*content types*'
- pnpm --filter nextjs build
- pnpm lint
- proof DAG: dag-flatbread-163-ts-safety-review completed 2/2 tasks

Closes #163

Change-Id: I9584a9ea1aece110cf32900dfd8afdcdddd8829b
Summary of changes

- Add an export trust experiment report with a JSON/CSV demo prompt for the posts/authors/tags ownership story.
- Include a product self-review table for raw files, JSON snapshots, CSV flat views, GraphQL introspection, generated types, and ownership docs.
- Add a verification transcript showing JSON and CSV export output from the Next.js example and follow-up issue drafts for CLI export, exit fixtures, and external interviews.

Testing

- pnpm lint
- Node export transcript using loadConfig and exportCollectionsAsJson/exportCollectionsAsCsv from the flatbread package
- proof DAG: dag-flatbread-164-export-trust-review-r2 completed 2/2 tasks

Closes #164

Change-Id: I60fd0a34d028a1e45f1d52adb78f013848097424
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

I found 3 issues worth fixing before merge:

  1. packages/codegen/README.md now shows a GraphQL example against posts { content }, but the schema and checked-in example operations in this repo use allPosts { _content { ... } }, so the primary codegen usage snippet will fail if readers copy/paste it.
  2. docs/pmf-decision-rubric.md still says broken refs “silently” degrade results and that there is no credible export story, which contradicts the validation and export surface this same PR adds elsewhere.
  3. examples/nextjs/README.md understates what the watch-demo scripts mutate; they also edit YAML author data and refs, not just the post title.

Assumption: reviewed against merge-base 49fba33903795214ed8f32d93f16d7cefa6bf8cb.

Change summary: the runtime/reference/export changes looked internally consistent on this pass; the blockers I found are documentation contradictions or copy-paste breakage.

Open in Web View Automation 

Sent by Cursor Automation: Flatbread PR Review

@@ -73,9 +79,24 @@ const posts: Post[] = await request<GetPostsQuery>(`
`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example no longer matches the schema Flatbread actually generates in this repo. The checked-in example documents use allPosts, and markdown bodies live under _content rather than content (see examples/nextjs/queries/posts.graphql). As written, a reader following the new codegen README will get a validation error from the first copy/pasted query.

**Decision summary:** Agent artifacts are a **credible strategic option** because they amplify demand for the same integrity, typing, and query surfaces the core product needs; they become a **primary wedge** only when those properties are **proven in production-shaped workflows**, not declared in roadmap language alone.

---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These bullets are stale relative to the code/docs being introduced in the same PR. packages/core/src/providers/test/references.test.ts now covers missing refs failing before schema use, and docs/json-export.md documents the new JSON/CSV export story backed by packages/core/src/export/json.ts / csv.ts. Leaving silently degrade and no credible ... export story here makes the rubric contradict the rest of the positioning docs you just published.

Comment thread examples/nextjs/README.md

## 📝 GraphQL Queries
Markdown and YAML for this demo live under **`examples/content`**; this package uses a **`content` → `../content`** symlink so config paths stay `content/markdown/...`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts table understates what this demo loop actually changes. demo-edit.mjs / demo-restore.mjs also mutate content/yaml/authors/dr-caffeine.yml (author name + friend ref), and watch-content-query.mjs watches both that YAML file and the Markdown post. Someone following the README to understand the expected output will be surprised when author/friend fields change too.

Summary of changes

- Add a cold-start versus Flatbread-mediated agent artifact retrieval benchmark for the Effort Graph validation track.
- Compare full-context artifact stuffing with filtered retrieval of blocking decision, plan, and session rows.
- Record payload size reduction, continuity tradeoffs, recommendation, and follow-up issue drafts for MCP query, broader benchmark, and expansion policy.

Testing

- wc -c over full artifact set and filtered Effort Graph rows
- pnpm lint
- proof DAG: dag-flatbread-169-artifact-retrieval-review completed 2/2 tasks

Closes #169

Change-Id: I8370996c72f1ccefd8829f7e59ca956baa399218
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Found 1 correctness issue in the new export path.

I reviewed the merge-base diff and spot-checked the runtime changes with focused tests (pnpm exec ava ... for the touched @flatbread/core areas and pnpm -F @flatbread/codegen exec vitest run ... for the codegen changes). Those suites passed, but the exporter still has a snapshot-consistency bug called out inline below.

Open in Web View Automation 

Sent by Cursor Automation: Flatbread PR Review

Comment on lines +41 to +47
// Reuse schema generation as the validation gate so exports cannot silently
// serialize broken ids or refs.
await generateSchema(configResult);

config.source.initialize?.(config);
const rawNodes = await config.source.fetch(config.content);
const transformerByExtension = getTransformerExtensionMap(config.transformer);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exportCollectionsAsJson() validates one snapshot and then serializes a second one. generateSchema(configResult) fetches/transforms content and validates IDs/refs, but after that we call config.source.fetch() again and export the second fetch.

That breaks the contract this PR documents for validated, deterministic snapshots: if a source plugin is nondeterministic or the content changes between those two awaits, export can succeed while returning data that was never validated. I reproduced this with a custom source whose first fetch returned a valid Post -> Author ref and whose second fetch returned author: "missing-author"; exportCollectionsAsJson() still returned the broken ref without throwing.

Please export the same transformed/validated node set that schema generation checked (or factor validation into a shared single-fetch pipeline) so the returned JSON/CSV snapshot is actually the validated snapshot.

Summary of changes

- Add a validation-driven roadmap with keep/kill/iterate decisions across content layer, validation, TypeScript APIs, GraphQL, watch loop, exports, Effort Graph, CMS UI, and database-replacement scope.
- Explicitly decide Effort Graph should remain a secondary vertical with a path to primary wedge after MCP, token benchmark, and external validation gates.
- Add updated priorities, follow-up issue drafts, maintainer action checklist, and per-issue traceability for the project-board stack.

Testing

- pnpm lint
- proof DAG: dag-flatbread-165-roadmap-review-r2 completed 2/2 tasks

Closes #165

Change-Id: I6aa7d2cb865b8a54c261169b1c3db214c6b1b8a0
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Found 4 still-open issues on the current head.

  • High: packages/core/src/export/json.ts still validates one content snapshot and serializes a second fetch, so the new JSON/CSV export APIs can return data that was never validated.
  • Medium: packages/codegen/README.md still shows a copy-paste GraphQL example that does not match this repo’s generated schema (allPosts / _content vs posts / content).
  • Medium: docs/pmf-decision-rubric.md still contradicts the same PR’s runtime/docs changes by claiming refs silently degrade and there is no credible watch/export story.
  • Low: examples/nextjs/README.md still understates the demo loop; the helper scripts also edit and watch the YAML author file and change the friend ref.

I did not find additional correctness regressions beyond those existing open threads.

Validation run on this head:

  • pnpm -F @flatbread/codegen exec vitest run
  • pnpm test:ava -- --match='*reference*' --match='*ID*' --match='*Sift*'
  • pnpm --filter nextjs build
  • pnpm build
Open in Web View Automation 

Sent by Cursor Automation: Flatbread PR Review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

No review findings in the current PR state.

I reviewed the branch against the origin/main merge base and spot-checked the highest-risk areas in packages/core, packages/codegen, examples/nextjs, and the new docs/runtime guidance. I also ran:

  • pnpm build
  • pnpm -F @flatbread/codegen exec vitest run
  • pnpm test:ava -- --match='*content types*'
  • pnpm --filter nextjs build
  • pnpm exec flatbread start -- next dev --turbopack from examples/nextjs, plus a live POST to http://localhost:5057/graphql and a fetch of http://localhost:3000

Residual risk:

  • I did not run the full pnpm verify stack or exhaustive browser automation across every new docs path.
  • pnpm --filter nextjs build still logs an ESLint plugin warning about eslint-plugin-react-hooks in this environment, although the build completes successfully and the app/runtime checks passed.
Open in Web View Automation 

Sent by Cursor Automation: Flatbread PR Review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 2 issues that look worth fixing before merge:

  • The new generated read API types over-promise nested relation data relative to the default selection generator, so FlatbreadRelationTarget is unsound for relation fields that contain nested objects.
  • The updated Next.js example quickstart points users at http://localhost:3000, but one of the two documented startup paths (pnpm dev) actually serves the app over HTTPS.
Open in Web View Automation 

Sent by Cursor Automation: Flatbread PR Review

>
> extends infer TargetRecord
? FlatbreadRelationCardinality<Collection, Field> extends 'many'
? ReadonlyArray<TargetRecord | null> | null
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FlatbreadRelationTarget is generated as the full target record here, but the default selection builder below only descends one object level. In the checked-in example that means flatbreadRead.Post.all() returns authors without nested fields like friend, image, or skills, even though FlatbreadRelationTarget<'Post', 'authors'> is typed as ReadonlyArray<Author | null> | null. A consumer can therefore write against author.friend.name and pass typecheck, then get undefined at runtime because those fields were never queried. Can we make relation results deep-partial (or otherwise tie them to the generated selection depth) before exposing this API?

Comment thread examples/nextjs/README.md
- **Package shortcut:** `pnpm dev` — currently passes `--https` for local convenience, but the Flatbread GraphQL endpoint remains documented as HTTP on `5057`.

## 🏗️ Generated Types
5. Open **[http://localhost:3000](http://localhost:3000)** for the app. Flatbread defaults to **`http://localhost:5057/graphql`** (not the Next port).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 4 documents both pnpm exec flatbread start -- next dev --turbopack and pnpm dev, but pnpm dev runs flatbread start --https -- next dev --turbopack. Pointing step 5 at http://localhost:3000 is therefore wrong for one of the advertised startup paths and will send users to the wrong scheme during the default self-signed-cert flow. It would be clearer to either use https://localhost:3000 for the pnpm dev path or split the URL guidance by command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment