Commit graph

262 commits

Author SHA1 Message Date
ffc24f7477 ci(docs): block merge on broken doc links 2026-05-03 01:16:38 +02:00
d7039b60ef chore(docs): wire docs:check-links and docs npm scripts 2026-05-03 01:16:27 +02:00
822db9472b feat(docs): add doc-link checker script 2026-05-03 01:16:22 +02:00
f07e40be31 docs(readme): link INDEX + glossary + agent instructions 2026-05-03 01:13:47 +02:00
b082d79700 chore(docs): regenerate INDEX.md in pre-commit hook 2026-05-03 01:13:32 +02:00
cd68886953 docs(glossary): add docs/glossary.md 2026-05-03 01:12:43 +02:00
f6c67ed37a docs(index): regenerate after ADR 0001-0008 2026-05-03 01:11:20 +02:00
1439bdd209 docs(adr): add 0008-agent-instructions-in-claude-md + update README index 2026-05-03 01:11:15 +02:00
eb9c843b6e docs(adr): add 0007-claude-question-channel-design 2026-05-03 01:11:12 +02:00
b77d84db5a docs(adr): add 0006-demo-user-three-layer-policy 2026-05-03 01:11:12 +02:00
c3afe767ed docs(adr): add 0005-iron-session-over-nextauth 2026-05-03 01:11:09 +02:00
f7d5d06376 docs(adr): add 0004-status-enum-mapping 2026-05-03 01:11:08 +02:00
98db4d6376 docs(adr): add 0003-one-branch-per-milestone 2026-05-03 01:11:05 +02:00
93499a1664 docs(adr): add 0002-float-sort-order 2026-05-03 01:11:05 +02:00
833236ce76 docs(adr): add 0001-base-ui-over-radix 2026-05-03 01:11:02 +02:00
d469b4018a docs(trim): extract MCP integration into runbook 2026-05-03 01:03:55 +02:00
df649ee1bd docs(trim): extract branch/commit rules into runbook 2026-05-03 01:02:43 +02:00
0342498f63 docs(split): merge md3-color-scheme into design/styling 2026-05-03 01:00:01 +02:00
5b0b8d5b7e docs(split): merge solo-paneel-spec into specs/functional.md 2026-05-03 00:59:23 +02:00
481e0c65cd docs(split): break architecture.md into 6 topical files 2026-05-03 00:58:35 +02:00
bdc52a4066 docs(taxonomy): move agent-instruction-audit into decisions/ 2026-05-03 00:56:23 +02:00
90ee122641 docs(taxonomy): move design/api/qa/backlog/assets into folders 2026-05-03 00:56:03 +02:00
2e47bda28e docs(taxonomy): move spec files into docs/specs/ 2026-05-03 00:55:11 +02:00
e56a038b4d docs(taxonomy): scaffold topical folders under docs/ 2026-05-03 00:54:18 +02:00
30f9b1afe7 docs(naming): polish CLAUDE.md doc-index after renames 2026-05-03 00:37:42 +02:00
61a6ce634f docs(naming): rename middleware.md to proxy.md (next 16) 2026-05-03 00:35:05 +02:00
ac23b33d17 docs(naming): rename plan file to kebab-case ASCII 2026-05-03 00:34:23 +02:00
1b81f66fa6 docs(naming): lowercase API.md and MD3 filenames 2026-05-03 00:33:07 +02:00
f5ff3673e2 docs(naming): drop scrum4me- prefix from doc filenames 2026-05-03 00:32:32 +02:00
6c49a5013d docs(index): regenerate INDEX.md after front-matter pass 2026-05-03 00:30:58 +02:00
739e631313 docs(front-matter): add YAML front-matter to plans + agent files 2026-05-03 00:30:36 +02:00
6beed46311 docs(front-matter): add YAML front-matter to patterns/ 2026-05-03 00:29:25 +02:00
f106af9ab4 docs(front-matter): add YAML front-matter to docs/ root 2026-05-03 00:25:54 +02:00
83262e20bb docs(junk-cleanup): archive .Plans/ to docs/plans/archive/ 2026-05-03 00:21:40 +02:00
0982640ade docs(junk-cleanup): remove stub patterns/test.md 2026-05-03 00:20:07 +02:00
8ff118bdd6 docs(plans): add PBI bulk-create spec for docs-restructure
Machine-parseable spec for an executor that calls the scrum4me MCP
(create_pbi → create_story → create_task) to seed the docs-restructure
work into the DB.

- Section 1 (Context) is the PBI description; serves as task-context
  via mcp__scrum4me__get_claude_context.
- Section 2 lists the 6 resolved decisions (English, MD3+styling
  merged, solo-paneel merged, .Plans archived, Nygard ADR default,
  node index script).
