Skip to content

Migrate prompt composition to flowmcp-prompt-generator #64

Description

@a6b8

Classification

Polish — internal refactoring, no functional change intended.

Context

This repository carries its own embedded prompt-composition pair
(src/AreaPromptLoader.mjs, src/PromptBuilder.mjs). The same
composition logic has since been generalized into a standalone module,
flowmcp-prompt-generator (one class, one public static method; typed
placeholder sources string/file/function; bidirectional template
validation; torso check; hard PGEN- error codes). The standalone
module is the designated single home for prompt composition — keeping
two implementations invites drift.

The module is currently developed locally and is not yet published.
This migration must not start before the module is published and
pinned like other FlowMCP dependencies.

Expected behavior

  • AreaPromptLoader/PromptBuilder usages are replaced by the
    flowmcp-prompt-generator API.
  • Grading-specific assets (area lists, the prompts/ root, the
    APL-/PB- error mapping) remain in this repository as thin
    configuration around the generic module.
  • The emit-prompts output stays equivalent; any deliberate deviation
    is documented in the CHANGELOG.
  • The test suite stays fully green; the existing error scenarios
    (torso check, empty file, unknown placeholder, persona/goal
    constraints) keep equivalent coverage against the new module.

Scope and rollout

  • This is a separate, self-contained rollout. Until it lands, the
    embedded copy stays functional — no breaking changes are to be
    introduced on the side.
  • Blocked by: publication of flowmcp-prompt-generator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions