mpup 0.1.0__tar.gz

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 (62) hide show
  1. mpup-0.1.0/.agents/skills/.openspec-target +1 -0
  2. mpup-0.1.0/.agents/skills/openspec-apply-change/SKILL.md +188 -0
  3. mpup-0.1.0/.agents/skills/openspec-archive-change/SKILL.md +182 -0
  4. mpup-0.1.0/.agents/skills/openspec-explore/SKILL.md +311 -0
  5. mpup-0.1.0/.agents/skills/openspec-propose/SKILL.md +149 -0
  6. mpup-0.1.0/.agents/skills/openspec-sync-specs/SKILL.md +262 -0
  7. mpup-0.1.0/.agents/skills/openspec-update-change/SKILL.md +91 -0
  8. mpup-0.1.0/.gitignore +22 -0
  9. mpup-0.1.0/PKG-INFO +135 -0
  10. mpup-0.1.0/README.md +126 -0
  11. mpup-0.1.0/assets/background.png +0 -0
  12. mpup-0.1.0/assets/bg-cfg.json +59 -0
  13. mpup-0.1.0/docs/remotion-v2-baseline.md +40 -0
  14. mpup-0.1.0/pyproject.toml +20 -0
  15. mpup-0.1.0/renderer/package-lock.json +3888 -0
  16. mpup-0.1.0/renderer/package.json +34 -0
  17. mpup-0.1.0/renderer/render-batch.mjs +87 -0
  18. mpup-0.1.0/renderer/src/env.d.ts +1 -0
  19. mpup-0.1.0/renderer/src/index.ts +5 -0
  20. mpup-0.1.0/renderer/src/root.tsx +36 -0
  21. mpup-0.1.0/renderer/src/song-video.tsx +283 -0
  22. mpup-0.1.0/renderer/src/visuals.ts +131 -0
  23. mpup-0.1.0/renderer/tests/composition.test.ts +64 -0
  24. mpup-0.1.0/renderer/tests/fixtures/render-job.json +19 -0
  25. mpup-0.1.0/renderer/tests/render-batch.test.mjs +81 -0
  26. mpup-0.1.0/renderer/tests/visuals.test.ts +73 -0
  27. mpup-0.1.0/renderer/tsconfig.json +15 -0
  28. mpup-0.1.0/src/mpup/__init__.py +3 -0
  29. mpup-0.1.0/src/mpup/__main__.py +5 -0
  30. mpup-0.1.0/src/mpup/background.py +122 -0
  31. mpup-0.1.0/src/mpup/cli.py +159 -0
  32. mpup-0.1.0/src/mpup/config.py +187 -0
  33. mpup-0.1.0/src/mpup/cover.py +244 -0
  34. mpup-0.1.0/src/mpup/discovery.py +33 -0
  35. mpup-0.1.0/src/mpup/enriched_audio.py +147 -0
  36. mpup-0.1.0/src/mpup/itunes.py +112 -0
  37. mpup-0.1.0/src/mpup/lyrics.py +190 -0
  38. mpup-0.1.0/src/mpup/lyrics_from_qq.py +46 -0
  39. mpup-0.1.0/src/mpup/metadata.py +159 -0
  40. mpup-0.1.0/src/mpup/pipeline.py +305 -0
  41. mpup-0.1.0/src/mpup/remotion_bridge.py +130 -0
  42. mpup-0.1.0/src/mpup/render_job.py +118 -0
  43. mpup-0.1.0/src/mpup/video.py +160 -0
  44. mpup-0.1.0/src/mpup/workspace.py +92 -0
  45. mpup-0.1.0/tests/__init__.py +1 -0
  46. mpup-0.1.0/tests/test_background.py +121 -0
  47. mpup-0.1.0/tests/test_cli.py +324 -0
  48. mpup-0.1.0/tests/test_config.py +132 -0
  49. mpup-0.1.0/tests/test_cover.py +254 -0
  50. mpup-0.1.0/tests/test_discovery.py +51 -0
  51. mpup-0.1.0/tests/test_enriched_audio.py +111 -0
  52. mpup-0.1.0/tests/test_integration.py +117 -0
  53. mpup-0.1.0/tests/test_itunes.py +116 -0
  54. mpup-0.1.0/tests/test_lyrics.py +223 -0
  55. mpup-0.1.0/tests/test_metadata.py +244 -0
  56. mpup-0.1.0/tests/test_pipeline.py +400 -0
  57. mpup-0.1.0/tests/test_remotion_bridge.py +128 -0
  58. mpup-0.1.0/tests/test_render_job.py +50 -0
  59. mpup-0.1.0/tests/test_v2_integration.py +178 -0
  60. mpup-0.1.0/tests/test_video.py +140 -0
  61. mpup-0.1.0/tests/test_workspace.py +93 -0
  62. mpup-0.1.0/uv.lock +124 -0
