@plot-ai/darwin-arm64 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@plot-ai/darwin-arm64",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "orchestrate coding agents against an issue tracker",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/igorsheg/plot.git",
10
+ "directory": "packages/plot"
11
+ },
12
+ "homepage": "https://github.com/igorsheg/plot",
13
+ "bugs": {
14
+ "url": "https://github.com/igorsheg/plot/issues"
15
+ },
16
+ "os": [
17
+ "darwin"
18
+ ],
19
+ "cpu": [
20
+ "arm64"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "files": [
26
+ "bin",
27
+ "web-dist",
28
+ "pi-resources",
29
+ "package.json"
30
+ ]
31
+ }
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: plot-commit
3
+ description: "session-aware conventional commits for plot. produces commits with summary, rationale, and validation evidence. use when committing implementation work during orchestrated issue execution."
4
+ ---
5
+
6
+ # plot-commit
7
+
8
+ ## goals
9
+
10
+ - produce commits that reflect the actual code changes and session context
11
+ - follow conventional commit format with rationale
12
+ - never stage unrelated changes
13
+
14
+ ## steps
15
+
16
+ 1. inspect working tree and staged changes:
17
+
18
+ ```bash
19
+ git status
20
+ git diff
21
+ git diff --staged
22
+ ```
23
+
24
+ 2. stage only your changes explicitly — never `git add -A` or `git add .`:
25
+
26
+ ```bash
27
+ git add <specific-files>
28
+ ```
29
+
30
+ 3. sanity-check staged files — flag build artifacts, logs, or temp files before committing.
31
+
32
+ 4. choose a conventional type that matches the change:
33
+ - `feat(scope):` — new feature
34
+ - `fix(scope):` — bug fix
35
+ - `refactor(scope):` — restructuring without behavior change
36
+ - `docs(scope):` — documentation only
37
+ - `test(scope):` — test additions/changes
38
+ - `chore(scope):` — tooling, deps, config
39
+
40
+ 5. write the commit message:
41
+
42
+ ```
43
+ <type>(<scope>): <short summary, imperative mood, ≤72 chars>
44
+
45
+ Summary:
46
+ - <what changed>
47
+
48
+ Rationale:
49
+ - <why it changed>
50
+
51
+ Validation:
52
+ - <what was verified, or "not run (reason)">
53
+ ```
54
+
55
+ 6. commit using a file to preserve formatting:
56
+ ```bash
57
+ cat > /tmp/commit-msg.md << 'EOF'
58
+ <message>
59
+ EOF
60
+ git commit -F /tmp/commit-msg.md
61
+ ```
62
+
63
+ ## rules
64
+
65
+ - subject line: imperative mood, ≤72 chars, no trailing period
66
+ - body lines: wrapped at 72 chars
67
+ - staged diff must match the commit message — if they diverge, fix the index or revise the message
68
+ - one logical change per commit when practical
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: plot-debug
3
+ description: "investigate stuck runs, retry loops, and execution failures in the plot orchestrator. correlates logs by issue id, workspace path, and session state. use when runs stall, retry repeatedly, or fail unexpectedly."
4
+ ---
5
+
6
+ # plot-debug
7
+
8
+ ## goals
9
+
10
+ - find why a run is stuck, retrying, or failing
11
+ - correlate issue identity to agent session and workspace
12
+ - read the right logs in the right order to isolate root cause
13
+
14
+ ## log sources
15
+
16
+ plot logs to stdout as structured key-value pairs. relevant log messages include:
17
+
18
+ | message | meaning |
19
+ | ----------------------- | ------------------------------------ |
20
+ | `dispatch` | agent dispatched for issue |
21
+ | `agent_session_created` | pi session started in workspace |
22
+ | `retry_scheduled` | retry queued (continuation or error) |
23
+ | `retry_issue_gone` | issue disappeared during retry |
24
+ | `reconcile` | active run state check |
25
+ | `tick` | poll cycle summary |
26
+ | `workspace_ready` | workspace created/reused |
27
+ | `agent_failed` | agent exited with error |
28
+ | `worker_interrupted` | agent was stopped by reconciliation |
29
+
30
+ ## correlation keys
31
+
32
+ - `issue_id` — numeric github issue number
33
+ - `identifier` — human-readable `#N`
34
+ - `state` — issue state at dispatch time
35
+ - `workspace` — absolute workspace path
36
+ - `attempt` — retry attempt number
37
+ - `error` — failure reason (or `continuation` for normal re-check)
38
+
39
+ ## quick triage
40
+
41
+ ### issue not being picked up
42
+
43
+ ```bash
44
+ # check if issue has correct label
45
+ gh issue view <number> --repo $GITHUB_REPO --json labels
46
+
47
+ # check server logs for candidate detection
48
+ # look for tick logs showing candidates > 0
49
+ ```
50
+
51
+ possible causes:
52
+
53
+ - missing or wrong `plot:*` state label (unlabeled issues are ignored)
54
+ - issue already claimed (check `running` or `retrying` counts)
55
+ - no available slots (`max_concurrent_agents` reached)
56
+ - issue has non-terminal blockers (`plot:todo` state only)
57
+
58
+ ### agent stuck / not progressing
59
+
60
+ ```bash
61
+ # check if session is still running
62
+ # look for recent reconcile logs with stopped: 0
63
+
64
+ # check stall timeout config
65
+ # default: 120000ms (2 min) — if no events for this long, agent is killed
66
+ ```
67
+
68
+ possible causes:
69
+
70
+ - agent waiting for user input (hard fail in pi)
71
+ - stall timeout too short for complex tasks
72
+ - workspace has broken state (missing deps, corrupt git)
73
+
74
+ ### retry loop
75
+
76
+ ```bash
77
+ # look for repeated retry_scheduled logs for same issue_id
78
+ # check error field — if "continuation", agent completed normally
79
+ # if actual error, check the error message
80
+ ```
81
+
82
+ possible causes:
83
+
84
+ - `continuation` retries are normal (agent finished, orchestrator re-checks if issue still active)
85
+ - `retry_issue_gone` means issue was closed/moved to terminal state during retry
86
+ - real errors trigger exponential backoff: 10s, 20s, 40s... up to max_retry_backoff_ms
87
+
88
+ ### workspace issues
89
+
90
+ ```bash
91
+ # check workspace exists and is valid
92
+ ls -la workspaces/<workspace-key>/
93
+
94
+ # check git worktree state
95
+ cd workspaces/<workspace-key> && git status
96
+
97
+ # check if hooks failed (after_create, before_run)
98
+ # look for hook timeout/failure in logs
99
+ ```
100
+
101
+ ## investigation flow
102
+
103
+ 1. identify the issue: `identifier` or `issue_id`
104
+ 2. find dispatch logs: look for `dispatch` with matching identifier
105
+ 3. find session logs: look for `agent_session_created` with matching issue_id
106
+ 4. check outcome: `retry_scheduled` (error field tells you why)
107
+ 5. if stuck: check `reconcile` logs — is `stopped` incrementing?
108
+ 6. if retry loop: check retry `attempt` numbers — are they climbing?
109
+
110
+ ## orchestrator state
111
+
112
+ the server exposes runtime state at `http://localhost:3000/rpc` via RPC. the dashboard at `http://localhost:3000` shows:
113
+
114
+ - running sessions with turn counts and token usage
115
+ - retry queue with attempt numbers and due times
116
+ - aggregate token totals and runtime
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: plot-land
3
+ description: "merge an approved PR for plot. monitors CI, resolves conflicts, handles review feedback, squash-merges, and transitions issue to plot:done. use when issue enters plot:merging state."
4
+ ---
5
+
6
+ # plot-land
7
+
8
+ ## goals
9
+
10
+ - ensure PR is conflict-free with main
11
+ - address any outstanding review feedback
12
+ - squash-merge the PR when checks pass
13
+ - transition issue to plot:done and close it
14
+
15
+ ## preconditions
16
+
17
+ - `gh` CLI is authenticated
18
+ - issue is in `plot:merging` state (label)
19
+ - a PR exists for the current branch
20
+
21
+ ## steps
22
+
23
+ 1. locate the PR:
24
+
25
+ ```bash
26
+ branch=$(git branch --show-current)
27
+ pr_number=$(gh pr view --json number -q .number --repo "$GITHUB_REPO")
28
+ ```
29
+
30
+ 2. run the review feedback sweep before merging:
31
+
32
+ ```bash
33
+ # top-level PR comments
34
+ gh pr view "$pr_number" --repo "$GITHUB_REPO" --comments
35
+
36
+ # inline review comments (line-level)
37
+ gh api repos/$GITHUB_REPO/pulls/$pr_number/comments
38
+
39
+ # review summaries
40
+ gh pr view "$pr_number" --repo "$GITHUB_REPO" --json reviews
41
+ ```
42
+
43
+ for each actionable comment:
44
+ - **accept**: implement fix, commit, push
45
+ - **push back**: reply with justification
46
+ - **clarify**: ask for specifics
47
+
48
+ do not merge while review comments are outstanding.
49
+
50
+ 3. check mergeability:
51
+
52
+ ```bash
53
+ mergeable=$(gh pr view --json mergeable -q .mergeable --repo "$GITHUB_REPO")
54
+ ```
55
+
56
+ if `CONFLICTING`:
57
+ - use the `plot-pull-main` skill to merge origin/main and resolve conflicts
58
+ - use the `plot-push-pr` skill to push the updated branch
59
+
60
+ if `UNKNOWN`:
61
+ - wait and re-check
62
+
63
+ 4. run local verification:
64
+
65
+ ```bash
66
+ bun run typecheck
67
+ bun run lint
68
+ ```
69
+
70
+ 5. watch CI checks:
71
+
72
+ ```bash
73
+ gh pr checks "$pr_number" --repo "$GITHUB_REPO" --watch
74
+ ```
75
+
76
+ if checks fail:
77
+ - inspect logs: `gh run view <run-id> --log`
78
+ - fix locally, commit with `plot-commit`, push with `plot-push-pr`
79
+ - re-run check watch
80
+
81
+ use judgment for flaky failures (timeouts on one platform) — may proceed.
82
+
83
+ 6. squash-merge:
84
+
85
+ ```bash
86
+ pr_title=$(gh pr view --json title -q .title --repo "$GITHUB_REPO")
87
+ gh pr merge "$pr_number" --squash --subject "$pr_title" --repo "$GITHUB_REPO"
88
+ ```
89
+
90
+ 7. transition issue to `plot:done`:
91
+ ```bash
92
+ # extract issue number from PR body (Resolves #N)
93
+ issue_number=$(gh pr view "$pr_number" --repo "$GITHUB_REPO" --json body -q '.body | capture("Resolves #(\d+)").["1"]')
94
+
95
+ gh issue edit "$issue_number" --repo "$GITHUB_REPO" --remove-label "plot:merging" --add-label "plot:done"
96
+
97
+ gh issue close "$issue_number" --repo "$GITHUB_REPO"
98
+ ```
99
+
100
+ ## review response format
101
+
102
+ when responding to feedback on the PR:
103
+
104
+ ```
105
+ [plot] <response — what you're doing about this comment>
106
+ ```
107
+
108
+ prefix all agent-generated PR comments with `[plot]`.
109
+
110
+ ## rules
111
+
112
+ - never call `gh pr merge` without completing the review sweep first
113
+ - only use `--force-with-lease` if history was rewritten; prefer normal push
114
+ - do not enable auto-merge — run the full watch loop
115
+ - address correctness feedback with concrete validation before closing it
116
+ - after pushing fixes, post a summary comment:
117
+ ```
118
+ [plot] Changes since last review:
119
+ - <bullets>
120
+ Commits: <sha>
121
+ Validation: <commands run>
122
+ ```
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: plot-pull-main
3
+ description: "sync current branch with origin/main using merge and zdiff3 conflict resolution. use before implementation starts and before pushing to ensure branch is up to date."
4
+ ---
5
+
6
+ # plot-pull-main
7
+
8
+ ## goals
9
+
10
+ - keep feature branch current with `origin/main`
11
+ - resolve merge conflicts with intent-preserving edits
12
+ - verify project health after merge
13
+
14
+ ## steps
15
+
16
+ 1. ensure working tree is clean:
17
+
18
+ ```bash
19
+ git status
20
+ ```
21
+
22
+ if dirty, commit or stash changes first.
23
+
24
+ 2. enable rerere for learned conflict resolution:
25
+
26
+ ```bash
27
+ git config rerere.enabled true
28
+ git config rerere.autoupdate true
29
+ ```
30
+
31
+ 3. fetch latest refs:
32
+
33
+ ```bash
34
+ git fetch origin
35
+ ```
36
+
37
+ 4. sync remote feature branch first (catches remote auto-commits):
38
+
39
+ ```bash
40
+ git pull --ff-only origin $(git branch --show-current) || true
41
+ ```
42
+
43
+ 5. merge origin/main with zdiff3 for clearer conflict context:
44
+
45
+ ```bash
46
+ git -c merge.conflictstyle=zdiff3 merge origin/main
47
+ ```
48
+
49
+ 6. if conflicts appear, resolve them following the protocol below, then:
50
+
51
+ ```bash
52
+ git add <resolved-files>
53
+ git merge --continue
54
+ ```
55
+
56
+ 7. verify project health:
57
+ ```bash
58
+ bun run typecheck
59
+ bun run lint
60
+ ```
61
+
62
+ ## conflict resolution protocol
63
+
64
+ - inspect before editing:
65
+
66
+ ```bash
67
+ git status # list conflicted files
68
+ git diff # see conflict hunks
69
+ git diff :1:<file> :2:<file> # base vs ours
70
+ git diff :1:<file> :3:<file> # base vs theirs
71
+ ```
72
+
73
+ - with zdiff3, conflict markers include `|||||||` (base) between ours and theirs — use it to understand both sides' intent
74
+
75
+ - resolve strategy:
76
+ 1. state what each side is trying to achieve
77
+ 2. identify the shared goal
78
+ 3. decide the final behavior first, then write the code
79
+ 4. prefer preserving API contracts and user-visible behavior
80
+
81
+ - resolve one file at a time, run verification after each logical batch
82
+
83
+ - for generated files: resolve source files first, then regenerate
84
+
85
+ - for import conflicts: accept both sides temporarily, then run lint to remove unused imports
86
+
87
+ - confirm no conflict markers remain:
88
+ ```bash
89
+ git diff --check
90
+ ```
91
+
92
+ ## rules
93
+
94
+ - always merge, never rebase (preserves history for orchestrator tracking)
95
+ - use `--ff-only` for same-branch pulls only
96
+ - document merge result in workpad Notes section:
97
+ - merge source(s)
98
+ - result: `clean` or `conflicts resolved`
99
+ - resulting HEAD short SHA
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: plot-push-pr
3
+ description: "push branch and create/update pull request for plot. handles PR creation, template compliance, title/body maintenance, and closed PR detection. use when publishing changes and opening or updating a PR."
4
+ ---
5
+
6
+ # plot-push-pr
7
+
8
+ ## goals
9
+
10
+ - push current branch to origin safely
11
+ - create or update a PR with template-compliant body
12
+ - detect and handle closed/merged PR branches
13
+
14
+ ## steps
15
+
16
+ 1. identify current branch and confirm it's not `main`:
17
+
18
+ ```bash
19
+ branch=$(git branch --show-current)
20
+ if [ "$branch" = "main" ]; then echo "ERROR: do not push directly to main"; exit 1; fi
21
+ ```
22
+
23
+ 2. run validation before pushing:
24
+
25
+ ```bash
26
+ bun run typecheck
27
+ bun run lint
28
+ ```
29
+
30
+ 3. push branch to origin:
31
+
32
+ ```bash
33
+ git push -u origin HEAD
34
+ ```
35
+
36
+ if push is rejected (non-fast-forward), sync first:
37
+
38
+ ```bash
39
+ git fetch origin
40
+ git merge origin/main
41
+ git push -u origin HEAD
42
+ ```
43
+
44
+ 4. check if a PR already exists for this branch:
45
+
46
+ ```bash
47
+ pr_state=$(gh pr view --json state -q .state --repo "$GITHUB_REPO" 2>/dev/null || echo "NONE")
48
+ ```
49
+
50
+ 5. handle PR state:
51
+ - `NONE` → create new PR
52
+ - `OPEN` → update existing PR
53
+ - `MERGED` or `CLOSED` → branch is stale; create a new branch and PR
54
+
55
+ 6. create PR with template compliance:
56
+
57
+ ```bash
58
+ gh pr create --title "#<number>: <clear description of change>" --body-file /tmp/pr-body.md --repo "$GITHUB_REPO"
59
+ ```
60
+
61
+ after creation:
62
+ - ensure the PR body includes `Resolves #<number>` so GitHub links and closes the issue on merge
63
+ - move the issue into review by swapping labels:
64
+
65
+ ```bash
66
+ gh issue edit <number> --repo "$GITHUB_REPO" --remove-label "plot:in-progress" --add-label "plot:human-review"
67
+ ```
68
+
69
+ 7. update existing PR if scope changed:
70
+ ```bash
71
+ gh pr edit --title "#<number>: <updated title>" --body-file /tmp/pr-body.md --repo "$GITHUB_REPO"
72
+ ```
73
+
74
+ after update:
75
+ - keep `Resolves #<number>` in the PR body so linkage stays intact
76
+
77
+ ## PR body template
78
+
79
+ the PR body must follow `.github/pull_request_template.md`. fill every section:
80
+
81
+ ```markdown
82
+ ## Summary
83
+
84
+ <what this PR does — 1-2 sentences>
85
+
86
+ ## Changes
87
+
88
+ - <key change 1>
89
+ - <key change 2>
90
+
91
+ ## Verification
92
+
93
+ - [x] Typecheck passes (`bun run typecheck`)
94
+ - [x] Lint passes (`bun run lint`)
95
+ - <additional verification done>
96
+
97
+ ## Issue
98
+
99
+ Resolves #<number>
100
+ ```
101
+
102
+ ## rules
103
+
104
+ - never force push (`--force` or `-f`)
105
+ - `--force-with-lease` only when history was rewritten (rebase)
106
+ - PR title format: `#<number>: <short description>`
107
+ - PR body must have all template sections filled — no placeholder comments
108
+ - on branch updates, reconsider whether PR title still matches scope
109
+ - return PR URL after creation/update