Skip to main content

Missions → Ideas → Works — Build PROGRESS Tracker

Branch: feat/missions-ideas-works Worktree: C:/Coding/Worktrees/wt-missions-build Loop: autonomous self-paced /loop with 30-min ticks. See Per-tick procedure below. Started: 2026-05-24 Spec: ./spec.md · ./plan.md (canonical local copies as of PR DOC2; source-of-truth still in Workspace at knowledge/notes/2026-05-24-missions-ideas-works-{spec,plan}.md)


Current focus

Tick 44 (DONE — FINAL): Phase 11 PR DOC2 — Cross-linked spec + plan into the in-repo docs tree. Copied verbatim from C:/Coding/Workspace/knowledge/notes/2026-05-24-missions-ideas-works-{spec,plan}.md (the Workspace-side source-of-truth) to docs/specs/features/missions-ideas-works/{spec.md,plan.md} so the public docs site (apps/docs) carries them alongside the user-facing pages PR DOC1 just landed (docs/features/{missions,ideas,mission-templates,budgets-and-usage}.md). Layout matches the existing docs/specs/features/<slug>/{spec,plan,tasks}.md convention used by activity-log, agent-zero-friction-onboarding, etc. Link rewrites: the 8 intra-document 2026-05-24-missions-ideas-works-{spec,plan}.md cross-references in the copied files were rewritten to spec.md / plan.md. The plan.md's §13.1 user-docs reference (which previously pointed at the Workspace user-docs file) was rewritten to link directly at the 4 new feature docs DOC1 added. file:///C:/Coding/Workspace/AGENTS.md workstation-local links were intentionally left alone — they document historical context, not callable navigation. PROGRESS.md updated: the top **Spec:** link now points at the local ./spec.md + ./plan.md and notes the canonical source still lives in Workspace. spec.md = 1091 lines; plan.md = 1021 lines. No code changes — pure docs lift. 🎉 ALL PRs DONE. Final summary below.

Final summary — Missions/Ideas/Works build

44 ticks across 44 PR-equivalents landed on feat/missions-ideas-works between 2026-05-23 and 2026-05-25. All TODO rows below are now DONE.

