Commit graph

24 commits

Author SHA1 Message Date
7f5a39c6b0 docs(plan): Phase 8 — agent API implementation plan
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 10:28:50 +02:00
16c8ea3644 docs(plan): Phase 10 implementation plan
Nine tasks: schema adds, loadPlan + pure grouping helper,
GanttBar / ProjectSection / GanttPlanView components, page
wire-up, integration test, and full verification. Drag and
inline subtask editing stay out of scope.
2026-09-21 16:07:31 +02:00
cab3b98372 chore(plan): pick up Plan Puzzle v1 in-progress work and Forgejo repo-url helper
The branch plan-puzzle-v1-tests had accumulated changes from a
sibling thread (Plan Puzzle v1 backend + frontend) that hadn't
been committed yet, plus a new src/lib/git/repo-url helper used by
the Forgejo ingest path. Pick them all up so the working tree is
clean and the branch reflects everything since its fork.

Files (Plan Puzzle):
  src/app/actions/client-proposal.ts
  src/app/actions/owner-plan.ts
  src/app/actions/reschedule.ts
  src/app/actions/reschedule-helpers.ts (+ test)
  src/components/admin/project-form.tsx
  src/components/roadmap/roadmap-builder.tsx
  src/components/roadmap/timeline-view.tsx
  src/lib/cards/write-with-audit.ts (+ test)
  src/lib/roadmap/timeline.ts (+ test)

New helper:
  src/lib/git/repo-url.ts (+ test)

Verified: npm run build clean, 466/466 unit tests pass.
2026-09-21 14:40:04 +02:00
882e9e20a7 docs(phase-9c): plan for picker integration tests + verification
Two tasks. Same format as 8c.

Task 1 — tests/integration/intake-picker.test.ts mirrors the Phase 8
shape. Five describe groups:
  - picker page (multi-project list, single-project redirect,
    zero-projects fallback)
  - wizard URL (cross-client projectId 404, show_in_intake=false 404)
  - submission flow (card lands on chosen project's inbox,
    cross-client refused, hostile body cannot override server-set
    fields, per-project cap isolates)
  - Phase 8 backwards compat (per-project link still resolves through
    the picker to the wizard URL)

Task 2 — full verification: unit, integration, build, colour
check, manual walkthrough, Phase 8 backwards-compat walkthrough.
2026-09-21 13:12:44 +02:00
cb122e802a docs(phase-9b): plan for picker page, two-step route, owner UI on /admin/clients/[id]
Eight tasks in the same format as 8b:
  1. /admin/clients/[clientId] page (link the existing /admin/clients
     list into it)
  2. <IntakeLinksPanel> mode='client' variant; Server Action takes
     a scope union for revalidation
  3. listPickerProjects + resolveProjectForClient helpers
  4. /intake/[token] picker page (single-project redirect, zero-
     projects fallback, multi-project list)
  5. /intake/[token]/p/[projectId] wizard page
  6. intakeStepPublicAction + POST /api/public/intake accept and
     verify projectId; cap check branches on link.client empty vs
     set
  7. confirm thanks page links to picker (no change)
  8. full verification

Backwards compat: Phase 8 URLs (link.project set, link.client empty)
still work — the wizard URL is the same shape as before, the action
falls through to the Phase 8 path.
2026-09-21 13:11:20 +02:00
748721128d docs(phase-9a): plan for schema + opt-in toggle + per-(link, project) cap
Seven tasks in the same format as 8a:
  1. schema (intake_links.client, projects.show_in_intake,
     intake_link_submissions)
  2. pure helpers + unit tests
  3. PocketBase read/write helpers
  4. setProjectShowInIntakeAction
  5. ShowInIntakeToggle component on /admin/projects/[id]
  6. integration test (permissive on route status until 9b wires
     intakeStepPublicAction to honour projectId)
  7. full verification

What 9a does NOT own (deliberately deferred to 9b): the picker
page, the two-step URL, intakeStepPublicAction changes, the new
/admin/clients/[id] route.
2026-09-21 13:08:52 +02:00
990de29683 docs(plan): Phase 7 — logged work entries implementation plan
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 13:47:59 +02:00
2d87cd505b chore(config): update .gitignore and enhance Next.js configuration
Added .superpowers directory to .gitignore to prevent tracking of specific Pocketbase data. Updated Next.js configuration to enable standalone output for optimized Docker image builds, reducing the need for the full node_modules tree.
2026-09-19 07:52:09 +02:00
d88dc91d7d docs: Phase 5 spec and plan for the planning and roadmap view
Two views rather than one chart, because the data forced it: measured on
the live database, 1 of 5 live cards has a target date and none has both
dates. target_date is client-owned and optional; start_date is only set on
Inbox acceptance. A conventional Gantt would render almost empty.

So Now/Next/Later is the default and works with zero dates, and the
timeline earns its place as clients set dates. From Dave's Gantt reference
it takes the quarter header, the Today marker, project grouping with the
client's colour, and the per-row completion percentage — which maps onto
checklist progress, the one honest source for it. The faint full-width
track is load-bearing rather than decorative: it makes a sparse chart read
as unscheduled instead of broken.

Drag-to-reschedule always writes an activity row naming the owner, because
target_date belongs to the client. A developer silently moving a date the
client chose is the failure the activity log exists to prevent.

Completes the plan set for phases 1 through 5.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 07:14:47 +02:00
0c4bbd951f docs(plan): Phase 4a and 4b for the client intake wizard
4a builds the stateless interview. Every constraint that matters is
enforced in code rather than requested in the prompt: the seven-question
cap, the answer length, and what fields a brief may contain. parseBrief is
a whitelist, not a parser — a brief asserting priority or accepted loses
those at the boundary and they never reach a caller that could act on them.

4b adds a separate intake route rather than extending Plan 1a's client
card route. That route's tests were written against a two-field body;
widening the shape it accepts would leave them passing while proving less.
Both routes set column, priority, accepted and created_by_role themselves,
and both are separately proven to.

The property both plans are written to: the worst a hostile brief can
achieve is a strangely-worded card in the Inbox.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 17:46:54 +02:00
f3e4b30d46 feat(ai): settings storage with a browser-safe projection 2026-09-16 15:52:12 +02:00
44bcc81d97 feat(ai): provider-neutral completion interface 2026-09-16 15:50:39 +02:00
0fd2cef2cf docs(plan): Phase 2b and 2c for commit linking, metrics and the dashboard
2b closes a gap between the spec and the schema: the spec's [#42] explicit
link had nothing to reference, because cards only had PocketBase ids. Adds
per-project card numbers, and sharpens two rules the spec left loose — a
scope rule is bounded by start_date OR created, and ties go to the card
with the latest bound rather than the most recently edited one.

2c builds the dashboard. The South African holiday table is verified
against the Hermes build log: 24 May to 8 Sep 2026 gives 108 calendar days
and 75 workdays, both exact, and that is now a regression test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 12:52:42 +02:00
3f9bbb783a docs(plan): Phase 2a implementation plan for commit ingestion
Eleven tasks covering conventional-commit parsing, HMAC webhook
verification, the Forgejo client, a shared idempotent ingest core, the
webhook and reconciliation endpoints, and the backfill admin panel.

The Forgejo API shape, pagination headers and merge counts are measured
against the live instance rather than recalled, and the plan says so, so
the implementer builds against facts.

Surfaces one unresolved issue for decision: projects.webhook_secret is
readable by a client manager straight from PocketBase, because rules are
record-level and cannot hide a field.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:41:57 +02:00
301af1f739 docs(plan): Phase 1d implementation plan for admin and accounts
Fourteen tasks covering clients, projects, manager accounts, column
management and the archive, so the owner can run the product without the
PocketBase console or the seed script.

Records why account creation must use a superuser connection: the users
write rules are locked because role is an ordinary field there, and both
the signup and self-promotion paths were verified exploitable. Adds a
verification step that re-runs the escalation guard, since this is the
phase most likely to reopen it.

Corrects Plan 1c's deferred list: the AI settings screen belongs to
Phase 3 per spec section 5.3, not here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:24:05 +02:00
0c6557b89d docs(plan): Phase 1c implementation plan for card detail and the Inbox flow
Fourteen tasks covering the card detail page, checklists, comments, a
readable activity timeline, card creation for both roles, and the accept
flow that stamps start_date.

Owner mutations are Server Actions on the caller's own token; client
mutations keep going through the whitelisted /api/client routes. Records
the constraint that activity.createRule is superuser-only, so audit rows
need a dedicated helper even for the owner.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 10:56:53 +02:00
857ef1a994 chore(seed): demo client, project, users and cards 2026-09-16 09:44:19 +02:00
76438f6e90 feat(api): client routes for inbox card creation and comments 2026-09-16 09:44:04 +02:00
72f9de6999 feat(api): client PATCH route for card priority and target date 2026-09-16 09:43:36 +02:00
91e53f150a feat(auth): PocketBase login, logout and signed-out redirect 2026-09-16 09:43:18 +02:00
30c1405f72 feat(activity): derive audit rows from card patches 2026-09-16 09:42:42 +02:00
6a6df8076b feat(cards): positive field whitelist for client-manager writes 2026-09-16 09:42:26 +02:00
ba990f0109 feat(schema): all collections + role-scoped API rules on remote PB
- migrations/ documented in pocketbase/pb_migrations/ for local PB
- scripts/setup-remote.ts applies them via admin API to remote PB
- collections: clients, projects, columns, cards, subtasks, comments, activity, settings
- user extension: role (owner|client_manager), client (relation)
- writes: owner only for app collections, superuser-only for activity and settings
2026-09-16 09:41:20 +02:00
6cfc7ee7cf docs(plan): Phase 1a implementation plan for data layer and permissions
Eighteen tasks, 86 steps, covering the PocketBase schema, auth, the
field-level whitelist that PocketBase rules cannot express, the three
client routes, and all five acceptance tests from the spec.

Board UI is deferred to Plan 1b so the security boundary can be reviewed
on its own rather than inside a large UI diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 09:20:55 +02:00