Skip to content

Commit 911b4ff

Browse files
author
pylon-upstream-sync[bot]
committed
chore(pylon): establish fork governance and sync
1 parent bc0fa76 commit 911b4ff

10 files changed

Lines changed: 441 additions & 11 deletions

File tree

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Pylon fork governance and synchronization
2+
/.github/workflows/ @rynfar
3+
/scripts/pylon-sync-upstream.sh @rynfar
4+
/AGENTS.md @rynfar
5+
/PYLON.md @rynfar
6+
/.pylon/ @rynfar

.github/workflows/changelog-fragment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Changelog fragment
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened, labeled, unlabeled]
6-
branches: [main]
6+
branches: [pylon]
77

88
permissions:
99
pull-requests: read

.github/workflows/ci.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
name: CI
22

33
on:
4+
workflow_call:
5+
inputs:
6+
checkout_ref:
7+
description: Exact candidate commit to verify from a trusted Pylon workflow
8+
required: false
9+
type: string
410
push:
5-
branches: [main]
11+
branches: [pylon]
612
pull_request:
7-
branches: [main]
13+
branches: [pylon]
14+
types: [opened, synchronize, reopened, ready_for_review]
815

916
concurrency:
10-
group: ci-${{ github.ref }}
17+
group: ci-${{ inputs.checkout_ref || github.ref }}
1118
cancel-in-progress: true
1219

1320
permissions:
@@ -16,13 +23,26 @@ permissions:
1623
jobs:
1724
trust:
1825
name: Contributor trust
26+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1927
runs-on: ubuntu-latest
2028
outputs:
21-
allowed: ${{ github.event_name == 'push' || steps.vouch.outputs.vouched == 'true' }}
29+
allowed: ${{ github.event_name == 'workflow_call' || github.event_name == 'push' || steps.sync.outputs.allowed == 'true' || steps.vouch.outputs.vouched == 'true' }}
2230
steps:
31+
- name: Recognize the internal upstream sync pull request
32+
id: sync
33+
if: github.event_name == 'pull_request'
34+
env:
35+
HAS_SYNC_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'pylon-upstream-sync') }}
36+
HEAD_REF: ${{ github.event.pull_request.head.ref }}
37+
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
38+
run: |
39+
if [ "$HAS_SYNC_LABEL" = true ] && [ "$HEAD_REPOSITORY" = "pylon-code/prime-agent" ] && [[ "$HEAD_REF" == automation/prime-upstream-* ]]; then
40+
echo "allowed=true" >> "$GITHUB_OUTPUT"
41+
fi
42+
2343
- name: Check pull request author
2444
id: vouch
25-
if: github.event_name == 'pull_request'
45+
if: github.event_name == 'pull_request' && steps.sync.outputs.allowed != 'true'
2646
uses: mitchellh/vouch/action/check-user@d66fa29a64600490892131ad87597c30c91fcac4 # v1
2747
with:
2848
user: ${{ github.event.pull_request.user.login }}
@@ -40,6 +60,7 @@ jobs:
4060
- name: Checkout
4161
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4262
with:
63+
ref: ${{ inputs.checkout_ref || github.ref }}
4364
persist-credentials: false
4465

4566
- name: Setup Node.js
@@ -52,7 +73,7 @@ jobs:
5273
run: |
5374
sudo apt-get update
5475
sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev fd-find ripgrep
55-
sudo ln -s $(which fdfind) /usr/local/bin/fd
76+
sudo ln -s "$(which fdfind)" /usr/local/bin/fd
5677
5778
- name: Install dependencies
5879
run: npm ci
@@ -113,6 +134,7 @@ jobs:
113134
- name: Checkout
114135
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
115136
with:
137+
ref: ${{ inputs.checkout_ref || github.ref }}
116138
persist-credentials: false
117139

