Repository navigation
Conversation
Share extension ignore loading and matching with presets while preserving extension behavior. Validate preset ignore files before the directory installer removes existing files, registry entries, or registered commands. Cover pattern semantics, encoding failures, ignored manifests and assets, archive reinstalls, and CLI updates. Document filtering rules and the existing remove-then-add update limitation. Validation: 1,520 tests pass in this checkout's virtual environment, with three failure-path warnings. Capture 25 failing preset cases before the implementation and verify that they pass afterward. Assisted-by: Codex (model: GPT-6, autonomous)
Move all 16 pattern cases into the mirrored test_install_ignore suite and run them for both extension and preset ignore files. Retain installer lifecycle coverage and test absent files, self-exclusion, domain validation errors, and read failures at the shared helper boundary. Validation: - 1,546 relevant tests pass with three existing failure-path warnings. - Full-suite collection increases from 12,748 to 12,774; all original pattern parameter sets remain represented. - Ruff 0.15.10 and git diff --check pass for the follow-up. - Initialize a temporary Codex skills project with a local preset using .presetignore and confirm development files are excluded while a template matched by .gitignore remains installed. - Execute the installed speckit-specify skill in the Codex session, resolve the preset template, and create a reading-list specification with its preset marker retained and all 16 quality-checklist criteria satisfied. - Run preset update with replacement ignore rules and verify the new retained file replaces the previously retained file. Manual workflow validation was performed by Codex on macOS with Bash project scripts; no human testing or cross-platform CI result is claimed. The full test suite and CI OS/Python matrix were not executed. Assisted-by: Codex (model: GPT-6, autonomous)
Contributor
There was a problem hiding this comment.
馃煛 Changes recommended
UTF-8 byte-order marks can silently disable the first ignore rule.
1 open issue
What changed in this PR
Adds .presetignore support so preset authors can exclude development files using the existing extension filtering semantics.
Changes:
- Share ignore loading and matching between presets and extensions.
- Validate preset ignore files before directory replacement.
- Add installation regressions and document supported patterns.
| File | Description |
|---|---|
| tests/鈥媡est_extensions.py | Verify declared files remain filterable. |
| tests/鈥媠pecify_cli/鈥媡est_install_ignore.py | Test shared matching and validation contracts. |
| tests/鈥媠pecify_cli/鈥媝resets/鈥媡est_manager.py | Cover filtering, reinstalls, and state preservation. |
| tests/鈥媔ntegration/鈥媡est_preset_update_workflow.py | Verify filtering during updates. |
| src/鈥媠pecify_cli/鈥媝resets/鈥媉manager.py | Validate and apply preset ignore rules. |
| src/鈥媠pecify_cli/鈥媏xtensions/鈥媉_init__.py | Delegate filtering to the shared helper. |
| src/鈥媠pecify_cli/鈥媉install_ignore.py | Centralize ignore loading and matching. |
| docs/鈥媟eference/鈥媝resets.md | Explain patterns and installation behavior. |
Review effort: Max
Decode preset and extension ignore files with utf-8-sig so an optional BOM does not become part of the first pattern. Cover ASCII and non-ASCII first patterns with BOM and CRLF fixtures, and document BOM support. Validation: four new regression cases failed before the fix; the relevant preset, extension, and shared-ignore suites passed with 1550 tests and 3 warnings. Ruff and git diff --check passed. Assisted-by: Codex (model: GPT-6, autonomous)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Add
.presetignoresupport so preset authors can exclude development-only files from installed presets, matching the existing.extensionignorebehavior..presetignoreitself. Preserve existing copying behavior when absent; do not use.gitignoreor introduce default exclusions.preset updateretains its documented remove-then-add behavior. The existing extension force-removal ordering remains unchanged.Testing
Commands use this checkout鈥檚 virtual environment, following repository guidance.
.venv/bin/specify --helpuv sync --extra testand.venv/bin/python -m pytest tests -qResults:
specify init --preset, template resolution, andpreset updatein a temporary Codex project.speckit-specifyskill; the generated specification retained the preset template marker and satisfied all 16 quality-checklist criteria.git diff --checkpassed.Validation ran on macOS with Python 3.11.15. The cross-platform CI matrix remains pending.
AI Disclosure
AI disclosure: OpenAI Codex using GPT-6 in autonomous coding-agent mode authored the implementation, tests, documentation, commit messages, and this PR description. Codex also reviewed repository guidance, ran automated tests, and executed the sample-project workflow validation. This does not claim human manual testing or line-by-line review.