Skip to content

Commit 19a1745

Browse files
committed
Initialize generated Boatstack distribution
1 parent 9566c32 commit 19a1745

39 files changed

Lines changed: 2575 additions & 2 deletions

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated from operatorstack/intelligence-flow.
2+
name: Verify Boatstack distribution
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
- run: python3 -m unittest discover -s tests -v
21+
- run: python3 -m compileall -q boatstack
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Generated from operatorstack/intelligence-flow.
2+
name: Sync from Intelligence Flow
3+
4+
on:
5+
schedule:
6+
- cron: "17 */6 * * *"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
concurrency:
14+
group: sync-intelligence-flow
15+
cancel-in-progress: false
16+
17+
jobs:
18+
sync:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out Boatstack
22+
uses: actions/checkout@v4
23+
with:
24+
path: boatstack-repo
25+
- name: Check out Intelligence Flow
26+
uses: actions/checkout@v4
27+
with:
28+
repository: operatorstack/intelligence-flow
29+
ref: main
30+
path: intelligence-flow
31+
- name: Generate projection
32+
id: generate
33+
shell: bash
34+
run: |
35+
source_commit="$(git -C intelligence-flow rev-parse HEAD)"
36+
python3 intelligence-flow/examples/12-product-engineering-loop/scripts/build_boatstack.py \
37+
--repo boatstack-repo \
38+
--source-commit "$source_commit" \
39+
--write
40+
echo "source_commit=$source_commit" >> "$GITHUB_OUTPUT"
41+
- name: Open generated pull request
42+
env:
43+
GH_TOKEN: ${{ github.token }}
44+
SOURCE_COMMIT: ${{ steps.generate.outputs.source_commit }}
45+
shell: bash
46+
run: |
47+
cd boatstack-repo
48+
if [[ -z "$(git status --porcelain)" ]]; then
49+
echo "Boatstack already matches Intelligence Flow."
50+
exit 0
51+
fi
52+
short="${SOURCE_COMMIT:0:12}"
53+
branch="sync/intelligence-flow-$short"
54+
existing="$(gh pr list --head "$branch" --state open --json url --jq '.[0].url')"
55+
if [[ -n "$existing" ]]; then
56+
echo "Upstream PR already open: $existing"
57+
exit 0
58+
fi
59+
git config user.name "github-actions[bot]"
60+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
61+
git switch -c "$branch"
62+
git add -A
63+
git commit -m "Sync Boatstack from Intelligence Flow $short"
64+
git push --set-upstream origin "$branch"
65+
gh pr create \
66+
--base main \
67+
--head "$branch" \
68+
--title "Sync Boatstack from Intelligence Flow $short" \
69+
--body "Generated from operatorstack/intelligence-flow@$SOURCE_COMMIT. Review provenance, tests, examples, and context-cost changes before merging."

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
__pycache__/
2+
*.py[cod]
3+
.DS_Store
4+
.venv/
5+
venv/

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated from operatorstack/intelligence-flow. -->
2+
3+
# Contributing
4+
5+
Boatstack is a generated distribution. Propose changes to workflow semantics, templates, evidence rules, or generated presentation in [Intelligence Flow](https://github.com/operatorstack/intelligence-flow/tree/5e1bbedab7d5bae49dd0e5cdda1e4b7804ab057f/examples/12-product-engineering-loop).
6+
7+
The Boatstack repository receives those changes through a generated pull request. Review the PR's `UPSTREAM.json`, tests, adapter diff, and context-size change; do not hand-edit generated output on `main`.
8+
9+
Repository-specific examples and outcome reports can be proposed upstream as new evidence. A failure becomes a durable move only after its mechanism and non-regression gate are documented.

README.md

Lines changed: 145 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,145 @@
1-
# boatstack
2-
Plan the route. Prove the work. Ship.
1+
<!-- Generated from operatorstack/intelligence-flow. Edit the upstream product-loop source, not this file. -->
2+
3+
# Boatstack
4+
5+
**Plan the route. Prove the work. Ship.**
6+
7+
Boatstack is loop engineering for coding agents: a model-neutral path from a product request to an explicitly approved, tested, reviewed pull request. Its behavior is generated from [Intelligence Flow at `5e1bbedab7d5bae49dd0e5cdda1e4b7804ab057f`](https://github.com/operatorstack/intelligence-flow/tree/5e1bbedab7d5bae49dd0e5cdda1e4b7804ab057f/examples/12-product-engineering-loop).
8+
9+
It is not a claim that a longer prompt writes better code. Here is what the loop actually does.
10+
11+
## One request, as executable state
12+
13+
Start with ordinary product intent:
14+
15+
```text
16+
Add machine-readable JSON output to the diagram printer while preserving the current text output.
17+
```
18+
19+
`/auto-plan` inspects the smallest relevant code boundary and makes contract choices visible:
20+
21+
```text
22+
Q1 Public API? sibling serializeFlowGraph() | change printFlowGraph()
23+
Q2 Stability? versioned schema | internal object dump
24+
Q3 Run data? compact overlay | entire execution trace
25+
```
26+
27+
The accepted answers become observable criteria and tasks—not hidden assumptions:
28+
29+
```json
30+
{
31+
"acceptance_criteria": [
32+
{"id": "AC-1", "text": "Return parseable schema-versioned graph JSON."},
33+
{"id": "AC-4", "text": "Keep existing ASCII output byte-compatible."}
34+
],
35+
"tasks": [{
36+
"id": "T-3",
37+
"acceptance_criteria": ["AC-1", "AC-4"],
38+
"validation": [
39+
"pnpm exec tsx examples/05-diagram-printer/json-check.ts",
40+
"diff -u expected-output.txt actual-output.txt"
41+
]
42+
}]
43+
}
44+
```
45+
46+
The compiler refuses a criterion with no task or verification. Then `/plan-gate` requires a named human and binds approval to content hashes:
47+
48+
```bash
49+
python3 boatstack/scripts/compile_plan.py \
50+
--plan .product-loop/features/diagram-json/plan.json \
51+
--out-dir .product-loop/features/diagram-json/compiled
52+
53+
python3 boatstack/scripts/approve_plan.py \
54+
--spec .product-loop/features/diagram-json/spec.md \
55+
--plan .product-loop/features/diagram-json/plan.json \
56+
--tasks .product-loop/features/diagram-json/compiled/tasks.json \
57+
--approved-by "Boateng Opoku-Yeboah" \
58+
--output .product-loop/features/diagram-json/plan.lock.json
59+
```
60+
61+
Build work checks that lock first:
62+
63+
```console
64+
$ python3 boatstack/scripts/approve_plan.py ... --check
65+
PASS: approved plan lock matches the current artifacts
66+
67+
# after plan.json changes
68+
$ python3 boatstack/scripts/approve_plan.py ... --check
69+
BLOCKED: stale or invalid plan lock: plan
70+
```
71+
72+
That is the approval boundary in code: conversation cannot silently turn a draft into permission to build.
73+
74+
See the complete, linked [worked example](examples/diagram-json/README.md).
75+
76+
## Install into a repository
77+
78+
```bash
79+
git clone https://github.com/operatorstack/boatstack.git && cd boatstack
80+
cp project.example.json /path/to/product/.boatstack-project.json
81+
# Replace the example paths and commands with facts from the product repository.
82+
83+
python3 boatstack/scripts/export_repo.py \
84+
--repo /path/to/product \
85+
--config /path/to/product/.boatstack-project.json \
86+
--adapter-name boatstack
87+
88+
# Review the dry run, then materialize it on a branch.
89+
python3 boatstack/scripts/export_repo.py \
90+
--repo /path/to/product \
91+
--config /path/to/product/.boatstack-project.json \
92+
--adapter-name boatstack \
93+
--write
94+
```
95+
96+
The exporter creates one canonical `.product-loop/` runtime and thin adapters for:
97+
98+
```text
99+
.cursor/commands/{auto-plan,plan-gate,build,test-gate,review,ship,retro}.md
100+
.cursor/rules/boatstack.mdc
101+
.agents/skills/boatstack/SKILL.md
102+
.claude/skills/boatstack/SKILL.md
103+
.github/PULL_REQUEST_TEMPLATE/boatstack.md
104+
```
105+
106+
It refuses to overwrite user-owned host files. Run the same export with `--check` in CI to detect drift.
107+
108+
## Why “loop engineering”
109+
110+
A coding model is one operator inside a controlled path:
111+
112+
```text
113+
intent -> questions -> spec -> plan -> human approval -> build
114+
-> test evidence -> review evidence -> PR -> failure analysis
115+
^ |
116+
+--- promoted moves ---+
117+
```
118+
119+
- **Optimization:** select the smallest context and ceremony that preserve the required quality and evidence constraints.
120+
- **Control:** represent state explicitly, gate transitions, verify outputs, preserve known-good progress, and feed observed failures into separately tested improvements.
121+
- **Model neutrality:** route on ambiguity, risk, convergence, tool results, and evidence—not model brand, price, or a guessed capability tier.
122+
123+
The full mapping from equations to files and checks is in [Loop engineering](docs/loop-engineering.md).
124+
125+
## Evidence, with boundaries
126+
127+
The rules were informed by a mechanically audited local corpus of **4,016 benchmark trial results** and **3,985 signal streams**, plus two real product-repository studies. For example:
128+
129+
| Observed failure | Encoded move |
130+
|---|---|
131+
| Restarting discarded partial progress | Preserve known-good state; repair locally |
132+
| Structured-output errors hid useful work | Validate and perform bounded same-step repair |
133+
| Stronger verification wording regressed | Treat self-review as evidence, not the oracle |
134+
| Blind context trimming lost accuracy | Select relevant context without deleting required state |
135+
| A development-slice gain did not transfer | Require representative gates before promoting a move |
136+
137+
Read the [research and design record](docs/research-and-design.md) and [corpus audit](docs/benchmark-corpus-audit.md). This evidence motivates the loop; it does not prove that every future feature or model will improve.
138+
139+
## Context has a budget
140+
141+
The three canonical runtime references currently total approximately **3371 estimated tokens** using `ceil(characters / 4)`. That is a stable compactness signal, not provider billing. Host adapters stay thin and load the operation-specific slice on demand.
142+
143+
## Status
144+
145+
Boatstack is an alpha research distribution. It can generate host adapters, compile traceable task/test artifacts, hash-lock explicit approval, detect stale plans, and preserve provenance. The next proof boundary is a paired feature-development evaluation against a plain host harness.

UPSTREAM.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"canonical_context": {
3+
"characters": 13481,
4+
"estimated_tokens": 3371,
5+
"estimator": "ceil(total characters / 4); compactness signal, not provider billing",
6+
"files": [
7+
"product-engineering-loop/references/workflow.md",
8+
"product-engineering-loop/references/artifacts.md",
9+
"product-engineering-loop/references/failure-moves.md"
10+
]
11+
},
12+
"files": {
13+
".github/workflows/ci.yml": "9480a65a3a4d24b42f7854566ad4a55100b7f2c2b25bffc6bb6b368ba0848104",
14+
".github/workflows/sync-upstream.yml": "54487a7da37c05a3676808026f867cd8532d8af18eb521acd761b9b0fe97da1b",
15+
".gitignore": "94fa252979321511b0ce5fa598f71905f6dc29c5bef6660ff4498a5a39c167ba",
16+
"CONTRIBUTING.md": "7cbc96cb16a74a66f1de152e188c3f6f78458d4afa3d1dbe43f30f0b9064c883",
17+
"README.md": "fdb309bc2b8f42bdd19381ed8f51c95488b7b3944a82a9fc87fc394ce5dc6e66",
18+
"boatstack/SKILL.md": "335731973cea2c5d0eb67b9d3870cc332490d1188e3943bb185ab78ab4b4b886",
19+
"boatstack/agents/openai.yaml": "8429c65868025e798d345cc2a9bd78f2bc3280ee982f8f7874504395d6d68368",
20+
"boatstack/assets/templates/adr.md": "c577a3c1c1319061f61deb053597e6e853657022185fe28b8f733327e2a78565",
21+
"boatstack/assets/templates/evidence.md": "12dac552bc5373ab443367d5797f41988f14284bcf46d16dfd72015cfddf9ad1",
22+
"boatstack/assets/templates/feature-spec.md": "c7e007cc4295ed4c599642c0587021ef978e729cf0946f6bf3a6c4f01d366ad4",
23+
"boatstack/assets/templates/gaps.md": "911cc2f086104d35071b952950c2ec44258641419f10b2355c594f33eb492cbe",
24+
"boatstack/assets/templates/move.md": "91bfd9a9b9426ac023eb88fd19f4f638190481c1855f1239acc73830528e50f0",
25+
"boatstack/assets/templates/plan-lock.json": "3e44dea05419cf198ee8112e9b9fdff92287edc2480a03fca026560fe929d468",
26+
"boatstack/assets/templates/plan.json": "803907480dd150da36337f3ecf46e3617f3e26ace9be282e540032983cb77e86",
27+
"boatstack/assets/templates/questions.md": "86c9bcf51172fe222b7b28bffccaf3da3b1ea0633c7a2348272fdbbd8eea6740",
28+
"boatstack/assets/templates/test-plan.md": "6db8a9f27dd171fb80222a501cae50eb051e7278c04703fa43b5ff86dd4d2df4",
29+
"boatstack/references/artifacts.md": "caaa7337674bf707a53f0854c7d95e58333ac566f2bc67f0d77533230796221a",
30+
"boatstack/references/failure-moves.md": "2d7d3988c70718e9cc02104f9899a00208173e2f654d1046edd22079f4d46f41",
31+
"boatstack/references/portability.md": "5490a045526c4cd6fd52bcddeb0039119208478fb17656cd2f6b3d5f71698ce6",
32+
"boatstack/references/workflow.md": "2c2343b3ef3dd7684dc6a027da4c8e5b1ce927cf3979aca32abea0d0d2028ee7",
33+
"boatstack/scripts/approve_plan.py": "92cb14cf0703bd25d053f8939575ab651a0274418d9ec85f3827f4c23c30001c",
34+
"boatstack/scripts/compile_plan.py": "523befa52993f5606a5ed7a91678459254ba6cfa074e9aafa9f4010876332968",
35+
"boatstack/scripts/export_repo.py": "42444369b2b4d8430b5347761626ac7725aae25aa4726b5bdca5325a4fc80ad0",
36+
"docs/benchmark-corpus-audit.md": "f2d206fe8579a514f9da82b2c96c19b343ac004be67617e1bd34f0f8e0e5e6c6",
37+
"docs/benchmark-submission-audit.md": "9518abdd17690729c6423f87cab20418ed47b0915b5faa44b9ef975e9e9c3b79",
38+
"docs/loop-engineering.md": "6b683402ab5e11aa418cf892cd941685e274eea981631233ddbb661a0363bc2d",
39+
"docs/research-and-design.md": "543836387090f8dc01381b1e46d1c6760bcbf8119b4004ece8d6f6f68d08db4f",
40+
"examples/diagram-json/README.md": "51871b16438cbef2bbdf5077dda0b5b06e77cbe76882d34e4a05c17c8f13a2b3",
41+
"examples/diagram-json/compiled/evidence.md": "1ba1c989ade070a8ef9a508fbd788d100d7292f2dbacbb2bce895468019f619d",
42+
"examples/diagram-json/compiled/tasks.json": "d66d693df1ba7dd34f65ce93afea54006563c14d642a1bf0d1d9311b3fcfb37b",
43+
"examples/diagram-json/compiled/test-matrix.json": "0497cf73f84515cfc493e4904eda4c2be6c0621fc0a11a3b1349803b5acf91cb",
44+
"examples/diagram-json/plan.json": "d1208003042a9d10f5efb010fc32fc7ac7bdefa427938260586e90daa0cb4414",
45+
"examples/diagram-json/plan.lock.json": "62d9506ef7a501d105f80ca715ed5c7ba79671fade4e3c7b8fe245b6d18424e9",
46+
"examples/diagram-json/questions.md": "1a0050041cac0a8d53e6ebfe04cbec4a298cdc8c50efeeb6fa15aeb663c5ec76",
47+
"examples/diagram-json/request.md": "0808fc41c36779c404f4a3a121167da6e76cac56df526e70f9ed6d3e0d4c02ed",
48+
"examples/diagram-json/spec.md": "a943c81cf2a88d23d5b300e6b9dc1dafc80923a9b6b9ab5297a67b4e2054b9d5",
49+
"project.example.json": "2054228f4c824d43385b7732e9f38f17739900d3cec6567bc23c5fe6c890d1be",
50+
"tests/test_boatstack.py": "9d61e552a196b9c9fba8bd175b7c3ae1fcfead1f61eb6396df065477086369e1"
51+
},
52+
"generator": "operatorstack/intelligence-flow:boatstack-distribution",
53+
"schema_version": 1,
54+
"source": {
55+
"commit": "5e1bbedab7d5bae49dd0e5cdda1e4b7804ab057f",
56+
"path": "examples/12-product-engineering-loop",
57+
"repository": "operatorstack/intelligence-flow"
58+
}
59+
}

0 commit comments

Comments
 (0)