Files
summercms/.planning/phases/19.7-generic-mcp-module/.continue-here.md

8.4 KiB

context, phase, plan, task, total_tasks, status, last_updated
context phase plan task total_tasks status last_updated
phase 19.7-generic-mcp-module 19.7-09 0 4 paused 2026-10-23T15:13:42.099Z

Phase 19.7: paused before gap plan 19.7-09

Critical Anti-Patterns

Pattern Description Severity Prevention Mechanism
Tagging before full verification The user will not accept a v0.5.0 that is bumped to v0.5.1 right after because verification found something. The plan 05 security review marked T-19.7-22 as verified, and a deep code review then found 3 critical issues. blocking Tag nothing until every gate below is green and its findings are fixed: the re-review of plans 06-09, the regression gate, msd-verifier, /msd-validate-phase and /msd-verify-work (UAT). Only then ask the user about v0.5.0.
Mid-phase framework tag v0.5.0 is reserved for phase completion. The release order is decided: framework v0.5.0, then sm-user-plugin, sm-oauthserver-plugin and sm-journal-plugin tags that require it, then the app pointer bumps. blocking No tag, push or deploy step inside plan 09. The release happens only after phase verification, and only on the user's go-ahead.
Plan drift on versions Plans written earlier named versions that were already taken (v0.1.9) or tags that were never cut ("plan-02 tag"). advisory Before dispatching an executor, check the current tags (git tag, ls-remote) and pass the corrections in the executor prompt.

<current_state> Phase 19.7 (Generic MCP module) is at 8 of 9 plans complete.

  • Plans 01-05 are the original phase. 01-02 are released in framework v0.4.4. 03 released sm-user-plugin v0.1.10. 04 released sm-oauthserver-plugin v0.1.2 and sm-journal-plugin v0.2.3. 05 added the unit tests, the check-phase19.7.sh gate and the security review.
  • A deep 3-lane code review (19.7-REVIEW.md: 3 critical, 17 warning, 20 info) led to gap-closure plans 06-09 (19.7-GAP-INPUTS.md). They also carry two sm-servers-app escalations: E-1, an organisation logo, and E-2, plugin-declared scopes for member usr_ tokens.
  • Gap plans 06, 07 and 08 are executed and summarized. 19.7-09 is the next plan and has not started. It covers tests for every fix and for E-1/E-2, the extended gate, the validation rows, and the corrected security docs. </current_state>

<completed_work>

  • 19.7-03: the user-plugin identity chain; sm-user-plugin v0.1.10 tagged and pushed; five apps bumped (local commits).
  • Fast fix d96c726: cabana subject events now fire as *pact.MCPSubjectChanged after commit.
  • 19.7-04: oauthserver v0.1.2 and Journal v0.2.3 tagged and pushed; vue-demo-app pushed; demo MCP wiring, nginx and DEPLOY.md.
  • 19.7-05: tests, the gate, the security review, and 3 framework fixes (c49983d, 1111828, c29d228).
  • Code review: 19.7-REVIEW.md (fef1cbb). Regression gate green at that point.
  • Gap plans:
    • 19.7-06: pier hardening, lane A (commits 2bf9dca..95f177b; SUMMARY 6ca9e17).
    • 19.7-07: auth_time, the pact.HasFrontendTokenScopes seam, cabana and the admin SPA, lane B (c14238b..88559d5; SUMMARY d6c7fd5).
    • 19.7-08: the plugins and demo, lane C, plus E-1 and E-2 (SUMMARY 1e5d9d4). Commits:
      • user: 32f9259, 970719c, ee5c096, f20a8d3
      • oauthserver: 671513d
      • journal: b129902
      • vue-demo-app: 0125e29
      • sm-demo-app: 00f57bf, 3b569a1, 7731641 </completed_work>