By phase:

  • Phase 0 (schema, 11 PRs): missions + work_proposals extensions + 9 supporting columns + sourceMissionId Clone back-link. Every entity change shipped a TypeORM migration in the same commit (NN #16).
  • Phase 1 (Ideas API, 6 PRs): A/B/C/D/E/FF — entity + service + DTO + controller; user-manual create, queue-for-build, exclusion+context generator, promoted constants → user prefs, i18n renames, /retry + /rebuild + auto-retry policy.
  • Phase 2 (Work-Agent prefs UI, 1 PR): EE — auto-retry + account-wide-budget settings sections.
  • Phase 3 (Missions agent, 4 PRs): G/H/HH/J — module skeleton, full CRUD + lifecycle (pause/resume/complete/runNow), Full-Fork Clone, cron tick worker + zero-dep cron matcher.
  • Phase 4 (Component extraction, 1 PR): K — IdeaCard primitive lift with snapshot lock.
  • Phase 5 (Ideas page, 2 PRs): M/N — IdeaCard component + dedicated /ideas page.
  • Phase 6 (Missions UI, 3 PRs): O/Q/R + S/GG — /missions catalog page, Mission detail page, state-aware action buttons, activity timeline + spend-over-time chart.
  • Phase 6.5 (Unified /new, 3 PRs): CC1/CC2/DD — extracted CreationBlockTrio, new /new page with chip strip, sidebar + New repoint.
  • Phase 7 (Budget surfaces, 3 PRs): T/U/V/II — owner-aware spend aggregation, per-owner budget endpoints, shared BudgetSummaryCard, dashboard Month-Spend tile.
  • Phase 8 (Mission Templates, 3 PRs): W/X/Y/JJ — KindSwitcher, curated catalog seed, Use-this-Template flow, .works/mission.yml Zod manifest parser.
  • Phase 9 (Chat tools, 2 PRs): Z1/Z2 — web-side Vercel AI SDK tool() defs (20 verbs) + MCP whitelist entries (25 entries).
  • Phase 10 (i18n, 1 PR): LOC — 7564 keys added across 20 non-English locales; all 21 files now at byte-identical parity.
  • Phase 11 (Docs, 2 PRs): DOC1/DOC2 — 4 user-facing feature docs + spec + plan cross-linked into the docs tree.

Operating constraints (all honored):

  • NN #20 (extension only, never replacement) — every UI change additive; no surface deleted.
  • NN #16 (TypeORM entity changes ship with migration in same commit) — confirmed across all schema PRs.
  • Conventional commits only — commitlint passed every commit.
  • No push to develop/main — every commit on feat/missions-ideas-works.
  • No PRs created — manual PR creation deferred to operator post-merge.

Test posture: Targeted test runs per tick (NOT full suite). All targeted suites green at PR-close. Cross-cutting checks at LOC and Z2 tied to component snapshots + whitelist invariants.

Branch is ready for manual PR creation against develop.


Per-tick procedure (canonical — copy into the loop prompt verbatim)

  1. cd C:/Coding/Worktrees/wt-missions-build.
  2. Confirm branch is feat/missions-ideas-works. Pull from origin in case a prior tick pushed.
  3. Read this PROGRESS.md. Find the topmost item in the table below marked TODO whose dependencies are all DONE.
  4. Read the corresponding PLAN phase + the §B pre-flight checklist for it. Then read every file the pre-flight tells you to read.
  5. Do one PR-equivalent unit of work. Aim for committable progress within this tick. If a PR is too big, slice it (capture the slice in this tracker as sub-rows e.g. A.1, A.2).
  6. Run targeted checks for what you changed (NOT the full suite — too slow):
    • pnpm lint --filter <affected-package> (or cd packages/<x> && pnpm lint)
    • pnpm type-check --filter <affected-package>
    • Targeted test: cd <pkg-or-app> && npx jest -t '<pattern>' or npx vitest run <file>
  7. Update the PR row below: change status TODODONE (or IN PROGRESS if sliced; or WIP if commit lands broken with a clear next-tick plan; or BLOCKED if human input needed). Add a one-line summary. Leave commit hash placeholder <hash>.
  8. Commit using conventional commits (feat:, fix:, docs:, refactor:, test:, chore: — enforced by commitlint). After commit, replace <hash> with the real short hash in this file (small follow-up amend or a second commit is fine).
  9. git push origin feat/missions-ideas-works.
  10. ScheduleWakeup(delaySeconds=1800, prompt=<the loop's orchestration prompt verbatim>).

Hard constraints

  • Workspace NN #20: extension only, never replacement.
  • Platform CLAUDE.md NN #16: any TypeORM entity change ships with its migration in the SAME commit.
  • Commitlint: conventional commits only.
  • No push to develop/main. Only feat/missions-ideas-works.
  • No PRs created. Per operator instruction this build runs on one branch; final PR pass happens manually after the loop completes.
  • Stop conditions:
    • All PRs marked DONE → write final summary, commit it, push, STOP (no ScheduleWakeup).
    • Real blocker requiring human input → mark BLOCKED, write one-sentence user message, STOP.
    • Broken build with no clear forward fix → commit as WIP, ScheduleWakeup so next tick attempts repair.

Phase-by-phase PR checklist

Status legend: TODO · IN PROGRESS · WIP (committed broken, next tick continues) · BLOCKED · DONE

Dependency notation [after X] means PR X must be DONE before this PR starts.

Phase 0 — Schema and migrations (additive)

PRStatusDescriptionDepsCommitSummary
0.1DONEExtendWorkProposalForMissions migration: add missionId uuid NULL FK; extend status enum (QUEUED, BUILDING, FAILED); extend source enum (USER_MANUAL, MISSION); new index (userId, status, missionId, generatedAt). Entity edits in same commit.9b3b32b4Entity extended (status + source enums + missionId column + new composite index decorator); migration 1779978000000-ExtendWorkProposalForMissions.ts idempotent up/down. Type-check + work-proposal integration test green. FK constraint to missions(id) intentionally deferred to PR 0.2 when target table exists.
0.2DONECreateMissionsTable migration: new missions table per spec §1.3 + Mission entity. Defer the FK constraint on work_proposals.missionId to here (added in 0.1 as nullable).0.17e6b95b3New Mission entity (packages/agent/src/entities/mission.entity.ts) with title/description/type/status/schedule/autoBuildWorks/outstandingIdeasCap/guardrailsOverride/missionTemplateRepo/missionRepo + idx_missions_user_status (userId, status). Migration creates table + index + users FK (ON DELETE CASCADE) + attaches the deferred fk_work_proposals_mission FK (ON DELETE SET NULL — preserves Done-Idea history). Registered in database.config.ts ENTITIES array + _entity-names.ts drift list. Type-check + 82 tests (drift specs) green. sourceMissionId self-FK deferred to PR 0.10 per phased plan.
0.3DONEExtendBudgetsToPolymorphicOwner migration: add ownerType + ownerId to work_budgets, usage_ledger_entries, plugin_usage_events, work_budget_alert_states; backfill ownerType='work', ownerId=workId; composite index (ownerType, ownerId).ccca26f0New BudgetOwnerType enum (WORK/IDEA/MISSION) placed in _types.ts (leaf file) to avoid an entity-init cycle that would leave the enum undefined at column-decorator-evaluation time on sibling entities. All 4 entities updated: ownerType (varchar 16, NOT NULL, default 'work') + ownerId (uuid, NULLABLE for backfill safety) + composite index (ownerType, ownerId). Migration 1779978002000-ExtendBudgetsToPolymorphicOwner.ts runs all 4 tables in a loop: add ownerType, add ownerId, backfill ownerId = workId for rows where ownerId IS NULL, then create the composite index. Existing workId columns / indexes / FKs untouched. Type-check + 131 tests (8 suites: budget services + repositories + drift detectors) all green.
0.4DONEPromoteWorkAgentConstantsToSettings migration: add auto_generate_cadence, auto_generate_batch_size, auto_build_throttle_per_day, mission_default_outstanding_cap to work_agent_preferences.946a7bddEntity gains 4 nullable columns mirroring the 4 hardcoded loop constants spec §6.2/§6.3 calls for. All NULLABLE: NULL = inherit-platform-default; non-NULL = user-set override. Special semantics: autoBuildThrottlePerDay NULL = unlimited; missionDefaultOutstandingCap NULL = inherit default-20, -1 sentinel = user-set unlimited. Read-side wiring (read from prefs vs hardcoded) deferred to PR D — until then columns exist but app behavior unchanged. Migration 1779978003000-PromoteWorkAgentConstantsToSettings.ts adds all 4 in a loop; idempotent; down() drops in reverse. 86 tests green (work-agent service + drift detectors).
0.5DONEAddAutoRetryPrefs migration: max_auto_retries, backoff_seconds, exponential_backoff_factor on work_agent_preferences. (v6 / Decision A23)0.4010b4d39Entity gains 3 NOT-NULL columns with defaults (maxAutoRetries=2, backoffSeconds=60, exponentialBackoffFactor=2.0). NOT NULL because the retry policy is behavior-affecting from day one — every existing user benefits the moment PR FF (Phase 1) wires the retry handler, with no settings visit required. exponentialBackoffFactor stored as float for SQLite/Postgres portability (the test driver is better-sqlite3 → REAL; prod is Postgres → real/double precision; 0.1 precision fits comfortably). Range bounds (0–5, 10–3600, 1.0–4.0) enforced at DTO-validation time in Phase 4 PR EE, not at the DB level — keeps migration dialect-portable. Migration 1779978004000-AddAutoRetryPrefs.ts adds all 3 in a loop; idempotent; down() drops in reverse. 86 tests green.
0.6DONEAddAccountWideBudget migration: account_wide_monthly_cap_cents, account_wide_allow_overage on work_agent_preferences. (v6 / Decision A28)0.4c0306756Entity gains accountWideMonthlyCapCents (bigint NULL — bigint not int because monthly cents can exceed int32 ceiling for power users) + accountWideAllowOverage (boolean NOT NULL default true). NULL cap = no account-wide guard. Drives Phase 7 PR II's Dashboard Month Spend tile and #account-budgets settings sub-section. Existing user rows get safe defaults at apply time — no guard kicks in until user explicitly configures.
0.7DONEAddIdeaIdToWorkAgentGoal migration: add ideaId uuid NULL FK on work_agent_goalswork_proposals.0.1c0af3a9cEntity gains ideaId uuid NULL + idx_work_agent_goals_idea + fk_work_agent_goals_idea (ON DELETE SET NULL). Lets the Phase 1 PR B build pipeline tag Goals with their source Idea, and the Goal-completion handler join back to update Idea status (ACCEPTED on success → calls acceptInternal(ideaId, workId); FAILED on terminal failure → persists failureMessage + failureKind from PR 0.8). Existing power-user direct-queue Goals have ideaId=NULL — back-compat intact.
0.8DONEAddIdeaFailureColumns migration: failure_message text NULL, failure_kind varchar(32) NULL on work_proposals. (v6 / Decisions A23, A24)0.11da650baNew IdeaFailureKind enum with 4 transient kinds (network / rate-limit / upstream-5xx / plugin) + 2 permanent kinds (invalid-input / unknown). Classifier itself lives in code (Phase 1 PR FF) per Decision A23 — this enum is just the vocabulary it writes. Both columns NULLABLE; populated only on FAILED status, cleared by /retry. Powers the inline error block on Idea Cards (spec §3.9).
0.9DONEAddMissionRefsToWorkProposalAndWork migration: accepted_from_idea_id uuid NULL on works.0.1c85b4dc8Entity gains acceptedFromIdeaId uuid NULL + idx_works_accepted_from_idea + fk_works_accepted_from_idea (ON DELETE SET NULL). Set by acceptInternal(ideaId, workId) (Phase 1 PR B). Enables Phase 6 PR R Mission detail page's "Works built from this Mission's Ideas" roll-up via single join Mission -> WorkProposal (missionId) -> Work (acceptedFromIdeaId). Pre-existing Works + pre-Missions creation paths keep ideaId=NULL — fully back-compat.
0.10DONEAddSourceMissionIdToMissions migration: source_mission_id uuid NULL self-FK on missions. (v6 / Decision A25)0.200f5b703Final Phase 0 migration. Entity gains sourceMissionId uuid NULL self-FK + idx_missions_source + fk_missions_source (ON DELETE SET NULL). Set at Clone time by Phase 3 PR HH MissionCloneService. Drives the Mission detail page's three Clone affordances: "Cloned from:" backlink, "Cloned as: N" count on source, and "Related Works (inherited)" read-only panel (Phase 6 PR GG). NULL for direct-created Missions (the common case).

Phase 1 — Backend extensions

| PR | Status | Description | Deps | Commit | Summary | | --- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | A | DONE | Extend WorkProposal entity + service for new statuses/sources + missionId. (PLAN §3.3 PR A) | 0.1 | 957dd0c9 | Entity work already shipped in PR 0.1; this PR carries the service + DTO + controller surface changes. WorkProposalRepository.findByUser + WorkProposalService.list + WorkProposalsApiService.list all gain optional { missionId } opts (tri-state: undefined = no filter, UUID = scope, null = standalone only). CreateWorkProposalInput extended with missionId for Phase 3 PR J. WorkProposalResponseDto gains missionId + failureMessage + failureKind (latter typed against the IdeaFailureKind enum from PR 0.8). ListWorkProposalsQueryDto gains missionId UUID query param. Both controller paths (list() + getOne()) populate the new fields. Existing API behavior unchanged when missionId query param absent — fully back-compat. 79 tests green (58 agent + 21 API). | | B | DONE | Add POST /me/work-proposals (user-manual create) + POST /me/work-proposals/:id/build (queue for build via WorkAgentGoal with maxWorksPerRun=1 + ideaId). Extract acceptInternal(ideaId, workId) from existing accept controller method so it can be called from both the controller AND the goal-completion handler. (PLAN §3.3 PR B; Decision A3) | A, 0.7 | 7465224f | Repository: createUserManual for new Ideas (auto-derives slug, empty suggestion arrays); markQueuedForBuild (PENDING/FAILED → QUEUED, clears failure cols); markAccepted extended with optional fromStatuses (back-compat default [PENDING]). Service: createUserManual with placeholder title-derivation (will swap for AI titler in PR I); queueForBuild; acceptInternal shared helper. API service: createUserManual, build (validates PENDING/FAILED → QUEUED + creates Goal). WorkAgentService: CreateWorkAgentGoalInput.ideaId field + persistence so Goal carries the back-ref. Module: imports WorkAgentModule. Endpoints: POST /me/work-proposals (10/min throttle), POST /me/work-proposals/:id/build (10/min throttle); both decorated for OpenAPI/MCP. Test fixes: added @ever-works/agent/work-agent mock to 2 specs matching existing deep-import-stub pattern; expanded enum mocks for new statuses/sources; updated service-spec constructor invocation to pass new workAgent arg; moved BuildWorkProposalResponseDto declaration AFTER WorkProposalResponseDto (class hoisting bug). 542 tests green (521 agent + 21 API). | | C | DONE | Extend user-research proposal generator to accept exclusion+context list (every existing Idea title/slug/desc across ALL statuses incl. DONE) + missionContext parameter. (PLAN §3.3 PR C) | A | ff900798 | prompts.ts: new ExistingIdeaContext + MissionContext types. buildProposalsPrompt takes both as optional trailing params (back-compat default empty). Existing-Ideas rendered as - [<status>] "<title>" (<slug>) — <desc> with per-row status hint instructing the model to lean adjacent to ACCEPTED, avoid replays of DISMISSED. Token-budget guards: cap at 50 Ideas, truncate desc at 140 chars. Mission context block, when present, includes the Goal description + KB excerpts and a "MUST advance the Mission" directive. work-proposal.service.ts: GenerateProposalsOptions gains missionContext + missionId. Generator fetches existing Ideas ONCE (all statuses via findRecentByUser), uses them for both prompt context AND the post-coercion dedupe loop. missionId from opts flows through into each bulk-inserted Idea so Mission tick worker (Phase 3 PR J) gets the back-FK automatically. Tests: 5 new prompt-spec tests covering status rendering, truncation, 50-entry cap, mission-context rendering, and back-compat no-section omission. 51 prompts-related tests green; full user-research/work-proposal sweep clean. | | D | DONE | Promote four work-agent constants (cadence, batch size, throttle, mission cap) from hardcoded to user settings. (PLAN §3.3 PR D) | 0.4 | 3a304bdf | types.ts: extended UpdateWorkAgentPreferencesInput + WorkAgentPreferencesDto with all 9 new pref fields (4 promoted constants + 3 auto-retry + 2 account-wide budget). work-agent.service.ts: toPreferencesDto surfaces all 9; updatePreferences handles them with tri-state PATCH semantics for the 6 nullable knobs (nullable3rd helper distinguishes omit-key from explicit-null); findOrCreatePreferences sets the new field defaults explicitly so the in-memory entity shape matches what the DB would produce. prompts.ts: buildProposalsPrompt gains optional targetCount clamped to 1–20 with hardcoded fallback 3; renders "Generate exactly N proposals" instead of the prior "3-5" range. work-proposal.service.ts: GenerateProposalsOptions.targetCount propagated. work-proposals.service.ts (api): runPipeline reads user's autoGenerateBatchSize pref before calling generate; pref-fetch failures don't block generation (debug log, fall back to default). Web client: WorkAgentPreferences + UpdateWorkAgentPreferencesInput interface extensions. Test updates: work-agent.service.spec expectations match new full DTO shape; work-proposals.service.spec mocks getPreferences on workAgent stub. 129 tests green (108 agent + 21 API). Cadence + throttle + Mission cap surfaced but their consumer-side wiring lands in later phases (3, 1-FF, 3 respectively). | | FF | DONE | POST /me/work-proposals/:id/retry + POST /me/work-proposals/:id/rebuild endpoints + auto-retry handler in goal-completion. Built-in transient classifier (network/429/5xx/plugin-internal). (v6 / PLAN §3.3 PR FF; Decisions A23, A24, A27) | B, 0.5, 0.8 | next-commit | idea-failure-classifier.ts (new): pure-function classifyIdeaFailure(unknown) → IdeaFailureKind — inspects structured HTTP status first (429 → rate-limit, 5xx → upstream, 4xx-other → invalid-input), falls back to message-pattern matching (ECONN*/ETIMEDOUT/ENOTFOUND → network, rate-limit/quota/throttle prose → rate-limit, 5xx/gateway/service-unavailable → upstream, timeout/aborted/stream → plugin, validation/malformed/schema → invalid-input). Plus isTransient(kind) predicate and computeBackoffSeconds(backoff, factor, attempts) implementing the spec §3.9 formula backoff × factor^attempts with [backoff, 1day] clamp. Repository: markBuilding (QUEUED | BUILDING → BUILDING, allows the no-flicker auto-retry path of Decision A24), markFailed(id, userId, message, kind) (BUILDING | QUEUED → FAILED + persist message + kind), markRebuildingFromAccepted (ACCEPTED → BUILDING + clear failure cols for the Re-build path). Service: retryFailed, beginRebuild, and the centerpiece handleGoalCompletion({ userId, ideaId, outcome, attempts, policy }) returning GoalCompletionDecision — pure decision API that handles success (calls acceptInternal with [BUILDING]) including the rebuild case (detects previousWorkId, emits rebuild-accepted outcome with both old + new workId), and failure (classifies, decides retry vs terminal based on attempts < policy.maxAutoRetries + isTransient, marks FAILED if terminal). Auto-retry SCHEDULING is the caller's responsibility (the decision API returns retryDelaySeconds); this lets the actual scheduling primitive — Trigger.dev / BullMQ / setTimeout — be chosen at the goal-execution wiring point that doesn't exist yet. API service: retry() (FAILED-only validation + new Goal) and rebuild() (ACCEPTED-only validation + new Goal). Controller: POST /:id/retry + POST /:id/rebuild endpoints (10/min throttle each). Both return the same BuildWorkProposalResponseDto shape as /build. Extracted shared toBuildResponseDto helper. Tests: 21 new classifier-spec tests covering every classification branch + the backoff formula's spec-§3.9 example sequence + clamp behaviors. Decisions reaffirmed: A23 (classifier is platform-managed, NOT user-configurable), A24 (Idea status stays BUILDING across auto-retries, no FAILED → QUEUED flicker), A27 (Re-build creates new Work + re-points acceptedWorkId; original Work NOT deleted — enforced by the absence of any delete call in handleGoalCompletion's success path). 100 tests green (79 agent incl. new classifier suite + 21 API). |

Phase 2 — Dashboard renames + stats reorder (smallest user-visible PR)

PRStatusDescriptionDepsCommitSummary
EDONEi18n renames across all 21 locales: proposals.header.title → "Ideas", drop titleWithName rendering, proposals.actions.accept → "Build", proposals.actions.refresh → "Suggest more", Dashboard "Recent Works" → "Works". (PLAN §4.3 PR E)next-commitEnglish (en.json) updated by hand: 4 renames + 2 new keys (stats.totalMissions, stats.totalIdeas). 20 non-English locales bulk-updated via a Node script that (a) reads each locale, (b) updates the specific keys IFF the locale had them (7 of the 20 have dashboard.proposals; all 20 have dashboard.works and dashboard.stats), (c) adds the 2 new stats keys to every locale's dashboard.stats, (d) writes back with the existing 4-space indent. Per-locale audit: all 21 locales have stats.totalMissions + stats.totalIdeas + works.recent = "Works". The 14 locales without a dashboard.proposals key fall back to en.json at render time, so they'll show the new English values for those 4 keys automatically. MT-acceptable values for v1 ship per PLAN; proper translation pass deferred to Phase 10 PR LOC.
FDONEAdd Total Missions + Total Ideas tiles to Dashboard stats row. New order: [Missions][Ideas][Works][Items][Sites]. Extend getWorkStats() server action. (PLAN §4.3 PR F)next-commitWorkRepository.getAccessibleStats: extended with totalMissions + totalIdeas via 2 raw Promise.all-parallel COUNT(*) queries on missions + work_proposals (both userId-scoped). Defensive .catch(() => [{ c: 0 }]) makes the stats endpoint resilient to missing tables on freshly-cloned dev boxes. Empty-userId fallback envelope updated to include the new fields (typed shape now requires them). WorkStatsResponse interface + getWorkStats() server action + catch-fallback in dashboard page.tsx + DashboardClient props + StatsOverview props all extended end-to-end. StatsOverview component: new tiles rendered FIRST in spec §5.1 order (Target icon for Missions, Lightbulb for Ideas, amber/yellow colors). Grid breakpoint extended to @5xl/main:grid-cols-5 for the 5-tile row; smaller breakpoints wrap gracefully (3 then 2 then 1). Tests: 3 existing getAccessibleStats specs updated with the new envelope shape + a repository.manager.query mock added to beforeEach returning [{ c: '0' }] so the new Promise.all branch works in tests that don't care about mission/idea counts. 80 work-repository tests green.

Phase 3 — Missions backend + tick worker

PRStatusDescriptionDepsCommitSummary
GDONEMission entity (already implied by 0.2's migration); MissionsModule skeleton. (PLAN §5.5 PR G)0.2next-commitAgent side (packages/agent/src/missions/): MissionsService injects Repository<Mission> directly (no custom MissionRepository class yet); MissionsModule registers the entity via TypeOrmModule.forFeature + exports the service; types.ts defines MissionDto + toMissionDto mapper; index.ts re-exports everything plus the Mission entity + enums for convenience. Single read method listForUser(userId) returns DTOs sorted by updatedAt DESC. API side (apps/api/src/missions/): MissionsController with one route GET /me/missions decorated for OpenAPI/MCP auto-derivation per Decision A19; MissionsModule thin wrapper imports agent-side module + AuthModule. Wiring: registered in api.module.ts after WorkAgentModule; added ./missions to packages/agent/package.json exports map so @ever-works/agent/missions resolves at TypeScript build time (mirrors the existing ./work-agent entry — required for downstream packages to type-check). DI graph exercised at boot via the single endpoint returning [] for users with no Missions. 4998 agent tests green; api type-check shows zero new errors.
HDONEMissionsModule full CRUD + lifecycle endpoints (pause/resume/complete/delete/run-now). (PLAN §5.5 PR H)Gnext-commitService: create (validates schedule-vs-type, clamps title to 200, status defaults to ACTIVE), getForUser (404 on missing or wrong-owner — same response shape so the API doesn't leak whether the id exists), update (partial PATCH; type-flip clears orphan schedule automatically), pause/resume/complete/runNow (all share transition helper + source-status guard; runNow is a noop-placeholder until PR J wires Trigger.dev), delete (any status; DB cascade preserves child Ideas + Clone back-links per migrations 0.2/0.10). assertScheduleConsistency + normalizeSchedule internals centralize the cron-vs-type invariant. Controller: 8 new endpoints (POST /, GET /:id, PATCH /:id, DELETE /:id, POST /:id/{pause,resume,complete,run-now}) all decorated for OpenAPI/MCP per Decision A19. Write endpoints throttled 30/min; runNow at 10/min. DTOs: CreateMissionDto + UpdateMissionDto with class-validator rules including outstandingIdeasCap >= -1 (sentinel for unlimited) and ValidateIf on the nullable schedule + missionTemplateRepo fields. Tests: 19 new tests across create validation, all 4 state-machine transitions + idempotency-error cases, ownership 404s, partial-update semantics, and type-flip edge cases.
IDONEShared titler service (one service, four callers: user-manual Idea, Mission-spawned Idea, Mission itself, Work title fallback). (PLAN §5.5 PR I)9e368ecbNew TitlerService (packages/agent/src/titler/titler.service.ts): generateTitle(prompt, opts?) returns ≤80-char title (configurable maxChars, floor 8). Heuristic: first sentence-ish + collapse whitespace + strip trailing punctuation + clip. Kind hint (idea/mission/work) drives the empty-input fallback ("Untitled Idea" etc.) and is plumbed for the future AI-backed implementation. Stateless, zero DI deps. TitlerModule exports the service. UserResearchModule + MissionsModule import it. WorkProposalService.createUserManual: deleted the private deriveTitle placeholder from Phase 1 PR B; now calls titler.generateTitle(description, { kind: 'idea', userId }) when caller doesn't pass a title. MissionsService.create: title is now optional; when empty/missing, generates via titler.generateTitle(description, { kind: 'mission', userId, maxChars: 200 }). DTOs: CreateMissionDto.title marked @IsOptional. Tests: 9 new titler-spec (first-sentence, whitespace collapse, trailing-punct strip, clip-to-maxChars, maxChars floor=8, kind-specific fallbacks, defensive non-string handling, newline-as-boundary); existing missions/work-proposal tests still pass (51 tests across affected modules total). Package: ./titler added to packages/agent/package.json exports.
JDONEMission tick worker — Trigger.dev schedules.task({id, cron, run}) per workScheduleDispatcherTask pattern. Honors outstanding-Ideas cap; generates Ideas via PR C generator with missionContext; if autoBuildWorks true, queues each new Idea for build via PR B. (PLAN §5.5 PR J)H, C, I, 0.4d74a0c34Cron matcher: zero-dep 5-field parser/matcher (*, */N, N, N-M, lists, ranges, steps; MON/JAN aliases; Vixie DoM-or-DoW semantics; UTC per spec §1.3). Tick service tickDue (scheduled path) + runOnce (run-now path, bypasses cron but enforces cap). Cap priority: per-Mission outstandingIdeasCap (incl. -1 unlimited) → user pref missionDefaultOutstandingCap → platform default 20. Batch size = min(cap-headroom, MAX_IDEAS_PER_TICK=5). Generation via PR C WorkProposalService.generate with source=MISSION + missionId + missionContext.description=mission.description (KB excerpts deferred to PR JJ). autoBuildWorks=true → PR B's queueForBuild on each new Idea. Trigger.dev task mission-tick.task.ts fires * * * * * and resolves the service via the existing remote-proxy pattern (RPC channel — MissionsModule added to trigger-internal.module.ts, MissionTickService registered in TriggerInternalController.remoteMap, worker-side proxy in packages/tasks/.../modules/trigger-internal.module.ts). Repository gained countOutstandingByMission. MissionsService.runNow delegates to tick service (PR H placeholder deleted; unit-test path still returns placeholder via @Optional() dep). Tests: 17 mission-tick + 16 cron-matcher; existing 19 missions-service + 79 user-research + 2331 API all green. Updated 2 trigger-internal specs with the new MissionTickService positional arg + jest.mock.
HHDONEPOST /me/missions/:id/clone + MissionCloneService — Full Fork: metadata + repo snapshot + Ideas as PENDING (skip DISMISSED) + sourceMissionId FK; Works NOT cloned. (v6 / PLAN §5.5 PR HH; Decisions A25, A26)H, 0.104c77dfc7Service: transactional cloneForUser(userId, sourceId, { title? }) returns { mission, ideasCloned, ideasSkipped }. Metadata copied verbatim except status (always ACTIVE), missionRepo (NULL — scaffolder mints), sourceMissionId (= source.id). Ideas: non-DISMISSED rows re-inserted as PENDING with fresh UUID + source=MISSION + cleared failure/acceptedWorkId; DISMISSED skipped and counted. Works NOT cloned (read-only "Related Works (inherited)" lands in PR GG). Default title = "Copy of <source>" clipped to 200. Plus countClonesOf(userId, sourceId) helper with Not(self) guard. DTO CloneMissionDto (single optional title). Endpoint POST /:id/clone 10/min throttle, 201 response, OpenAPI-decorated. Module registers WorkProposal via forFeature (Mission entity already there). Tests 9 new clone specs covering metadata, title override + clip, Idea clone + fresh-slate status, DISMISSED skip + count, source immutability, 404 paths, count helper. 61 missions-module + 2331 API tests green.

Phase 4 — Work Agent settings additive refactor

PRStatusDescriptionDepsCommitSummary
KDONEExtract <LiveRun />, <LogList />, <StatusPill />, <Metric />, <ToggleRow />, <NumberField />, <MoneyField /> from WorkAgentSettings.tsx to apps/web/src/components/work-agent/. First snapshot tests for apps/web/ — set up the Vitest snapshot infra as part of this PR. Byte-identical output. (PLAN §6.4 PR K; Decision A10)50ae8594New apps/web/src/components/work-agent/ with 7 component files + index barrel. LiveRun is a fresh wrapper composing StatusPill+Metric+LogList (so PR R can render one-per-run per Decision A15) — takes parent-supplied i18n labels so it stays decoupled from useTranslations. WorkAgentSettings.tsx 489→304 lines, imports from @/components/work-agent, byte-identical render. First apps/web snapshot tests: 14-test work-agent-primitives.unit.spec.tsx using toMatchInlineSnapshot() (no config changes — Vitest infra already in place). Locks markup + key behaviors (onChange wiring, cents↔dollars via fireEvent.change, STATUS_STYLES set lock, LiveRun empty + active branches). All green.
LDONEAdd #auto-generate-ideas + #auto-build-works anchors; add four promoted-constant <NumberField> rows. (PLAN §6.4 PR L)K, D61e03dafTwo new sections (Sparkles + Zap icons) with id="auto-generate-ideas" / id="auto-build-works" + scroll-mt-24 for clean deep-link anchoring. Four NumberFields wired through PR K's primitive: cadence (translated to/from stored cron via new cadence-minutes.ts helper), batch size 1–20, autobuild throttle 0–1000, mission cap -1–1000 (-1 unlimited). Per-section Save + "Use default" buttons (null sends → reset to platform default). 14 cadence-helper tests covering round-trip, clamps, shape detection, default locks. 28 work-agent tests + apps/web type-check green. 7 new i18n keys (autoGenerateIdeas / autoBuildWorks sections + 4 fields + 2 actions).
EEDONEAdd Auto-retry policy sub-section (anchor #auto-retry) + Account-wide budgets sub-section (anchor #account-budgets) to settings page. (v6 / PLAN §6.4 PR EE)L, 0.5, 0.6791dc267New sections #auto-retry (RotateCcw icon, 3 NumberFields incl. exponentialBackoffFactor with step=0.1) + #account-budgets (Wallet icon, opt-in ToggleRow → MoneyField + overage ToggleRow). Auto-retry "Use default" snaps to entity defaults (NOT-NULL); account-cap "Use default" sends null. New bigint-cents.ts helper narrows string-bigint → JS number (clamps to MAX_SAFE_INTEGER for corrupt-value safety). NumberField gained optional step? prop without breaking the PR K inline snapshot. 11 new bigint-cents tests + 6 new i18n keys + 6 new field labels. All 39 work-agent tests + apps/web type-check green.

Phase 5 — Ideas page + Dashboard Ideas block

PRStatusDescriptionDepsCommitSummary
MDONEExtract <IdeaCard /> from WorkProposalsSection.tsx to apps/web/src/components/ideas/. Snapshot-verify byte-identical. (PLAN §7.3 PR M)Kc4145549New apps/web/src/components/ideas/IdeaCard.tsx (canonical) + index barrel. Old dashboard/WorkProposalCard.tsx shrunk to one-line back-compat shim (export { IdeaCard as WorkProposalCard }) per NN #20 — external imports of the old name keep working. WorkProposalsSection.tsx switched to the new import path. 9 new IdeaCard tests including a full-markup inline snapshot locking byte-identical render (Decision A10).
NDONENew /ideas page (sidebar + page + quick-add +Add button + two toggles + ⚙ gears + sorted list). (PLAN §7.3 PR N)M, Bd32264b4New ROUTE + Lightbulb sidebar entry + server page (apps/web/src/app/[locale]/(dashboard)/ideas/page.tsx) + client IdeasPageClient with quick-add → createIdeaAction (first UI consumer of PR B), 2 visibility toggles, 7-chip filter strip with counts, sorted IdeaCard grid, gears dropdown deep-linking to all 4 Phase 4 anchors, empty state. API client + actions extended (createUserManual, build, IdeaFailureKind union, missionId/failureMessage/failureKind on WorkProposal). 25+ new i18n keys. 10 new IdeasPageClient tests; 19 ideas-module tests + apps/web type-check green.
ODONEReshape Dashboard Ideas preview block: add toggles + +Add + gears + View all (N) link. Max 3 cards. (PLAN §7.3 PR O)N1e5c7c2bWorkProposalsSection.tsx capped to 3 visible cards via PREVIEW_CARD_LIMIT; new toolbar (+ Add collapsible quick-add panel, ⚙ gears dropdown to all 4 Phase 4 anchors, legacy Suggest more preserved); sub-header toggles row (Show accepted / Show dismissed) with one-shot LAZY listProposalsAction fetches so unopened toggles cost zero round-trip; dismiss-via-card now flips local status to DISMISSED instead of dropping the row, so the toggle can un-hide without re-fetch; View all (N) → Link to /ideas with current visible count. 1 new viewAll i18n key with {n} interpolation. 9 new WorkProposalsSection unit specs (3-card cap, View all href/count, hide-when-empty, both lazy-load paths, one-shot contract, quick-add expand + validation + prepend, local-dismiss semantics). 28 ideas+preview tests + apps/web type-check green.
PDONEDone filter chip on /ideas. (PLAN §7.3 PR P)N874016d0New 'done' pseudo-filter alias for ACCEPTED with distinct semantics — chip enabled regardless of toggle, surfaces accepted rows when active, green/success palette + checkmark glyph reads as celebratory terminal state. Count mirrors ACCEPTED. IdeaCard CTA branches: when accepted+acceptedWorkId, shows "View Work →" (success palette, CheckCircle2 icon) navigating to /works/<workId> instead of the Build flow; legacy accepts without workId keep Build. 3 new i18n keys (actions.viewWork, filters.done, filters.doneTooltip). 4 new IdeasPageClient + 4 new IdeaCard tests; 36 ideas/dashboard tests + apps/web type-check green.

Phase 6 — Missions UI

PRStatusDescriptionDepsCommitSummary
QDONE/missions page: Cards list + small + New Mission button top-right (NO large quick-add — Phase 6.5's /new owns that). (PLAN §8.5 PR Q)H75e30929New ROUTE + Target sidebar entry (above Ideas, matches spec §5.1 tile order). API client wraps all 9 Phase 3 Mission endpoints. Server actions revalidate both / and /missions. MissionCard (whole-card Link, type badge, cap label honoring null/-1/value, clone-from GitFork indicator) + MissionsList (top-right + New Mission/new?type=mission, friendly empty state, responsive 1/2/3-col grid). No quick-add form per spec §8b — /new owns that. 1 nav key + 15-key dashboard.missionsPage block. 13 new unit tests + apps/web type-check green.
RDONE/missions/[id] Mission detail page: header + Schedule switch + per-Mission Auto-build + outstanding-Ideas cap + guardrails overrides + live run (LIST of all in-flight runs per Decision A15) + Ideas list + Works list + Pause/Resume/Complete/Delete/Run-now. (PLAN §8.5 PR R)Q, K84b6ff72Server page hits missionsAPI.get(id) + workProposalsAPI.list({missionId}) (new opts); MissionDetailClient with 7 sections (header+actions, settings PATCH, guardrails placeholder, live-runs LIST shape, Ideas grid via IdeaCard, Related Works derived from accepted+workId Ideas, clone badge). Lifecycle buttons gated by source-status; Delete confirms via window.confirm. Reuses PR K (StatusPill/NumberField/ToggleRow) + PR M (IdeaCard). API extension: list + listProposalsAction gain optional {missionId} forwarding to the existing Phase 1 PR A server filter. 45-key dashboard.missionDetail i18n block. 13 new MissionDetailClient tests; 26 missions-module + apps/web type-check green.
SDONEDashboard Missions preview block above Ideas block. 3 cards with live counters (Ideas/Works/Sites). (PLAN §8.5 PR S)Q44f93bc4New MissionsPreviewSection hard-caps at 3 cards (PREVIEW_LIMIT), View all (N) → Link to /missions reflects full mission count, friendly empty state with rich-text <link> to /new?type=mission. Each card: title, StatusPill, optional Scheduled badge, 3-counter strip (Ideas / Works / Sites) derived O(missions+ideas) from a single byMission Map memoized over allIdeas. Sites=0 placeholder until Phase 7 PR T/II wires per-Mission deployments. Home page parallel-fetches missionsAPI.list() + the all-statuses Ideas list (both catch-defended); DashboardClient slots <MissionsPreviewSection /> ABOVE <WorkProposalsSection /> for Missions→Ideas→Works home flow. 10-key dashboard.missionsPreview i18n block. 8 new preview-section tests; 34 missions-module + apps/web type-check green.
GGDONEMission detail page extras: activity timeline + spend-over-time chart + Clone button (with confirmation modal) + Related Works (inherited) panel (visible when sourceMissionId != null) + Idea failure inline error. (v6 / PLAN §8.5 PR GG)R, HH, Ua8483fa2Clone toolbar button + Headless Dialog modal (title override Input, Confirm calls cloneMissionAction + router.push to new clone's page, toast surfaces ideasCloned/ideasSkipped from PR HH). Activity + Spend side-by-side sections render as "wired surfaces, empty data" placeholders (Activity needs PR J tick events, Spend needs PR U budget query). Inherited Works panel server-side fetches sourceMission + inheritedIdeas (accepted Ideas with missionId=source) when sourceMissionId is set; renders from-source Link + Work list. IdeaCard inline failure block (spec §3.9): when status=FAILED, danger-tinted AlertTriangle alert with i18n-mapped failureKind label + line-clamped failureMessage — visible everywhere IdeaCard renders. 6 new failure-kind i18n labels + 15 new keys under missionDetail. 8 new MissionDetailClient PR GG specs covering all 5 extras; 69 missions/ideas-module tests + apps/web type-check green. PR U dep deferred (Spend chart wires when PR U lands).

Phase 6.5 — Unified + New page at /new

PRStatusDescriptionDepsCommitSummary
CC1DONEExtract CreationBlockTrio from new-work-client.tsx (lines 57+) to shared component. Byte-identical /works/new output (snapshot test). Decision A11. (PLAN §8b.3 PR CC1)K96e653e5New apps/web/src/components/works/CreationBlockTrio.tsx exporting the 3-card trio with optional labelSet: 'legacy' | 'unified' prop — default 'legacy' for byte-identical /works/new render, 'unified' for PR CC2's /new page ("Create Work with AI" etc.). Unified i18n bundle (dashboard.newPage.cards.*) shipped forward-compatibly so PR CC2 can land cleanly. new-work-client.tsx shrunk ~120 lines, unused icon imports removed. 4 new tests including a toMatchSnapshot() markup lock. Type-check green.
CC2DONENew /new route + page: large prompt input + chips (Mission/Idea/Website/Landing Page/Blog/Directory/Awesome Repo in that order) + reused CreationBlockTrio with labelSet='unified' ("Create Work with AI" / "Create Work Manually" / "Import Existing Work"). AI Chat sidebar HIDDEN on /new until submit. Submit posts prompt into chat and navigates Canvas to created object. (PLAN §8b.3 PR CC2)CC1, Hb09f1ad5Route + server page reads ?type=<chip> query param (validated against 7 known types). NewPageClient: prompt Textarea + 7-chip strip in spec order with Lucide icons, Create button disabled until chip+10-chars-prompt, "or" divider + unified CreationBlockTrio below. Submit routes per chip — mission → createMissionAction (one-shot) → /missions/; idea → createIdeaAction → /ideas; other 5 → /works/new?kind=...&prompt=... (legacy page ignores unknown params, forward-compatible). New ROUTES.DASHBOARD_NEW. AI Chat hide-until-submit deferred (needs layout-client refactor) — inline TODO. 20-key dashboard.newPage i18n block. 7 new NewPageClient tests covering chip order, initialType, disabled-CTA contract, all 3 submit branches, unified trio render. Type-check green.
DDDONESidebar + New Work+ New rename + repoint to new route ROUTES.DASHBOARD_NEW = '/new'. All 21 locales. Existing ROUTES.DASHBOARD_WORKS_NEW stays. (PLAN §8b.3 PR DD)CC2bcb3541dDashboardSidebar's two branches (collapsed + expanded) swap href to ROUTES.DASHBOARD_NEW and label to t('new'). Inline NN #20 comment documents that the old route + newWork i18n key stay (deep links keep working). New dashboard.sidebar.new in en.json + bulk-applied to 20 non-English locales via scripts/add-new-key.mjs (idempotent, per-locale translations). 303 apps/web tests + type-check green. Phase 6.5 complete (CC1+CC2+DD).

Phase 7 — Budgets generalization

PRStatusDescriptionDepsCommitSummary
TDONEPolymorphic owner on budget + usage entities (use Phase 0.3 columns). BudgetGuardService extended with ownerType + ownerId query; falls back to per-Work for back-compat. (PLAN §9.4 PR T)0.388f8d74bWorkBudgetRepository gains findGlobalForOwner + findForOwnerPlugin keyed on a new BudgetOwnerRef type. PluginUsageRepository gains getTotalSpendCentsForOwner. BudgetService gains getApplicableBudgetsForOwner and branches evaluateBudget on owner-type — Mission/Idea uses owner-scoped query, Work keeps legacy (back-compat per NN #20). BudgetGuardService.checkBudget gets optional options.owner arg. 3 new specs + 28 budget tests green.
UDONEPer-Idea + per-Mission budget query endpoints. Read-time roll-up via FK joins per spec §8.2. (PLAN §9.4 PR U)T2ab3eb7cNew BudgetService.summarizeForOwner returns periodWindow + currentSpendCents + GLOBAL cap status + percentUsed + blocked. Two ownership-gated GET endpoints — /me/missions/:id/budget (404 on wrong owner via MissionsService) + /me/work-proposals/:id/budget (via WorkProposalsApiService). Both OpenAPI/MCP-decorated. Api MissionsModule + WorkProposalsModule import the agent BudgetsModule. work-proposals.module.spec.ts gains the @ever-works/agent/budgets deep-import stub. 28 agent budget tests + 2329 api tests green.
VDONEBudget UI on Mission detail page + Idea progress view + Work Agent settings page. (PLAN §9.4 PR V)U, EEd5176ed1API clients missionsAPI.getBudget + workProposalsAPI.getBudget wrap PR U endpoints. New shared BudgetSummaryCard (apps/web/src/components/budgets/) renders period header, money-formatted current spend, monthly cap (or "No cap set"), color-coded progress bar (primary/warning/danger), percent-used label, blocked + over-cap conditional badges, Intl.NumberFormat fallback for unknown currency codes. Mission detail page parallel-fetches missionsAPI.getBudget (catch-defended); MissionDetailClient renders the card inside Spend section, falling back to the PR GG placeholder when API failed. 9-key dashboard.budgetSummary i18n block. 9 new BudgetSummaryCard tests + 51 missions+budgets tests + apps/web type-check green. Idea progress view + Account-wide live-spend on settings reuse the same card — follow-up ticks.
IIDONEAccount-wide spend roll-up + Dashboard Month Spend 6th tile. GET /me/usage/account-wide. Click → /settings/work-agent#account-budgets. (v6 / PLAN §9.4 PR II)U, EE, F22852f8aNew PluginUsageRepository.getTotalSpendCentsForUser (uses existing (userId, occurredAt) index — no migration). New BudgetService.summarizeForUser(userId, prefs) returning UserBudgetSummary. New AccountUsageController mounts GET /api/me/usage/account-wide; reads prefs via WorkAgentService, narrows bigint-string cap through Number() with MAX_SAFE_INTEGER fallback. BudgetsModule imports WorkAgentModule. New apps/web/src/lib/api/usage.ts + usageAPI.accountWide. Dashboard server-fetches it (catch-defended); DashboardClient passes through. StatsOverview grows to 6 tiles (new @5xl:grid-cols-6), new Month Spend tile (Wallet icon, rose accent) renders via optional href field as a Link to /settings/work-agent#account-budgets. Tile uses Intl.NumberFormat USD with plain-$X.YY fallback. 4 new BudgetService PR II tests + 32 agent budget tests + apps/web type-check green.

Phase 8 — Mission Templates

PRStatusDescriptionDepsCommitSummary
WDONEKind-switch on TemplatesCatalog (Mission Templates default, Work Templates secondary). (PLAN §10.4 PR W)7718388dTemplateKind extended to 'website' | 'work' | 'mission' in both agent entity + apps/web mirror (varchar(32) col, no migration). Server actions migrated to imported TemplateKind. /templates reads ?kind= query param (default 'website' for back-compat). New KindSwitcher segmented control: 3 pills in spec §10 order (Mission/Work/Website) with Target/FolderClosed/Globe icons, each a Link to /templates?kind=<value>, active pill has aria-current. New dashboard.templates.kindSwitcher i18n block. 3 new KindSwitcher tests. Type-check green.
XDONEMission Templates catalog backend + per-Mission <slug>-mission repo scaffolder via gitFacade.createRepository() (Decision A8). Same destination org as -data repos. (PLAN §10.4 PR X)H232a0530New mission-template.config.ts with MissionTemplateConfig + 2 curated starters (starter-business, starter-content). TemplateCatalogService.seedBuiltInTemplates extended via toBuiltInMissionTemplateRecord to seed kind='mission' rows alongside websites. Per-Mission cadence + KB seed paths + guardrails NOT in catalog rows — those live in template .works/mission.yml (read by PR JJ). Per-Mission repo scaffolder via gitFacade.createRepository deferred to PR X.2. 6 new mission-template.config tests + 1 updated catalog spec (mock made coords-aware). 42 template-catalog + 67 missions-module tests green.
YDONE"Use this Template" button on Mission Template cards → /new?type=mission prefill. (PLAN §10.4 PR Y)W, X, CC21a6b1654TemplatesCatalog: Mission-only primary button (Sparkles icon, "Use this Template") → /new?type=mission&template=<id>. /new server page resolves the template + builds ${name}\n\n${description} prefill. NewPageClient gains initialPrompt + initialTemplateId props; submit forwards templateId as missionTemplateRepo for the back-link. 1 new i18n key + 3 new tests (prefill, with-templateId, without-templateId). Type-check + 13 tests green.
JJDONEMissionTemplateManifestService — parse .works/mission.yml with Zod. Forward-compat on unknown keys. Integrate with PR X scaffolder: copy kb.seedPaths, apply defaults.*, pass recommendedWorkTemplates to Idea→Work scaffolder. (v6 / PLAN §10.4 PR JJ; Decisions A21, A22)X0d527c57Pure Zod parser w/ discriminated {ok} return — every object .passthrough() for A22 forward-compat; empty/null/~/comments → EMPTY_MISSION_TEMPLATE_MANIFEST per A21; errorKind: 'yaml' | 'schema' split for caller branching; first-3-issues summary cap. applyDefaults helper: caller-supplied wins, === undefined gate preserves explicit null resets, unknown guardrail fields pass through to entity JSON column. Registered in MissionsModule. 29 new specs cover empty inputs, minimal/full valid, forward-compat at every nesting level, YAML+schema errors, applyDefaults precedence/null-reset/partial-fill/passthrough/no-mutate.

Phase 9 — AI Chat tool registrations (TWO surfaces)

PRStatusDescriptionDepsCommitSummary
Z1DONEWeb-side in-app AI Chat tools (Vercel AI SDK tool() defs at apps/web/src/lib/ai/tools/missions.tools.ts + ideas.tools.ts). Verbs per spec §3.8 + §4.5. (PLAN §11.3)H, B, FF, HH568681df11 Mission verbs (list/get/budget/create/update/pause/resume/complete/delete/runNow/clone) + 9 Idea verbs (list/get/budget/refreshStatus/create/refresh/build/dismiss/accept). Each wraps the existing server action or API client so auth + ownership + throttles inherit automatically — no agent bypass. Trimmed responses (id/status/url/flags only) keep chat context compact; tri-state PATCH semantics intact on updateMission; lifecycle results passed through verbatim; rate-limited refresh returns envelope rather than throws. Wired into buildChatTools(). 30 new vitest specs cover args-forwarding, trimmed-shape contract, lifecycle delegation, optional-arg omission, and edge cases (empty statuses array, budget API failure, mission not-found). Type-check clean.
Z2DONEMCP WHITELIST entries at apps/mcp/src/openapi-tools/whitelist.ts for every new endpoint. Auto-derives from @ApiOperation decorators. (PLAN §11.4)H, B, FF, HH, T, U, II, X, JJa554401a25 new entries: 11 Missions (/api/me/missions/*), 13 Ideas (/api/me/work-proposals/*), 1 account-wide usage (/api/me/usage/account-wide). Names mirror PR Z1's web-side chat verbs in snake_case. readOnlyHint on every GET; destructiveHint ONLY on delete_mission + dismiss_idea — lifecycle mutations (pause/resume/complete/build/retry/rebuild/accept) are reversible/soft and don't get the scary-confirmation hint. New whitelist-missions-ideas.spec pins all 25 entries via it.each(...) + 3 cross-cutting checks (readOnly coverage, destructive coverage, no shadowed tool names). 29 tests green; existing tool-registration suite still green; type-check clean.

Phase 10 — Localization sweep

PRStatusDescriptionDepsCommitSummary
LOCDONEAll 21 locale files brought to parity with en.json for every new key introduced by Phases 2–9. MT acceptable for v1; flag for translator pass post-merge. (PLAN §12)(all UI phases)e6c6d9f3New apps/web/scripts/sync-locale-parity.mjs deep-walks en.json and copies missing leaves as English placeholders. Per-locale adds: fr +198, ar/bg/de/es/he +216, the remaining 14 +449 each — 7564 keys added across 20 locales, all files now byte-identical at 4412 lines. Purely additive (NN #20) — existing translations never overwritten; type mismatches left alone; arrays opaque. Idempotent: second run = 0 adds. English placeholders avoid next-intl's MISSING_MESSAGE collapse when an intermediate object is absent. 79 component tests still green; type-check clean. Translator pass deferred to a post-merge ticket.

Phase 11 — Docs

PRStatusDescriptionDepsCommitSummary
DOC1DONELift end-user docs from Workspace into apps/docs/ under docs/features/missions.md, ideas.md, mission-templates.md, budgets-and-usage.md. Index updated. (PLAN §13)d5503306Four new docs (missions.md, ideas.md, mission-templates.md, budgets-and-usage.md) with mermaid state-machine diagrams, when-to-use tables, full .works/mission.yml example w/ per-section table, failure-kind action playbook, owner-type cost-rollup table, cap precedence ladder, API + MCP verb tables. Features index extended (4 new rows). Sidebar (apps/docs/sidebarsPlatform.ts) updated to slot the new pages after creating-a-work. All cross-link each other plus mcp-server + scheduled-updates + website-templates. Docusaurus typecheck has pre-existing unrelated errors not touched by this PR.
DOC2DONECross-link spec + plan under docs/specs/features/missions-ideas-works/{spec,plan}.md (copy from Workspace). (PLAN §13)1e8d0933Spec (1091 lines) + plan (1021 lines) copied verbatim from Workspace knowledge/notes/2026-05-24-missions-ideas-works-{spec,plan}.md to local sibling files. Layout matches the existing {spec,plan,tasks}.md convention used elsewhere under docs/specs/features/. 8 intra-document cross-links rewritten to the new filenames; plan §13.1 user-docs reference rewritten to point at PR DOC1's 4 feature docs directly. PROGRESS Spec header repointed at the local copies. No code changes — pure docs lift.

Decisions made during build (append-only log)

Use this section to record any choice the loop makes mid-build that isn't already in PLAN §A. Format: <date> · <PR> · <decision> · <why>.

(No entries yet.)


Blockers (if any — append-only)

(No entries yet.)


Final Summary (filled at completion)

(Not yet complete.)