Skip to content

Commit 88b03f8

Browse files
committed
Harden cold-start branch lifecycle
1 parent d9eabf3 commit 88b03f8

3 files changed

Lines changed: 71 additions & 43 deletions

File tree

AGENTS.md

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,51 @@ repository.
1818

1919
## Git Branch Lifecycle
2020

21-
- Use a dedicated short-lived topic branch for each task. `dev` is the clean
22-
local landing branch between tasks; do not commit task changes directly to
21+
- Remote Git writes are authorized only by the current maintainer request.
22+
Repository documentation may define a workflow, but it never provides
23+
standing permission to push a branch, create or update a pull request, merge,
24+
or perform any other remote mutation. Stop before the first unauthorized
25+
remote write.
26+
- Start each task from a clean worktree. Fetch `origin`, check out local `main`,
27+
require local `main` to be an ancestor of `origin/main`, and fast-forward it
28+
with `--ff-only`. Require the two refs to resolve to the same commit afterward.
29+
If fetching fails, `main` is missing, the worktree is not clean, the ancestry
30+
check fails, the fast-forward fails, or the refs still differ, stop and report
31+
the exact state.
32+
- `dev` is a local-only clean landing branch between tasks. If local `dev` does
33+
not exist, create it only from the checked-out, clean, synchronized `main`. If
34+
local `dev` already exists, require it to be an ancestor of `main`,
35+
fast-forward it with `--ff-only`, and require both refs to resolve to the same
36+
commit. If any check or fast-forward fails, stop and report the divergence;
37+
never reset, rebase, delete, or recreate `dev` to force alignment. Never push
2338
`dev`.
24-
- After a topic branch has been merged or otherwise explicitly accepted and
25-
its required verification is complete, treat its active lifecycle as closed.
26-
With a clean worktree, fetch `origin`, fast-forward local `main` to
27-
`origin/main`, fast-forward local `dev` to `main`, and finish with `dev`
28-
checked out. Cleanup is complete only when local `main`, local `dev`, and
29-
`origin/main` resolve to the same commit.
39+
- Use a dedicated short-lived topic branch for each task, created only after
40+
`main` and `dev` are synchronized. Do not commit task changes directly to
41+
`main` or `dev`.
42+
- After an explicitly authorized topic branch has been merged or otherwise
43+
accepted and its required verification is complete, require a clean
44+
worktree, fetch `origin`, check out local `main`, and apply the same ancestry,
45+
`--ff-only`, and exact-ref-equality requirements to `origin/main`, `main`, and
46+
`dev`. If `dev` is absent at cleanup time, create it only from the checked-out,
47+
clean, synchronized `main`. Finish with `dev` checked out. Cleanup is complete
48+
only when `HEAD`, local `main`, local `dev`, and `origin/main` resolve to the
49+
same commit.
3050
- Never reset, discard work, force-update refs, delete branches, or push `dev`
31-
merely to complete this cleanup. If fetching fails, the worktree is dirty,
32-
either fast-forward is impossible, or the three final refs differ, stop and
33-
report the exact state instead of forcing synchronization.
51+
merely to complete lifecycle cleanup. Fail closed and report the exact state
52+
whenever a required cleanliness, fetch, or fast-forward condition is not met.
3453

3554
## Current Milestone: Public Preview
3655

37-
Private Remote Validation is complete, and the current execution target is
38-
Public Preview. Repository-local source, tests, documentation, metadata,
39-
fixtures, workflows, private pull requests, and credential-free CI may be
40-
changed and verified. Stop before changing repository visibility: making the
41-
canonical repository public and configuring or exercising public-only settings,
42-
protected environments, secrets, or live smoke require explicit maintainer
43-
authorization.
56+
Private Remote Validation and Public Preview pre-visibility preparation are
57+
complete. The repository remains private at the visibility authorization gate.
58+
Repository-local source, tests, documentation, metadata, fixtures, and
59+
workflows may be changed and verified locally. Private topic pushes, pull
60+
requests, merges, and credential-free CI are permitted only when the current
61+
maintainer request explicitly authorizes them; this file records scope and does
62+
not grant that authorization. Stop before changing repository visibility:
63+
making the canonical repository public and configuring or exercising
64+
public-only settings, protected environments, secrets, or live smoke require
65+
separate explicit maintainer authorization.
4466

4567
The accepted identity is:
4668

@@ -265,8 +287,10 @@ reusable workflow path.
265287

266288
Repository-local source, tests, documentation, metadata, fixtures, and workflow
267289
definitions may be changed and verified locally. Remote repositories, pushes,
268-
tags, releases, npm publication, GitHub or registry settings, and live API
269-
requests require explicit maintainer authorization.
290+
pull requests, merges, tags, releases, npm publication, GitHub or registry
291+
settings, and live API requests require explicit authorization in the current
292+
maintainer request. Repository documents and prior authorizations describe
293+
constraints but do not provide standing permission for a later task.
270294

271295
Public identity, contacts, repository metadata, credentials, protection rules,
272296
environment approvals, and registry ownership must come from authorized