@@ -0,0 +1 @@
1
+ codex
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: openspec-apply-change
3
+ description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
4
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ generatedBy: "1.11.0"
11
+ ---
12
+
13
+ Implement tasks from an OpenSpec change.
14
+
15
+ **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
16
+
17
+ **Input**: Optionally specify a change name (e.g., `$openspec-apply-change (Codex) or /openspec-apply-change (other agents) add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
18
+
19
+ **Steps**
20
+
21
+ 1. **Select the change**
22
+
23
+ If a name is provided, use it. Otherwise:
24
+ - Infer from conversation context if the user mentioned a change
25
+ - Auto-select if only one active change exists
26
+ - If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
27
+
28
+ Always announce: "Using change: <name>" and how to override (e.g., `$openspec-apply-change (Codex) or /openspec-apply-change (other agents) <other>`).
29
+
30
+ 2. **Check status to understand the schema**
31
+ ```bash
32
+ openspec status --change "<name>" --json
33
+ ```
34
+ Parse the JSON to understand:
35
+ - `schemaName`: The workflow being used (e.g., "spec-driven")
36
+ - `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
37
+ - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
38
+
39
+ 3. **Get apply instructions**
40
+
41
+ ```bash
42
+ openspec instructions apply --change "<name>" --json
43
+ ```
44
+
45
+ This returns:
46
+ - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
47
+ - Progress (total, complete, remaining)
48
+ - Task list with status
49
+ - Dynamic instruction based on current state
50
+ - Optional `context`: current required project instruction input from the selected root
51
+ - Optional `operationGuidance`: current advisory guidance for apply
52
+
53
+ **Handle states:**
54
+ - If `state: "blocked"` (missing artifacts): show message, suggest using `$openspec-continue-change (Codex) or /openspec-continue-change (other agents)` (if it is not installed, run `openspec status --change "<name>" --json` to see the next artifact and `openspec instructions <artifact-id> --change "<name>" --json` for how to create it)
55
+ - If `state: "all_done"`: congratulate, suggest archive
56
+ - Otherwise: proceed to implementation
57
+
58
+ Treat `context` as a required prompt-level input. Read and consider it, and
59
+ apply relevant project facts, conventions, and constraints while implementing.
60
+ Treat `operationGuidance` as optional additive advice. Read and consider every
61
+ entry, and follow entries that are applicable and compatible with the built-in
62
+ workflow.
63
+
64
+ Keep both fields separate from CLI-returned state, missing artifacts, tasks,
65
+ progress, `contextFiles`, and the built-in `instruction`. They are not
66
+ evidence of task completion, do not replace the built-in instruction, and do
67
+ not permit bypassing a blocked state. If context conflicts with the built-in
68
+ instruction, an explicit user choice, or a CLI-controlled value, report the
69
+ conflict and preserve the controlling value. If guidance is inapplicable or
70
+ conflicts with those controlling inputs, do not follow it and explain why.
71
+ These are prompt-level behavior contracts, not enforceable checks.
72
+
73
+ 4. **Read context files**
74
+
75
+ Read every file path listed under `contextFiles` from the apply instructions output.
76
+ The files depend on the schema being used:
77
+ - **spec-driven**: proposal, specs, design, tasks
78
+ - Other schemas: follow the contextFiles from CLI output
79
+
80
+ Do not copy `context` or `operationGuidance` verbatim into implementation
81
+ files or planning artifacts unless the user separately asks for that content.
82
+
83
+ 5. **Show current progress**
84
+
85
+ Display:
86
+ - Schema being used
87
+ - Progress: "N/M tasks complete"
88
+ - Remaining tasks overview
89
+ - Dynamic instruction from CLI
90
+
91
+ 6. **Implement tasks (loop until done or blocked)**
92
+
93
+ For each pending task:
94
+ - Show which task is being worked on
95
+ - Make the code changes required
96
+ - Keep changes minimal and focused
97
+ - Mark task complete in the tasks file: `- [ ]` → `- [x]`
98
+ - Continue to next task
99
+
100
+ **Pause if:**
101
+ - Task is unclear → ask for clarification
102
+ - Implementation reveals a design issue → suggest updating artifacts
103
+ - A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
104
+ - Error or blocker encountered → report and wait for guidance
105
+ - User interrupts
106
+
107
+ 7. **On completion or pause, show status**
108
+
109
+ Display:
110
+ - Tasks completed this session
111
+ - Overall progress: "N/M tasks complete"
112
+ - If all done: suggest archive
113
+ - If paused: explain why and wait for guidance
114
+
115
+ **Output During Implementation**
116
+
117
+ ```
118
+ ## Implementing: <change-name> (schema: <schema-name>)
119
+
120
+ Working on task 3/7: <task description>
121
+ [...implementation happening...]
122
+ ✓ Task complete
123
+
124
+ Working on task 4/7: <task description>
125
+ [...implementation happening...]
126
+ ✓ Task complete
127
+ ```
128
+
129
+ **Output On Completion**
130
+
131
+ ```
132
+ ## Implementation Complete
133
+
134
+ **Change:** <change-name>
135
+ **Schema:** <schema-name>
136
+ **Progress:** 7/7 tasks complete ✓
137
+
138
+ ### Completed This Session
139
+ - [x] Task 1
140
+ - [x] Task 2
141
+ ...
142
+
143
+ All tasks complete! You can archive this change with `$openspec-archive-change (Codex) or /openspec-archive-change (other agents)`.
144
+ ```
145
+
146
+ **Output On Pause (Issue Encountered)**
147
+
148
+ ```
149
+ ## Implementation Paused
150
+
151
+ **Change:** <change-name>
152
+ **Schema:** <schema-name>
153
+ **Progress:** 4/7 tasks complete
154
+
155
+ ### Issue Encountered
156
+ <description of the issue>
157
+
158
+ **Options:**
159
+ 1. <option 1>
160
+ 2. <option 2>
161
+ 3. Other approach
162
+
163
+ What would you like to do?
164
+ ```
165
+
166
+ **Guardrails**
167
+ - Keep going through tasks until done or blocked
168
+ - Always read context files before starting (from the apply instructions output)
169
+ - If task is ambiguous, pause and ask before implementing
170
+ - If implementation reveals issues, pause and suggest artifact updates
171
+ - Keep code changes minimal and scoped to each task
172
+ - Update task checkbox immediately after completing each task
173
+ - Pause on errors, blockers, or unclear requirements - don't guess
174
+ - When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
175
+ - Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred
176
+ - Use contextFiles from CLI output, don't assume specific file names
177
+ - Do not use context or operation guidance as proof that a task is complete
178
+ - Apply relevant project context; report conflicts with controlling workflow inputs
179
+ - Consider every guidance entry; explain any inapplicable or conflicting advice
180
+ - Do not copy runtime context or operation guidance into implementation files or planning artifacts
181
+ - Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
182
+
183
+ **Fluid Workflow Integration**
184
+
185
+ This skill supports the "actions on a change" model:
186
+
187
+ - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
188
+ - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: openspec-archive-change
3
+ description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
4
+ allowed-tools: Bash(openspec:*)
5
+ license: MIT
6
+ compatibility: Requires openspec CLI.
7
+ metadata:
8
+ author: openspec
9
+ version: "1.0"
10
+ generatedBy: "1.11.0"
11
+ ---
12
+
13
+ Archive a completed change in the experimental workflow.
14
+
15
+ **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
16
+
17
+ `<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
18
+
19
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
20
+
21
+ **Steps**
22
+
23
+ 1. **Select the change**
24
+
25
+ If a name is provided, use it. Otherwise:
26
+ - Infer from conversation context if the user mentioned a change
27
+ - Auto-select if only one active change exists
28
+ - If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
29
+
30
+ When prompting, show only active changes (not already archived).
31
+ Include the schema used for each change if available.
32
+
33
+ Always announce: "Using change: <name>" and how to override (e.g., `$openspec-archive-change (Codex) or /openspec-archive-change (other agents) <other>`).
34
+
35
+ **Load current archive inputs before the existing archive checks:**
36
+
37
+ After resolving the selected change and planning root, run:
38
+ ```bash
39
+ openspec instructions archive --change "<name>" --json
40
+ ```
41
+ Keep the same selected-root flags on this command. This lookup is advisory and
42
+ optional: it only supplies extra prompt inputs, so it must never block archiving.
43
+ If it exits non-zero or returns invalid JSON — for example on an older CLI that
44
+ does not support this command yet — continue the archive workflow with no
45
+ context and no operation guidance. Do not report an error and do not stop.
46
+
47
+ A successful response may omit both optional fields. Treat `context` as a
48
+ required prompt-level input: read and consider it, and apply relevant project
49
+ facts, conventions, and constraints. Treat `operationGuidance` as optional
50
+ additive advice: read and consider every entry, and follow entries that are
51
+ applicable and compatible with the built-in archive workflow.
52
+
53
+ Keep both fields separate from built-in steps, explicit user choices, resolved
54
+ paths, CLI checks, and command contracts. If context conflicts with one of those
55
+ controlling inputs, report the conflict and preserve the controlling value. If
56
+ guidance is inapplicable or conflicts with a controlling input, do not follow it
57
+ and explain why. Do not infer replacement paths, skipped prompts, or flags from
58
+ either field, and do not copy their text verbatim into specs, change artifacts,
59
+ or archive summaries unless the user separately asks for it. These are
60
+ prompt-level behavior contracts, not enforceable checks.
61
+
62
+ 2. **Check artifact completion status**
63
+
64
+ Run `openspec status --change "<name>" --json` to check artifact completion.
65
+
66
+ Parse the JSON to understand:
67
+ - `schemaName`: The workflow being used
68
+ - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
69
+ - `artifacts`: List of artifacts with their status (`done`, `skipped`, or other)
70
+
71
+ **If any artifacts are neither `done` nor `skipped`** (skipped artifacts satisfy the requirement - the change declares skip_specs):
72
+ - Display warning listing incomplete artifacts
73
+ - Ask the user to confirm they want to proceed
74
+ - Proceed if user confirms
75
+
76
+ 3. **Check task completion status**
77
+
78
+ Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
79
+
80
+ Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
81
+
82
+ **If incomplete tasks found:**
83
+ - Display warning showing count of incomplete tasks
84
+ - Ask the user to confirm they want to proceed
85
+ - Proceed if user confirms
86
+
87
+ **If no tasks file exists:** Proceed without task-related warning.
88
+
89
+ 4. **Assess delta spec sync state**
90
+
91
+ Use `artifactPaths.specs.existingOutputPaths` from status JSON as the only
92
+ delta-spec source. If the `specs` entry is missing or
93
+ `existingOutputPaths` is empty, proceed without a sync prompt and do not infer
94
+ delta specs from other artifacts.
95
+
96
+ **If delta specs exist:**
97
+ - Compare each delta spec with its corresponding main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (use the store-aware `planningHome.root` from step 2, not a hardcoded repo path)
98
+ - Determine what changes would be applied (adds, modifications, removals, renames)
99
+ - Show a combined summary before prompting
100
+
101
+ **Prompt options:**
102
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
103
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
104
+
105
+ Route on the answer:
106
+ - "Cancel" — stop, do not archive
107
+ - "Archive without syncing" or "Archive now" — proceed to archive
108
+ - "Sync now" or "Sync anyway" — sync, then verify (below)
109
+ - Anything else — ask again rather than archiving
110
+
111
+ Before a selected sync writes any main spec, run
112
+ `openspec instructions specs --change "<name>" --json` once with the same
113
+ selected-root flags. Require a zero exit status and valid artifact-instruction
114
+ JSON. If the lookup fails or returns invalid JSON, report the error and stop
115
+ before writing any main spec or moving the change. A valid response with omitted
116
+ `rules` is the no-rules case. Apply returned `rules` only to the content and
117
+ form of main specs produced by this merge; do not use them as archive guidance,
118
+ change CLI behavior, or copy the rule text into any output file.
119
+
120
+ Then run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching `specs` instructions again. Do not delegate it to a background task — step 5 would move `changeRoot` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
121
+
122
+ Then re-run the comparison from the top of this step against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
123
+ - ADDED requirements present
124
+ - MODIFIED requirements carrying the scenario and description changes named in the delta, with their other scenarios intact
125
+ - REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving `## Requirements` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
126
+ - RENAMED requirements present under the new name and absent under the old one
127
+
128
+ If the sync failed, or any capability does not match, report what differs and stop — do not archive. Nothing has moved and `changeRoot` is intact, so the user can fix the mismatch or re-run the sync and start the archive again.
129
+
130
+ 5. **Perform the archive**
131
+
132
+ Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
133
+ ```bash
134
+ mkdir -p "<planningHome.changesDir>/archive"
135
+ ```
136
+
137
+ Generate the target name: use the change name as-is when it already starts with a `YYYY-MM-DD-` prefix; otherwise prepend the current date as `YYYY-MM-DD-<change-name>`. Never stack a second date (same rule as `openspec archive`).
138
+
139
+ **Check if target already exists:**
140
+ - If yes: Fail with error, suggest renaming existing archive or using different date
141
+ - If no: Move `changeRoot` to the archive directory
142
+
143
+ ```bash
144
+ mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
145
+ ```
146
+
147
+ 6. **Display summary**
148
+
149
+ Show archive completion summary including:
150
+ - Change name
151
+ - Schema that was used
152
+ - Archive location
153
+ - Whether specs were synced (if applicable)
154
+ - Note about any warnings (incomplete artifacts/tasks)
155
+
156
+ **Output On Success**
157
+
158
+ ```markdown
159
+ ## Archive Complete
160
+
161
+ **Change:** <change-name>
162
+ **Schema:** <schema-name>
163
+ **Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
164
+ **Specs:** <"✓ Synced to main specs" only if the step 4 verification passed; otherwise "No delta specs" or "Sync skipped">
165
+
166
+ <"All artifacts complete. All tasks complete." — or, if archived with warnings, list them instead (e.g. "Archived with 2 incomplete tasks")>
167
+ ```
168
+
169
+ **Guardrails**
170
+ - Announce the selected change; prompt for selection when it is ambiguous
171
+ - Use artifact graph (openspec status --json) for completion checking
172
+ - Don't block archive on warnings - just inform and confirm
173
+ - Preserve .openspec.yaml when moving to archive (it moves with the directory)
174
+ - Show clear summary of what happened
175
+ - If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven)
176
+ - Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving `changeRoot`
177
+ - If delta specs exist, always run the sync assessment and show the combined summary before prompting
178
+ - Apply relevant runtime context and report conflicts; operation guidance remains advisory
179
+ - Consider every guidance entry and explain any inapplicable or conflicting advice
180
+ - Existing CLI checks, resolved paths, prompts, and command contracts are unchanged
181
+ - Artifact rules constrain only the specs being written and are never operation guidance
182
+ - Never copy runtime context, operation guidance, or artifact-rule text verbatim into output files