[Feature]: Replace incremental scaffold reconciliation with full regeneration and snapshot-based recovery
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by locating the CLI component lifecycle paths for extensions, presets, workflows, steps, and bundles, then trace the existing scaffold hash manifest and native settings handling. Review the benchmark prototype and its stated limits; identify where shared regeneration, verified snapshots, and rollback must fit. Done means the acceptance criteria pass, including failure and restoration coverage, with recovery documentation and performance measurements.
索引モデルが issue の本文から書いたものです。
説明
Problem Statement
Extension, preset, workflow, workflow-step, and bundle changes currently rely on multiple incremental cleanup and reconciliation paths. Handling additions, removals, updates, precedence changes, and previously active integrations creates substantial lifecycle complexity.
Replace these paths with one predictable process:
Check → snapshot → uninstall → regenerate → commit or restore.
Proposed Solution
Use one shared regeneration operation for applicable component additions, removals, updates, enablement changes, and priority changes.
Two distinct manifest concepts
| Manifest | Responsibility |
|---|---|
| Hash manifest | Records the expected hashes of wholly owned, generated scaffold files. Used to detect modifications and identify files to remove. |
| Snapshot manifest | Records the actual files and bytes backed up before an operation, including hashes, restoration metadata, and affected paths that were absent. Used to verify and restore the snapshot. |
The recovery ZIP contains both the newly computed snapshot manifest and the original hash manifest unchanged.
These cannot be conflated: with --force, a locally modified file’s actual snapshot hash differs from its expected scaffold hash. Recovery must restore the modified bytes and the original baseline so that the file remains recognized as modified.
1. Validate and check
Determine the desired installed state and validate that the inputs needed for regeneration are available.
Check every file in the existing hash manifest. Report modified, missing, or unexpectedly replaced paths and abort without mutation unless --force permits proceeding.
--force authorizes discarding scaffold customizations during regeneration. It does not bypass path safety, trust requirements, or ownership boundaries.
2. Create the recovery ZIP
Before any destructive work, create and verify a local ZIP containing:
- All existing hash-tracked scaffold files, preserving their actual current contents—including modifications accepted with
--force. - The original hash manifest, unchanged.
- Native settings files that the operation will modify.
- Project/component registries, configuration, and source files that the operation will replace or remove and that are needed for recovery.
- The snapshot manifest, computed from the exact bytes archived.
The snapshot manifest also records affected paths that did not previously exist, allowing recovery to restore absence rather than leave newly introduced files behind.
Create the snapshot whenever regeneration proceeds, with or without --force. If snapshot creation or verification fails, do not begin teardown.
Keep snapshots local, access-restricted, and outside version control; native settings can contain sensitive configuration.
3. Uninstall and remove existing scaffolding
Remove every file in the existing scaffold hash manifest. When --force is supplied, this includes locally modified files.
Keep the ownership boundary simple:
- Scaffold inventory: only wholly owned, disposable Spec Kit files; no partial/shared ownership categories.
.specify/events.py: wholly owned by Spec Kit, tracked once at project level, removed and regenerated if required.- Native settings: outside the scaffold hash inventory. Integration/events uninstall removes only Spec Kit’s contributions, preserving unrelated settings and subsequent user edits.
Normal uninstall reverses Spec Kit’s native settings edits; it does not overwrite a settings file with an old installation-time copy.
4. Apply the change and regenerate
Apply the requested component change and regenerate scaffolding for every installed integration, not just the active one, using existing precedence rules.
Build a new, in-progress hash manifest outside the recovery ZIP:
- Persist each generated destination before writing, so failed or partial writes remain discoverable.
- Record the resulting hash after a successful write.
- Do not replace the original authoritative hash manifest until the operation succeeds.
Preserve unchanged versions, provenance, priorities, enablement, integration options, configuration, authored artifacts, and workflow execution state. Do not unnecessarily redownload or reinstall unchanged source packages.
5. Commit or restore
On success: finalize the new hash manifest as the authoritative scaffold inventory.
On failure:
- Clean up generated output from the failed attempt using its in-progress hash manifest.
- Restore files, settings, and metadata from the ZIP using the snapshot manifest.
- Restore the original hash manifest unchanged.
Unlike ordinary uninstall, failure recovery restores the immediate pre-operation settings snapshot.
Report recovery failures explicitly and retain the recovery artifacts. Document manual restoration, including warnings before overwriting subsequent user changes.
Alternatives Considered
- Continue maintaining separate incremental reconciliation paths.
- Regenerate only the active integration and defer other installed integrations.
- Reinstall every source package unnecessarily.
- Rely on Git alone, which does not reliably cover ignored files or uncommitted local state.
Component
Specify CLI (initialization, commands)
AI Agent (if applicable)
All agents
Use Cases
- Removing an override consistently restores the surviving contribution.
- Updates and enablement changes leave no stale generated commands or skills.
- Forced regeneration remains recoverable without losing accepted local modifications permanently.
- Teams commit the upstream-documented
nonebaseline while developers select their chosen integration locally.
Acceptance Criteria
- Relevant component changes use one shared regeneration operation.
- Non-forced conflicts abort before mutation and report affected paths.
- Scaffold hash-manifest entries represent wholly owned files, including project-owned
events.py. - The verified recovery ZIP contains a snapshot manifest, the unchanged original hash manifest, and all required recovery contents.
- Forced teardown removes modified tracked files only after successfully snapshotting them.
- Native settings remain outside the scaffold inventory; uninstall removes only Spec Kit’s contributions.
- Regeneration covers every installed integration, matches a fresh scaffold of the desired state, and is stable when repeated.
- The in-progress hash manifest records destinations before writes; the authoritative manifest changes only after success.
- Recovery restores files, original baseline hashes, metadata, and originally absent paths consistently.
- Positive and negative coverage includes snapshot failure, partial writes, regeneration failure, and restoration failure.
- Documentation explains
--force, snapshot storage, and recovery. - Performance measurements include snapshot overhead and prioritize one to three integrations.
Additional Context
Exploratory feasibility benchmark: macOS ARM64, Python 3.13.16, seven warm-local samples per case.
| Installed integrations | Component mix | Full regeneration median |
|---|---|---|
| 1 | Core only | 0.12 s |
| 3 | Core only | 0.25 s |
| 1 | 5 extensions + 3 presets | 0.27 s |
| 3 | 5 extensions + 3 presets | 0.71 s |
Extension/preset changes plus full regeneration across three integrations took 0.68–0.90 seconds median.
The prototype matched fresh generated output, produced stable repeated builds, and passed modified/deleted-output refusal and forced-restoration checks.
These measurements exclude ZIP snapshot creation/restoration, CLI startup, and downloads. They used synthetic extension/preset packages on commit 6ad20824, not current upstream. Workflow, step, and bundle inputs were preserved, but their lifecycle mutations, native-event interactions, and failure rollback were not benchmarked.
The evidence supports pursuing the design, not claiming production readiness.
AI Disclosure
GitHub Copilot, powered by GPT-6.1 Sol, assisted with repository investigation, the benchmark prototype, analysis, and this issue draft under human supervision. Reasoning-effort settings were not recorded.
- 主要言語
- Python
- スター
- 149k
- フォーク
- 13.4k
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 223
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/spec-kit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
triage-must-have
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)対応中かも @mehdikarimi55 が 3 日前に担当しました。 オープンtriage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)対応中かも @mehdikarimi55 が 3 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug triage-out-of-scope
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
github/spec-kit の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
glossyio/traffic-monitor#312 ·
メンテナーはふだん 1 日以内に返信
-
local devenv exampleオープンdocumentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
es-ude/elastic-ai.creator#1046 ·
メンテナーはふだん 3 日以内に返信
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
confident-ai/deepteam#306 ·
メンテナーはふだん 1 日以内に返信
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL ports対応中かも @himanchalkaushale が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OWASP/Nettacker#1884 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信