Skip to content

Commit 0d17c72

Browse files
feat: positive-marker repo detection and scaffold auto-registration (#75)
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>
1 parent b7b9e7d commit 0d17c72

13 files changed

Lines changed: 814 additions & 348 deletions

File tree

.github/workflows/validate.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,20 @@ jobs:
9999
run: pip install Jinja2 PyYAML
100100

101101
- name: Check scaffold syntax
102-
run: python3 -m py_compile scaffold/create-tool.py
102+
run: python3 -m py_compile scaffold/create-tool.py scaffold/generator.py
103103

104104
- name: Test scaffold dry run
105+
# --no-register: this is a throwaway probe; it must not mutate the
106+
# checkout's registry.json (registration is covered hermetically by
107+
# tests/test_scaffold_born_green.py against a temp registry root).
105108
run: |
106109
python3 scaffold/create-tool.py \
107110
--name "CI Test Plugin" \
108111
--description "Automated test" \
109112
--mcp-server \
110113
--skills 2 \
111114
--rules 1 \
115+
--no-register \
112116
--output /tmp/scaffold-test
113117
114118
test -f /tmp/scaffold-test/ci-test-plugin/.cursor-plugin/plugin.json

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Documented conventions for building new developer tools. All docs in [`standards
106106
| [AGENTS.md Template](standards/agents-template.md) | AI agent guidance file structure |
107107
| [Versioning](standards/versioning.md) | Semver management and automated release flow |
108108
| [Release-doc-sync](standards/release-doc-sync.md) | Composite action contract for keeping CHANGELOG, CLAUDE, and ROADMAP in sync after auto-release |
109+
| [Born-Green Contract](standards/born-green-contract.md) | Acceptance criterion every repo generator must satisfy |
109110
| [Testing](standards/testing.md) | Test frameworks, coverage bar, and CI wiring |
110111
| [Skills](standards/skills.md) | `SKILL.md` structure and frontmatter |
111112
| [Rules](standards/rules.md) | `.mdc` structure, globs, and the secrets rule pattern |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.16.3
1+
1.17.0

0 commit comments

Comments
 (0)