Skip to content

netresearch/php-structured-edit

v0.1.0(MIT AND CC-BY-SA-4.0)

AST-native PHP source mutations for coding agents: typed edits through nikic/php-parser with hash guards and canonical printing.

Changelog

All notable changes to this project are documented in this file.

The format follows Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

0.1.0

Added

  • php-ast-edit CLI with inspect, apply and validate commands.
  • Ten typed operations: set_name, set_string, replace_expression, replace_statement, insert_before, insert_after, delete, replace_argument, add_argument, remove_argument.
  • Transaction guards: SHA-256 optimistic lock, expected node type/name/value, attachment check before each edit, reparse before write, atomic rename.
  • php-structured-edit Agent Skill with the operation reference and a wrapper resolving the repository binary, vendor/bin, a local PHAR, or PATH.
  • PHAR build via scripts/build-phar.php.