fix(plugins): make official plugins project-wide
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# Task: Make official project Plugins project-wide
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260905-official-plugin-project-scope-6e4a9c21
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260905-official-plugin-project-scope-6e4a9c21-official-plugin-project-scope
|
||||
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260905-official-plugin-project-scope-6e4a9c21
|
||||
- Base commit: 5e0a091955da7aadcf0c70a1a266fc3aa077359a
|
||||
- Owner: codex-root
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Reproduce the official Game Resource Plugin still exposing Agent-assignment UI and runtime `skill_unassigned` gating after project enablement.
|
||||
- Make MakeLore code-owned official project Plugins project-wide: Data Service, Game Resource, and Project Scaffold materialize their Skills/tools for the parent Agent when enabled for a project, without a separate partner assignment.
|
||||
- Keep third-party Marketplace and locally installed packages on their existing assignment/lifecycle rules, and keep child Agents from inheriting parent-only Plugin resources.
|
||||
- Update the shared project-wide predicate, Renderer projection/action tests, effective resolver tests, and directly affected end-to-end expectations only.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- User-confirmed product rule: project enablement is the only project-level activation step for official Plugins; the UI must not offer a redundant “assign to partner” action.
|
||||
- Main remains the authority for effective worker resources; Renderer only projects the same shared predicate and dispatches existing commands.
|
||||
- Account acquisition, device/package availability, project enablement, provider admission, billing, and parent/child lifecycle semantics remain unchanged.
|
||||
- No compatibility layer, feature flag, new store, server change, Marketplace policy change, or local-package behavior change.
|
||||
- Current accepted ADR/project memory says Project Scaffold is the sole exception and Game Resource retains assignment. This task treats the user's newer instruction as the superseding product decision and records the required canonical-doc update as an Integration promotion candidate rather than editing canonical memory in Feature mode.
|
||||
- Concurrent Task Gate: Passed. `task_context.py start` created this managed worktree from exact base `5e0a091955da7aadcf0c70a1a266fc3aa077359a`; status identity matched and no active peer owned overlapping files or semantics.
|
||||
- Planning Gate: Passed after loading the active task record, project entry documents, current state, ADR-008/decision index, architecture/data flow/module map, business rules, success criteria, glossary, evidence, reflection, commitments, and stale items.
|
||||
- Project Context Loaded:
|
||||
- MakeLore Electron Main owns effective Plugin resources; the Renderer must project the same shared activation rule rather than inventing a second lifecycle.
|
||||
- The integrated state made only Project Scaffold project-wide, while Game Resource and Data Service still emitted assignment UI and `skill_unassigned` runtime outcomes.
|
||||
- Account acquisition, code-owned bundled delivery, project enablement, policy/admission, billing, and frozen worker generations remain separate authorities.
|
||||
- The user explicitly superseded the earlier narrow exception by requiring official project Plugins to work from project enablement alone.
|
||||
- The supported boundary is the three code-owned official identities; downloaded Marketplace and local Device Packages retain their existing behavior.
|
||||
- TDD boundary: reproduce the public resolver and workspace command failures first, then change the single shared predicate used by both Main and Renderer.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Confirmed the screenshot was not a stale rendering issue: the shared project-wide predicate contained only Project Scaffold. Game Resource and Data Service therefore both produced a Renderer `open_agent_assignment` command and a Main `skill_unassigned` outcome when enabled without an Agent assignment.
|
||||
- Extended that single code-owned predicate to Data Service, Game Resource, and Project Scaffold. Once their existing acquisition/delivery and project-enable requirements are met, every parent Agent receives their Skills/tools without partner assignment; child Agent behavior remains unchanged.
|
||||
- Updated the unified Plugin workspace fixtures and Electron journey so code-owned official cards/details show `随项目启用` / `生效范围` and never expose a partner-assignment button. Third-party official Plugin tests continue to retain `open_agent_assignment`.
|
||||
- No server, Marketplace contract, project persistence, Provider, billing, Package Store, local Plugin, or worker-lifecycle authority changed.
|
||||
|
||||
## Verification
|
||||
|
||||
- TDD RED: two focused files produced 4 expected failures and 26 passes. Game Resource and Data Service returned `skill_unassigned`; both system-included and bundled Renderer projections still emitted `open_agent_assignment`.
|
||||
- Focused GREEN: resolver and workspace model passed 30/30.
|
||||
- Adjacent Plugin/runtime/page slice: 6 files, 70/70 passed; the effective-resolver/composition/capability/product-host subset passed 37/37.
|
||||
- `corepack pnpm run typecheck`: passed.
|
||||
- Scoped ESLint and `git diff --check`: passed. Full `corepack pnpm run lint:check` passed with 0 errors and 5 unchanged warnings in untouched Home/Makelore files.
|
||||
- Full unit command completed with 1,889 passes and 2 skips; one unrelated two-second real-process timing assertion measured 2,773 ms. The exact failed file then passed 6/6 in isolation.
|
||||
- `corepack pnpm run build:vite`: Renderer, Main, Preload, and utility builds passed with existing Browserslist/import/chunk warnings.
|
||||
- Targeted production-build Electron journey `tests/e2e/project-plugins.spec.ts`: 1/1 passed, proving project enable/disable while the detail reports project-wide scope and contains no Data Service assignment button.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Integration must promote the superseding official project-wide rule into canonical memory, merge the source commit to local `main`, and preserve the root worktree's three pre-existing untracked task records.
|
||||
- A rebuilt/installed client smoke is still required before claiming the user's currently installed binary contains the change.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Targets: ADR-008, decision index, current state, system overview, module map, data flow, business rules, success criteria, README, evidence, and the installed-client release commitment.
|
||||
- Proposal: all MakeLore code-owned official project Plugins (`makelore.data-service`, `makelore.game-resource`, and `makelore.project-scaffold`) are project-wide. Existing Account acquisition/delivery and project enablement remain required where applicable, but Agent assignment is neither required nor presented. Downloaded Marketplace and local packages retain current assignment/lifecycle behavior.
|
||||
- Evidence: the focused RED reproduced both Main `skill_unassigned` and Renderer assignment commands; the shared-predicate fix passed focused, adjacent, full-unit diagnostics, production builds, and the Electron project journey.
|
||||
- Future impact: new code-owned official project Plugin identities must be added to the shared project-wide predicate and tested at both Main effective resolution and Renderer command projection. Existing stored assignments for these three identities may remain inert and preserved.
|
||||
- Semantic conflict: this supersedes ADR-008 and current architecture/domain text that name Project Scaffold as the sole exception and explicitly require Game Resource/Data Service assignment.
|
||||
- Human confirmation required: No. The user explicitly corrected the behavior after observing the Game Resource assignment button on 2026-09-05.
|
||||
Reference in New Issue
Block a user