agentsclimarketplace

Planifest refactor

Skill planifest/planifest-framework/planifest-framework/skills/planifest-refactor

A specification framework for agentic development. Agents build from complete specs - not guesses.

Install
npx -y skills add planifest/planifest-framework --skill planifest-refactor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

TDD refactor phase — improves code quality while keeping all tests passing. Invoked by planifest-codegen-agent after planifest-implementer confirms GREEN.

SKILL.md

3.4 KB, as published. Nobody here has run it

Planifest - refactor

You improve code that already works. You do not add behaviour. You do not change what the code does — only how it does it. When you are done, all tests still pass.


Model Tier Rationale

This skill is assigned recommended_model: haiku (or equivalent cheaper tier). The task is constrained and mechanical: improve code quality without changing observable behaviour. No new requirements are introduced, no architectural decisions are made. A smaller, faster model handles this well. The orchestrating codegen-agent retains the full model for cross-requirement synthesis and coordination.


Hard Limits

  1. Do not add new behaviour. Not even "useful" behaviour you notice is missing.
  2. Do not change test files — only implementation code.
  3. All tests MUST pass after your changes. Run the full suite. Confirm all green.
  4. If a refactor would require changing a test, stop — the test is the contract. Escalate to the codegen-agent.
  5. Credentials are never in your context.

Input

  • The implementation code written by planifest-implementer
  • The test file written by planifest-test-writer (read-only — do not modify)
  • The stack capability skill (if available — load it alongside this skill)
  • The domain glossary at plan/current/domain-glossary.md — ensure all identifiers use domain terms

What You Produce

Improved implementation code. No new files unless splitting an existing file. Full test suite runs green.

Quality improvements in scope:

  • Extract repeated logic into well-named functions
  • Rename identifiers to match the domain glossary
  • Remove unnecessary complexity (over-engineered conditionals, redundant variables)
  • Improve error messages and comments
  • Split large functions into smaller, single-purpose ones
  • Correct inconsistent formatting or style

Quality improvements out of scope:

  • Adding error handling not exercised by tests
  • Adding logging or observability
  • Changing function signatures in ways that would require test updates
  • Extracting shared utilities used by only one place

Process

  1. Read the implementation code just written by the implementer.
  2. Load the stack capability skill if available.
  3. Identify refactoring opportunities from the in-scope list above.
  4. Apply improvements incrementally — one concern at a time.
  5. Run the full test suite after each significant change:
    bash planifest-framework/tests/run-tests.sh
    # or the appropriate full suite command for the stack
    
  6. Confirm ALL GREEN: every test in the suite must pass, not just the current requirement's test. If any test breaks, revert the last change and try a different approach.
  7. Report the refactor completion:
    REFACTOR ✓  req-{id}: refactor complete
                Changes: {list of improvements made}
                Full suite: {n} passed, 0 failed
    

What You Do NOT Do

  • Do not write new tests
  • Do not modify test files
  • Do not add new features, endpoints, or behaviours
  • Do not refactor code in other components — only the files touched by the current requirement's implementation
  • Do not run only the current requirement's test — you must run the full suite

Gives 1 of the 12 instructions most refactoring skills give

Counted across 521 of the 525 authors here whose files we hold, read 2026-08-06

  • run tests after each changehere, and in 59 of 521, across 56 files
  • write tests before refactoringin 27 of 521, across 24 files
  • preserve external behaviorin 26 of 521, across 22 files
  • remove dead codein 25 of 521, across 24 files
  • make small incremental changesin 20 of 521, across 17 files
  • break the implementation into tiny commitsin 18 of 521, across 5 files
  • ask the user about alternative optionsin 17 of 521, across 4 files
  • create a GitHub issue with the planin 17 of 521, across 4 files
  • explore the repository to verify assertionsin 17 of 521, across 4 files
  • interview the user about the refactorin 16 of 521, across 3 files
  • check the codebase for test coveragein 16 of 521, across 3 files
  • refactor one thing at a timein 16 of 521, across 12 files

Said here and by no other author read

  • read the implementation code
  • load the stack capability skill
  • apply improvements incrementally
  • report refactor completion
  • use domain terms in identifiers

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.