- Section 3 records what already shipped on this branch so the
  executor doesn't duplicate the ADR scaffolding or index generator.
- Section 4 carries the structured YAML graph: 1 PBI, 8 stories
  (one per phase), 39 tasks. product_id is REPLACE_ME — fill before
  running.
- YAML validated with PyYAML; field schema sanity-checked.
2026-05-02 21:41:18 +00:00
d9dbdb1946 chore: ignore Obsidian vault and personal sidecar files
Add .obsidian/ (Obsidian vault config) and _*.md (personal sidecar
notes) to .gitignore so the docs/ tree can serve as canonical source
of truth while still being usable as an Obsidian vault for personal
authoring. The docs index generator already excludes the same _*.md
pattern from INDEX.md.
2026-05-02 21:25:43 +00:00
eea5c86886 feat(docs): add docs index generator + initial INDEX.md
scripts/generate-docs-index.mjs walks docs/**/*.md, parses YAML
front-matter (or first H1 fallback) and a Nygard-style ## Status
section, then writes docs/INDEX.md with grouped tables for ADRs,
Specs, Plans (with archive subsection), Patterns, and Other.

Pure Node 20 (no external deps); idempotent — running it twice
produces byte-identical output. Excludes adr/templates/, the ADR
README, INDEX.md itself, and any *_*.md sidecar file.

Wire-up:
- package.json: docs:index → node scripts/generate-docs-index.mjs

Initial run indexed 35 docs across the existing structure; the
generated INDEX.md is committed so the table is reviewable in the
PR before hooking generation into a pre-commit step.
2026-05-02 21:25:35 +00:00
8a7d419972 docs(adr): add ADR scaffolding (templates, README, meta-ADR)
Set up docs/adr/ as the canonical home for architecture decisions:

- templates/nygard.md — default four-section format (Status, Context,
  Decision, Consequences) for one-way-door decisions.
- templates/madr.md — MADR v4 with YAML front-matter and explicit
  Considered Options for decisions where rejected alternatives matter.
- README.md — naming convention (NNNN-kebab-case), template-selection
  guidance (Nygard default; MADR for auth, queue mechanics, agent
  integration), status lifecycle, and ADR roster.
- 0000-record-architecture-decisions.md — meta-ADR establishing the
  practice itself, in Nygard format.

Backfilling existing implicit decisions (base-ui-over-radix, float
sort_order, demo-user three-layer policy, etc.) is fase 6 of the
docs-restructure plan.
2026-05-02 21:25:26 +00:00
6e0827399a docs(plans): add docs-restructure plan for AI-optimized lookup
Audit of existing 39 doc files (~10.700 lines) and a phased restructure
proposal aimed at minimising the tokens an AI agent has to read to find
the right reference. Captures resolved decisions on language (English),
ADR template (Nygard default with MADR escape-hatch), index generator
(node script), and folder taxonomy. Proposal status — fase 1 to follow.
2026-05-02 21:25:17 +00:00
7837652530 Added pdevelopment docs 2026-05-02 13:06:51 +02:00
e6c3dc11b3 docs(dialog-pattern): convert task spec + add pbi/story entity-profiles
Reduceert docs/scrum4me-task-dialog.md van 507 naar ~140 regels: alle
gedeelde regels verhuisd naar docs/patterns/dialog.md, dit document
bevat nu alleen Task-specifieke velden, URL-pattern, status-veld,
server actions, triggers en bewuste out-of-scope-keuzes.

Voegt twee nieuwe entity-profielen toe voor bestaande dialogen:
- docs/scrum4me-pbi-dialog.md (PbiDialog: state-based, code+title-rij,
  PbiStatusSelect, geen delete in v1)
- docs/scrum4me-story-dialog.md (StoryDialog: state-based, header met
  status/priority badges, inline activity-log, demo-readonly-fallback,
  inline-delete-confirm i.p.v. AlertDialog)

Beide profielen documenteren expliciet de "Bekende gaps t.o.v.
generieke spec" zodat opvolgende PR's de afwijkingen kunnen
rechtzetten of bewust kunnen accorderen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 02:28:42 +02:00
b3b5b910c0 docs(dialog-pattern): add generic entity-dialog spec
Introduceert docs/patterns/dialog.md als bron-of-truth voor elke
create/edit/detail-dialog in Scrum4Me, ongeacht het achterliggende
dataobject. Bevat 14 secties: uitgangspunten, stack, component-
architectuur, layout, validatie, drielaagse demo-policy, submission,
dialog-gedrag, theming, footer, triggers/URL-state, per-entiteit
profile-template, out-of-scope, en een verificatie-checklist.

Registreert het patroon in CLAUDE.md "Implementatiepatronen"-tabel
zodat Claude (en mensen) de spec verplicht raadplegen voor elke
nieuwe dialog.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 02:28:41 +02:00
6c6c8b96b7
fix(realtime): force-destroy pg socket on cleanup timeout (SSE leak) (#44)
Three SSE-routes (solo, backlog, notifications) each create a long-
running pg.Client that LISTENs on scrum4me_changes. On abrupt close
(Fast Refresh, browser refresh, Vercel function recycle) the
pgClient.end()-await sometimes hangs silently, leaving the underlying
socket connected to Postgres. The connection stays in 'idle' on Neon's
side and after ~10-20 reconnects the connection-pool fills up — new
SSE connects fail with ERR_INCOMPLETE_CHUNKED_ENCODING in the browser.

Fix: shared `closePgClientSafely` helper that races client.end()
against a 2 s timeout; on timeout it force-destroys the underlying
socket so the OS releases the FD and Postgres notices the disconnect.

Validated by direct DB inspection: 18 stale 'idle LISTEN'-connections
were piled up before the fix; after manual pg_terminate_backend cleanup
the SSE-stream stabilised. This change makes the pile-up impossible
going forward.

- new lib/realtime/pg-client-cleanup.ts
- 3 routes use the helper instead of bare `await pgClient.end()`
- 3 unit tests for the helper (timely-end, hang-falls-back-to-destroy,
  end-rejection-is-swallowed)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 20:04:22 +02:00
070e1d9ea2
chore: remove smoke-test files (#43)
These three docs/smoke-test-*.md files were created by the
branch-per-story flow smoke-test (PR #42, story cmon1q0do0023bortliq2tae9).
The flow worked correctly — confirmed in DB: 1 branch + 1 PR for 3
tasks, verify_result populated, worktree-cleanup deferred until the
last sub-task. Files served their purpose and can now be removed.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 19:37:39 +02:00
9fa0093336
SMOKE-TEST: branch-per-story flow met 3 simpele tasks (#42)
* docs(ST-smoke): add smoke-test-1.md

* docs(ST-smoke): add smoke-test-2.md

* docs(ST-smoke): add smoke-test-3.md
2026-05-01 18:19:15 +02:00
0454eede74
feat(insights): port unique files from closed bundle-PRs (#41)
Re-introduce the 3 unique files from closed PRs #37 and #40 that
overlap-merged with already-landed sub-PRs (#34, #35, #36, #38, #39):

- app/(app)/insights/page.tsx — Server Component dat alle helpers
  parallel aanroept en de 5 sectie-Cards rendert (Sprint Health,
  Plan-quality, Agent throughput, Velocity, Backlog health)
- app/(app)/insights/components/sprint-info-strip.tsx — chips per
  active sprint met productname + goal + dagen-over + taakcount
- app/(app)/insights/components/alignment-trend.tsx — Recharts
  LineChart die % ALIGNED jobs per sprint over laatste 5 sprints toont
- lib/insights/verify-stats.ts — TrendPoint type + getAlignmentTrend
  helper (uitgebreid van PR #38)

Plus dependency: recharts (was in package.json van #37/#40 die we
sloten).

Tests: 290/290 groen, tsc clean, lint clean.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 16:44:53 +02:00
8c0941804c
Component: VerifyResultDonut + Top-5 tabellen (#39)
* chore: voeg recharts toe aan dependencies

Vereist door PlanQualityCard component.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: getVerifyResultStats helper (lib/insights/verify-stats.ts)

Aggregeert verify_result counts en top-5 EMPTY/DIVERGENT jobs over de laatste N dagen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: PlanQualityCard — verify_result donut + top-5 EMPTY/DIVERGENT tabellen

PieChart (donut) met ALIGNED/PARTIAL/EMPTY/DIVERGENT verdeling, MD3-kleuren.
Twee tabellen rechts met Next.js Link deeplinks naar TaskDetailDialog.
Empty-state met link naar Plan-verify gating story.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:41:25 +02:00
ddd9b8b39b
feat: getVerifyResultStats helper + 5 Vitest-tests (lib/insights/verify-stats.ts) (#38)
Aggregeert verify_result counts (ALIGNED/PARTIAL/EMPTY/DIVERGENT) en top-5 EMPTY/DIVERGENT
jobs over de laatste N dagen voor de ingelogde gebruiker.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:41:22 +02:00
2539361784
Component: SprintStatusDonut (Recharts PieChart) (#36)
* chore: voeg recharts toe aan dependencies

Vereist door SprintStatusDonut component.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: SprintStatusDonut + getSprintStatusBreakdown helper

PieChart (donut) met TO_DO/IN_PROGRESS/DONE verdeling over alle active sprints.
REVIEW wordt samengevoegd in IN_PROGRESS. MD3 status-kleuren via CSS-variabelen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 16:41:18 +02:00