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
{{ message }}
Repository navigation
Commit e933b4a
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(scripts): centralize SPECIFY_INIT_DIR resolution in core
Resolve SPECIFY_INIT_DIR once in core get_repo_root / Get-RepoRoot and drop the
duplicated resolvers from the git and agent-context extensions, per PR review.
The git feature-branch script inherits the resolver by sourcing core; auto-commit
and agent-context revert to their prior root resolution.
- PS resolver: verify the resolved path is a directory (Resolve-Path also
succeeds for files) so a file value errors as "not an existing directory".
- create-new-feature: when core is absent (only git-common loaded) and
SPECIFY_INIT_DIR is set, hard-error instead of silently falling back to the
git root, keeping the no-silent-fallback contract.
- Drop the legacy-core fallback path and its tests; fix a non-ASCII char in
common.ps1 for PowerShell 5.1.
|`SPECIFY_INIT_DIR`| Target a member project from outside its directory (e.g. a monorepo root) without `cd`, for non-interactive / CI use. Set it to the **project root** — the directory *containing*`.specify/` (relative paths resolve against the current directory). The path must exist and contain `.specify/`, otherwise the command errors and does **not** fall back to the current directory or the Git root. Honored by the core feature scripts and the bundled Git extension (feature-branch creation and auto-commit). When unset, the project is detected by searching upward from the current directory as before. |
62
+
|`SPECIFY_INIT_DIR`| Target a member project from outside its directory (e.g. a monorepo root) without `cd`, for non-interactive / CI use. Set it to the **project root** — the directory *containing*`.specify/` (relative paths resolve against the current directory). The path must exist and contain `.specify/`, otherwise the command errors and does **not** fall back to the current directory or the Git root. Resolved once in the core `get_repo_root` helper, so it is honored by the core feature scripts (`/speckit.plan`, `/speckit.tasks`, …) and the Git extension's feature-branch creation, which inherit it. When unset, the project is detected by searching upward from the current directory as before. |
63
63
|`SPECIFY_FEATURE_DIRECTORY`| Override the active feature directory *within* the resolved project (highest priority, above `.specify/feature.json` and branch-name detection). Relative paths resolve under the project root. Combine with `SPECIFY_INIT_DIR` to pick both the project and the feature non-interactively. |
64
64
|`SPECIFY_FEATURE`| Override feature detection for non-Git repositories. Set to the feature directory name (e.g., `001-photo-albums`) to work on a specific feature when not using Git branches. Must be set in the context of the agent prior to using `/speckit.plan` or follow-up commands. |
65
65
66
-
> **Two resolution axes.**`SPECIFY_INIT_DIR` selects the **project** (which directory contains `.specify/`); `SPECIFY_FEATURE_DIRECTORY` / `.specify/feature.json` / `SPECIFY_FEATURE` select the **feature** within that project. They are independent — project first, then feature. Feature-axis selection applies to the core feature scripts (`/speckit.plan`, `/speckit.tasks`, …); the agent-context update picks the most recently modified `specs/*/plan.md` within the resolved project regardless of the feature-axis variables.
66
+
> **Two resolution axes.**`SPECIFY_INIT_DIR` selects the **project** (which directory contains `.specify/`); `SPECIFY_FEATURE_DIRECTORY` / `.specify/feature.json` / `SPECIFY_FEATURE` select the **feature** within that project. They are independent — project first, then feature.
0 commit comments