WP Origin: export Guidelines skills for coding agents#34
Open
Conversation
46d12ca to
abdd713
Compare
adamziel
reviewed
Apr 29, 2026
Comment on lines
+61
to
+65
| if ( $fs->is_file( $target_path ) ) { | ||
| $fs->rm( 'objects/.tmp' ); | ||
|
|
||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
Wouldn't this destroy the object we just wrote? Or is it just saving us some HDD operations on replacing the identical file, since $target_path is addressed via a content hash?
adamziel
reviewed
Apr 29, 2026
| public function commit( $options = array() ) { | ||
| // First process all blob updates. | ||
| $updates = $options['updates'] ?? array(); | ||
| $symlinks = $options['symlinks'] ?? array(); |
Contributor
There was a problem hiding this comment.
nitpick: let's call it $options['create_symlinks'] to make the intent clear. I got a bit confused initially and had to read the rest of the diff to figure that out.
adamziel
reviewed
Apr 29, 2026
| isset( $tree_objects[ $child_name ] ) && | ||
| TreeEntry::FILE_MODE_DIRECTORY !== $tree_objects[ $child_name ]->get_mode_bucket() | ||
| ) { | ||
| continue; |
Contributor
There was a problem hiding this comment.
This seems to be silently ignoring references to descendants of symlinks. Why? Let's document it inline. Should we throw an error instead?
Also, I'd rather check for symlinks explicitly:
TreeEntry::FILE_MODE_SYMBOLIC_LINK === $tree_objects[ $child_name ]->get_mode_bucket()
The current condition could silently swallow errors such as "it's actually a file".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wp_guidelineCPT andwp_guideline_typetaxonomy being available.WP Origin AGENTS.mdwith slug/sourcewp-originwhen Guidelines are enabled.wp_guideline/<type>/...; skills export aswp_guideline/skills/<slug>/SKILL.mdwith Codex-compatible frontmatter generated from WordPress fields..agents/skills,.claude/skills,AGENTS.md, andCLAUDE.mdsymlinks only when the Guidelines skill exists.Validation
vendor/bin/phpcs -d memory_limit=1G plugins/wp-origin/class-wp-origin-plugin.php plugins/wp-origin/functions.php plugins/wp-origin/wp-origin.php plugins/wp-origin/class-wp-origin-seeder.php bin/test-wp-origin-git-actions.shvendor/bin/phpunit components/Git/Tests/GitRepositoryTest.phpbin/test-wp-origin-git-actions.sh