Skip to content

feat(claude): emit plugin workflows and output styles (#187) - #300

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s2-workflows-output-styles
Sep 2, 2026
Merged

feat(claude): emit plugin workflows and output styles (#187)#300
ScriptedAlchemy merged 1 commit into
mainfrom
feat/187-s2-workflows-output-styles

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Slice 2 of the Track Claude Code plugin contract parity beyond the current adapter #187 systematic Claude parity pass (manifest completion).
  • ClaudeHostConfig gains workflows and outputStyles project-directory surfaces, copied byte-faithfully to plugin-root workflows/ and output-styles/ (the canonical default locations; no manifest path fields emitted, consistent with the plugin.paths evidence pinned in feat(claude): emit manifest metadata fields and pin component path rules (#187) #293).
  • Generalizes the slice-1 bin machinery into shared normalizeHostPayloadDirectories with per-surface registry hooks (workflowsSource, outputStylesSource), keeping NormalizedHostBin as a compatible alias. Adds realpath containment so a symlinked payload directory cannot escape the project root — a recorded tightening that now also guards bin.
  • Output styles tighten to the documented .md format (frontmatter fields name, description, keep-coding-instructions, plugin-only force-for-plugin pinned from https://code.claude.com/docs/en/output-styles, 2026-09-01); workflow files stay opaque payloads because the reference documents no deeper schema.
  • Dotted diagnostics claude.workflows.* / claude.outputStyles.* mirroring the bin family; new workflows and outputStyles capability rows; unified plugin adapter follows the bin precedent. Claude adapter 1.11.0 → 1.12.0, plugin adapter 1.10.0 → 1.11.0.
  • Native proof against Claude Code 2.1.257: strict validation accepts emitted workflows + output styles, and a probe shows the CLI does not inspect output-style frontmatter (recorded honestly in evidence).

Test plan

Part of #187 (slice 2).

Keep bin compatibility by mirroring its source hooks and normalized payload fields per surface while sharing file enumeration and realpath containment. Emit only Claude's canonical workflows/ and output-styles/ directories, leaving manifest path fields and the plugin schema pin unchanged; workflows remain opaque, while output styles tighten to the documented .md format and native proof records that strict validation does not inspect frontmatter.
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 20ecfe2

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

This PR includes changesets to release 1 package
Name Type
agent-bundle 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

@ScriptedAlchemy
ScriptedAlchemy merged commit 2b5a985 into main Sep 2, 2026
4 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 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-09-02T07:22:32.928101Z 20ecfe2 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.

@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: 20ecfe25dc

ℹ️ 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".

Comment on lines +762 to +765
const hostOutputStyleRoots = (registry.outputStyleSources?.(loaded.config, targetNames) ?? [])
.flatMap((source) => 'source' in source ? [resolve(dirname(loaded.configPath), source.source)] : []);
const hostWorkflowRoots = (registry.workflowSources?.(loaded.config, targetNames) ?? [])
.flatMap((source) => 'source' in source ? [resolve(dirname(loaded.configPath), source.source)] : []);

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 Skip escaped payload symlinks before source snapshotting

When claude.outputStyles or claude.workflows names an in-project symlink whose target is outside the project, these roots are passed to snapshotProjectSource before normalization. payloadSourcePaths follows the directory symlink, and sourceInput then resolves each file's realpath and throws because it lies outside the root, so ProjectService returns generic AB7003 instead of reaching normalizeHostPayloadDirectories and emitting the intended claude.*.directory.outside diagnostic. Filter these roots using the same realpath-containment check, or make snapshotting skip escaped roots, so CLI validation/build preserves the newly documented diagnostic behavior.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in a45992e: additional payload roots are realpathed and filtered to the project before snapshot traversal, so escaped outputStyles/workflows symlinks no longer become AB7003 and validation emits the intended claude.*.directory.outside diagnostic.

@ScriptedAlchemy
ScriptedAlchemy deleted the feat/187-s2-workflows-output-styles branch September 3, 2026 05:24
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.

1 participant