Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Title Check

on:
pull_request:
types: [opened, synchronize, reopened, edited]
pull_request_target:
types: [opened, synchronize, reopened, edited]

permissions:
contents: read
pull-requests: read

jobs:
validate-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
Subject must not start with uppercase letter.
Example: "feat: add new feature" not "feat: Add new feature"
25 changes: 25 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release Please

on:
push:
branches:
- main
- v3.0.1-alpha-updates

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Target branch automatically set to triggering branch
target-branch: ${{ github.ref_name }}
# Manifest-driven config for multi-branch support
manifest-file: .release-please-manifest.json
config-file: .release-please-config.json
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
release:
types: [published]

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ bin/__pycache__/

# Claude Code agent harness ephemeral worktrees
.claude/worktrees/
bin/rebar
75 changes: 75 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# GoReleaser configuration for rebar CLI
# Builds multi-platform binaries with version injection via ldflags

version: 2

before:
hooks:
- go mod tidy
- go test ./...

builds:
- id: rebar
main: ./cli
binary: rebar
ldflags:
- -s -w
- -X github.com/willackerly/rebar/cli/cmd.Version={{.Version}}
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64

archives:
- id: rebar
format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
files:
- LICENSE*
- README*
- CLAUDE.md
- bin/install
- templates/**/*
- scripts/**/*
- agents/**/*

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
- Merge pull request
- Merge branch

release:
github:
owner: ttschampel
name: rebar
draft: false
prerelease: auto
name_template: "{{.ProjectName}} {{.Version}}"
2 changes: 1 addition & 1 deletion .rebar-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0
v3.0.1-alpha
4 changes: 4 additions & 0 deletions .rebarrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

# Enforcement tier (1=Partial, 2=Adopted, 3=Enforced)
tier = 3

# Contract namespace (host/org/repo). All CONTRACT: references in this repo
# are prefixed with this value. Inferred from `git remote get-url origin`.
contract_namespace = github.com/willackerly/rebar
22 changes: 22 additions & 0 deletions .release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"packages": {
".": {
"release-type": "go",
"package-name": "rebar",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"include-component-in-tag": false,
"extra-files": [
{
"type": "generic",
"path": ".rebar-version",
"glob": false
}
]
}
},
"bootstrap-sha": "775d382"
}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.0.1-alpha"
}
8 changes: 4 additions & 4 deletions architecture/CONTRACT-REGISTRY.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Contract Registry

<!-- AUTO-GENERATED by scripts/compute-registry.sh — do not edit manually -->
<!-- Generated: 2026-04-26T03:19:39Z -->
<!-- Generated: 2026-05-15T18:26:57Z -->
<!-- Regenerate: ./scripts/compute-registry.sh -->

## Services

| ID | Version | Status | Impl Files | Purpose |
|----|---------|--------|------------|---------|
| S1-STEWARD | 1.0 | active | 2 | — |
| S2-ASK-CLI | 1.0 | active | 3 | — |
| S3-MCP-SERVER | 1.0 | active | 1 | — |
| github.com/willackerly/rebar:S1-STEWARD | 1.0 | active | 3 | — |
| github.com/willackerly/rebar:S2-ASK-CLI | 1.0 | active | 4 | — |
| github.com/willackerly/rebar:S3-MCP-SERVER | 1.0 | active | 1 | — |

## Contract Files

Expand Down
6 changes: 3 additions & 3 deletions architecture/CONTRACT-S1-STEWARD.1.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CONTRACT-S1-STEWARD.1.0
# CONTRACT-github.com/willackerly/rebar:S1-STEWARD.1.0

**Version:** 1.0
**Status:** active
Expand Down Expand Up @@ -109,7 +109,7 @@ ask steward check C1 # → commands/check.sh C1

## Dependencies

- Depends on: `CONTRACT:S2-ASK-CLI.1.0` (ASK CLI invokes the steward via `ask steward`)
- Depends on: `CONTRACT:github.com/willackerly/rebar:S2-ASK-CLI.1.0` (ASK CLI invokes the steward via `ask steward`)
- Depends on: bash 3.2+, `jq`, GNU/BSD `grep`, `find`, `awk`, `sed`
- Configuration: `.rebarrc` (`tier = 1|2|3`)
- External: none
Expand All @@ -123,7 +123,7 @@ ask steward check C1 # → commands/check.sh C1
## Future evolution

- **Provisional:** the JSON schema in `architecture/.state/` will get a
formal versioned contract (likely `CONTRACT:I1-STEWARD-STATE.1.0`)
formal versioned contract (likely `CONTRACT:github.com/willackerly/rebar:I1-STEWARD-STATE.1.0`)
once a 2nd consumer beyond `rebar audit` emerges.
- **Major-bump trigger:** if the spec-gate sections change (e.g.,
Why/Who/Scenarios become required for spec-gate completeness).
Expand Down
8 changes: 4 additions & 4 deletions architecture/CONTRACT-S2-ASK-CLI.1.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CONTRACT-S2-ASK-CLI.1.0
# CONTRACT-github.com/willackerly/rebar:S2-ASK-CLI.1.0

