Skip to content

Commit 8af5ae4

Browse files
committed
docs: update contribution guidelines to reflect use of git subtree for documentation
1 parent 7b68190 commit 8af5ae4

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

CONTRIBUTING.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Thanks for your interest in contributing! LeanSpec is about keeping things lean,
1111
5. Commit with clear message: `git commit -m "Add feature X"`
1212
6. Push and open a PR
1313

14-
> Note: The documentation site lives in the `codervisor/lean-spec-docs` repository and is mounted here as the `docs-site/` submodule. Run `git submodule update --init --recursive` after cloning if you plan to work on docs.
14+
> Note: The documentation site lives in the `codervisor/lean-spec-docs` repository and is merged here as the `docs-site/` directory using git subtree. It's already included when you clone the repo - no additional steps needed.
1515
1616
## Development Setup
1717

@@ -96,20 +96,32 @@ git push
9696
- Automated sync in CI/CD
9797
- Simpler release process
9898

99-
### Docs Site Submodule
99+
### Docs Site Subtree
100100

101-
The docs are maintained in [codervisor/lean-spec-docs](https://github.com/codervisor/lean-spec-docs) and pulled in via the `docs-site/` git submodule. Typical workflow:
101+
The docs are maintained in [codervisor/lean-spec-docs](https://github.com/codervisor/lean-spec-docs) and merged into this repo at `docs-site/` using git subtree. The docs are already included when you clone.
102102

103+
**Local development:**
103104
```bash
104-
git submodule update --init --recursive # first time or when the submodule is missing
105105
cd docs-site
106-
pnpm install # install docs dependencies once inside the submodule
107-
pnpm start # develop docs locally
108-
git commit -am "docs: ..." && git push # push changes from inside the submodule
106+
pnpm install # install docs dependencies
107+
pnpm start # develop docs locally
108+
```
109+
110+
**Pushing docs changes:**
111+
```bash
112+
# Make changes in docs-site/, then commit to this repo
113+
git add docs-site
114+
git commit -m "docs: your changes"
115+
git push
109116

110-
cd ..
111-
git add docs-site # stage updated submodule pointer in this repo
112-
git commit -m "chore: bump docs-site"
117+
# Push to the separate docs repo (maintainers only)
118+
git subtree push --prefix=docs-site https://github.com/codervisor/lean-spec-docs.git main
119+
```
120+
121+
**Pulling docs changes from upstream:**
122+
```bash
123+
# Pull latest from the separate docs repo
124+
git subtree pull --prefix=docs-site https://github.com/codervisor/lean-spec-docs.git main --squash
113125
```
114126

115127
### Monorepo with Turborepo
@@ -125,7 +137,7 @@ This project uses [Turborepo](https://turbo.build/) to manage the monorepo with
125137
- `packages/mcp` - MCP server wrapper (published as `@leanspec/mcp`)
126138
- `packages/ui` - Web UI bundle (published as `@leanspec/ui`)
127139
- `packages/desktop` - Tauri desktop app (not published to npm)
128-
- `docs-site/` - Git submodule pointing to `codervisor/lean-spec-docs` (Docusaurus)
140+
- `docs-site/` - Git subtree merged from `codervisor/lean-spec-docs` (Docusaurus)
129141

130142
**Key files:**
131143
- `turbo.json` - Task pipeline configuration
@@ -168,12 +180,12 @@ All code changes should include tests. We have a comprehensive testing strategy:
168180

169181
### When to Write Which Test Type
170182

171-
| Test Type | Use When | Location |
172-
|-----------|----------|----------|
173-
| **Unit** | Testing pure functions, validators, parsers | `*.test.ts` alongside source |
174-
| **Integration** | Testing workflows with mocked deps | `integration.test.ts`, `list-integration.test.ts` |
175-
| **E2E** | Testing user-facing CLI workflows | `__e2e__/*.e2e.test.ts` |
176-
| **Regression** | Fixing a bug (must fail before, pass after) | Add to relevant `__e2e__` file |
183+
| Test Type | Use When | Location |
184+
| --------------- | ------------------------------------------- | ------------------------------------------------- |
185+
| **Unit** | Testing pure functions, validators, parsers | `*.test.ts` alongside source |
186+
| **Integration** | Testing workflows with mocked deps | `integration.test.ts`, `list-integration.test.ts` |
187+
| **E2E** | Testing user-facing CLI workflows | `__e2e__/*.e2e.test.ts` |
188+
| **Regression** | Fixing a bug (must fail before, pass after) | Add to relevant `__e2e__` file |
177189

178190
### E2E Tests
179191

0 commit comments

Comments
 (0)