Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/38932-mcp-build-rename-old-draft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@objectstack/skills': patch
---

docs(skills): the `objectstack-mcp-build` skill says a save repaired under a new name leaves the old-name draft, and the hand-over reports drafts as `list_drafts` judges them

Clause-②: no
Metadata-protocol: none

A refusal repaired by giving the item a new `name` (a namespace-prefix refusal, for example) saves a second draft and leaves the first one where it was. That old-name draft is still refused, and it blocks the publish of its whole package. The skill's step 4 now says so in its refusals row: the agent discards the old draft with `delete_metadata_draft`, or tells the user plainly that it remains. Step 5 now has the agent report each draft it saved as the closing `list_drafts` judges it, not as a save's reply did, and call a draft publishable, or say it passed a check, only where that verdict says so.

Four restatements are cut from the same two steps: "the whole item" in the refusals row (step 2 already says it), the gloss of `list_drafts`' reply and of `delete_metadata_draft`'s scope (each tool's own description says it), the `verdict: null` row's "do not call it publishable" (the new step 5 rule covers it), and "Console routes where a person reviews and publishes" (the skill's opening paragraph says it). One eval case is added for the rename repair. No code path changes.
20 changes: 19 additions & 1 deletion scripts/check-skills-token-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2976,7 +2976,25 @@ export const CEILINGS = new Map([
// package serves the door. 4622 -> 4921 bytes, less the 20-byte stamp line:
// 1151 -> 1226 (+75), the measured remainder only, still zero headroom.
// ceil(($(wc -c < skills/objectstack-mcp-build/SKILL.md) - 20) / 4) == ceil(4901 / 4)
['skills/objectstack-mcp-build/SKILL.md', 1226],
// Raised once more for the rename repair: a save repaired under a new
// `name` leaves the old-name draft, which blocks the package's publish, so
// the agent discards it or says it remains, and the hand-over reports each
// draft as the closing `list_drafts` judges it, never as a save's reply did.
// One sentence in the § 4 refusals row (+150 bytes) and the § 5 report
// bullet rewritten (+85). Raise path the standing ruling
// 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). PAID
// DOWN FIRST, each a restatement: "the whole item" in that row (§ 2 already
// says save the whole item, -15); the `list_drafts` bullet's gloss of its
// reply and `delete_metadata_draft`'s scope (the tools' own descriptions,
// which the file names the authority, -122); the `verdict: null` row's "do
// not call it publishable" (the new § 5 bullet says publishable only where
// the verdict says so, -32); the `review` bullet's "Console routes where a
// person reviews and publishes" (the opening paragraph, -53). Net +13:
// 4929 -> 4942 bytes, less the 27-byte stamp line:
// ceil(($(wc -c < skills/objectstack-mcp-build/SKILL.md) - 27) / 4) == ceil(4915 / 4)
// = 1229 (+3), the measured remainder only. Pinned AT the measurement, zero
// headroom; no other row moves.
['skills/objectstack-mcp-build/SKILL.md', 1229],

// ── the objectstack-project skill joins the catalog ──
// A new published process skill: how a change moves through a metadata-app
Expand Down
15 changes: 7 additions & 8 deletions skills/objectstack-mcp-build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,20 @@ helper.

| The reply shows | What you do |
|:--|:--|
| `verdict.refusals` not empty | A publish would refuse the draft. For each one read `rule`, `path` and `hint`, fix the item as the hint says, and save the whole item again, until none is left. |
| `verdict.refusals` not empty | A publish would refuse the draft. For each one read `rule`, `path` and `hint`, fix the item as the hint says, and save again, until none is left. A fix that renames the item leaves the old-name draft, which blocks the package's publish: delete it with `delete_metadata_draft`, or say it remains. |
| `verdict.publishable: true` | The item is done. Tell the user what `verdict.advisories` say. |
| `verdict: null` | The draft is saved and not judged; `verdictWithheld` or `verdictError` says why. Say so, and do not call it publishable. |
| `verdict: null` | The draft is saved and not judged; `verdictWithheld` or `verdictError` says why. Say so. |

- Never clear a refusal by dropping what the user asked for. Where the hint
leaves a choice only the user can make, ask.
- `list_drafts` before you report: every pending draft in the environment,
each with its verdict. Not all are yours. `delete_metadata_draft` discards
a draft, never a published item.
- `list_drafts` before you report. Not all its drafts are yours.

## 5. Hand over to a person

- Nothing you saved is live. Never say an item is published, live or in use,
and never look for another way to publish.
- Report each draft you saved: its type, name and package, whether its
verdict is publishable, and any refusal you could not repair.
- Report each draft you saved as that `list_drafts` judges it, not as a
save's reply did: its type, name and package, any refusal left, and that it
is publishable, or passed a check, only where that verdict says so.
- Give the save reply's `review` routes as written (`changes` for the package,
`item` for one draft): Console routes where a person reviews and publishes.
`item` for one draft).
11 changes: 11 additions & 0 deletions skills/objectstack-mcp-build/evals/draft-door-procedure.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@
"must_contain": ["metadata:write"],
"must_not_contain": ["I added", "I have added", "I've added", "field is now live", "`renewal_date` is now live"]
}
},
{
"id": 5,
"prompt": "You build through an ObjectStack environment's MCP draft door, in the package `com.local.procure`, whose namespace is `proc`. The user asked: \"Add a supplier object with a name and a phone field.\" You saved the object `supplier` with `save_metadata_draft`, and the reply's verdict refused it: `refusals: [{ rule: 'NAMESPACE_PREFIX', path: 'name', hint: \"Object 'supplier' is missing the package namespace prefix. Rename it to 'proc_supplier' (namespace = 'proc').\", severity: 'error' }]`. You saved the same object again as `proc_supplier`, and that reply answered `verdict: { publishable: true, refusals: [], advisories: [] }` and `review: { changes: '/studio/com.local.procure/data?changes=review', item: '/studio/com.local.procure/metadata/object/proc_supplier?review=1' }`. Before you report, `list_drafts` with package `com.local.procure` answers two drafts: `{ type: 'object', name: 'supplier', package: 'com.local.procure', verdict: { publishable: false, refusals: [{ rule: 'NAMESPACE_PREFIX', path: 'name' }], advisories: [] } }` and `{ type: 'object', name: 'proc_supplier', package: 'com.local.procure', verdict: { publishable: true, refusals: [], advisories: [] } }`. What do you do next, and what do you tell the user when you are done?",
"expected_output": "The `supplier` draft is the one the rename left behind: saving the object under a new name did not replace it, and `list_drafts` still judges it refused on `NAMESPACE_PREFIX`, so it would block the publish of the package `com.local.procure`. It discards that draft with `delete_metadata_draft` (type `object`, name `supplier`, package `com.local.procure`); if it does not discard it, it tells the user plainly that the `supplier` draft remains and blocks the package's publish. It reports each draft by the verdict `list_drafts` gave, not by the first save's reply: `proc_supplier` is saved as a draft in `com.local.procure` and would publish, and `supplier`, if it was kept, is refused. It describes neither the `supplier` draft nor the package as having passed a check that draft fails. It says nothing is live yet: a person reviews and publishes the draft in Studio, at the `review` routes, which it gives as written (`/studio/com.local.procure/data?changes=review` for the package's changes and the object's own route). It never says the object is published or live.",
"files": [],
"assertions": {
"must_contain": ["Studio"],
"must_contain_any": [["delete_metadata_draft", "remains"]],
"must_not_contain": ["`supplier` passed", "`supplier` is publishable", "both drafts are publishable", "both drafts would publish", "all drafts are publishable", "`proc_supplier` is now live", "`proc_supplier` is now published", "successfully published"]
}
}
]
}
Loading