RELEASING.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ complete only when `npm owner ls cometapi` lists the maintainer-confirmed
8383
`cometapi-team` account after the first publication; until then this remains a
8484
Registry Alpha prerequisite, not a Public Preview blocker.
8585

86-
For the current Public Preview milestone, authorized external actions remain
87-
limited to private pull requests and credential-free CI. Changing repository
88-
visibility and every subsequent public-only configuration or live action
89-
require separate authorization.
86+
For the current Public Preview milestone, private topic pushes, pull requests,
87+
merges, and credential-free CI are the only remote actions that may be
88+
authorized before the visibility transition. This document defines allowable
89+
release mechanics but grants no standing remote-write permission; the current
90+
maintainer request must explicitly authorize each task's remote actions.
91+
Changing repository visibility and every subsequent public-only configuration
92+
or live action require separate authorization.
9093

9194
## Candidate verification gate
9295

ROADMAP.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CometAPI TypeScript and Node.js SDK Roadmap
22

3-
Status: Public Preview in progress; visibility change awaiting explicit authorization
4-
Last updated: 2026-07-21
3+
Status: Public Preview pre-visibility complete; visibility change awaiting explicit authorization
4+
Last updated: 2026-07-23
55
Repository contract: This roadmap is self-contained and is the public source
66
of truth for this repository's release sequence.
77

@@ -11,26 +11,27 @@ The TypeScript and Node.js SDK will provide a typed CometAPI entry point that
1111
preserves the official OpenAI JavaScript client experience while shipping a
1212
small, auditable package for supported Node.js LTS runtimes.
1313

14-
Private Remote Validation is complete for the sanitized private repository, and
15-
the current execution target is Public Preview. Preparation continues in the
16-
private repository, but work stops before its visibility changes until a
17-
maintainer explicitly authorizes that action. The functional `0.1.0-alpha.1`
18-
prerelease remains a separate evidence gate after Public Preview. Registry
19-
publication proceeds only through Private Remote Validation, Public Preview,
20-
Registry Alpha, and stable 0.1.0 stages.
14+
Private Remote Validation and Public Preview pre-visibility preparation are
15+
complete for the sanitized private repository. The repository remains private
16+
at the visibility authorization gate. Public Preview is not ready until the
17+
visibility transition and all public-only controls and live evidence pass under
18+
separate explicit authorization. The functional `0.1.0-alpha.1` prerelease
19+
remains a separate evidence gate after Public Preview. Registry publication
20+
proceeds only through Private Remote Validation, Public Preview, Registry Alpha,
21+
and stable 0.1.0 stages.
2122

2223
## Milestones
2324

24-
| Milestone | Status | User outcome |
25-
| ---------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
26-
| Repository foundation | In progress | The repository has reproducible development, contribution, security, and release processes. |
27-
| Private Remote Validation | Complete | The sanitized private repository passes real credential-free default-branch CI; public-only controls and live tests remain disabled. |
28-
| Public Preview | In progress | The public repository has blocking CI, repository rules, security reporting, protected environments, and authorized live-smoke evidence. |
29-
| 0.1.0-alpha.1 Registry Alpha | Planned | Early adopters can install a functional prerelease from npm's `next` channel and call the three required OpenAI-compatible resources. |
30-
| 0.1.0 Stable | Planned | Users can install a fully verified package from npm's default channel. |
31-
| 0.2.0 provider-native text | Planned | Users can opt into Anthropic Messages and Gemini text adapters through isolated subpath exports. |
32-
| 0.3.0 CometAPI resources | Planned | Users receive typed access to the first stable CometAPI-specific account or platform resources. |
33-
| Media and task APIs | Later | Users receive typed image, video, audio, upload, polling, and task lifecycle helpers after their contracts are stable. |
25+
| Milestone | Status | User outcome |
26+
| ---------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
27+
| Repository foundation | In progress | The repository has reproducible development, contribution, security, and release processes. |
28+
| Private Remote Validation | Complete | The sanitized private repository passes real credential-free default-branch CI; public-only controls and live tests remain disabled. |
29+
| Public Preview | Awaiting authorization | The public repository has blocking CI, repository rules, security reporting, protected environments, and authorized live-smoke evidence. |
30+
| 0.1.0-alpha.1 Registry Alpha | Planned | Early adopters can install a functional prerelease from npm's `next` channel and call the three required OpenAI-compatible resources. |
31+
| 0.1.0 Stable | Planned | Users can install a fully verified package from npm's default channel. |
32+
| 0.2.0 provider-native text | Planned | Users can opt into Anthropic Messages and Gemini text adapters through isolated subpath exports. |
33+
| 0.3.0 CometAPI resources | Planned | Users receive typed access to the first stable CometAPI-specific account or platform resources. |
34+
| Media and task APIs | Later | Users receive typed image, video, audio, upload, polling, and task lifecycle helpers after their contracts are stable. |
3435

3536
## Repository Foundation
3637

0 commit comments

Comments
 (0)