Skip to content

[architecture] Extract repository-metadata policies without moving bootstrap orchestration #382

Open

Description

@coisa

Proposal / validation gate: this issue records an extraction design for maintainer validation. Repository/package names are candidates. Approve the boundary and migration plan before implementation; this task does not authorize creating repositories, implementing the extraction, releases or consumer rollout.

Problem and proposal

Propose php-fast-forward/repository-metadata / fast-forward/repository-metadata for policy-aware repository metadata generation/merging. Source baseline also includes License, Funding, CodeOwners, GitIgnore and GitAttributes commands and dedicated services/resources.

Boundary

Own license selection/rendering, funding reconciliation, CODEOWNERS generation, managed ignore/export policy and Composer metadata edits/normalization adapters. DevTools owns profile selection, package composition, provenance manifest, upgrade planning and safe orchestration. git-hooks remains #336; domain workflow/skill payloads belong to their domain packages. Do not create a repository-sync monolith that reabsorbs all domains.

Concrete tasks / acceptance

  • Inventory ownership of every generated field/path and source precedence (explicit user config before package defaults); license choice is not guessed and author/contact data is not silently overwritten.
  • Separate pure read/plan/merge transformations from apply; preserve comments/order/manual entries where format supports them. Changes to Composer requirements, allowlists and scripts must be scoped, with unrelated entries retained.
  • Define proposed manifest resource descriptor used by the DevTools orchestrator: source package/version/path, owned target regions, hash, policy, schema version and rollback data. This package implements metadata policy, not central cross-domain sync.
  • Coordinate Composer Normalize with code-standards so one canonical implementation/writer exists; compatibility aliases can delegate.
  • Test local overrides, missing/invalid metadata, repeated no-op application, path/symlink escape rejection, preexisting files, three-way conflicts and interrupted apply. Check/dry-run must not install plugins, modify files or execute hooks.
  • Respect closed Make consumer synchronization manifest-driven and policy-aware #143/Add check and dry-run support for skills, agents, and wiki synchronization #141 as history, not proof the new cross-package descriptor and skill ownership contract exists. No reopening historical tasks merely for this larger scope.

Alternatives

One repo per license/funding/ignore command is premature. Keeping metadata policy permanently inside bootstrap couples reusable transformations to the orchestrator. Start one coherent metadata domain and split only with concrete independent consumers.

Delivery and migration gates

Architectural / Isolation Criteria

  • MUST: Core logic MUST live in dedicated services; commands/controllers only orchestrate.
  • MUST: Separate input resolution, domain transformations and rendering; keep CLI/framework I/O out of reusable behavior.
  • MUST: Support reuse/extensibility without major refactoring and deterministic, testable exits/output.
  • MUST: Separate gathering/transformation from writes/publishing; repeated execution MUST be idempotent or explicitly bounded.
  • MUST: Update README, command/config docs, skill references and synchronized consumer examples with the actual new ownership.

Repository-split decision gate

Before implementation, compare independent consumers, current code size, dependency/release cadence and maintenance cost with keeping this responsibility as a bounded module under the nearest domain or DevTools. A separate repository is a candidate, not mandatory. If reuse/lifecycle does not justify it, document the smaller grouping and avoid artificial fragmentation. Validate the recommendation with the maintainer.

Activity

  1. coisa commented on Oct 21, 2026

    @coisa
    ContributorAuthor

    Concrete regression gates from the parallel audit

    Preserve the focused functional issues #378 (GitIgnore ordering/negation) and #385 (GitAttributes ordering/overrides) as independent bugs. Their regressions must be covered before metadata extraction and after migration; architectural relocation alone neither fixes nor closes them. Keep original rule order/semantics and consumer overrides in the plan/apply fixtures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions