Repository navigation
Description
Objective and current decision
Make DevTools the thin, profile-based bootstrap, composition and upgrade orchestrator for independently versioned domain tools. Bootstrap a clean project and upgrade an existing customized project without copying another repository or maintaining a universal static template. Domains own their engines, public APIs, released CLI/PHAR, workflow/Action payloads, portable skills and docs. DevTools selects, verifies and delegates; it does not reimplement domain behavior. Versioned, verified PHAR replaces CPX as the delivery direction. A Composer-global adapter is optional only if it adds demonstrated value without mandatory plugin hooks or implicit writes. Decision record.
Composition contract and verifiable acceptance
- Select library/application/docs-only/custom profiles with explicit capabilities and opt-outs. Suggest, then preview exact choices. Record package, exact version, provenance, capability/overrides, source path/commit, previous rendered hash, target and local edits per managed artifact or region. Assign one owner per skill/workflow and retain provenance through LLM Skills ([architecture] Map domain-owned skills and replace redundant agent distribution #195), not a second skill installer. Inventory template repositories separately; no deletion implied.
- Separate setup from execution. Explicit setup validates exact PHAR version, approved source, trusted digest and PHP/extensions compatibility before switching to the staged executable. The selected binary runs without network, downloading,
latestor CPX fallback. The previous working selection survives failure, interruption or concurrent upgrade; prove rollback. Executable rollback does not revert changes to the checkout. - Follow Define release-safe refs for consumer workflow wrappers and checked-out actions #238 for immutable workflow/Action references. The plan records the called workflow SHA, every additional Actions checkout SHA, exact executable version/source/digest and skill source. Same-repository workflow/Actions use the same SHA by default; separately versioned combinations must be declared and qualified. Reject unavailable or incompatible refs before changing active consumer files. [architecture] Evaluate Phive as an optional channel for existing versioned PHARs #197 evaluates Phive only as an optional channel for the same qualified bytes.
- Provide deterministic dry-run/diff/check and explicit apply. In a customized consumer fixture, preview causes no writes, publication or hook execution; replay is a no-op; intervening local edits or unavailable refs fail closed without overwriting the files. Preserve unknown content, settings, hooks, exits, JSON, cwd/cache/color options and required-check identities. Stage and validate changes before switching; verify fresh bootstrap, legacy plugin/CPX migration fixtures, missing/incompatible capabilities and failed/interrupted/concurrent updates.
- Delegate via domain exit/result contracts with acyclic dependencies. Keep reusable logic separate from CLI I/O and writes; do not assume a PHAR isolates public PHP APIs loaded in a consumer process. Verify runtime and resources outside the source checkout; distinguish tool runtime requirements from the consumer application minimum. Update README, configuration/command docs, skill references and synchronized examples to match actual ownership. Use Add a doctor command for repository readiness diagnostics #142 for readiness diagnostics.
Git hooks: acceptance for #376 migration
- Both installed
pre-commitandcommit-msgprefer project-local GrumPHP; otherwise use only a compatible executable already selected by explicit setup. Never download or invoke CPX from a hook. An absent executor fails with actionable diagnostics, not silent success. Preserve stdin, hook arguments and the actual exit code. - Explicitly migrate only legacy hooks whose DevTools ownership can be proved. Never silently overwrite custom, unknown or locally modified hooks. If Git uses custom
core.hooksPath, preserve that configuration and its contents; do not write there as part of this increment. List each preserved or non-migrated effective hook in preview and after apply, with the reason;--no-overwritemust not treat retention as migration.--targetonly changes where files are written; writing in.git/hooksdoes not activate hooks in a custom path. Full hook-domain extraction stays in Externalize git hook logic into a dedicated git-hooks package #336. - In clean-install and legacy-upgrade fixtures with CPX and network unavailable, invoke both actual installed hooks through Git. Include local-executor preference, selected-executor fallback, no-executor failure and preserved custom hooks. For custom
core.hooksPath, use distinct markers in the effective and default paths and compare Git invocations before and after; verify neither the setting nor custom contents changed. Inject failure installing the second managed hook: verify the previous PHAR selection and both previous hook files, including executable permissions. Demonstrate two separate rejection cases through Git:pre-commitrejects, thenpre-commitsucceeds andcommit-msgrejects.HEADstays unchanged in each case. Binary rollback alone is not evidence of hook rollback. Roll back managed changes from this operation, not unrelated consumer edits. - Baseline inspected, not executed: pre-commit, commit-msg, installer, Git hook semantics.
Dependencies, exclusions and next implementable step
- Root roadmap: [architecture] Plan domain-owned tooling extraction and DevTools orchestration #240. Ref policy: Define release-safe refs for consumer workflow wrappers and checked-out actions #238. Skill ownership: [architecture] Map domain-owned skills and replace redundant agent distribution #195. Optional Phive: [architecture] Evaluate Phive as an optional channel for existing versioned PHARs #197. Do not duplicate their work. No mandatory shared runtime/container, universal Actions repo, CPX fallback, plugin side effects or duplicated engines.
- First PR: after the operator clears coding/claims/push and the Project Owner confirms authorship and absence of competing edits, redirect the existing feat!: distribute DevTools through CPX and portable skills #376 to verified setup, offline execution and rollback, including the managed-hook migration above. Reuse selective feat: recover tooling profiles, skills setup and testing improvements #403 setup/compatibility regression evidence without concurrent edits to shared paths. Use local artifacts/fixtures and already published domains; the first PR does not wait for Testing or Documentation. Before claim, recheck base/head and writer in Kanban
t_ff1049da→t_d4e34ed6; independent QA and review verify the exact resulting base/head. - Later adoption: qualify each domain directly, then integrate it through DevTools in a reviewable increment and migrate small consumer cohorts. Begin with a small component (
clockis the documentation proof), then config/container and a custom test/report consumer as applicable; refresh actual imports, hooks, required checks and overrides. No active workflow may point to an unpublished version. Stacked drafts must declare predecessor, merge order and revalidation. No release, Pages/Wiki, deployment, automated merge, or consumer activation is part of feat!: distribute DevTools through CPX and portable skills #376; chore(release): fast-forward/dev-tools v1.26.0 → v2.0.0 #373 is not release proof.
Historical baseline and alternatives
SyncCommand at the October baseline coupled orchestration with metadata, hooks, Wiki and skills. #143 and #141 are historical, not proof of the composition contract. #376 originally proposed CPX and portable skills; preserve that history and migration fixtures, not CPX as the target. A shared static template drifts, copied workflows lose provenance, and a monolithic automation repo reverses domain ownership. One thin orchestrator with explicit profiles serves fresh and existing repositories without those trade-offs.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity
coisa commentedon Dec 3, 2026
Current composition contract: verified PHAR, thin DevTools
This decision supersedes the CPX execution direction above, not the historical evidence. Update the existing #376; #403 stays an unchanged source of useful regressions, not a parallel implementation. Reserve and recheck branch ownership before any write. #240 tracks scope and sequence, #238 owns reference policy, #197 evaluates only optional Phive distribution.
DevTools owns profiles and explicit setup, preview/apply, upgrade and rollback; domain packages own engines, workflow/Action payloads and skills. Setup resolves the exact PHAR version, source and trusted digest before activation. Running a selected binary is offline-capable: no download, latest or CPX fallback. Failure or interruption leaves the previous selection usable. Executable rollback does not revert workflow/config edits. The composition plan records workflow commit, any additional Actions checkout commit, binary version/source/digest and skill source. Adopt #238 rather than redefining its policy.
Acceptance in #376: fixture with local customizations, valid and invalid artifact/ref inputs, offline execution, interrupted upgrade and rollback. Preview writes nothing; rerunning an applied plan is a no-op; an intervening local edit or unavailable ref must stop active application without overwriting files. Supplied local fixtures can demonstrate the contract without waiting for Testing or Documentation. Consumer activation is a separate adoption PR and requires published, qualified versions. No current coding, claim, push, release or merge authorization follows from this record.