Skip to content

chore: add project standards (AGENTS.md, CI, devlog, e2e scaffold) - #10

Merged
ranxianglei merged 1 commit into
masterfrom
2026-08-13_project-standards
Aug 13, 2026
Merged

chore: add project standards (AGENTS.md, CI, devlog, e2e scaffold)#10
ranxianglei merged 1 commit into
masterfrom
2026-08-13_project-standards

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Add project standards to billion-context-opencode, bringing it to the same contributing standard as opencode-acp (adapted for this MIT monorepo with a single published package).

Files

File Purpose
AGENTS.md (~436 lines) MIT monorepo dev spec. Documents the dual-shape mechanism (Object.assign(v1Fn, {id, setup}) + why Plugin.define identity makes one package serve V1+V2), @bili/core private workspace, call↔result pairing invariant, splice-in-place reassembly, per-session lock contract, gh-guard note, git-safety table, and the absolute PR-merge prohibition (human-only).
.github/workflows/ci.yml Matrix Node 22/24 → npm ci → typecheck → build → test. Job named build so branch protection can require it.
.github/workflows/pr-checks.yml Runs scripts/ci/check-pr.sh (branch regex, devlog, changelog-on-bump). Job named pr-validation.
.github/workflows/release.yml On push to master: detects release-branch merge (YYYY-MM-DD_release-v*, standard + squash patterns) → tag v{VERSION}npm publish --workspace billion-context-opencode → GitHub Release. Prerelease (- suffix) → npm dev tag. workflow_dispatch(force) override. Publishes only the public package.
scripts/ci/check-pr.sh Branch name ^\d{4}-\d{2}-\d{2}_[a-z0-9.-]+$, devlog REQ.md+WORKLOG.md existence, changelog entry when packages/billion-context-opencode/package.json version bumps.
devlog/{README,REQ.template,WORKLOG.template,DESIGN.template}.md Naming convention + lighter templates adapted from opencode-acp.
devlog/2026-08-13_project-standards/{REQ,WORKLOG}.md This task's devlog entry (so check-pr passes).
scripts/e2e/{README.md,run-e2e.sh} E2e scaffold only — README documents the planned Docker + fake-LLM + state-asserting harness (deferred); run-e2e.sh is a stub. Full e2e is a follow-up.
README.md Append ## Changelog with ### v0.1.0 baseline entry (existing content preserved).

Adaptations vs opencode-acp

  • License: MIT (not AGPL-3.0).
  • Monorepo: npm workspaces; CI runs npm run typecheck --workspaces, build/test target the billion-context-opencode workspace.
  • Single published package: release publishes --workspace billion-context-opencode only; @bili/core is private (never published).
  • Default branch: master (renamed from main).
  • No Chinese README: dropped the README.zh-CN.md changelog check.
  • Version source: packages/billion-context-opencode/package.json (not root).

Verification

  • bash scripts/ci/check-pr.sh 2026-08-13_project-standards origin/masterPASS
  • npm run typecheck --workspaces → clean ✅ (no source touched)
  • bash -n scripts/ci/check-pr.sh → syntax valid ✅
  • YAML lint (python3 -m yaml) → all 3 workflows parse ✅
  • git status → only README.md modified + new AGENTS.md / .github/ / devlog/ / scripts/no packages/ changes

Notes

  • No version bump (standards-only PR). First real release will follow the §5.4.2 release-branch process.
  • NPM_TOKEN secret still needs to be added to repo settings for release.yml to publish (documented in AGENTS.md §5.4.3).
  • Branch protection already configured (1 review, enforce_admins: false); should additionally require the build and pr-validation checks.

…affold)

Bring billion-context-opencode to opencode-acp's contributing standard:

- AGENTS.md (~436 lines): MIT monorepo dev spec. Documents the dual-shape
  mechanism (Object.assign + Plugin.define identity), @bili/core private
  workspace, call<->result pairing invariant, splice-in-place reassembly,
  per-session lock contract, gh-guard note, git-safety rules, and the
  absolute PR-merge prohibition (human-only).
- .github/workflows/ci.yml: matrix Node 22/24, typecheck+build+test (job 'build')
- .github/workflows/pr-checks.yml: runs check-pr.sh (job 'pr-validation')
- .github/workflows/release.yml: release-branch merge -> tag + publish
  ONLY billion-context-opencode (--workspace) + GitHub Release;
  prerelease (-suffix) -> npm dev tag; workflow_dispatch force override
- scripts/ci/check-pr.sh: branch regex, devlog presence, changelog-on-bump
- devlog/: README + REQ/WORKLOG/DESIGN templates + this task's entry
- scripts/e2e/: README (planned Docker harness) + run-e2e.sh stub
- README.md: append Changelog section (### v0.1.0 baseline)

Verified: check-pr.sh passes on this branch, typecheck clean, yaml parses.
@ranxianglei
ranxianglei merged commit 3ee259b into master Aug 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant