refactor(buddy): move protocol + docs governance commands out of userland into core#2192
Merged
Merged
Conversation
…nd into core
The protocol-conformance and docs-freshness tooling lived under
app/Commands/{protocol,docs} (userland), but these are framework-repo core
commands, not app code. Move them into storage/framework/core/buddy/src/commands/
and register them through the core lazy-command loader + barrel, like every other
built-in command.
- git-mv the 27 tooling + test files, preserving history
- Protocol.ts/Docs.ts become named-export core registrars (protocol()/docs())
- 22 protocol:* / docs:* entries added to lazy-commands.ts; commands barrel updated
- fix repo-root path depth (import.meta.dir) + cross-package imports for the new
location; update CI workflow + generated-doc paths
- app/Commands.ts drops the protocol/docs registrations (keeps the inspire example)
- fix 6 latent strict-null type errors the looser app/ tsconfig had hidden
(regex-group / buffer-index access) so the tooling passes framework typecheck
Verified: framework typecheck clean in the moved files, lint clean, 48/48 moved
tests pass, buddy protocol:* / docs:* wire + run correctly.
protocol-conformance CI stays red on the pre-existing #2179 governance-evidence
drift (orphaned bf1245e pin), unrelated to this move.
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.
Addresses @chrisbreuer's review: the protocol-conformance + docs-freshness tooling was added under
app/Commands/{protocol,docs}(userland) in #2168, but these are core framework-repo commands, not app code. This moves them where they belong.What moved
app/Commands/{protocol,docs,run-tool.ts,Protocol.ts,Docs.ts}→storage/framework/core/buddy/src/commands/(27 files, history preserved viagit mv).Protocol.ts/Docs.ts→ named-export core registrars (export function protocol(buddy)/docs(buddy)), matching every other built-in command.protocol:*/docs:*entries registered in the core lazy-command loader (lazy-commands.ts) + the commands barrel (index.ts).app/Commands.tsdrops the protocol/docs registrations (keeps theinspireexample - that one is a userland sample)..github/protocol/(unchanged); only the tooling moved.Fixes required by the move
import.meta.dir) + cross-package imports rewritten for the deeper location.ci.yml,desktop-lifecycle.yml) + generated-doc header paths updated.app/tsconfig had hidden (regex-group / buffer-index access undernoUncheckedIndexedAccess) - fixed with proper guards so the tooling passes the strict framework typecheck.Verified
./buddy protocol:manifest:checkanddocs:*wire + run correctly end-to-end.CI note
protocol-conformancestays red on the pre-existing #2179 governance-evidence drift (orphanedbf1245esource-manifest pin -git rev-parseon a GC'd commit), which fails onmainindependently of this move. Separately, I noticeddocs:buddy:checkbakes a machine-specific--projectdefault path into the generated reference, so it can't match across machines - also a governance-evidence/generator issue for that same refresh, not this move.