Targeting a member project from the monorepo root #2834
Replies: 6 comments
|
I am not sure this should be the responsibility of the CLI to be honest. Your specification can clearly spell out that you are working on a given directory? |
|
Fair point. You're right that The gap is non-interactive use. That's fine in a terminal. It's fragile for a script or CI step running from the repo root, where a manual Would you be open to that for the non-interactive case? |
|
Thanks for the detailed write-up, and for cleanly separating this from the harder questions (branch namespacing, constitution inheritance, workspace manifests). I think there's a real, narrowly-scoped gap here that's worth filling. Today the resolver in If we do this, I'd suggest:
Scoped this way, the change is small: wire the env var into Tests should cover both sides of the contract:
Happy to review a PR along those lines. |
|
Thanks ! I opened PR #2892 with the scoped version you suggested:
The PR updates the Bash and PowerShell common resolvers, wires the override into the bundled I kept branch namespacing, workspace manifests, constitution inheritance, and broader agent UX out of scope. This PR only adds a clear script-level project selector for non-interactive / CI use. PR: #2892 |
|
Now that SPECIFY_INIT_DIR has shipped (#2892), I'd like to line up the follow-up. The env var only reaches the shell layer today. I'd close that two ways, and I'm happy to do both in one PR if you want:
If that works for you I'll open the PR with tests mirroring the strict cases in test_init_dir.py and a docs note on core.md. Which scope do you prefer — env var only, or env var + |
|
For this particular one I say go ahead, but in principle we should NOT assume that any environment variable that is available when running a command will be made available in the CLI. I wanted to clarify this so it is clear that this is the exception and not the rule going forward |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I may be missing an existing workflow here, but this is the concrete gap I hit.
Given a monorepo like this:
Spec Kit works if I first move into the project:
cd apps/webFrom there, #1933 means specs, plans, and numbering stay under
apps/web.What I do not see is a way to stay at
repo/and say:That is what I am proposing: a way to choose the project by path.
Possible forms:
SPECIFY_PROJECT=apps/web--project apps/webExpected behavior:
apps/web, Spec Kit treatsapps/web/.specifyas the project;apps/web/specs, notrepo/specs;I would avoid the name
SPECIFY_ROOT; in a monorepo, "root" can mean git root, workspace root, or Spec Kit project root.This seems related to #1026. It may not solve every agent's slash-command discovery by itself, but it would give the CLI/scripts/integrations one clear project selector to build on.
Not trying to solve these in this thread:
Question: is a project path option acceptable for Spec Kit? If yes, should it be env only, CLI flag only, or both?
All reactions