refactor-node
Skill4 starsChanged 4 months agoMITView on GitHub
Use when the user asks for a behavior-preserving audit or refactor of a registered Officina node or one of its owned sources. Do not use for feature work, bug fixes, generic code review, or files outside registered node ownership.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bib-auditSkill
- bootstrap-dispatcher-runtimeSkill
- ci-debugSkill
- cloud-filesSkill
- connect-googleSkill
- daily-planSkill
- distill-to-ruttersSkill
- email-clientSkill
- email-triageSkill
- find-handoff-candidatesSkill
- formal-prose-reviewSkill
- get-weatherSkill
- git-workflowSkill
- hook-makerSkill
- initialize-tddSkill
- install-launchersSkill
- latex-workshopSkill
- list-managerSkill
- llm-wakeupSkill
- loose-modeSkill
- make-tex-docstringSkill
- math-dependency-graphSkill
- milestone-loggingSkill
- node-certifySkill
- node-driftSkill
- notation-reviewSkill
- online-calendarSkill
- pdf-to-markdownSkill
- prepare-handoffSkill
- proof-auditSkill
- recurring-tasksSkill
- regenerate-blueprintsSkill
- relocate-nodesSkill
- semantic-integrationSkill
- send-feedbackSkill
- setup-interface-managerSkill
- skill-makerSkill
- technical-flow-reviewSkill
- tight-modeSkill
- tool-applicabilitySkill
- update-standardsSkill
- using-compassSkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Use standards.interface.query-standard as the sole repository-policy query.
- Very specific: line 37
Before querying policy, identify the selected component and affected implementation children.
- Very specific: line 64
If selected work touches test files or their fixtures or helpers, query references/node-standards/code-testing.standard.yaml as an …
- Distinctive: line 68
Test artifacts are collected or executed by configured test or validation runner.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- BEGIN BLUEPRINT INTERFACES -->Generated from
blueprint.yaml. Do not edit this block by hand.
Executable Interfaces:
Send the required caller (caller skill), interface, version, and arguments; optional dry_run defaults to false. Compact uses ordered positionals plus an option mapping; ordered raw argv uses positionals: [] plus every argv token in list options. Never mix forms.
standards.interface.query-standard— Query one explicit standard and its complete pinned import closure.- Caller:
refactor-node - Version: 1
- Security level: 2
- Alternative:
standard-and-optionsArguments JSON (replace labels with actual values). Omit optional positionals and options that are not needed. {"options": {"--facts-json": "JSON", "--query-json": "JSON", "--refs-json": "JSON", "--repo-root": "PATH", "--view": "requirements|context|evidence|remedies|full"}, "positionals": ["standard-path"], "stdin": null} Required options: []; positional arity: 1..1; stdin: forbidden
- Caller:
Instruction Interfaces:
These are LLM-readable instruction surfaces. Read and follow them directly; do not invoke the MCP server for them.
refactor-node.source.instruction-refactoring.interface.refactor-instructions@1— Diagnose and repair an owned instruction source from its applicable standards.refactor-node.source.python-refactoring.interface.refactor-python@1— Diagnose and, after approval, apply one verified behavior-preserving Python OOD refactoring move at a time.
<!-- END BLUEPRINT INTERFACES -->Refactor Node
Use standards.interface.query-standard as the sole repository-policy query.
Select the root from the established request scope; the query returns its
complete pinned import closure. Never ask it to infer ownership or reconstruct
a blueprint graph.
Preflight
Before querying policy, identify the selected component and affected
implementation children. Retain
the dry-run; verify caller, target standards.interface.query-standard,
repository root, selected standard path, task facts, view, and refs. Reject
mismatches and inferred targets.
Standards retrieval
Classify each selected scope by its known node role and gateway family, then
query the corresponding canonical root with task.kind=refactor and
--view requirements:
| Selected scope | Root standard |
| Python module | references/node-standards/python-module.standard.yaml |
| Python behavioral source | references/node-standards/python-behavioral-source.standard.yaml |
| Instruction module | references/node-standards/instruction-module.standard.yaml |
| Instruction behavioral source | references/node-standards/instruction-behavioral-source.standard.yaml |
Select by affected role, not filename. For a typical registered SKILL.md,
module identity, discovery, gateway, or export work uses the instruction-module
root; authored instruction work uses the instruction-behavioral-source root.
Query both only when both roles change; a narrow source-owned section uses only
the source root. For other mixed work, query each applicable root separately
and combine the returned requirements. A whole-skill audit queries both
instruction roots plus every declared Python module and source root.
If selected work touches test files or their fixtures or helpers, query
references/node-standards/code-testing.standard.yaml as an additional
independent root with task.kind=refactor. Set
task.optimizes-test-performance true for performance work and false otherwise.
Test artifacts are collected or executed by configured test or validation runner.
Markdown-only means no executable test file, fixture, or helper changes. Test
code that validates Markdown remains test code.
Imported documents arrive in the complete pinned import closure; never query
them separately. Apply requirements.true, resolve material
requirements.unknown and missing facts. Never silently discard a material
unknown. Then use exact returned document/ref
pairs: --view context --refs-json JSON for context_index; --view
evidence for checks, tests, and assurances, semantic_reviews, artifacts,
and limitations; and --view remedies for returned remedied-by
procedures. Use --view full or --query-json only through --help.
Retain a selected class, function, method, or instruction section as the caller-owned sub-scope. Read scoped repository instructions and the current diff, then characterize observable behavior before proposing changes.
Evidence and preservation
Map affected behavior, ownership, dependencies, authorization, reverse consumers, and verification. Classify canonical evidence, supplemental change-relevant evidence with owner and limitations, and affected refs with no mapped evidence. Perform semantic review and build a preservation map for observables, route outcomes, fallbacks, approval boundaries, generated invocations, and removed directives.
Route
- Invoke
refactor-node.interface.refactor-pythonfor Python scopes. - Invoke
refactor-node.interface.refactor-instructionsfor Markdown gateway partitions. - For mixed work, invoke both routes as needed and combine their proposals without crossing the established scope boundaries.
Shared change contract
Preserve behavior; separate features, bug fixes, and public-API redesign. Before mutation, report scope, preservation map, requirements, unresolved facts, evidence, and remedy. Require approval, apply one move, inspect the exact diff against the preservation map, and verify. An unvalidated move is non-final: fix and rerun within scope or revert and stop.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

