@sellable/mcp 0.1.141 → 0.1.143

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.
@@ -3,17 +3,15 @@
3
3
  This policy is the invariant layer for the from-scratch v2 orchestrator. Follow
4
4
  it even if prompt prose is ambiguous.
5
5
 
6
- ## 1) JSON State Machine First
6
+ ## 1) Campaign State First
7
7
 
8
- `core/flow.v2.json` is the source of truth for:
8
+ `core/flow.v2.json` defines the stage order and tool gates. CampaignOffer state,
9
+ the watched app, selected source/list state, and campaign-table rows are the
10
+ runtime source of truth.
9
11
 
10
- - stage order
11
- - required artifacts
12
- - produced artifacts
13
- - allowed tools
14
- - forbidden tools
15
- - wait events
16
- - transitions
12
+ Normal create-campaign-v2 runs do not use local markdown/json artifacts as
13
+ required state. Debug artifacts can exist only for explicit debug/UAT or legacy
14
+ validation harnesses, and they must never override live campaign state.
17
15
 
18
16
  `SKILL.md` explains how to execute the flow. It does not replace the flow.
19
17
 
@@ -28,40 +26,37 @@ bootstrap -> brief-interview
28
26
  Do not start at `validate-artifacts` unless resuming a compatibility run where
29
27
  the complete upstream artifact set already exists.
30
28
 
31
- ## 3) No Mutation Before Approval
29
+ ## 3) Shell-First Mutation Gates
32
30
 
33
- Before the user explicitly chooses `approve` at the commit gate, do not call:
31
+ Create the campaign shell early after campaign identity and the initial brief
32
+ are good enough for the customer to watch setup progress. Then enforce these
33
+ mutation gates:
34
34
 
35
- - `create_campaign`
36
- - `save_rubrics`
37
- - `import_leads`
38
- - `confirm_lead_list`
39
- - `update_campaign`
40
- - `queue_cells`
41
- - `start_campaign`
35
+ - Do not call provider search/import tools until the user approves the source
36
+ plan or explicitly chooses a source.
37
+ - Do not call `import_leads` or `confirm_lead_list` until the concrete source
38
+ action is approved.
39
+ - Import/confirm only the first bounded review batch before message approval.
40
+ - Do not call `queue_cells` until filter choice is resolved, rubrics are saved
41
+ when filters are enabled, and the default Use Template path has an approved
42
+ message template/token rule set.
43
+ - Do not attach a sequence or call `start_campaign` until the user explicitly
44
+ chooses to launch.
42
45
 
43
46
  Customer roleplay critique is advisory only. It cannot approve a campaign.
44
47
 
45
- ## 4) Artifact Gates
48
+ ## 4) State Gates
46
49
 
47
- Do not run a downstream stage until the active step's `requiredArtifacts` exist.
48
- Intermediate user-review gates are interrupt-only: auto-continue when an
49
- artifact is confirmed and no strategic tradeoff is present. The final commit
50
- gate is the only mandatory pre-mint approval gate.
50
+ Do not run a downstream stage until the matching live state exists:
51
51
 
52
- The minimum pre-approval chain is:
53
-
54
- ```text
55
- brief.md
56
- lead-review.md
57
- lead-sample.json
58
- lead-filter.md
59
- message-prep.md (optional)
60
- message-candidate-drafts.md (optional, generated from find-leads basis rows)
61
- message-validation.md
62
- approval-packet.md
63
- commit-gate-decision.md
64
- ```
52
+ - campaign shell exists before a watch link is shown as active
53
+ - selected source/list state exists before importing a review batch
54
+ - `workflowTableId` and non-empty bounded review-batch rows exist before filter
55
+ and message branches run
56
+ - `leadScoringRubrics` are saved before queueing ICP filter cells when filters
57
+ are enabled
58
+ - approved message template/token rules are written to campaign brief before
59
+ queueing Generate Message cells on the default Use Template path
65
60
 
66
61
  ## 5) Revision Routing
67
62
 
@@ -73,10 +68,11 @@ Revision choices route back to the exact upstream stage:
73
68
  - `revise-messaging` -> `message-generation`
74
69
  - `abort` -> stop with zero DB mutation
75
70
 
76
- ## 6) Post-Approval Tail
71
+ ## 6) Post-Message Tail
77
72
 
78
- After `approve`, mint atomically with `create_campaign` and `save_rubrics`.
79
- Only then surface the watch link and continue the cascade-driven tail.
73
+ After message approval, queue only the bounded review-batch cells needed to move
74
+ the watched app through enrichment, ICP filtering, and approved-template
75
+ message generation. Keep the tail observable through watch narration.
80
76
 
81
77
  The tail stops at `awaiting-user-greenlight`. Never call `start_campaign`
82
78
  inside the autonomous tail.
@@ -1,110 +1,26 @@
1
- # Draft Lifecycle
1
+ # Legacy Debug Artifact Lifecycle
2
2
 
3
- Phase 84 validates the Phase 83 brief through chained artifacts in one draft
4
- directory:
3
+ Normal `create-campaign-v2` does not use a local draft directory. CampaignOffer
4
+ state, the watched app, selected source/list state, and campaign-table rows are
5
+ the source of truth.
5
6
 
6
- `.sellable/create-campaign-v2/drafts/{workspace-slug}/{campaign-slug}/`
7
+ Use this reference only for explicit debug/UAT work or compatibility validation
8
+ harnesses that intentionally emit local diagnostic artifacts. Do not load it for
9
+ normal customer-facing create-campaign runs.
7
10
 
8
- Required files as the chain advances:
11
+ ## Rules For Debug/UAT Artifacts
9
12
 
10
- ```text
11
- brief.md
12
- lead-review.md
13
- lead-sample.json
14
- lead-filter.md
15
- message-validation.md
16
- rubric.json # optional
17
- ```
13
+ - Treat artifacts as diagnostic copies, not durable campaign state.
14
+ - Never surface local artifact paths to customers unless they explicitly ask for
15
+ debug output.
16
+ - Never resume a live campaign from diagnostic files when CampaignOffer state is
17
+ available.
18
+ - Never let diagnostic files override selected source/list ids, table ids, row
19
+ ids, saved rubrics, approved templates, or watch narration.
20
+ - Keep all customer approvals and product mutations tied to live campaign state.
18
21
 
19
- ## Artifact Roles
22
+ ## Compatibility Boundary
20
23
 
21
- - `brief.md`
22
- - stable Phase 83 thesis
23
- - preserved during validation
24
- - `lead-review.md`
25
- - human-readable analysis of the preview run
26
- - `lead-sample.json`
27
- - machine-readable lead sample for filter and message validation
28
- - `lead-filter.md`
29
- - primary keep/exclude output for the middle step
30
- - owns required keep rules, required exclude rules, sample false positives,
31
- pass-rate judgment, and the final recommendation
32
- - `rubric.json`
33
- - optional implementation sidecar only
34
- - must be derived from `lead-filter.md`, not designed separately
35
- - `message-validation.md`
36
- - final message check against the validated lead set
37
-
38
- ## Serial Step Order
39
-
40
- Run in this order only:
41
-
42
- 1. find leads
43
- 2. filter leads
44
- 3. generate message
45
-
46
- Do not skip ahead unless the required upstream artifacts already exist and are
47
- complete.
48
-
49
- ## Atomic Writes
50
-
51
- Every artifact edit must be written as:
52
-
53
- 1. read the current artifact if it exists
54
- 2. compute the full replacement contents
55
- 3. write `{artifact}.tmp`
56
- 4. rename `{artifact}.tmp` -> `{artifact}`
57
-
58
- If the write fails before rename, the old artifact remains the valid state.
59
-
60
- ## Resume Rules
61
-
62
- - `brief.md` only -> run `find leads`
63
- - `lead-review.md` + `lead-sample.json` present -> run `filter leads` and
64
- `generate message` from the same find-leads basis
65
- - `lead-filter.md` present and `message-validation.md` missing -> run
66
- `generate message`
67
- - `message-validation.md` present and `lead-filter.md` missing -> run
68
- `filter leads`
69
- - `message-validation.md` + `lead-filter.md` present -> reconcile and stop,
70
- validation complete
71
-
72
- Invalid partial states must stop for repair:
73
-
74
- - `lead-review.md` exists but `lead-sample.json` is missing
75
- - `lead-sample.json` exists but `lead-review.md` is missing
76
- - `lead-filter.md` exists without both upstream lead artifacts
77
- - approval packet or commit gate exists without both `message-validation.md`
78
- and `lead-filter.md`
79
-
80
- ## Revision Rules
81
-
82
- - `revise-brief`
83
- - preserve `brief.md`
84
- - delete `lead-review.md`
85
- - delete `lead-sample.json`
86
- - delete `lead-filter.md`
87
- - delete `message-validation.md`
88
- - delete `rubric.json` if present
89
- - `revise-leads`
90
- - delete `lead-review.md`
91
- - delete `lead-sample.json`
92
- - delete downstream artifacts (`lead-filter.md`, `message-validation.md`, `rubric.json`)
93
- - `revise-filter`
94
- - preserve lead preview artifacts
95
- - delete `lead-filter.md`
96
- - delete `message-validation.md`
97
- - delete `rubric.json` if present
98
- - `revise-message`
99
- - preserve upstream artifacts
100
- - delete `message-validation.md`
101
-
102
- ## No-Mutation Boundary
103
-
104
- During Phase 84, the artifact chain is local draft state only. Do not:
105
-
106
- - create or update a `CampaignOffer`
107
- - import leads
108
- - persist a selected lead list
109
- - create workflow rows
110
- - attach sequences
24
+ Legacy validation harnesses may still use a serial artifact chain to test
25
+ prompt behavior without mutating product state. That boundary does not apply to
26
+ normal shell-first create-campaign execution.