codex-flows/docs/development-flow.md

105 lines
2.4 KiB
Markdown
Raw Normal View History

2026-05-12 17:09:22 +00:00
# Development Flow
2026-05-12 21:50:51 +00:00
This monorepo is developed on jojo at `jojo.build`. Codeberg is a push mirror, and GitHub is used only when npm trusted publishing needs its workflow.
2026-05-12 17:09:22 +00:00
## Remotes
2026-05-12 21:50:51 +00:00
Use jojo as the normal development remote:
2026-05-12 17:09:22 +00:00
```bash
git remote -v
2026-05-12 20:22:32 +00:00
# origin git@jojo.build:peezy-tech/codex-flows.git
# codeberg git@codeberg.org:peezy-tech/codex-flows.git
# github https://github.com/peezy-tech/codex-flows.git
2026-05-12 17:09:22 +00:00
```
2026-05-12 21:50:51 +00:00
Push ordinary development to jojo:
2026-05-12 17:09:22 +00:00
```bash
git push origin main
```
2026-05-12 21:50:51 +00:00
`jojo.build` push-mirrors `main` to Codeberg. The local `codeberg` remote is kept for diagnostics and manual recovery.
2026-05-12 20:22:32 +00:00
2026-05-12 17:09:22 +00:00
Push to GitHub only when a release needs the trusted publishing workflow:
```bash
git push github main
```
2026-05-12 21:50:51 +00:00
## Accounts
2026-05-12 17:09:22 +00:00
2026-05-12 21:50:51 +00:00
- `peezy` is the human site admin account and has 2FA enabled.
- `matamune` is an active development worker account for this host and is not a site admin.
- Both accounts are Owners in `peezy-tech`.
2026-05-12 17:09:22 +00:00
2026-05-12 21:50:51 +00:00
## Machine Keys
2026-05-12 17:09:22 +00:00
2026-05-12 21:50:51 +00:00
This host uses a dedicated jojo SSH key and GPG key:
2026-05-12 17:09:22 +00:00
```text
2026-05-12 21:50:51 +00:00
~/.config/forgejo-keys/matamune-jojo-build-ssh.pub
2026-05-12 20:22:32 +00:00
~/.config/forgejo-keys/matamune-jojo-build-gpg.asc
2026-05-12 17:09:22 +00:00
```
2026-05-12 21:50:51 +00:00
The Codeberg key remains available for mirror diagnostics:
2026-05-12 17:09:22 +00:00
2026-05-12 21:50:51 +00:00
```text
~/.ssh/id_ed25519_codeberg.pub
```
2026-05-12 17:09:22 +00:00
2026-05-12 21:50:51 +00:00
## Jojo CLI
2026-05-12 17:09:22 +00:00
2026-05-12 21:50:51 +00:00
`fj` can talk to `jojo.build` after creating an application token:
2026-05-12 17:09:22 +00:00
```bash
2026-05-12 21:50:51 +00:00
fj --host jojo.build auth add-key <username> <token>
2026-05-12 20:22:32 +00:00
fj --host jojo.build auth use-ssh true
fj --host jojo.build auth list
2026-05-12 17:09:22 +00:00
```
2026-05-12 21:50:51 +00:00
## CI And Branch Protection
`main` is protected on `jojo.build`.
- Owners can push and merge.
- Required status context: `ci / check (push)`.
- The workflow lives at `.forgejo/workflows/ci.yml`.
- Protection applies to admins.
- Signed commits are not required yet.
The CI workflow runs:
2026-05-12 17:09:22 +00:00
```bash
2026-05-12 21:50:51 +00:00
bun install --frozen-lockfile
bun run check:types
bun run test
bun run --filter @peezy.tech/codex-flows release:check
2026-05-12 17:09:22 +00:00
```
## Releases
Release package: `@peezy.tech/codex-flows`
Before publishing:
```bash
bun run --filter @peezy.tech/codex-flows release:check
bun run check:types
bun run test
git diff --check
```
To publish through GitHub trusted publishing:
1. Bump `packages/codex-client/package.json`.
2026-05-12 21:50:51 +00:00
2. Commit and push to jojo.
2026-05-12 20:22:32 +00:00
3. Confirm the Codeberg mirror has received the commit.
4. Push the same commit to GitHub.
5. Run `.github/workflows/publish-codex-flows.yml` on GitHub with confirmation input `@peezy.tech/codex-flows`.
6. Verify npm:
2026-05-12 17:09:22 +00:00
```bash
npm dist-tag ls @peezy.tech/codex-flows
```