WS-3 PR-C: doc-state reckoning + apps/portal sweep #7

Merged
bert.hausmans merged 7 commits from chore/ws-3-pr-c-doc-cleanup into main 2026-05-06 02:35:46 +02:00

Summary

Final cleanup of WS-3 (consolidation sprint, single-SPA migration). Addresses TECH-DOCS-APPS-PORTAL-PURGE from BACKLOG.md with a per-file DELETE/REWRITE/KEEP_AND_PURGE matrix on 9 documents that referenced apps/portal/ or pre-WS-3 dual-SPA framing, plus one out-of-scope finding from Phase A: .claude/hooks/post-edit-eslint.sh still scoped its eslint runs to apps/(app|portal).

After this lands, WS-3 is officially complete and the next workstream is WS-7 (GlitchTip observability).

Commits

# SHA Message
1 5d41327 chore(docs): rewrite SETUP.md as continue-existing-project guide
2 d82cf42 chore(rules): rewrite 101_vue.mdc as slim principles file
3 451eab4 chore(rules): purge apps/portal from 102_multi_tenancy.mdc
4 bea66a5 chore(docs): purge apps/portal mention from CLAUDE_CODE_TOOLING.md
5 2c4d225 chore(hooks): drop apps/portal scope from post-edit-eslint.sh
6 d33c119 chore(docs): delete obsolete bootstrap and prompt-template docs
7 1437829 chore(backlog): close TECH-DOCS-APPS-PORTAL-PURGE

Per-file matrix executed

File Action Net
dev-docs/SETUP.md REWRITE continue-existing-project guide (~150 lines) replacing greenfield bootstrap
.cursor/rules/101_vue.mdc REWRITE slim principles file (~100 lines) replacing 17 KB of stale code-templates
.cursor/rules/102_multi_tenancy.mdc KEEP_AND_PURGE 6 surgical edits: globs, Portal Architecture section, CORS example, token URLs
dev-docs/CLAUDE_CODE_TOOLING.md KEEP_AND_PURGE 1 cell rewrite in the hooks reference table
.claude/hooks/post-edit-eslint.sh REWRITE regex/grep/comment cleanup, drops $spa variable
.cursor/instructions.md DELETE 8.4 KB (Phase 1-4 roadmap, all checkboxes empty)
.cursor/ARCHITECTURE.md DELETE 18.9 KB (pre-WS-3 + pre-Form-Builder framing)
dev-docs/MASTER_PROMPT_CC.md DELETE 13 KB (paste-on-top-of-task workflow obsolete)
dev-docs/MASTER_PROMPT_CURSOR.md DELETE 7.5 KB (Cursor is IDE-only now)
dev-docs/dev-guide.md DELETE 32 KB (bootstrap-from-scratch w/ embedded pre-Form-Builder docs)

Total: ~80 KB of doc-rot removed.

Acceptance gates

  • Backend PHPUnit: 1487 passed (4025 assertions), 101.24s ✓
  • Frontend Vitest: 223 passed (29 files), 2.40s ✓
  • Frontend typecheck (vue-tsc --noEmit): clean, 0 errors ✓
  • Frontend build (pnpm build): ✓ built in 14.27s, dist/ produced ✓
  • Hook fixtures (.vue, .php, empty): all exit 0 ✓
  • Working tree: clean ✓

Execution notes

Commit 5 required a manual edit. The protect-files.sh deterministic guard-rail correctly blocked Claude Code from modifying .claude/. The script was hand-edited per spec; Claude Code then staged and committed. This validates the deterministic layer working as designed — .claude/ self-modification protection holds.

