Skip to content

docs: add monorepo guide#3084

Open
PascalThuet wants to merge 5 commits into
github:mainfrom
PascalThuet:docs/monorepo-guide
Open

docs: add monorepo guide#3084
PascalThuet wants to merge 5 commits into
github:mainfrom
PascalThuet:docs/monorepo-guide

Conversation

@PascalThuet

@PascalThuet PascalThuet commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Adds a guide for using Spec Kit in a monorepo: per-project .specify/, targeting a
member project from the repo root with SPECIFY_INIT_DIR (#2892), how the env var
reaches the agent, how Git operations resolve in a monorepo, and per-project
constitutions.

Docs-only; documents already-merged behavior. New page docs/guides/monorepo.md,
wired into docs/toc.yml under Development.

(AI assistance: drafted and verified with an AI coding agent; reviewed by me.)

Adds docs/guides/monorepo.md covering per-project .specify/, targeting a member project from the repo root with SPECIFY_INIT_DIR, agent env propagation, the git extension scoping limitation (github#3081), and per-project constitutions. Wires it into docs/toc.yml under Development.
@PascalThuet PascalThuet requested a review from mnriem as a code owner June 22, 2026 04:45

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I am going to reject this PR as it currently stands as we are not going to document open issues in our guides as it is too easy to forget to remove them and then the guidance is incorrect in perpetuity

@PascalThuet

Copy link
Copy Markdown
Contributor Author

Done. The Git note no longer references any issue. It documents current behavior only: in a monorepo with one root Git repository, feature branches are created in that shared root repo while spec directories stay under the selected member project. This is stable guidance with nothing that can go stale, which directly addresses the concern you raised. Would you accept the PR with this change?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new documentation guide describing how to use Spec Kit in a monorepo, with emphasis on per-project .specify/ roots, using SPECIFY_INIT_DIR to target a member project from the repo root (as introduced in #2892), and how Git/constitutions behave in that setup.

Changes:

  • Adds a new guide at docs/guides/monorepo.md covering recommended monorepo layouts and workflows.
  • Documents SPECIFY_INIT_DIR usage patterns (CI/non-interactive and interactive agent environments).
  • Wires the new guide into the documentation TOC under the Development section.
Show a summary per file
File Description
docs/toc.yml Adds the new “Monorepos” entry under Development.
docs/guides/monorepo.md New monorepo guide covering project root resolution, SPECIFY_INIT_DIR, Git behavior, and per-project constitutions.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread docs/guides/monorepo.md Outdated

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copilot feedback

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread docs/guides/monorepo.md Outdated
Comment thread docs/guides/monorepo.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new

Comment thread docs/guides/monorepo.md

## Constitutions

Each member project has its own `.specify/memory/constitution.md` and

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While correct it is certainly possible for a constitution.md to refer to another constitution in another directory. But that plumbing is something one would have to do yourself

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants