Skip to content

fix: expose Luna module draft contracts - #130

Merged
dajiaohuang merged 1 commit into
mainfrom
fix/125-luna-module-draft-contract
Sep 1, 2026
Merged

fix: expose Luna module draft contracts#130
dajiaohuang merged 1 commit into
mainfrom
fix/125-luna-module-draft-contract

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Problem

Fresh Luna callers could reach module_draft(start/get/evidence) but tools/list exposed payload as an open object, so the required Pack manifest and source-backed D&D play profile were discoverable only through runtime failures.

Solution

  • publish a bounded Draft 2020-12 action contract for start, get, evidence, edit, and finalize
  • describe server-issued job/module ids, the Agent-selected pack id, exact evidence receipts, complete manifest decisions, levels, advancement, pregenerated-character review, catalogs, narrative, dependencies, and confirmation
  • validate each supplied Pack decision before persisting it and enforce the advertised import-job revision guard on package edits
  • cover a Luna-shaped generated Markdown workflow through finalization, import, activation, and playthrough initialization

Malformed Pack edits now leave the job revision, result, and edit history unchanged.

Verification

  • uv run --package sagasmith-dnd-mcp pytest packages/mcp/tests (full suite; one existing skip)
  • uv run --package sagasmith-dnd pytest packages/domain/tests
  • uv run --package sagasmith-dnd-mcp pytest packages/mcp/tests/test_module_draft_contract.py packages/mcp/tests/test_three_tool_authoring_mcp.py packages/mcp/tests/test_tool_contract_quality.py packages/mcp/tests/test_full_skill_parity.py (18 passed after rebasing onto latest main)
  • uv run ruff check packages/domain packages/mcp
  • python skills/dnd-module-generator/scripts/validate_skill.py skills/dnd-module-generator

Closes #125

@dajiaohuang
dajiaohuang merged commit e50c7d0 into main Sep 1, 2026
4 checks passed
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.

Expose Luna-usable module_draft finalize contracts

1 participant