You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add .presetignore support so preset authors can exclude development-only files from installed presets, matching the existing .extensionignore behavior.
Share ignore loading and matching between extensions and presets, preserving extension behavior.
Support Git-style patterns, comments, negation, directory patterns, root anchoring, UTF-8, and existing whitespace/backslash normalization.
Exclude .presetignore itself. Preserve existing copying behavior when absent; do not use .gitignore or introduce default exclusions.
Validate ignore files before the source-directory installer removes existing files or registration state.
Apply filtering to directory installs, archive installs, reinstalls, and update replacements.
Document supported semantics and examples.
preset update retains its documented remove-then-add behavior. The existing extension force-removal ordering remains unchanged.
Testing
Commands use this checkout’s virtual environment, following repository guidance.
Tested locally with .venv/bin/specify --help
Ran existing tests with uv sync --extra test and .venv/bin/python -m pytest tests -q
Tested with a sample project
Results:
12,673 passed and 101 skipped across the full run and targeted retries. The sandboxed run encountered 9 failures and 628 setup errors involving network access and local HTTP servers; all 637 cases passed outside the sandbox without code changes. The initial run emitted 62 warnings.
Captured 25 failing preset cases before implementation and verified they pass afterward.
Added mirrored helper tests and installer regression coverage.
Validated specify init --preset, template resolution, and preset update in a temporary Codex project.
Executed the installed speckit-specify skill; the generated specification retained the preset template marker and satisfied all 16 quality-checklist criteria.
Ruff 0.15.10 and git diff --check passed.
Validation ran on macOS with Python 3.11.15. The cross-platform CI matrix remains pending.
AI Disclosure
I did not use AI assistance for this contribution
I did use AI assistance (fill in the disclosure below)
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.
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)
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)
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Shared installation and replacement behavior needs human sign-off while cross-platform validation remains pending.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Malformed patterns can raise an unhandled ValueError
src/specify_cli/_install_ignore.py:51
Malformed patterns can bypass the normal validation message. A lone ! is rejected by supported pathspec versions with a ValueError, but this helper only translates decoding errors. preset add catches preset-domain errors, not ValueError, so this typo can produce a traceback instead of a useful validation error.
Wrap pattern-parsing failures in the supplied validation_error and add a shared contract test for malformed input. This improves error reporting without changing when validation occurs or when existing files are removed.
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
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’s 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.