**Version:** 1.0
**Status:** active
Expand Down Expand Up @@ -118,13 +118,13 @@ Exit codes: 0 success, 1 ask-level failure, 2 invocation error.
## Cross-references

- **Doc:** `bin/README.md` (full reference), `DESIGN.md` §10 (design rationale)
- **Sister contract:** `CONTRACT:S3-MCP-SERVER.1.0` (the MCP bridge that wraps ASK)
- **Sister contract:** `CONTRACT:S1-STEWARD.1.0` (Steward exposes itself via `ask steward`)
- **Sister contract:** `CONTRACT:github.com/willackerly/rebar:S3-MCP-SERVER.1.0` (the MCP bridge that wraps ASK)
- **Sister contract:** `CONTRACT:github.com/willackerly/rebar:S1-STEWARD.1.0` (Steward exposes itself via `ask steward`)

## Future evolution

- **Provisional:** the wire protocol between `bin/ask` and `bin/ask-server`
isn't yet a versioned contract; it should be `CONTRACT:I2-ASK-WIRE.1.0`
isn't yet a versioned contract; it should be `CONTRACT:github.com/willackerly/rebar:I2-ASK-WIRE.1.0`
once a 2nd implementation appears (e.g., a Go reimplementation).
- **Major-bump trigger:** changing the quoted-vs-unquoted convention, or
changing how `ask <repo>:<role>` resolves repos.
Expand Down
6 changes: 3 additions & 3 deletions architecture/CONTRACT-S3-MCP-SERVER.1.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CONTRACT-S3-MCP-SERVER.1.0
# CONTRACT-github.com/willackerly/rebar:S3-MCP-SERVER.1.0

**Version:** 1.0
**Status:** active
Expand Down Expand Up @@ -119,7 +119,7 @@ JSON-RPC surface:

## Dependencies

- Depends on: `CONTRACT:S2-ASK-CLI.1.0` (subprocess executor for every tools/call)
- Depends on: `CONTRACT:github.com/willackerly/rebar:S2-ASK-CLI.1.0` (subprocess executor for every tools/call)
- Depends on: Python 3.10+
- Depends on: standard library only (no third-party deps — keeps install zero-friction)
- Configuration: `.mcp.json` in adopted repos (auto-written by `rebar init`)
Expand All @@ -128,7 +128,7 @@ JSON-RPC surface:
## Cross-references

- **Doc:** `docs/MCP-SETUP.md` (adopter guide), `docs/MCP-IMPLEMENTATION.md` (protocol-level details)
- **Sister contract:** `CONTRACT:S2-ASK-CLI.1.0`
- **Sister contract:** `CONTRACT:github.com/willackerly/rebar:S2-ASK-CLI.1.0`
- **Wave 2.5 commits:** `d9e68fc` (activation), `0db9073` (notifications fix),
`bc936cf` (paragraph extraction), `2f52983` (role preambles), `5800647`
(depth-2 discovery)
Expand Down
19 changes: 13 additions & 6 deletions architecture/CONTRACT-TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# CONTRACT-{ID}-{NAME}.{MAJOR}.{MINOR}
# CONTRACT-{NAMESPACE}:{ID}-{NAME}.{MAJOR}.{MINOR}

<!-- Copy this file to create a new contract.
Replace all {placeholders} with actual values.
Remove these HTML comments when done. -->
Remove these HTML comments when done.

{NAMESPACE} is your repo's namespace in Go-module form
(host/org/repo, e.g. github.com/willackerly/rebar). The filename
keeps the legacy unnamespaced form
(CONTRACT-{ID}-{NAME}.{MAJOR}.{MINOR}.md); only the title and
in-source CONTRACT: references carry the namespace. Run
`rebar contract migrate-namespace` to apply it across a repo. -->

<!-- VERSIONING:
- When this contract is superseded, add: SUPERSEDED BY: CONTRACT-{ID}-{NAME}.{NEW}
- When this contract supersedes another, add: SUPERSEDES: CONTRACT-{ID}-{NAME}.{OLD}
- When this contract is superseded, add: SUPERSEDED BY: CONTRACT-{NAMESPACE}:{ID}-{NAME}.{NEW}
- When this contract supersedes another, add: SUPERSEDES: CONTRACT-{NAMESPACE}:{ID}-{NAME}.{OLD}
-->

**Version:** {MAJOR}.{MINOR}
Expand Down Expand Up @@ -98,7 +105,7 @@ type BlobStore interface {
<!-- What does this component depend on? Other contracts, external services,
configuration. -->

- Depends on: `CONTRACT:I2-KEY-EXCHANGE.1.0` for encryption keys
- Depends on: `CONTRACT:{NAMESPACE}:I2-KEY-EXCHANGE.1.0` for encryption keys
- Configuration: `BLOBSTORE_PATH` environment variable
- External: none (self-contained)

Expand Down Expand Up @@ -136,7 +143,7 @@ type BlobStore interface {

<!-- List all files that implement this contract.
Keep updated — or regenerate with:
grep -rn "CONTRACT:{ID}-{NAME}" src/ internal/ client/
grep -rn "CONTRACT:{NAMESPACE}:{ID}-{NAME}" src/ internal/ client/
-->

- `internal/blobstore/file.go` — file-backed implementation
Expand Down
Loading