Skip to content

feat(ghost): add universal guidance packages - #319

Open
opdich wants to merge 13 commits into
mainfrom
experiment/universal-cascade
Open

opdich wants to merge 13 commits into
mainfrom
experiment/universal-cascade

Conversation

@opdich

@opdich opdich commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add universal guidance packages that can be paired with brand fingerprints. The manifest's core: list and the nodes' requires graph determine delivery. Universal nodes arrive first, with prerequisites before dependents.
  • Include authority text in cascade pulls and expose each node's declared requires in Markdown and JSON. The authority text describes direct and transitive overrides, including priority marked with !important.
  • Preserve output for legacy brand.md packages.

Verification

  • pnpm check passed. The full suite passed 349 tests, with one Goose discovery test skipped.
  • The branch is based on 141e6756 and merges cleanly with current main. All 288 legacy CLI comparisons against 141e6756 matched byte for byte.
  • Verified the rebuilt package in a downstream integration, including guidance pulls and generation prompts.

🤖 Generated with Claude Code

opdich and others added 6 commits November 18, 2026 11:44
Resolve automatic roots and selected node prerequisites across the two package owners, preserving legacy cover behavior.

Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Expose automatic guidance and version diagnostics, validate fallback policies and graph errors across the cascade, and measure explicit requests in stats.

Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Carry the original rule authority through embedded pulls and both CLI output formats.

Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Keep the package loader and output decisions in each command.

Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Group the dependency closure by package, preserving prerequisites and core-first delivery within each group.

Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>

@chailandau chailandau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Chai read and approved these comments.

Comment thread packages/ghost/src/embed/pull.ts Resolved
opdich and others added 3 commits November 19, 2026 14:44
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
opdich and others added 3 commits November 20, 2026 10:29
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
Co-authored-by: Big Ed <1e04291f32fc24a8e2f5e52e208aa27d61d5891ada99a679443b5488c4d723ad@buzz.block.builderlab.xyz>
}

/** The caller's repository contains usual materials; an external package owns its directory. */
export function materialRoot(packageDir: string, repoRoot: string): string {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 [P2] Should materialRoot resolve repo-relative materials from the Git repository that owns the external package? When a package lives in a sibling repository, a documented locator such as src/logo.svg is currently resolved as <packageDir>/src/logo.svg, so validation, pull, and inspect miss the real <ownerRepo>/src/logo.svg. The cross-repo tests only cover bundled materials/... paths, which intentionally use the package directory.

Updated by Kettle 🤖

): string | undefined {
// Released cover packages treat the heading alone as an authored policy.
if (legacy) return LEGACY_FALLBACK_HEADING.exec(body)?.[0];
return sliceNodeSection(body, FALLBACK_POLICY_HEADING)?.trim() || undefined;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 [P2] Should fallback detection ignore Markdown headings inside fenced code? A guidance node can show ## If no guidance applies as an example; sliceNodeSection treats that example as the package’s authored policy. That silently suppresses the default fallback, or rejects the package as having two policies when another node contains a real one.

Updated by Kettle 🤖

This branch has not been deployed

No deployments
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.

2 participants