Skip to content

Commit 66974c5

Browse files
committed
docs(contributing): add Git workflow for Soushi+Tibi collaboration
- Branch model: main ← dev ← feature branches - Branch naming convention: {type}/issue-{N}-{slug} - Commit message conventions with scope table - PR lifecycle: draft → ready, squash merge to dev, merge commit to main - Semver release tagging on main - ci(build): extend CI to dev branch push and PR triggers
1 parent e830462 commit 66974c5

2 files changed

Lines changed: 158 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, dev]
66
pull_request:
7-
branches: [main]
7+
branches: [main, dev]
88

99
jobs:
1010
build:
@@ -34,4 +34,3 @@ jobs:
3434

3535
- name: Build happ
3636
run: nix develop --command bun run build:happ
37-

CONTRIBUTING.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Contributing to Nondominium
2+
3+
Development workflow for the Soushi + Tibi core team.
4+
5+
---
6+
7+
## Branch Model
8+
9+
```
10+
main ← production-stable, tagged releases only
11+
└── dev ← integration branch, always deployable
12+
└── feat/issue-N-short-slug ← feature work
13+
└── fix/issue-N-short-slug ← bug fixes
14+
└── refactor/short-slug ← refactoring
15+
└── docs/short-slug ← documentation
16+
└── chore/short-slug ← maintenance, deps, config
17+
```
18+
19+
**Rules:**
20+
- `main` — no direct pushes. Only merges from `dev` via PR when cutting a release.
21+
- `dev` — integration branch. Feature PRs land here first.
22+
- Feature branches — fork from `dev`, PR back to `dev`. Short-lived.
23+
24+
---
25+
26+
## Starting a Feature
27+
28+
```bash
29+
git checkout dev
30+
git pull origin dev
31+
git checkout -b feat/issue-N-short-slug
32+
```
33+
34+
Branch name format: `{type}/issue-{N}-{slug}` or `{type}/{slug}` when not tied to an issue.
35+
36+
| Type | When |
37+
|------|------|
38+
| `feat` | New capability |
39+
| `fix` | Bug fix |
40+
| `refactor` | Restructure without behavior change |
41+
| `docs` | Documentation only |
42+
| `chore` | Deps, config, CI, maintenance |
43+
| `test` | Tests only |
44+
45+
Examples:
46+
- `feat/issue-56-resource-lifecycle`
47+
- `fix/issue-42-capability-grant-validation`
48+
- `chore/bump-holochain-0-4`
49+
- `docs/governance-zome-api`
50+
51+
---
52+
53+
## Commit Messages
54+
55+
Conventional Commits format — already in use, keep it consistent.
56+
57+
```
58+
{type}({scope}): imperative verb + specific object
59+
```
60+
61+
**Scopes:** `person`, `resource`, `governance`, `ui`, `tests`, `hrea`, `ci`, `nix`, `docs`
62+
63+
```
64+
feat(governance): add resource claim validation
65+
fix(person): capability grant not persisting across conductor restart
66+
refactor(resource): extract lifecycle state machine into module
67+
docs(governance): add PPR system sequence diagram
68+
chore(ci): extend build check to dev branch PRs
69+
test(person): add multi-agent capability revocation scenario
70+
```
71+
72+
Breaking changes: add `!` after the scope, or add `BREAKING CHANGE:` footer.
73+
74+
```
75+
feat(governance)!: rename EconomicEvent fields to match ValueFlows 2.0
76+
```
77+
78+
---
79+
80+
## Opening a Pull Request
81+
82+
1. Push your branch: `git push -u origin feat/issue-N-slug`
83+
2. Open PR **targeting `dev`** (not `main`)
84+
3. Fill the PR template (Intent, Changes, Decisions, How to test, Documentation, Related)
85+
4. Open as **Draft** while work is in progress
86+
5. Mark **Ready for Review** when complete and CI passes
87+
88+
**Review:** One approval required before merge. Soushi reviews Tibi's PRs, Tibi reviews Soushi's. Mexi is notified for visibility but doesn't block merges.
89+
90+
**Merge method:** Squash merge — keeps `dev` history clean, one commit per feature.
91+
92+
---
93+
94+
## Releasing to main
95+
96+
When `dev` is stable and ready for a release:
97+
98+
1. Open a PR from `dev` to `main`
99+
2. PR title: `release: vX.Y.Z`
100+
3. Merge using **merge commit** (preserves the release boundary in history)
101+
4. Tag immediately after merge: `git tag vX.Y.Z && git push origin vX.Y.Z`
102+
103+
**Versioning:** Semantic versioning. Increment:
104+
- `MAJOR` for breaking changes to zome APIs or DNA hash
105+
- `MINOR` for new features (backward-compatible)
106+
- `PATCH` for bug fixes and docs
107+
108+
---
109+
110+
## Branch Cleanup
111+
112+
Delete feature branches after merge:
113+
```bash
114+
git branch -d feat/issue-N-slug # local
115+
git push origin --delete feat/issue-N-slug # remote
116+
```
117+
118+
GitHub's "Delete branch" button on the merged PR does both.
119+
120+
---
121+
122+
## CI
123+
124+
The build pipeline runs on:
125+
- Push to `main`
126+
- PRs targeting `main`
127+
- PRs targeting `dev`
128+
129+
Checks: Nix environment, `bun install`, `build:happ` (WASM compilation).
130+
131+
Tests are included but non-blocking while the test suite is being stabilized. Once stable, tests will be promoted to a required check.
132+
133+
---
134+
135+
## Worktrees (Soushi)
136+
137+
Soushi uses git worktrees for feature branches (via PAI tooling). Worktrees live in
138+
`.worktrees/` (gitignored). If you see a `.worktrees/` directory, that's normal.
139+
140+
Tibi: standard `git checkout` workflow works fine — worktrees are optional.
141+
142+
---
143+
144+
## Current Branch State (as of 2026-03)
145+
146+
| Branch | Status | Action |
147+
|--------|--------|--------|
148+
| `main` | Production-stable | Protected — PR only |
149+
| `dev` | Integration | Active — base for new features |
150+
| `feat/issues-51-52-53-55-hrea-person-bridge` | In-progress hREA Phase 1 | PR to `dev` when ready |
151+
152+
---
153+
154+
## Questions?
155+
156+
Open an issue or ping in the team channel.

0 commit comments

Comments
 (0)