118140
- name: Setup Node.js
@@ -125,7 +147,7 @@ jobs:
125147
run: |
126148
sudo apt-get update
127149
sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev fd-find ripgrep
128-
sudo ln -s $(which fdfind) /usr/local/bin/fd
150+
sudo ln -s "$(which fdfind)" /usr/local/bin/fd
129151
130152
- name: Install dependencies
131153
run: npm ci
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Pylon upstream sync
2+
3+
on:
4+
schedule:
5+
- cron: "17 7 * * *"
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: pylon-upstream-sync
10+
cancel-in-progress: false
11+
12+
permissions:
13+
contents: write
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
sync:
19+
name: Mirror and prepare merge
20+
if: github.repository == 'pylon-code/prime-agent' && github.ref == 'refs/heads/pylon'
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 10
23+
outputs:
24+
candidate_sha: ${{ steps.sync.outputs.candidate_sha }}
25+
pr_url: ${{ steps.sync.outputs.pr_url }}
26+
steps:
27+
- name: Checkout Pylon product branch
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
with:
30+
ref: pylon
31+
fetch-depth: 0
32+
33+
- name: Mirror Prime and open a draft merge pull request
34+
id: sync
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: scripts/pylon-sync-upstream.sh
38+
39+
verify:
40+
name: Verify candidate with trusted fork CI
41+
needs: sync
42+
if: needs.sync.outputs.candidate_sha != ''
43+
permissions:
44+
contents: read
45+
uses: ./.github/workflows/ci.yml
46+
with:
47+
checkout_ref: ${{ needs.sync.outputs.candidate_sha }}

.pylon/features.yaml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
schema: 1
2+
fork:
3+
repository: https://github.com/pylon-code/prime-agent
4+
upstream_repository: https://github.com/PrimeIntellect-ai/prime-agent
5+
upstream_branch: main
6+
mirror_branch: main
7+
product_branch: pylon
8+
tracking_issue: https://github.com/pylon-code/prime-agent/issues/1
9+
reviewed_upstream_commit: bc0fa7606abb3b7af0f765319518d255e6ae553d
10+
reviewed_at: 2026-08-27
11+
12+
decisions:
13+
managed-plan-daemon:
14+
area: progress
15+
state: shipped
16+
owner: pylon-server
17+
decision: retain
18+
pylon_refs:
19+
- https://github.com/pylon-code/pylon/issues/114
20+
- https://github.com/pylon-code/pylon/pull/116
21+
fork_change: none
22+
upstream_support: Prime extensions can register a todo tool, but the daemon has no native managed-plan event.
23+
revisit_when:
24+
- Prime ships a negotiated structured plan event or equivalent managed tool-result contract.
25+
- Pylon behavioral evaluation shows the full-snapshot model is too noisy or unreliable.
26+
27+
managed-plan-acp:
28+
area: progress
29+
state: gap
30+
owner: pylon-prime-integration
31+
decision: redesign
32+
pylon_refs:
33+
- https://github.com/pylon-code/pylon/issues/114
34+
fork_change: candidate
35+
upstream_support: ACP does not expose a trustworthy Pylon-managed structured plan result.
36+
revisit_when:
37+
- Prime adds authenticated extension provenance and structured ACP tool-result metadata.
38+
- A standard ACP plan protocol becomes available.
39+
40+
mobile-plan-rendering:
41+
area: progress
42+
state: gap
43+
owner: pylon-client
44+
decision: retain
45+
pylon_refs:
46+
- https://github.com/pylon-code/pylon/issues/114
47+
fork_change: none
48+
upstream_support: not applicable
49+
revisit_when:
50+
- Pylon mobile and web share a provider-neutral plan renderer.
51+
52+
delegated-work-progress:
53+
area: progress
54+
state: design
55+
owner: pylon-client-runtime
56+
decision: redesign
57+
pylon_refs:
58+
- https://github.com/pylon-code/pylon/issues/114
59+
fork_change: possible-capability
60+
upstream_support: Prime exposes subagent lifecycle separately from root plan state.
61+
revisit_when:
62+
- Root progress can summarize delegated phases without creating one plan row per worker.
63+
- Prime exposes a stable aggregate delegated-work status where Pylon lacks one.
64+
65+
background-process-lifecycle:
66+
area: autonomous-work
67+
state: gap
68+
owner: shared
69+
decision: hybridize
70+
pylon_refs:
71+
- https://github.com/pylon-code/pylon/issues/114
72+
fork_change: candidate
73+
upstream_support: Prime has native background execution, but Pylon lacks complete public lifecycle and ownership mapping.
74+
revisit_when:
75+
- Prime publishes list, correlation, cancellation, and terminal lifecycle events.
76+
77+
heartbeat-projection:
78+
area: autonomous-work
79+
state: blocked
80+
owner: shared
81+
decision: hybridize
82+
pylon_refs:
83+
- https://github.com/pylon-code/pylon/issues/114
84+
fork_change: none-yet
85+
upstream_support: Prime exposes heartbeat list, management, and change APIs.
86+
blocker: Pylon needs canonical autonomous occurrence, turn, checkpoint, and active-run ownership.
87+
revisit_when:
88+
- The provider-neutral autonomous-work ownership model is implemented.
89+
- Prime changes heartbeat dispatch or lifecycle APIs.
90+
91+
scheduled-prompts:
92+
area: autonomous-work
93+
state: blocked
94+
owner: shared
95+
decision: redesign
96+
pylon_refs:
97+
- https://github.com/pylon-code/pylon/issues/114
98+
fork_change: candidate
99+
upstream_support: Prime exposes scheduled prompt APIs, but not all Pylon run ownership and history guarantees.
100+
blocker: Pylon needs canonical occurrence identity, restart adoption, cancellation, outcomes, limits, and checkpoint ownership.
101+
revisit_when:
102+
- The provider-neutral autonomous-work ownership model is implemented.
103+
- Prime publishes stronger scheduled-run lifecycle APIs.
104+
105+
pylon-read-context:
106+
area: agent-context
107+
state: gap
108+
owner: pylon-server
109+
decision: retain
110+
pylon_refs:
111+
- https://github.com/pylon-code/pylon/issues/114
112+
fork_change: none
113+
upstream_support: not applicable
114+
revisit_when:
115+
- Pylon ships scoped read-only context and checkpoint MCP capabilities.

.pylon/upstream-review.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Pylon upstream review ledger
2+
3+
This ledger records Prime upstream evidence and the decision taken for each overlapping Pylon feature. `.pylon/features.yaml` is the current machine-readable state; this file is the chronological review record.
4+
5+
## Entry template
6+
7+
- Date and upstream commit or release
8+
- Prime issues, pull requests, releases, and source reviewed
9+
- Affected feature keys from `.pylon/features.yaml`
10+
- Decision: `adopt`, `hybridize`, `retain`, or `redesign`
11+
- Reason and Pylon constraints
12+
- Validation performed
13+
- Follow-up or revisit trigger
14+
15+
## 2026-08-27 — fork baseline
16+
17+
- Upstream baseline: `PrimeIntellect-ai/prime-agent@bc0fa7606abb3b7af0f765319518d255e6ae553d`
18+
- Latest audited release: `v0.8.1`
19+
- Reviewed Prime's extension todo example, daemon plan and heartbeat APIs, ACP event surface, background execution work, releases, and related public issues and pull requests.
20+
- `managed-plan-daemon`: **retain** Pylon's allowlisted full-snapshot managed extension. Prime has an extension example, not an equivalent reconnect-safe managed daemon plan contract.
21+
- `managed-plan-acp`: **redesign** as a small capability-gated fork bridge. Do not expose arbitrary extension tool details.
22+
- `delegated-work-progress`: **redesign** around phase-level root progress plus the separate Agents surface. Do not create one plan item per subagent.
23+
- `heartbeat-projection` and `background-process-lifecycle`: **hybridize** after Pylon defines provider-neutral autonomous occurrence and checkpoint ownership.
24+
- `scheduled-prompts`: **redesign** after the same ownership foundation. Prime's native scheduling is useful but is not itself Pylon's durable cross-provider scheduler model.
25+
- No fork source behavior was added at baseline. The first fork change should target a measured Pylon parity gap and include stock-Prime degradation tests.

AGENTS.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Development Rules
22

3+
## Pylon fork policy
4+
5+
On the `pylon` branch and branches based on it, read and follow `PYLON.md` before making changes. `main` is an exact Prime upstream mirror; all Pylon product work targets `pylon`. When upstream and Pylon overlap, preserve Pylon behavior until `.pylon/features.yaml` records a reviewed `adopt`, `hybridize`, `retain`, or `redesign` decision.
6+
37
## Conversational Style
48

59
- No fluff or cheerful filler text
@@ -71,9 +75,10 @@ When closing issues via commit:
7175

7276
## PR Workflow
7377

