develop-implement

Translate alpha ADR implementation contracts into code and passing Vitest suites.

12|2|Updated Nov 27, 2024
One-click install
npx skills add https://github.com/Pionpill/retikz --skill develop-implement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: develop-implement
Source: https://github.com/Pionpill/retikz/tree/main/.agents/skills/develop-implement
Command: npx skills add https://github.com/Pionpill/retikz --skill develop-implement

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It provides a disciplined way to turn an alpha ADR “implementation contract” into working code and passing tests, ensuring the IR remains AI-friendly and contract-compatible.

Core Features & Use Cases

  • Spec-First TDD for red/mandatory changes: Generates a Zod schema stub plus Vitest cases before implementation, then drives the implementation until all tests pass.
  • Contract-safe IR constraints: Enforces JSON-serializable IR, English .describe(...) on every schema field, and TikZ vocabulary-aligned naming to protect LLM tool use.
  • Deterministic, guarded implementation loop: Runs eslint, tsc, and full vitest for every step and forbids changing schema field names/types or altering test expectations.

Quick Start

Use develop-implement to implement a Proposed ADR “契约段” by first generating the schema stub and Vitest tests in a Spec-First workflow, then implement code step-by-step until all tests pass.

Frequently Asked Questions about develop-implement

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement ADR contracts using spec-first TDD?

To implement ADR contracts using spec-first TDD, generate a Zod schema stub and Vitest test cases first, then write implementation code step-by-step until all tests pass. This enforces JSON-serializable IR and TikZ-aligned naming.

What is spec-first TDD for JSON-serializable IR?

Spec-first TDD for JSON-serializable IR is a development workflow where you define Zod schemas with English `.describe(...)` fields and write Vitest tests before implementation. It ensures round-trip equivalence and protects LLM tool use.

How do I enforce contract constraints with Vitest and Zod schemas?

You enforce contract constraints with Vitest and Zod schemas by running eslint, tsc, and full vitest gates for every step. This deterministic loop forbids changing schema field names or types and prevents breaking the implementation contract.

Can I change test expectations during the ADR implementation loop?

No, you cannot change test expectations during the ADR implementation loop. The guarded implementation process forbids altering test expectations or modifying schema field names and types to prevent breaking the contract.

When do I need to use spec-first TDD for ADR contracts?

You need spec-first TDD for ADR contracts when implementing “契约段” changes, especially during red (mandatory) stages. It is required to enforce JSON-serializable IR, TikZ-aligned naming, and round-trip equivalence with step-scoped commits.

Does this spec-first TDD workflow work with the retikz TikZ/IR pipeline?

Yes, this spec-first TDD workflow explicitly works with the retikz TikZ/IR pipeline. It translates an alpha Proposed ADR implementation contract into working code while enforcing JSON-serializable IR and TikZ vocabulary-aligned naming.