<remaining_work>

  1. Execute 19.7-09 (/msd-execute-phase 19.7 --gaps-only). Notes for its executor, from the 08 SUMMARY:
    • write the named revocation tests (TestMCPVerifierRevocation, TestMCPGrantRevocation, TestAccessRevocation);
    • write unit tests for linkCode.ts and OrganisationLogoFields;
    • remove the now-unused connectWatching helper in the demo e2e test;
    • record as deferred: admin:token:revoke fires no MCP event (from 07), B-IN-05, B-IN-06.
  2. Fresh code review of the gap-closure changes (06-09) across all repos; fix its findings.
  3. Regression gate:
    • go vet and go test ./... with and without -tags summercms_mcp;
    • examples/hello;
    • check-phase19.6.1.sh and check-phase19.7.sh --all;
    • check-admin-openapi.sh, check-admin-dist.sh, summer docs:build --check.
  4. Phase-goal verification (msd-verifier → 19.7-VERIFICATION.md), then Nyquist validation (/msd-validate-phase 19.7), then UAT with the user (/msd-verify-work 19.7). UAT must include a real MCP client against the local demo; plan 04 skipped that check.
  5. Decide on the deferred items in deferred-items.md that could block v0.5.0 (the user decides each one).
  6. Only then, on the user's go-ahead:
    • tag framework v0.5.0 and post the changelog (CLAUDE.md);
    • tag the plugins requiring v0.5.0;
    • bump the apps, including the sm-demo-app submodule pointers for user, oauthserver, journal and vue-demo-app;
    • g15office sync: move tasks hmguritm and tqyvnzxx into milestone dcnv4mha and post the phase comment. </remaining_work>

<decisions_made>

  • v0.5.0 is tagged only after full verification and validation (user, 2026-10-23; saved in memory).
  • Gap closure is 4 plans. 07 depends on 06 because of file overlap, so the waves run 1/2/3/4. The user approved this.
  • Every critical and warning finding is fixed; info findings are fixed where cheap, otherwise deferred with a reason.
  • E-2 uses a separate pact.HasFrontendTokenScopes, not cabana's HasTokenScopes (note .planning/notes/2026-10-23-frontend-token-scopes.md). MintAPITokenFor(app, …) is scoped to the app; the legacy MintAPIToken uses a process-wide fallback.
  • E-1 adds the logo as a second attachment beside avatar, delivered as the helpers OrganisationLogoURL and OrganisationLogoFields. The plugin serves no organisation payload.
  • A ban or password reset revokes MCP AND OIDC grants (user, 2026-10-23). A link change revokes backend-scoped MCP grants.
  • auth_time is set at sign-in and copied unchanged by refresh. Sessions issued before the upgrade must sign in again before linking. </decisions_made>
- None technical. - **Everything since the last pushes is local and unpushed** (see Infrastructure State). If the next session runs on a different machine, these commits must be pushed first, with the user's go-ahead (CLAUDE.md: no push without go-ahead).

Required Reading (in order)

  1. .planning/phases/19.7-generic-mcp-module/19.7-GAP-INPUTS.md: gap scope, escalations, decisions, release order
  2. 19.7-REVIEW.md: the findings 06-09 fix
  3. 19.7-06-SUMMARY.md, 19.7-07-SUMMARY.md, 19.7-08-SUMMARY.md: what was done and the deviations
  4. 19.7-09-PLAN.md: the next plan
  5. deferred-items.md
  6. Memory: release-tag-only-at-phase-completion

Infrastructure State

Last measured 2026-10-23T15:13Z. Nothing is pushed beyond the tags listed above.

Repo Branch @ HEAD Ahead of origin Uncommitted
summercms.go master 42 .planning/state.json (another session's), .msd/, two .gitkeep
sm-user-plugin (sm-demo-app/plugins/golem15/user) master @ f20a8d3 5 clean
sm-oauthserver-plugin master @ 671513d 2 go.work: tracked file, its user replace was pointed at ../sm-demo-app/plugins/golem15/user for local dev. Restore it or decide its fate before release
sm-journal-plugin main @ b129902 2 go.work.sum (untracked, not ours)
sm-demo-app master @ 7731641 12 main.go (another session's); submodule checkouts user/oauthserver/journal moved to local commits, and their pointers are bumped only at release
vue-demo-app master @ 0125e29 1 clean. Must be pushed before sm-demo-app 00f57bf
fonoteka.go master @ 06bc9d0 35 clean
sm-bm-app, sm-grzybyfunkcjonalne-app, sm-summercmsio-app master 1 each (the plugin v0.1.10 bump) unrelated untracked files

Tools: the msd CLI is node ~/.claude/msd-core/bin/msd-tools.cjs (no msd_run on PATH). Docker tests run directly (socket available); fall back to sudo -u golem if the socket is denied.

Execution model: the orchestrator dispatches one msd-executor per plan, sequentially on the main tree (workflow.use_worktrees=false). It passes the drift corrections in the prompt and updates ROADMAP/STATE through msd-tools after each plan ("docs(phase-19.7): update tracking after gap wave N"). Plan 09 is autonomous, with no checkpoints. The user wants evidence-backed gates and dislikes surprise version bumps.

<next_action> Start with: confirm the repos above are present at the listed HEADs on this machine (push or pull first if moving machines, with the user's go-ahead). Then run /msd-execute-phase 19.7 --gaps-only; it will pick up 19.7-09. </next_action>