minutework 0.1.8 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/EXTERNAL_ALPHA.md +3 -0
  2. package/README.md +2 -0
  3. package/assets/claude-local/CLAUDE.md.template +60 -0
  4. package/assets/claude-local/skills/README.md +14 -0
  5. package/assets/claude-local/skills/ai-capability-defaults.md +21 -0
  6. package/assets/claude-local/skills/app-pack-authoring.md +16 -0
  7. package/assets/claude-local/skills/capability-gap-reporting.md +26 -0
  8. package/assets/claude-local/skills/email-ingress-and-thread-routing.md +36 -0
  9. package/assets/claude-local/skills/generated-workspace-architecture.md +55 -0
  10. package/assets/claude-local/skills/layering-and-import-modes.md +28 -0
  11. package/assets/claude-local/skills/ontology-mapping.md +16 -1
  12. package/assets/claude-local/skills/runtime-capability-inventory.md +46 -0
  13. package/assets/claude-local/skills/shadow-participation-and-guest-threads.md +33 -0
  14. package/assets/claude-local/skills/sidecar-generation.md +4 -0
  15. package/dist/cli.js +0 -0
  16. package/dist/index.js +12 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/init.js +5 -64
  19. package/dist/init.js.map +1 -1
  20. package/dist/orchestrator-context.js +15 -1
  21. package/dist/orchestrator-context.js.map +1 -1
  22. package/dist/orchestrator-state.d.ts +12 -5
  23. package/dist/orchestrator-state.js +1 -1
  24. package/dist/orchestrator-state.js.map +1 -1
  25. package/dist/orchestrator.js +6 -2
  26. package/dist/orchestrator.js.map +1 -1
  27. package/dist/reporting.js +1 -1
  28. package/dist/reporting.js.map +1 -1
  29. package/dist/sandbox.js +1 -1
  30. package/dist/sandbox.js.map +1 -1
  31. package/dist/workspace-assets.d.ts +56 -0
  32. package/dist/workspace-assets.js +409 -0
  33. package/dist/workspace-assets.js.map +1 -0
  34. package/dist/workspace.d.ts +8 -0
  35. package/dist/workspace.js +158 -0
  36. package/dist/workspace.js.map +1 -0
  37. package/package.json +7 -5
  38. package/vendor/workspace-mcp/cli.d.ts +2 -0
  39. package/vendor/workspace-mcp/cli.js +5 -0
  40. package/vendor/workspace-mcp/cli.js.map +1 -0
  41. package/vendor/workspace-mcp/context.d.ts +89 -0
  42. package/vendor/workspace-mcp/context.js +1840 -0
  43. package/vendor/workspace-mcp/context.js.map +1 -0
  44. package/vendor/workspace-mcp/index.d.ts +5 -0
  45. package/vendor/workspace-mcp/index.js +4 -0
  46. package/vendor/workspace-mcp/index.js.map +1 -0
  47. package/vendor/workspace-mcp/runtime-state.d.ts +23 -0
  48. package/vendor/workspace-mcp/runtime-state.js +88 -0
  49. package/vendor/workspace-mcp/runtime-state.js.map +1 -0
  50. package/vendor/workspace-mcp/server.d.ts +17 -0
  51. package/vendor/workspace-mcp/server.js +94 -0
  52. package/vendor/workspace-mcp/server.js.map +1 -0
  53. package/vendor/workspace-mcp/types.d.ts +1527 -0
  54. package/vendor/workspace-mcp/types.js +432 -0
  55. package/vendor/workspace-mcp/types.js.map +1 -0
package/EXTERNAL_ALPHA.md CHANGED
@@ -62,6 +62,9 @@ Generated workspaces receive a root `CLAUDE.md` plus exported `skills/`
62
62
  guidance so the local coding agent sees the combined-web, snapshot-delivery,
63
63
  and `mw.core.site` baseline workflow.
64
64
 
65
+ Generated guidance and MCP wiring can be reconciled later with
66
+ `minutework workspace sync-assets`.
67
+
65
68
  Runtime-only Claude hooks remain excluded from the generated workspace export.
66
69
 
67
70
  ### Local preview and deploy lane
package/README.md CHANGED
@@ -76,6 +76,8 @@ minutework session resume
76
76
  overlapping phantom sessions.
77
77
  - Generated workspaces receive a root `CLAUDE.md` plus exported `skills/`
78
78
  guidance tailored to the combined web and published-site workflow.
79
+ - Managed guidance and MCP wiring can be refreshed later with
80
+ `minutework workspace sync-assets`.
79
81
  - Runtime-only Claude hooks are not exported into the generated workspace.
80
82
 
81
83
  ### Local preview and deploy lane