74-
- Analyze PRs without pulling locally first
75-
- If the user approves: create a feature branch, pull PR, rebase on main, apply adjustments, commit, merge into main, push, close PR, and leave a comment in the user's tone
76-
- We work in feature branches until everything is according to the user's requirements. Never merge PRs by yourself.
78+
- Analyze PRs without pulling locally first.
79+
- For Pylon product work, branch from the latest `origin/pylon`, apply adjustments, commit only your files, push the task branch, and open a pull request against `pylon`.
80+
- Never commit or merge Pylon changes into `main`; it is the exact Prime upstream mirror.
81+
- We work in feature branches until everything meets the user's requirements. Never merge pull requests by yourself.
7782

7883
## Testing Prime Agent Interactive Mode with tmux
7984

PYLON.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Pylon Prime Agent fork
2+
3+
This repository is Pylon's long-lived Prime Agent fork. It follows Prime upstream closely while allowing Pylon-owned integration behavior to remain when upstream has no suitable equivalent.
4+
5+
## Branches and remotes
6+
7+
- `main` is an exact fast-forward mirror of `PrimeIntellect-ai/prime-agent:main`. Never commit Pylon changes to it.
8+
- `pylon` is the default product branch. Branch feature work from the latest `origin/pylon` and open pull requests back to `pylon`.
9+
- The local `upstream` remote must be fetch-only. Never push to a Prime Intellect remote.
10+
- Do not hard-reset, force-push, or wholesale rebase `pylon` onto upstream.
11+
12+
The daily `Pylon upstream sync` workflow fast-forwards `main`, then opens a draft merge pull request into `pylon`. Clean candidates run through the trusted `pylon` CI definition with no secrets or persisted Git credentials. A conflict opens or updates one blocker issue and requires a human resolution branch from `pylon`; the workflow never resolves conflicts automatically.
13+
14+
Sync and manual conflict-resolution pull requests must use merge commits so `pylon` retains ancestry from the exact upstream commit. The mirror push must use the built-in `GITHUB_TOKEN`: replacing it with a PAT or app token would allow an upstream-owned push workflow to execute when `main` advances.
15+
16+
## Upstream overlap decisions
17+
18+
Before adding or changing a Pylon-owned integration:
19+
20+
1. Search current Prime Agent issues, pull requests, releases, and source.
21+
2. Update `.pylon/features.yaml` with the current ownership and upstream evidence.
22+
3. Choose one explicit decision:
23+
- `adopt`: use the upstream implementation and remove the superseded fork behavior;
24+
- `hybridize`: use upstream primitives behind a Pylon-owned contract;
25+
- `retain`: keep the fork behavior because upstream does not meet Pylon's needs;
26+
- `redesign`: replace both implementations with a smaller coherent model.
27+
4. Capability-gate optional daemon or ACP behavior and keep stock Prime degradation local.
28+
5. Add the decision and validation result to `.pylon/upstream-review.md`.
29+
30+
Pylon divergence has no expiry date. Remove it only when evidence shows that another implementation genuinely supersedes it.
31+
32+
## Release boundary
33+
34+
Mirroring upstream must not publish packages, binaries, or beta releases. Keep the inherited release workflow disabled in the fork, and never expose upstream-known release secrets at repository scope. Fork artifact names, package ownership, provenance, signing, and release channels require a separate reviewed design before automated publishing is enabled.
35+
36+
## Product integration principles
37+
38+
- Keep orchestration and durable ownership in Pylon when the behavior spans providers.
39+
- Put Prime-specific protocol translation and missing Prime lifecycle primitives at the fork boundary.
40+
- Prefer negotiated capabilities to version guesses.
41+
- Keep structured progress concise. The root plan describes meaningful user-visible outcomes, not every tool call or delegated worker.
42+
- Preserve a stock-Prime fallback when Pylon can do so without weakening correctness or trust boundaries.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
Prime Agent: A Self-Improving RLM Harness
1313
</h3>
1414

15+
> This is Pylon's long-lived Prime Agent fork. It synchronizes with [Prime upstream](https://github.com/PrimeIntellect-ai/prime-agent) daily while preserving Pylon integrations that upstream does not yet provide. See [PYLON.md](PYLON.md) for branch, synchronization, and overlap policy.
16+
1517
<p align="center">
1618
<a href="packages/coding-agent/docs/index.md">Documentation</a> &bull;
1719
<a href="https://github.com/PrimeIntellect-ai/verifiers">Verifiers</a> &bull;

0 commit comments

Comments
 (0)