Objective
Update UpdateComposerJsonCommand so it adds the README link to composer.json when a repository has README.md and Composer metadata does not already expose it.
Current Limitation
dev-tools:sync can normalize and enrich Composer metadata, but it does not currently add a README reference when the project already has a root README.md. As a result, packages can miss a useful Packagist/Composer metadata link even though the file exists in the repository.
Proposed Work
Teach UpdateComposerJsonCommand to detect a root-level README.md and add the Composer readme property only when it is missing.
Scope
- Detect
README.md in the project root.
- Add
readme to composer.json when it is absent.
- Use
README.md as the default value.
- Preserve an existing
readme value if one is already present.
- Keep the update idempotent across repeated
dev-tools:sync runs.
- Cover the behavior with focused tests for
UpdateComposerJsonCommand or the Composer JSON update service it delegates to.
Non-goals
- Generating or modifying README content.
- Overwriting an existing Composer
readme value.
- Supporting multiple README filenames in the first implementation.
- Changing unrelated Composer metadata.
Acceptance Criteria
Delivery Criteria
Architectural / Isolation Criteria
Objective
Update
UpdateComposerJsonCommandso it adds the README link tocomposer.jsonwhen a repository hasREADME.mdand Composer metadata does not already expose it.Current Limitation
dev-tools:synccan normalize and enrich Composer metadata, but it does not currently add a README reference when the project already has a rootREADME.md. As a result, packages can miss a useful Packagist/Composer metadata link even though the file exists in the repository.Proposed Work
Teach
UpdateComposerJsonCommandto detect a root-levelREADME.mdand add the Composerreadmeproperty only when it is missing.Scope
README.mdin the project root.readmetocomposer.jsonwhen it is absent.README.mdas the default value.readmevalue if one is already present.dev-tools:syncruns.UpdateComposerJsonCommandor the Composer JSON update service it delegates to.Non-goals
readmevalue.Acceptance Criteria
Delivery Criteria
dev-tools:syncadds"readme": "README.md"tocomposer.jsonwhen rootREADME.mdexists andreadmeis missing.dev-tools:syncdoes not addreadmewhen no rootREADME.mdexists.readmevalues are preserved unchanged.Architectural / Isolation Criteria
UpdateComposerJsonCommandremains orchestration-focused if the repository already uses a dedicated Composer JSON update helper.