@@ -7,6 +7,22 @@ surface that fits the request.
7
7
  `tenant-app` is the combined web starter: public site routes at the root plus a
8
8
  private authenticated workspace under `/app`.
9
9
 
10
+ ## Read These First
11
+
12
+ Read these exported skills before making MinuteWork-specific architecture
13
+ decisions from a generated workspace:
14
+
15
+ - `skills/generated-workspace-architecture.md`
16
+ - `skills/runtime-capability-inventory.md`
17
+ - `skills/layering-and-import-modes.md`
18
+ - `skills/capability-gap-reporting.md`
19
+ - `skills/ai-capability-defaults.md` when the request includes drafting,
20
+ generation, or other model-backed UX
21
+ - `skills/shadow-participation-and-guest-threads.md` when the request touches
22
+ external participants, guests, shared collaboration, or claimable users
23
+ - `skills/email-ingress-and-thread-routing.md` when the request touches inboxes,
24
+ aliases, email/SMS/chat routing, or thread-based communication
25
+
10
26
  ## Starter Choice Matrix
11
27
 
12
28
  The shipped product unit is an `app pack`. `tenant-app` and `sidecar` are
@@ -35,6 +51,43 @@ a concrete backend responsibility such as:
35
51
  - internal API endpoint
36
52
  - external system sync
37
53
 
54
+ ## Compose Before Rebuild
55
+
56
+ - Compose shared MinuteWork substrate first: baseline capabilities, runtime
57
+ primitives, reviewed capability skills, app packs, overlays, and hosted
58
+ publication flows.
59
+ - For external collaboration, start from the native substrate: shadow tenant,
60
+ shadow person, guest/shared thread, route, pointer, grant, and explicit
61
+ claim/upgrade.
62
+ - If a need is likely reusable across many tenants, prefer reusable substrate or
63
+ app-pack structure over bespoke tenant-only page logic.
64
+ - Builder usually builds the reusable tenant product once. Future customer
65
+ deliverables such as itineraries, proposals, pages, and generated assets
66
+ should usually be runtime data/content/workflow outputs rendered through that
67
+ product, not fresh app rebuilds.
68
+ - Use schemas, manifests, `mw.core.site`, and flows before adding custom code
69
+ surfaces.
70
+ - If shared substrate is missing today, implement the smallest tenant-local
71
+ extension that can later collapse into a reusable primitive, baseline
72
+ capability, reviewed skill, or app pack.
73
+
74
+ ## AI Capability Defaults
75
+
76
+ - Payload-aware drafting and generation should default to the runtime's existing
77
+ AI capability, not direct browser/provider integrations.
78
+ - When the runtime already provides an AI capability, reuse it before adding
79
+ bespoke model SDK calls in `tenant-app` or `sidecar`.
80
+ - `tenant-app` should collect inputs, review/edit outputs, and call typed
81
+ platform/runtime surfaces; do not put provider credentials or direct
82
+ browser-to-model calls in the web app.
83
+ - Do not add a bespoke AI sidecar for MVP drafting/generation unless you can
84
+ name a concrete gap in the existing runtime AI capability.
85
+ - If runtime AI availability is unclear, inspect the linked runtime/workspace
86
+ context or ask a clarifying question before inventing new AI infrastructure.
87
+ - When AI or workflow touches external participants, inspect runtime, gateway,
88
+ and platform source before inventing a new collaboration or communications
89
+ backend.
90
+
38
91
  ## Public Site Defaults
39
92
 
40
93
  - Treat `mw.core.site` as a runtime baseline capability that already exists. Do
@@ -58,6 +111,13 @@ a concrete backend responsibility such as:
58
111
  - Public anonymous pages usually belong in `tenant-app` and ship through the hosted public-release path, not a runtime-local sidecar.
59
112
  - Do not use `sidecar` as the default public-site renderer for pricing, docs,
60
113
  blog, or landing pages.
114
+ - Do not invent a separate guest-account or inbox-routing model when the
115
+ existing shadow identity, alias, route, and thread substrate fits.
116
+ - Do not add direct model/provider integrations in `tenant-app` for MVP when
117
+ the runtime should provide the drafting/generation capability.
118
+ - Do not treat each new proposal, itinerary, or customer deliverable as a fresh
119
+ Builder/codegen task when the installed product should render it from runtime
120
+ data/content/workflow.
61
121
  - `sidecar` is internal-first by default.
62
122
 
63
123
  See the files under `skills/` for deeper guidance on schema authoring,
@@ -8,8 +8,22 @@ for developer-local export. Skills are shared across all engine renderers.
8
8
  They should describe the shipped authoring model external workspaces actually
9
9
  receive:
10
10
 
11
+ - Builder should compose shared substrate before generating bespoke tenant code
11
12
  - `tenant-app` is the combined public plus private web starter
12
13
  - `mw.core.site` is a runtime baseline capability
13
14
  - public authoring is runtime/CMS-backed
14
15
  - anonymous live delivery should prefer published snapshots
16
+ - AI drafting/generation should reuse existing runtime AI capability before new
17
+ model/provider integrations
15
18
  - tenant-specific extensions belong in adjacent schemas or extension packs
19
+ - per-customer deliverables usually come from runtime content/workflow, not a
20
+ fresh product rebuild
21
+
22
+ Generated-workspace-first guidance should live here, especially:
23
+
24
+ - `generated-workspace-architecture.md`
25
+ - `runtime-capability-inventory.md`
26
+ - `layering-and-import-modes.md`
27
+ - `capability-gap-reporting.md`
28
+ - `shadow-participation-and-guest-threads.md`
29
+ - `email-ingress-and-thread-routing.md`
@@ -0,0 +1,21 @@
1
+ # AI Capability Defaults
2
+
3
+ Use this skill when the request includes AI-assisted drafting, proposal
4
+ generation, itinerary generation, content generation, or structured-output UX.
5
+
6
+ - Payload-aware AI belongs in the tenant runtime, not browser-direct provider
7
+ integrations.
8
+ - Default to the existing runtime AI capability when it is available.
9
+ - `tenant-app` should gather inputs, invoke typed platform/runtime surfaces, and
10
+ display or edit outputs; do not embed provider credentials or direct
11
+ browser-to-model calls in the web app for MVP.
12
+ - Do not create a bespoke `sidecar` for drafting/generation unless the existing
13
+ runtime AI capability has a concrete gap or there is another backend-only
14
+ requirement.
15
+ - Start with `minutework_capability_inventory` and the generated workspace
16
+ capability guidance before assuming runtime AI capability is present,
17
+ missing, or unsupported.
18
+ - If runtime AI availability is unclear, inspect the linked runtime/workspace
19
+ context or ask a clarifying question before inventing new AI infrastructure.
20
+ - Save drafts and generated outputs as runtime-owned data/content/workflow state
21
+ and publish them through the normal published-web or app flows.
@@ -2,11 +2,27 @@
2
2
 
3
3
  An `app pack` is the shipped product unit.
4
4
 
5
+ - Compose shared MinuteWork substrate first: baseline capabilities, runtime
6
+ primitives, reviewed capability skills, app packs, overlays, and hosted
7
+ publication flows.
5
8
  - Start with declarative schema/manifests and add code surfaces only when needed.
6
9
  - Use `tenant-app` for the combined public-site plus private-app web surface.
7
10
  - Use `sidecar` for internal APIs, workers, integrations, or Python-heavy compute.
8
11
  - Treat `mw.core.site` as a runtime baseline capability and compose against it
9
12
  instead of trying to install it from the workspace.
13
+ - Reuse existing runtime AI capabilities before adding direct model/provider
14
+ integrations in `tenant-app` or `sidecar`.
15
+ - For AI-assisted drafting MVPs, let `tenant-app` collect/edit inputs and
16
+ outputs while an existing runtime AI capability produces the draft when
17
+ available; ask or inspect context if that availability is unclear.
10
18
  - Public-site authoring should stay CMS/runtime-backed, while anonymous live
11
19
  delivery should prefer published snapshots.
20
+ - Builder usually builds the reusable tenant product once. Per-customer
21
+ deliverables such as itineraries, proposals, pages, and generated assets
22
+ should usually come from runtime data/content/workflows, not fresh rebuilds.
23
+ - If a need is likely reusable across many tenants, prefer reusable substrate or
24
+ app-pack structure over bespoke tenant-only page logic.
25
+ - If shared substrate is missing today, implement the smallest tenant-local
26
+ extension that can later collapse into a reusable primitive, baseline
27
+ capability, reviewed skill, or app pack.
12
28
  - Keep platform-owned runtime source untouched; author only workspace-local generated source.
@@ -0,0 +1,26 @@
1
+ # Capability Gap Reporting
2
+
3
+ Use this skill when a generated workspace discovers that the requested
4
+ implementation does not cleanly fit current MinuteWork substrate.
5
+
6
+ - Record architecture gaps in `.minutework/runtime/capability-gap-report.json`.
7
+ - Keep the report sanitized and tenant-safe. Do not include secrets, raw
8
+ prompts, private provider responses, or full payload copies.
9
+ - Use the `MinuteWorkCapabilityGapReportV1` shape:
10
+ - `version`
11
+ - `generatedAt`
12
+ - `updatedAt`
13
+ - `gaps`
14
+ - Each gap should include:
15
+ - `gapId`
16
+ - `title`
17
+ - `layer` one of `baseline_capability`, `runtime_primitive`,
18
+ `reviewed_skill`, `app_pack`, `overlay_only`, `attached_app`
19
+ - `currentWorkaround`
20
+ - `whyCurrentStateViolatesArchitecture`
21
+ - `suggestedSharedSubstrate`
22
+ - `evidence`
23
+ - `reusability` as `tenantLocalOnly` or `likelyReusable`
24
+ - Prefer one concrete gap per missing shared capability.
25
+ - Use gap reports to tell humans where MinuteWork needs new substrate. Do not
26
+ treat them as automatic implementation instructions.
@@ -0,0 +1,36 @@
1
+ # Email Ingress And Thread Routing
2
+
3
+ Use this skill when the product touches inboxes, aliases, email-driven
4
+ workflows, guest chat, or thread-based communication with external parties.
5
+
6
+ - Email alias ingress belongs to platform and gateway routing, not to bespoke
7
+ browser code in `tenant-app`.
8
+ - External identities should normalize into stable routing keys such as email or
9
+ phone identity records before thread participation is resolved.
10
+ - Alias routing should resolve or create the right shadow tenant and shadow
11
+ person, then attach or reuse the correct thread route.
12
+ - Runtime should own the tenant payload that results from the message:
13
+ inbound email records, thread posts, workflow state, drafts, and follow-up
14
+ tasks.
15
+ - Builder products should hang communication features off channels, threads,
16
+ runtime communication, and workflow primitives rather than inventing a second
17
+ communications backend.
18
+ - A thread-first communication model is preferred: inbound alias -> route ->
19
+ shadow identity -> thread -> runtime payload.
20
+ - Outbound reply should be modeled as runtime communication and workflow, not as
21
+ direct browser-to-provider logic.
22
+ - If the product later offers live guest participation, keep the same thread as
23
+ the collaboration anchor instead of splitting email and chat into unrelated
24
+ systems.
25
+ - Some provider-specific or polished reply UX may still be partial. Inspect
26
+ source before claiming a turnkey capability exists.
27
+
28
+ Useful inspection points when source is available:
29
+
30
+ - `apps/mwv3-platform-dj/apps/gateway_api/views.py`
31
+ - `apps/mwv3-platform-dj/apps/gateway_api/services.py`
32
+ - `apps/mwv3-platform-dj/apps/channels/services.py`
33
+ - `apps/mwv3-runtime-dj/apps/runtime_agents/services.py`
34
+ - `apps/mwv3-runtime-dj/apps/runtime_communication/services.py`
35
+ - `reference/mwv3-dj6-docs/agent_mediated_external_workflows.md`
36
+ - `reference/mwv3-dj6-docs/email_connector_wave1_audit.md`
@@ -0,0 +1,55 @@
1
+ # Generated Workspace Architecture
2
+
3
+ Use this skill when reasoning from a CLI-generated Builder workspace rather than
4
+ the monorepo or a live tenant runtime.
5
+
6
+ - A generated workspace is a developer-local authoring client of MinuteWork, not
7
+ the runtime itself.
8
+ - Treat these as separate surfaces with different trust boundaries:
9
+ - developer-local broker/orchestrator (`minutework session ...`)
10
+ - runtime-local Builder host inside the tenant runtime
11
+ - runtime-local non-coding assistant inside the tenant product
12
+ - The clearest layering model is:
13
+ - base image and baseline capabilities
14
+ - app packs
15
+ - skills
16
+ - tenant overlays
17
+ - `tenant-app` and optional `sidecar` are implementation surfaces inside the
18
+ tenant product, not the whole architecture.
19
+ - `tenant-app` is the combined public plus private web starter.
20
+ - External collaboration is a first-class system pattern. Do not treat guest
21
+ participants, inbound aliases, or shared threads as ad hoc product features.
22
+ - `mw.core.site` is a runtime baseline capability; public site authoring should
23
+ compose against it rather than rebuilding CMS plumbing.
24
+ - Shadow tenants and shadow people are identity-first collaboration records in
25
+ Core. They do not imply a provisioned runtime and they should remain cheap to
26
+ create, route, and upgrade later.
27
+ - Guest or shared thread participation is the normal collaboration shape before
28
+ claim or upgrade. Prefer thread, route, pointer, and grant composition over a
29
+ separate bespoke guest model.
30
+ - Runtime should stay ontology-aware, not ontology-authoritative. Shared
31
+ entities should usually be referenced by stable URNs and promoted explicitly
32
+ instead of duplicated into a tenant-local graph by default.
33
+ - Prefer the highest layer that solves the problem. Start from existing
34
+ capability/configuration before creating new app-pack or code surfaces.
35
+ - Build the reusable tenant product once. Per-customer deliverables such as
36
+ itineraries, proposals, pages, and generated assets should usually come from
37
+ runtime data/content/workflow, not fresh product rebuilds.
38
+ - Current external alpha constraints matter:
39
+ - local authoring supports `tenant-app`, `sidecar`, or both
40
+ - hosted deploy is preview-first
41
+ - live public delivery and sidecar/runtime-backed deploys are not implied from
42
+ the current external lane
43
+ - Use workspace MCP and the generated capability inventory before assuming that
44
+ a live runtime surface already exists.
45
+ - If runtime, platform, or gateway source trees are available on disk, use them
46
+ as the primary source for implemented capability discovery. Use MCP/context
47
+ first for generated-workspace truth, not for total system truth.
48
+ - In hosted VM images, those source roots are often available under:
49
+ - `/opt/minutework/apps/mwv3-runtime-dj`
50
+ - `/opt/minutework/apps/mwv3-platform-dj`
51
+ - `/opt/minutework/apps/mwv3-platform-dj/apps/gateway_api`
52
+ - `/opt/minutework/runtime/builder`
53
+ - When requests touch external participants, inboxes, aliases, guest chat,
54
+ shared collaboration, or claimable users, read the shadow participation and
55
+ email routing skills before choosing surfaces.
@@ -0,0 +1,28 @@
1
+ # Layering And Import Modes
2
+
3
+ Use this skill when choosing between configuration, app-pack changes, overlays,
4
+ `attached_app`, or OSS intake.
5
+
6
+ - Prefer the highest layer that solves the request:
7
+ - configure an existing capability, skill, or baseline substrate first
8
+ - then durable app-pack/schema/flow changes
9
+ - overlays for tenant-specific, fast-moving prompts, views, and policy
10
+ - Durable tenant behavior should usually compile to governed app-pack artifacts,
11
+ not ad hoc backend code.
12
+ - Use `attached_app` when a mature foreign system should remain its own
13
+ subsystem and MinuteWork should compile a governed control surface around it.
14
+ - Use `external_repo_intake` only when no reviewed capability skill or cleaner
15
+ `attached_app` path fits. Any repo intake must stay inside the bounded Builder
16
+ sandbox.
17
+ - Never treat cloned OSS code, reviewed capability skills, or attached systems
18
+ as direct runtime install contracts.
19
+ - `catalog_native` is the preferred fast path for reusable solutions that can
20
+ compile directly to standard MinuteWork artifacts.
21
+ - For generated workspaces, keep the decision order explicit:
22
+ - reuse what already exists
23
+ - extend app-pack/schema/flow surfaces
24
+ - add tenant-only overlays where appropriate
25
+ - reach for `attached_app` when a foreign subsystem should stay foreign
26
+ - use repo intake last
27
+ - If the same workaround appears across early tenants, report it as likely
28
+ reusable shared substrate instead of normalizing bespoke fixes.
@@ -4,5 +4,20 @@ Use ontology mappings when local app data needs shared identifiers or shared
4
4
  meaning.
