Skip to content

feat(mold): add tcr (test && commit || revert) rule mold #79

@kriscoleman

Description

@kriscoleman

Create a new ailloy mold that provides a single TCR (Test && Commit || Revert) rule based on Kent Beck's TCR workflow. The mold should be AI platform agnostic, outputting the rule in the appropriate format for each target:

The mold should be scaffolded in /tmp/ for now and moved into its own repository later.

Acceptance Criteria

  • Scaffold a new mold in /tmp/tcr-mold/ using ailloy mold new (or manually)
  • mold.yaml with proper metadata (name: tcr, version: 0.1.0, description, author)
  • Single rule template file containing TCR workflow instructions (platform-agnostic markdown)
  • flux.yaml with configurable variables:
    • test_command (e.g., go test ./..., bun test, npm test) - the command to run tests
    • test_watch_command (optional) - watch mode variant
    • test_file_command (optional) - single file test variant
    • project_name (optional) - project identifier
  • flux.yaml output mapping defaults to Claude target (.claude/rules/)
  • Rule content covers all TCR principles: TDD-first, small increments, run tests constantly, embrace reversion
  • Rule content uses flux template variables for test commands (not hardcoded to any specific runner)
  • Rule is structured as practical guidelines an AI agent can follow, not just documentation
  • Mold validates cleanly with ailloy temper
  • Mold renders correctly with ailloy forge for default (Claude) target

Notes

  • The rule content should be adapted from the attached example but made generic using flux variables for test commands
  • For Claude, the output target is .claude/rules/ which maps to a Claude rule file
  • For Copilot, the same content could be output to .github/copilot-instructions.md or .github/instructions/tcr.instructions.md
  • For Codex/GPT, the content could be output to AGENTS.md at project root
  • The flux.yaml output: mapping handles the platform targeting — users change the output destination based on their AI tool
  • This is a single-rule mold (no commands, no skills, no workflows) — just the rule template and metadata
  • Reference: Kent Beck's TCR article: https://medium.com/@kentbeck_7670/test-commit-revert-870bbd756864

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions