Skip to content

feat!: framework mode — structure in config and conventions, JSX only for rendering (RFC #63) - #67

Merged
ScriptedAlchemy merged 7 commits into
mainfrom
feat/framework-mode-structure
Aug 31, 2026
Merged

feat!: framework mode — structure in config and conventions, JSX only for rendering (RFC #63)#67
ScriptedAlchemy merged 7 commits into
mainfrom
feat/framework-mode-structure

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Implements RFC #63 end to end, greenfield (no compatibility hedges):

  • Skills convention hardening (AB4734) — when explicit skills config leaves a conventional skills/<name>/SKILL.md uncovered, validation reports an info nudge naming the shadowed skill. Config wins, conventions fill — same precedence one-liner as RFC RFC: agent-bundle owns the build — one config, framework entry conventions #50's entry conventions.
  • Rendered skills (power tier)skills/<name>/SKILL.tsx (or .ts) default-exports a component and exports frontmatter; the build compiles the element tree to Markdown through a dependency-free renderer (documented element subset; anything outside it is a named error, never a silent approximation) and emits the SKILL.md as a generated write entry per target. A hand-authored SKILL.md always wins (AB4735).
  • defineRscApplication — flat, JSX-free runtime declaration: { name, version, description?, operations }. runRscCli and createRscMcpServer consume it; the server name selects operations, structure stays in config.
  • Structural JSX removed outrightAgentBundle, Skill, Script, McpServer, McpApp, Operation, defineRscAgentBundle, and RscAgentBundleApplication are gone from @agent-bundle/rsc-runtime, along with its agent-bundle peer dependency. JSX renders (Mcp.*/Hook.*, rendered skills); config and conventions structure.
  • audiobook-curator migratedagent-bundle.config.ts declares the structure (skill ships by convention with no declaration; MCP server uses the conventional src/mcp/curator.ts entry), src/application.ts is JSX-free composition, and application.tsx/mcp-server.ts are deleted. Zero diagnostics; behavior preserved (same skill markdown, same 13 CLI commands and 15 MCP tools).
  • create-agent-bundle templatesminimal now teaches the skills-directory convention (no skills field); mcp-server and cli-tool already taught the conventional entries. All three validate with zero diagnostics via the packed-pool e2e.
  • Docs — new one-screen docs/framework-mode.md (newcomer path: one directory convention, one flat config, "JSX = rendering"), AB4734/AB4735 in docs/diagnostics.md, cross-links from the root README and docs/entry-conventions.md. Changesets: minor for both packages, prose states the removals plainly.

Every commit keeps the repo gate green; the removal commit is last. movie-library (separate repo, pinned previews) migrates when it bumps: its five-server tree becomes five mcp.servers config entries + conventional src/mcp/<id>.ts files, and its app tree becomes defineRscApplication.

Gate

  • build / typecheck / lint: green
  • unit: 1771 passed
  • examples:check (all five): green; audiobook-curator validate: zero diagnostics
  • examples-contract + affected integration files: green
  • test:packed incl. scaffolder packed-pool e2e (real tarballs, per-template check): 22 passed
  • workbench browser e2e: 4 passed

Closes #63.

…conventional skills/*/SKILL.md uncovered (RFC #63)
…KILL.md at build via the minimal markdown renderer (RFC #63)
…ation; createRscMcpServer/runRscCli consume it; migrate audiobook-curator to framework mode (RFC #63)
…McpServer/McpApp/Operation elements and defineRscAgentBundle are gone; JSX renders, config and conventions structure (RFC #63)
@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9fe29ee

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
agent-bundle Minor
@agent-bundle/rsc-runtime Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T06:59:37.813742Z d5e4b60 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@67
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@67
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/rsc-runtime@67

commit: 9fe29ee

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5e4b60be8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"@types/ws": "8.18.1"
"@types/react": "19.2.18",
"@types/ws": "8.18.1",
"react": "19.2.8"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the JSX runtime required by rendered skills

When a consumer follows the documented SKILL.tsx example without independently installing React, Jiti's automatic JSX transform imports react/jsx-runtime, but published packages do not install their devDependencies. This makes every ordinary JSX-based rendered skill fail to load with AB3003; React must be a runtime/peer dependency with an explicit installation contract, or the compiler must provide its own JSX runtime.

Useful? React with 👍 / 👎.

Comment on lines +170 to +171
const body = text.endsWith('\n') ? text.slice(0, -1) : text;
return `\`\`\`${language}\n${body}\n\`\`\``;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Size Markdown fences to preserve embedded backticks

When a rendered <pre><code> block contains a triple-backtick sequence—common when a skill documents Markdown—the fixed three-backtick delimiter is closed by the content, so the generated SKILL.md treats the remainder as ordinary Markdown and changes the skill's instructions. Choose a fence longer than any backtick run in the body, or use a safe alternate fence.

Useful? React with 👍 / 👎.

@ScriptedAlchemy
ScriptedAlchemy merged commit 12526a8 into main Aug 31, 2026
9 checks passed
ScriptedAlchemy added a commit that referenced this pull request Aug 31, 2026
…n, link the model doc, restore the MCP Apps guidance (#69)

Wave B of the examples refresh, unblocked by #67.

B1: verified the audiobook-curator framework-mode migration landed as designed
(inspect reports diagnostics: [] with conventional provenance on the MCP entry,
Skill, bin, and lib; structure declared in config). Swept one leftover — the
migrated tests/application.test.tsx kept its extension after losing its last
JSX, so it is now .ts, matching #67's own src/application.tsx rename.

B2: skills-starter's README links docs/framework-mode.md where it teaches the
skills-directory convention.

B3: the reframe itself already landed in #67, which replaced the structural-JSX
section and deleted tests/plugin-app.test.ts wholesale; no rsc-runtime test
teaches a removed element. What #67 missed was a deletion: it dropped the
<McpApp> paragraph instead of restating it, leaving the README teaching
_meta.ui.resourceUri widget binding with nothing saying where the widget is
declared. Restored in config-mode terms, plus a link to the framework-mode doc.

Docs and one rename only; no behavior change, so no changeset.
@ScriptedAlchemy
ScriptedAlchemy deleted the feat/framework-mode-structure branch September 3, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: framework mode — structure in config and conventions, JSX only for rendering

1 participant