5
5
 
6
6
  - Prefer stable shared references and URNs over duplicating shared entities.
7
- - Keep local app schema ownership clear even when mapping into shared ontology concepts.
7
+ - Runtime should remain ontology-aware, not ontology-authoritative.
8
+ - Keep local app schema ownership clear even when mapping into shared ontology
9
+ concepts.
10
+ - High-variance tenant data should usually stay runtime-local until explicit
11
+ promotion makes sense.
12
+ - Use overlays when tenant-specific fields need to hang off shared entities
13
+ without mutating the shared ontology baseline directly.
14
+ - Promotion should be explicit and reviewable. Treat shared facts, matches, and
15
+ canonical upgrades as a visible workflow, not a hidden side effect.
16
+ - Use stable URN anchors for travelers, vendors, locations, contacts, and other
17
+ shared entities before inventing parallel local identifiers.
8
18
  - Make mappings explicit and reviewable rather than burying them in app code.
19
+
20
+ Useful inspection points when source is available:
21
+
22
+ - `reference/mwv3-dj6-docs/runtime_ontology_contract.md`
23
+ - `reference/mwv3-dj6-docs/core_ontology_and_runtime_overlays.md`
@@ -0,0 +1,46 @@
1
+ # Runtime Capability Inventory
2
+
3
+ Use this skill when you need to answer "what does runtime already have?" from a
4
+ generated Builder workspace.
5
+
6
+ - Start with `minutework_capability_inventory` when available. It is the
7
+ truthful summary of what the generated workspace can know today.
8
+ - Use capability inventory as the primary source for generated-workspace truth,
9
+ not as the universal source of truth for the whole system.
10
+ - The generated-workspace inventory is intentionally limited to:
11
+ - compile graph and schema artifact state
12
+ - enabled starters and local sandbox surfaces
13
+ - auth, link, and preview deploy context
14
+ - gap report contract and current file state
15
+ - explicit unknowns and blind spots
16
+ - If runtime, platform, or gateway source trees are available on disk, inspect
17
+ those directly for implemented capability inventory. That is usually more
18
+ authoritative than MCP for "does the system really implement X?" questions.
19
+ - If source trees are available, inspect them in this order:
20
+ - runtime for implemented tenant-local capability
21
+ - gateway for exposed contracts and routing seams
22
+ - platform for canonical ownership, shared substrate, and control-plane rules
23
+ - In hosted VM images, those roots are commonly:
24
+ - `/opt/minutework/apps/mwv3-runtime-dj`
25
+ - `/opt/minutework/apps/mwv3-platform-dj/apps/gateway_api`
26
+ - `/opt/minutework/apps/mwv3-platform-dj`
27
+ - Do not present the generated-workspace inventory as a full live runtime
28
+ descriptor.
29
+ - Unknowns such as installed runtime app packs, live runtime descriptor state,
30
+ or provider-specific runtime AI readiness should stay unknown unless a linked
31
+ runtime surface exposes them.
32
+ - Use the more specific workspace MCP tools as needed:
33
+ - `minutework_workspace_snapshot`
34
+ - `minutework_schema_status`
35
+ - `minutework_local_runtime_status`
36
+ - `minutework_deploy_status`
37
+ - `minutework_workspace_doctor`
38
+ - If a feature depends on a runtime capability that remains unknown, either:
39
+ - inspect runtime/platform/gateway source trees directly when available
40
+ - inspect a linked runtime-capability surface when available
41
+ - ask a clarifying question
42
+ - or record a capability gap instead of inventing new substrate blindly
43
+ - Collaboration, shadow identity, alias ingress, ontology ownership, and
44
+ thread-routing questions are usually implemented-system questions. Prefer
45
+ source inspection over MCP-only inference for those.
46
+ - The gap report contract lives at `.minutework/runtime/capability-gap-report.json`.
@@ -0,0 +1,33 @@
1
+ # Shadow Participation And Guest Threads
2
+
3
+ Use this skill when a product feature involves external people who may not have
4
+ their own runtime yet.
5
+
6
+ - A shadow tenant is identity-first in Core. It can exist before runtime claim,
7
+ before provisioning, and before a full customer conversion.
8
+ - A shadow person is the external person anchor associated with that shadow
9
+ tenant. Treat it as a stable participation record, not a disposable invite.
10
+ - Guest or shared thread participation is the default collaboration shape for
11
+ pre-claim external users.
12
+ - The source runtime remains the canonical owner of private payload until an
13
+ explicit claim, transfer, or upgrade flow says otherwise.
14
+ - Core should hold pointers, grants, routing records, and participation state;
15
+ do not copy private runtime payload into shadow tenants by default.
16
+ - Builder should compose on top of existing collaboration substrate first:
17
+ external identity, shadow tenant, shadow person, channel route, guest/shared
18
+ thread, explicit claim or upgrade.
19
+ - Do not invent a parallel guest-account, invite-only, or shared-inbox model
20
+ when the existing thread and route substrate already fits.
21
+ - When collaboration later deepens, model upgrade as an explicit runtime claim
22
+ or provisioning step, not as a silent mutation of the existing guest record.
23
+ - If the needed collaboration primitive does not exist, report a capability gap
24
+ instead of inventing tenant-local substrate blindly.
25
+
26
+ Useful inspection points when source is available:
27
+
28
+ - `reference/mwv3-dj6-docs/shadow_participation_and_runtime_upgrade.md`
29
+ - `reference/mwv3-dj6-docs/federation_model.md`
30
+ - `reference/mwv3-dj6-docs/architecture_charter.md`
31
+ - `apps/mwv3-platform-dj/apps/channels/services.py`
32
+ - `apps/mwv3-platform-dj/apps/identity/services.py`
33
+ - `apps/mwv3-platform-dj/apps/threads/models.py`
@@ -7,6 +7,10 @@ belong in `tenant-app`.
7
7
  - Keep browser auth and tenant-facing login flows in `tenant-app`, not here.