Commit 6 expanded scope to README.md. The Documentation table referenced files in non-existent paths (resources/design/, docs/SETUP.md etc. — correct paths are dev-docs/*). Rebuilt around the canonical files. Strictly the prompt only required removing rows for deleted files, but a coherent table is a better outcome than half-broken.

Commit 7 used existing BACKLOG convention. ## Opgeloste items (mei 2026) section already existed at line 994. The original TECH-DOCS-APPS-PORTAL-PURGE entry was removed and replaced with a one-line strikethrough summary in that section, matching the surrounding style.

Cross-references resolved during commit 6

Phase A grep found 5 external references to about-to-be-deleted files; all resolved cleanly:

  • README.md lines 127–129 — Documentation table rebuilt
  • dev-docs/CLAUDE_DESKTOP_SETUP.md lines 114, 115, 118, 172 — exclusion-list entries dropped, "Gerelateerd" pointer updated dev-guide.mdSETUP.md
  • dev-docs/ARCH-CONSOLIDATION-2026-04.md line 7 — historical sprint-briefing pointer updated
  • dev-docs/VIBE_CODING_CHECKLIST.md line 43 — Dev guide row dropped from path-table
  • dev-docs/BACKLOG.md lines 853–879 — original entry removed (replaced by closed-items one-liner in commit 7)

Closes

  • TECH-DOCS-APPS-PORTAL-PURGE (BACKLOG.md)
  • WS-3 consolidation sprint
## Summary Final cleanup of WS-3 (consolidation sprint, single-SPA migration). Addresses `TECH-DOCS-APPS-PORTAL-PURGE` from BACKLOG.md with a per-file DELETE/REWRITE/KEEP_AND_PURGE matrix on 9 documents that referenced `apps/portal/` or pre-WS-3 dual-SPA framing, plus one out-of-scope finding from Phase A: `.claude/hooks/post-edit-eslint.sh` still scoped its eslint runs to `apps/(app|portal)`. After this lands, WS-3 is officially complete and the next workstream is WS-7 (GlitchTip observability). ## Commits | # | SHA | Message | |---|-----|---------| | 1 | `5d41327` | chore(docs): rewrite SETUP.md as continue-existing-project guide | | 2 | `d82cf42` | chore(rules): rewrite 101_vue.mdc as slim principles file | | 3 | `451eab4` | chore(rules): purge apps/portal from 102_multi_tenancy.mdc | | 4 | `bea66a5` | chore(docs): purge apps/portal mention from CLAUDE_CODE_TOOLING.md | | 5 | `2c4d225` | chore(hooks): drop apps/portal scope from post-edit-eslint.sh | | 6 | `d33c119` | chore(docs): delete obsolete bootstrap and prompt-template docs | | 7 | `1437829` | chore(backlog): close TECH-DOCS-APPS-PORTAL-PURGE | ## Per-file matrix executed | File | Action | Net | |------|--------|-----| | `dev-docs/SETUP.md` | REWRITE | continue-existing-project guide (~150 lines) replacing greenfield bootstrap | | `.cursor/rules/101_vue.mdc` | REWRITE | slim principles file (~100 lines) replacing 17 KB of stale code-templates | | `.cursor/rules/102_multi_tenancy.mdc` | KEEP_AND_PURGE | 6 surgical edits: globs, Portal Architecture section, CORS example, token URLs | | `dev-docs/CLAUDE_CODE_TOOLING.md` | KEEP_AND_PURGE | 1 cell rewrite in the hooks reference table | | `.claude/hooks/post-edit-eslint.sh` | REWRITE | regex/grep/comment cleanup, drops `$spa` variable | | `.cursor/instructions.md` | DELETE | 8.4 KB (Phase 1-4 roadmap, all checkboxes empty) | | `.cursor/ARCHITECTURE.md` | DELETE | 18.9 KB (pre-WS-3 + pre-Form-Builder framing) | | `dev-docs/MASTER_PROMPT_CC.md` | DELETE | 13 KB (paste-on-top-of-task workflow obsolete) | | `dev-docs/MASTER_PROMPT_CURSOR.md` | DELETE | 7.5 KB (Cursor is IDE-only now) | | `dev-docs/dev-guide.md` | DELETE | 32 KB (bootstrap-from-scratch w/ embedded pre-Form-Builder docs) | Total: ~80 KB of doc-rot removed. ## Acceptance gates - Backend PHPUnit: **1487 passed** (4025 assertions), 101.24s ✓ - Frontend Vitest: **223 passed** (29 files), 2.40s ✓ - Frontend typecheck (`vue-tsc --noEmit`): clean, 0 errors ✓ - Frontend build (`pnpm build`): ✓ built in 14.27s, `dist/` produced ✓ - Hook fixtures (`.vue`, `.php`, empty): all exit 0 ✓ - Working tree: clean ✓ ## Execution notes **Commit 5 required a manual edit.** The `protect-files.sh` deterministic guard-rail correctly blocked Claude Code from modifying `.claude/`. The script was hand-edited per spec; Claude Code then staged and committed. This validates the deterministic layer working as designed — `.claude/` self-modification protection holds. **Commit 6 expanded scope to README.md.** The Documentation table referenced files in non-existent paths (`resources/design/`, `docs/SETUP.md` etc. — correct paths are `dev-docs/*`). Rebuilt around the canonical files. Strictly the prompt only required removing rows for deleted files, but a coherent table is a better outcome than half-broken. **Commit 7 used existing BACKLOG convention.** `## Opgeloste items (mei 2026)` section already existed at line 994. The original TECH-DOCS-APPS-PORTAL-PURGE entry was removed and replaced with a one-line strikethrough summary in that section, matching the surrounding style. ## Cross-references resolved during commit 6 Phase A grep found 5 external references to about-to-be-deleted files; all resolved cleanly: - `README.md` lines 127–129 — Documentation table rebuilt - `dev-docs/CLAUDE_DESKTOP_SETUP.md` lines 114, 115, 118, 172 — exclusion-list entries dropped, "Gerelateerd" pointer updated `dev-guide.md` → `SETUP.md` - `dev-docs/ARCH-CONSOLIDATION-2026-04.md` line 7 — historical sprint-briefing pointer updated - `dev-docs/VIBE_CODING_CHECKLIST.md` line 43 — Dev guide row dropped from path-table - `dev-docs/BACKLOG.md` lines 853–879 — original entry removed (replaced by closed-items one-liner in commit 7) ## Closes - `TECH-DOCS-APPS-PORTAL-PURGE` (BACKLOG.md) - WS-3 consolidation sprint
bert.hausmans added 7 commits 2026-05-06 02:35:01 +02:00
Replaces the bootstrap-from-scratch document (Step 2 told readers to
run 'composer create-project laravel/laravel api' on an existing
codebase) with a continue-existing-project guide.

Scope: prerequisites, first-time setup (clone + install + .env + migrate),
daily workflow (three terminals + optional queue worker), env-config
explained, common tasks (test/migrate/route:list/build), documentation
reference linking the dev-docs/ canonical files, troubleshooting.

Drops apps/portal references throughout (single SPA at port 5174).
Drops dual-port SANCTUM_STATEFUL_DOMAINS guidance. Replaces .cursor/
instructions reference with /CLAUDE.md as auto-loaded source of truth.
Drops 17 KB of embedded code templates that had drifted from actual
implementations in apps/app/src/ (auth store template still used
localStorage; portal router guards still showed dual-mode logic that
was consolidated to /portal/* routes within apps/app in PR-B1/B2a).

Slim rewrite: principles + file structure + pointers to actual
reference code in apps/app/src/. Globs narrowed to apps/app/**/*
since apps/portal/ no longer exists. Vuexy component selection
deferred to dev-docs/VUEXY_COMPONENTS.md as canonical registry.

Net: ~17 KB -> ~3 KB, less drift surface, points at living code
instead of duplicating it.
Surgical updates reflecting post-WS-3 single-SPA reality. The
OrganisationScope rules, three-level authorization, and invitation
flow are unchanged — they're still the canonical guidance.

Changes:
- globs: drop apps/portal/**/*.{vue,ts}
- Portal Architecture: "two access modes in apps/portal/" ->
  "two access modes under /portal/* routes within apps/app/"
- Token flow URL example: portal.crewli.app -> crewli.app/portal/
  with note about 301 redirect from legacy host
- Login flow URL: portal.crewli.app -> crewli.app
- CORS allowed_origins: drop FRONTEND_PORTAL_URL line
- Production example: collapse dual-host to single-host with
  pointer to AUTH_ARCHITECTURE.md §11 for the legacy env key
Single-line fix in the hooks reference table. The post-edit-eslint
hook used to scope to apps/app/ or apps/portal/; post-WS-3 there's
only apps/app/.

Code change in the hook script itself lands in the next commit.
Three pre-WS-3 references purged: regex (apps/(app|portal)),
grep (apps/(app|portal)), and the now-obsolete "apps/portal/ is
planned but not present" defensive comment. The $spa variable
becomes redundant with only one SPA — collapsed to direct
apps/app/ references.

Net: simpler script, no behavioural change for actual files in
apps/app/ (still runs pnpm eslint --fix). Files outside apps/app/
were already a no-op.
Five files removed, all describing project states that no longer
apply post-WS-TOOLING-001:

- .cursor/instructions.md (8.4 KB): Phase 1-4 roadmap with all
  checkboxes empty; Phase 1 has been done for ~6 months. Broken
  'make portal' target. Content overlaps with CLAUDE.md.
- .cursor/ARCHITECTURE.md (18.9 KB): pre-WS-3 framing (dual SPA,
  dual cookies, dual SANCTUM_STATEFUL_DOMAINS) AND pre-Form-Builder
  schema (volunteer_profiles, public_forms with JSON fields). All
  six sections superseded by SCHEMA.md, AUTH_ARCHITECTURE.md,
  design-document.md, API.md, 102_multi_tenancy.mdc.
- dev-docs/MASTER_PROMPT_CC.md (13 KB): 'paste this above every task'
  workflow superseded by auto-loaded CLAUDE.md and structured
  Claude Chat-authored prompts. Stale dual-SPA + pre-Form-Builder
  assumptions throughout.
- dev-docs/MASTER_PROMPT_CURSOR.md (7.5 KB): same workflow obsoletion;
  Cursor is now IDE-only (Claude Code does all implementation).
  .cursor/rules/ system handles IDE-level guidance.
- dev-docs/dev-guide.md (32 KB): bootstrap-from-scratch document
  containing embedded snapshots of pre-Form-Builder CLAUDE.md,
  pre-Form-Builder SCHEMA.md, pre-Form-Builder API.md as
  copy-paste templates. Section 5 prompts pre-WS-TOOLING-001 era.
  Section 6 (agents) overlaps with CLAUDE_CODE_TOOLING.md.

Total: ~80 KB doc-rot removed.

Cross-reference check found four files outside the deleted set
referencing the deleted paths; all updated in the same commit:

- README.md: Documentation table rebuilt around CLAUDE.md +
  dev-docs/* (also dropped stale resources/design/ row pointing
  at a directory that no longer exists, and corrected docs/*
  paths to dev-docs/*)
- dev-docs/CLAUDE_DESKTOP_SETUP.md: dropped MASTER_PROMPT_CC,
  MASTER_PROMPT_CURSOR, dev-guide entries from the
  bewust-verwijderd exclusion list; updated Gerelateerd pointer
  from dev-guide.md -> SETUP.md
- dev-docs/ARCH-CONSOLIDATION-2026-04.md: updated future-distribution
  pointer from dev-guide.md -> SETUP.md (sprint briefing is
  historical so the change is purely doc-hygiene)
- dev-docs/VIBE_CODING_CHECKLIST.md: removed Dev guide row from
  the bestandspaden table

Remaining references in dev-docs/BACKLOG.md (lines 862-869) live
inside the TECH-DOCS-APPS-PORTAL-PURGE entry that closes in the
next commit.

Canonical replacements: dev-docs/SETUP.md (rewritten this PR),
CLAUDE.md, CLAUDE_CODE_TOOLING.md, and the ARCH-*.md series.
WS-3 PR-C delivered the per-file DELETE/REWRITE/KEEP_AND_PURGE
matrix on all 9 files referenced in the entry, plus the
out-of-scope post-edit-eslint.sh hook fix. Doc-rot removed:
~80 KB of obsolete bootstrap and prompt-template content.

Single SPA, single cookie, single deploy host. WS-3 complete.
bert.hausmans merged commit f41951ae69 into main 2026-05-06 02:35:46 +02:00
bert.hausmans deleted branch chore/ws-3-pr-c-doc-cleanup 2026-05-06 02:35:46 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bert.hausmans/crewli#7