[Feature]: Add `specify init --dry-run` preview
- Lingua principale
- Python
- Stelle
- 137k
- Fork
- 12.3k
- Merge medio
- 2g 12h
- PR unite (30g)
- 159
Descrizione
## Context
This issue supersedes [#1035](https://github.com/github/spec-kit/issues/1035), which requested `specify init . --dry-run` and was automatically closed for inactivity rather than resolved.
`specify init` can merge into an existing directory with `--force`, potentially changing generated project artifacts. Users need a reliable way to inspect the exact initialization plan before allowing writes.
## Proposal
Add:
```text
specify init --dry-run
```
The dry-run must use the same resolution and planning path as a real initialization, but perform no project filesystem mutations. It should preview the outcome for the requested directory and the selected integration, script type, preset, and extensions.
## Expected output
For every planned artifact, report:
- action: `create`, `overwrite`, `preserve`, `skip`, or `conflict`;
- project-relative path;
- provenance: core, integration, preset, workflow, or extension.
Provide a human-readable summary and `--json` output for CI/tooling.
## Acceptance criteria
- `specify init --dry-run` never creates, modifies, deletes, or registers project files.
- Its plan matches a subsequent real `specify init` invocation with the same options.
- Existing-directory conflicts are reported without needing `--force`.
- The preview accounts for core assets, integrations, presets, bundled/local extensions, and the bundled workflow.
- URL extensions are not installed during preview; any unresolved/download-required result is reported explicitly.
- Human-readable and JSON output have regression coverage, including a no-write assertion.
## Non-goals
- Running coding-agent commands or workflows.
- Replacing the existing `specify workflow run --dry-run` behavior.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal comando esistente `specify init` e segui il suo percorso di risoluzione e pianificazione, poiché l’issue non indica file o test. Confronta la pianificazione in dry-run con un’inizializzazione reale, quindi aggiungi una copertura di regressione per l’output leggibile dagli esseri umani e per l’output JSON, includendo un’asserzione che verifichi l’assenza di scritture; il lavoro è completato quando tutte le fonti degli artefatti elencate e tutti gli esiti dell’estensione degli URL sono rappresentati senza mutazioni del file system.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100