8
8
  - Keep public-site rendering for pricing, docs, blog, and landing pages in
9
9
  `tenant-app`, not here.
10
+ - Do not create a sidecar just to host a new model/provider integration for
11
+ drafting or generation when the runtime already provides that AI capability.
12
+ - For MVP, add AI logic here only when you can name a concrete runtime
13
+ capability gap or another backend-only requirement.
10
14
  - Do not use sidecar routes as the default anonymous live delivery path when
11
15
  published snapshots or hosted public delivery are the intended contract.
12
16
  - Treat the sidecar as internal-first by default.
package/dist/cli.js CHANGED
File without changes
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- import { runWorkspaceMcpCli } from "@minutework/workspace-mcp";
2
+ import { runWorkspaceMcpCli } from "../vendor/workspace-mcp/index.js";
3
3
  import { runAgentCommand } from "./agent.js";
4
4
  import { runEnvUseCommand, runLinkCommand, runLoginCommand, } from "./auth.js";
5
5
  import { runCodegenCommand, runCompileCommand, runValidateCommand } from "./compile.js";
@@ -11,6 +11,7 @@ import { runSessionCommand } from "./orchestrator.js";
11
11
  import { createCapturedIo, maybeAutoReportCliFailure, runReportBugCommand, } from "./reporting.js";
12
12
  import { runDevCommand, runSandboxCommand, runTestCommand, } from "./sandbox.js";
13
13
  import { runTokensCommand } from "./tokens.js";
14
+ import { runWorkspaceCommand } from "./workspace.js";
14
15
  export async function runCli(argv, options = {}, io = defaultIo) {
15
16
  const cwd = options.cwd ?? process.cwd();
16
17
  const env = options.env ?? process.env;
@@ -99,6 +100,14 @@ export async function runCli(argv, options = {}, io = defaultIo) {
99
100
  platform,
100
101
  });
101
102
  }
103
+ else if (command === "workspace") {
104
+ exitCode = await runWorkspaceCommand({
105
+ args: rest,
106
+ cwd,
107
+ io: capturedIo.io,
108
+ platform,
109
+ });
110
+ }
102
111
  else if (command === "validate") {
103
112
  exitCode = await runValidateCommand({
104
113
  args: rest,
@@ -309,6 +318,7 @@ Usage:
309
318
  minutework agent stop
310
319
  minutework env use
311
320
  minutework tokens
321
+ minutework workspace sync-assets [workspace] [--workspace <path>] [--check] [--force]
312
322
  minutework mcp
313
323
  minutework report-bug
314
324
 
@@ -327,6 +337,7 @@ Wave 2 status:
327
337
  agent Attach/resume/status/stop available
328
338
  env use Available
329
339
  tokens Available
340
+ workspace Managed asset sync available
330
341
  mcp Available
331
342
  report-bug Available
332
343
 
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAA0B,MAAM,YAAY,CAAC;AACrE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,eAAe,GAGhB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAA2B,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAqB,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAiC,MAAM,mBAAmB,CAAC;AACrF,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,GAEpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,GAEf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAA2B,MAAM,aAAa,CAAC;AA2BxE,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,IAAc,EACd,UAAyB,EAAE,EAC3B,KAAY,SAAS;IAErB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,MAAM,QAA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CAAC;AAED,SAAS,cAAc,CAAC,QAAkD;IACxE,MAAM,QAAQ,GAAG;QACf,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;QACxC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;KACpC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC;AAC3E,CAAC;AAED,SAAS,UAAU;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CR,CAAC;AACF,CAAC;AAED,SAAS,cAAc;IACrB,OAAO;;;;;;;;;;;;;;;;;;;CAmBR,CAAC;AACF,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,0BAA0B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChG,CAAC;AAED,MAAM,SAAS,GAAU;IACvB,MAAM,CAAC,OAAO;QACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACvC,CAAC;IACD,MAAM,CAAC,OAAO;QACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACvC,CAAC;CACF,CAAC"}
package/dist/init.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { promises as fs } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
+ import { materializeManagedWorkspaceAssets } from "./workspace-assets.js";
4
5
  const ROOT_ENV_EXAMPLE = `# Optional repo-local MinuteWork CLI overrides.
5
6
  # The local platform URL is wired automatically inside a MinuteWork workspace.
6
7
  # Starter-local runtime variables stay inside tenant-app/.env.example and sidecar/.env.example.
@@ -98,7 +99,10 @@ export async function runInit(options) {
98
99
  fs.mkdir(path.join(targetDirectory, ".minutework"), { recursive: true }),
99
100
  ]);
100
101
  await writeBaseWorkspace(targetDirectory, workspaceSlug, options.starters);
101
- await materializeBuilderBundle(targetDirectory);
102
+ await materializeManagedWorkspaceAssets({
103
+ moduleUrl: import.meta.url,
104
+ targetDirectory,
105
+ });
102
106
  if (options.starters.tenantApp) {
103
107
  await materializeStarter(targetDirectory, workspaceSlug, "tenant-app");
104
108
  await writeRootNodeWorkspace(targetDirectory, workspaceSlug, options.starters);
@@ -145,8 +149,6 @@ async function writeBaseWorkspace(targetDirectory, workspaceSlug, starters) {
145
149
  fs.writeFile(path.join(targetDirectory, "minutework.config.ts"), renderMinuteWorkConfig(workspaceSlug, starters), "utf8"),
146
150
  fs.writeFile(path.join(targetDirectory, "schemas", "README.md"), SCHEMA_README, "utf8"),
147
151
  fs.writeFile(path.join(targetDirectory, "schemas", "schema.ts"), renderSchemaSeed(workspaceSlug), "utf8"),
148
- fs.writeFile(path.join(targetDirectory, ".cursor", "mcp.json"), JSON.stringify(renderCursorMcpConfig(), null, 2) + "\n", "utf8"),
149
- fs.writeFile(path.join(targetDirectory, "mcp", "claude-desktop.sample.json"), JSON.stringify(renderClaudeDesktopSample(), null, 2) + "\n", "utf8"),
150
152
  ]);
151
153
  }
152
154
  async function writeRootNodeWorkspace(targetDirectory, workspaceSlug, starters) {
@@ -185,34 +187,6 @@ async function materializeStarter(targetDirectory, workspaceSlug, starterId) {
185
187
  },
186
188
  });
187
189
  }
188
- async function materializeBuilderBundle(targetDirectory) {
189
- const bundleRoot = await requireBundledBuilderBundleRoot(import.meta.url);
190
- const manifestPath = path.join(bundleRoot, "bundle.json");
191
- const manifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
192
- const templatePath = path.join(bundleRoot, manifest.render.template);
193
- const renderedClaudeMd = await fs.readFile(templatePath, "utf8");
194
- await fs.writeFile(path.join(targetDirectory, manifest.render.output), renderedClaudeMd, "utf8");
195
- const skillsSourceRoot = path.join(bundleRoot, manifest.directories.skills);
196
- const skillsStats = await fs.stat(skillsSourceRoot).catch((error) => {
197
- if (error.code === "ENOENT") {
198
- return null;
199
- }
200
- throw error;
201
- });
202
- if (!skillsStats?.isDirectory()) {
203
- return;
204
- }
205
- await copyDirectory({
206
- destinationRoot: path.join(targetDirectory, manifest.directories.skills),
207
- sourceRoot: skillsSourceRoot,
208
- shouldSkip() {
209
- return false;
210
- },
211
- transformFile(_relativePath, content) {
212
- return content;
213
- },
214
- });
215
- }
216
190
  async function copyDirectory(options) {
217
191
  await fs.mkdir(options.destinationRoot, { recursive: true });
218
192
  await walkAndCopy(options, "");
@@ -339,26 +313,6 @@ export const schema = defineSchema({
339
313
  } as const);
340
314
  `;
341
315
  }
342
- function renderCursorMcpConfig() {
343
- return {
344
- mcpServers: {
345
- minutework: {
346
- command: "npx",
347
- args: ["-y", "minutework", "mcp"],
348
- },
349
- },
350
- };
351
- }
352
- function renderClaudeDesktopSample() {
353
- return {
354
- mcpServers: {
355
- minutework: {
356
- command: "npx",
357
- args: ["-y", "minutework", "mcp"],
358
- },
359
- },
360
- };
361
- }
362
316
  function renderRootPackageJson(workspaceSlug, starters) {
363
317
  const scripts = {
364
318
  "dev:tenant-app": "pnpm --dir tenant-app dev",
@@ -395,19 +349,6 @@ async function requireBundledStarterTemplateRoot(moduleUrl, starterId) {
395
349
  }
396
350
  return templateRoot;
397
351
  }
398
- async function requireBundledBuilderBundleRoot(moduleUrl) {
399
- const bundleRoot = resolveBundledBuilderBundleRoot(moduleUrl);
400
- const stats = await fs.stat(bundleRoot).catch((error) => {
401
- if (error.code === "ENOENT") {
402
- return null;
403
- }
404
- throw error;
405
- });
406
- if (!stats?.isDirectory()) {
407
- throw new Error(`Bundled Builder assets are missing at ${bundleRoot}. Run the CLI asset sync/build step before using "minutework init".`);
408
- }
409
- return bundleRoot;
410
- }
411
352
  function hasSkippedBasename(relativePath, basenames) {
412
353
  return basenames.includes(path.basename(relativePath));
413
354
  }