feat: positive-marker repo detection and scaffold auto-registration#75
Merged
Merged
Conversation
Harden the tool-scaffolding subsystem so a repo cannot be born wrong, born unknown, or born unregistered. - _detect_repo_type keys on positive manifest markers (.cursor-plugin/ plugin.json => cursor-plugin; package.json => mcp-server) instead of incidental directory presence. An mcp-server rendered with skills/ now classifies correctly instead of flipping to unknown and silently losing required-workflow enforcement. Adds package.json to SPARSE_PATHS so mode=all detection sees the marker. - create-tool.py registers every generated repo in registry.json by default and regenerates derived artifacts via the shared sync_all code path; --no-register is the escape hatch. The live registry is untouched. - Canonical generation logic factored into importable scaffold/generator.py (generate_repo / build_registry_entry / register_in_registry) so a second generator can delegate instead of reimplement. create-tool.py is a thin CLI. - standards/born-green-contract.md codifies the born-green acceptance criterion (C1-C6) any generator must satisfy. - Born-green test extended with the previously-breaking shapes (mcp-server with skills, empty cursor-plugin) and a registration round-trip against a temp registry root. Bumps VERSION 1.16.3 -> 1.17.0. Signed-off-by: fOuttaMyPaint <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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
Hardens and completes the tool-scaffolding subsystem so a repo cannot be born wrong, born unknown, or born unregistered.
_detect_repo_typenow keys on positive manifest markers (.cursor-plugin/plugin.json=> cursor-plugin;package.json=> mcp-server) instead of incidental directory presence. An mcp-server rendered withskills/previously flipped tounknownand silently lost required-workflow enforcement; it now classifies correctly.package.jsonadded toSPARSE_PATHSsomode: alldetection sees the marker.create-tool.pyregisters every generated repo inregistry.jsonby default and regenerates derived artifacts via the sharedsync_allcode path.--no-registeris the escape hatch. The live registry is untouched by this PR; registration is exercised hermetically against a temp registry root in tests.scaffold/generator.py(generate_repo/build_registry_entry/register_in_registry);create-tool.pyis now a thin CLI. A second generator can delegate instead of reimplement.standards/born-green-contract.mdcodifies the born-green acceptance criterion (C1-C6) any generator must satisfy.Bumps
VERSION1.16.3 -> 1.17.0.Test plan
pytest -q(238 passed, 1 skipped network-integration)python scripts/sync_from_registry.py --checkclean (registry untouched)py_compilecreate-tool.py, generator.py, sync_from_registry.py