Skip to content

Correct JSX-slot contribution planning #178

Description

@lloydrichards

What problem are we solving?

The planning compiler recognizes JSX-slot contributions and the assessor can emit JSX composition operations:

const TsJsxSlotOp = {
  fileType: "typescript",
  slotId: contribution.slotId,
  content: contribution.content,
};

But the check that decides whether a planning path contains composition work omits JSX slots:

const hasCompositions =
  planningPath.tsCallArgs.length > 0 ||
  planningPath.tsObjectFields.length > 0;

As a result, a path containing only JSX-slot intent can reach the No planning intent defined failure. A path combining authoritative content and JSX-slot intent can also be classified using only the authoritative branch even though later projection includes composition operations.

Why does this matter?

flowchart TD
  J[JSX-slot contribution] --> C[compiled planning path]
  C --> H{has compositions?}
  H -->|JSX slots omitted| N[No planning intent]
  H -->|other TS operations| P[planned composition]
  style N stroke:#dc2626,stroke-width:2px
Loading

JSX slots are catalog contribution behavior, not an optional internal optimization. A supported contribution should produce a predictable Plan whether the target file is seeded, already exists, or is contributed authoritatively in the same Blueprint.

This issue should establish the expected behavior first. It should not assume that the existing wide planning-intent representation must remain.

Scope

  • JSX-slot-only contributions.
  • JSX slots applied to an existing target file.
  • JSX slots applied when a seed or authoritative file contribution is present.
  • Missing composition targets and malformed slot markers.
  • Multiple compatible or conflicting JSX-slot contributions for one path.

Acceptance criteria

  • A JSX-slot-only contribution produces a deliberate Plan outcome rather than No planning intent defined.
  • Planning behavior is covered for missing, existing, and seeded target files.
  • Authoritative content combined with a JSX-slot contribution preserves both intents in the resulting Plan behavior.
  • Missing or incompatible JSX composition targets produce explicit conflict or failure information.
  • Repeated planning and applying of the same JSX-slot contribution is deterministic and idempotent.
  • Focused tests document the supported JSX-slot scenarios without relying only on large Plan fixtures.

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    afkAutonomous slice that can be completed without human interactionbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions