opencastle 1.12.9 → 1.13.0
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 +8 -1
- package/src/orchestrator/agent-workflows/shared-delivery-phase.md +6 -5
- package/src/orchestrator/agents/team-lead.agent.md +1 -1
- package/src/orchestrator/plugins/github/skills/github-platform/SKILL.md +24 -1
- package/src/orchestrator/prompts/bug-fix.prompt.md +1 -1
- package/src/orchestrator/prompts/implement-feature.prompt.md +1 -1
- package/src/orchestrator/skills/git-workflow/SKILL.md +12 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencastle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "What your team's AI learns stays with the team: lessons from what agents remember, reviewed in pull requests and loaded by every teammate's assistant, beside shared instructions, skills, agents and MCP servers. Works with Claude Code, Copilot, Cursor, Windsurf, OpenCode, Codex, Antigravity and Devin, or on its own.",
|
|
6
6
|
"bin": {
|
|
@@ -69,5 +69,12 @@
|
|
|
69
69
|
"smol-toml": "^1.9.0",
|
|
70
70
|
"valibot": "^1.2.0",
|
|
71
71
|
"yaml": "^2.8.2"
|
|
72
|
+
},
|
|
73
|
+
"overrides": {
|
|
74
|
+
"sharp": "^0.35.5",
|
|
75
|
+
"lodash": "^4.18.1",
|
|
76
|
+
"anymatch": {
|
|
77
|
+
"picomatch": "^2.3.2"
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
80
|
}
|
|
@@ -8,11 +8,12 @@ The last phase of every workflow template, once the work is implemented and veri
|
|
|
8
8
|
|
|
9
9
|
1. **Commit** to the feature branch, with the tracker issue ID in the messages when there is one.
|
|
10
10
|
2. **Push** it: `git push -u origin <branch>`.
|
|
11
|
-
3. **Open
|
|
11
|
+
3. **Open one draft pull request** at the first push, with the body written to a file first so the shell cannot mangle it. If the task already has one, push to its branch instead:
|
|
12
12
|
```bash
|
|
13
|
-
GH_PAGER=cat gh pr create --base main --title "<title>" --body-file /tmp/pr-body.md
|
|
13
|
+
GH_PAGER=cat gh pr create --draft --base main --title "<title>" --body-file /tmp/pr-body.md
|
|
14
14
|
```
|
|
15
|
-
4. **
|
|
16
|
-
5. **
|
|
15
|
+
4. **Mark it ready** (`gh pr ready <n>`) once every part is in and the tests, lint and build pass locally. CI runs from then on.
|
|
16
|
+
5. **Do NOT merge** — a person reviews and merges it.
|
|
17
|
+
6. **Link it** from the tracker issue, when there is one.
|
|
17
18
|
|
|
18
|
-
Whoever coordinates the work owns delivery: the Team Lead creates the branch before delegating, sub-agents
|
|
19
|
+
Whoever coordinates the work owns delivery: the Team Lead creates the branch before delegating, sub-agents commit to that branch, and only the Team Lead pushes, opens the one draft pull request and marks it ready. A sub-agent never opens a pull request (**git-workflow**).
|
|
@@ -57,7 +57,7 @@ Independent tasks can run at the same time; a task that needs another's output w
|
|
|
57
57
|
|
|
58
58
|
## Deliver
|
|
59
59
|
|
|
60
|
-
Run the project's tests, lint and build on the whole change, then
|
|
60
|
+
Every task's commits go to one feature branch, and the task gets one pull request, opened as a draft at the first push. Tell each agent the branch in its delegation, and that it commits there and opens no pull request. Run the project's tests, lint and build on the whole change, then mark the draft ready (**git-workflow**). Report what each task did, how it was verified, and what is left open. Never push to `main`, and never merge your own pull request.
|
|
61
61
|
|
|
62
62
|
## Larger, unattended work
|
|
63
63
|
|
|
@@ -20,7 +20,7 @@ GitHub's own remote server, `https://api.githubcopilot.com/mcp/`. VS Code signs
|
|
|
20
20
|
- **A review is pending until submitted.** Comments added to a pending review are invisible to everyone else, and a session that ends before the submit leaves them unsent.
|
|
21
21
|
- **Why a PR cannot merge:** `gh pr view 42 --json mergeStateStatus`. `BEHIND` needs a rebase onto its base, `DIRTY` has conflicts, `BLOCKED` lacks a required review or check, `UNSTABLE` has a non-required check failing.
|
|
22
22
|
- **A person merges**, as git-workflow says. Stop at a reviewed PR with green checks, though both the server and `gh` offer a merge.
|
|
23
|
-
-
|
|
23
|
+
- One task is one PR, a draft until every part is in (`gh pr create --draft`, then `gh pr ready 42`), as git-workflow says. `gh pr ready 42 --undo` turns it back into a draft for a larger rework. `Closes #123` in the body closes the issue only when the PR merges into the default branch.
|
|
24
24
|
- In a review comment, a ```` ```suggestion ```` block replaces the commented lines when the author applies it. Use it for any fix that fits those lines.
|
|
25
25
|
- Search allows 30 requests a minute. Narrow with `repo:` and `is:open` rather than paging.
|
|
26
26
|
|
|
@@ -44,6 +44,29 @@ The REST API returns review comments without saying which are resolved. GraphQL
|
|
|
44
44
|
|
|
45
45
|
Done when step 1 shows every thread you fixed as resolved. A point you disagree with gets a reply and stays open for the reviewer.
|
|
46
46
|
|
|
47
|
+
## CI on drafts
|
|
48
|
+
|
|
49
|
+
A draft collects many pushes, so its workflows skip the expensive jobs and run them once the PR is ready:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
on:
|
|
53
|
+
pull_request:
|
|
54
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
55
|
+
|
|
56
|
+
jobs:
|
|
57
|
+
test:
|
|
58
|
+
if: github.event.pull_request.draft == false
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- `ready_for_review` is not a default type: without it, marking the PR ready runs nothing until the next push.
|
|
62
|
+
- A workflow that also runs on `push` or `schedule` needs `if: github.event_name != 'pull_request' || !github.event.pull_request.draft`.
|
|
63
|
+
- A job that `needs` a skipped job is skipped too, unless its `if` calls `always()` or `!cancelled()`. Such a job needs the draft condition of its own.
|
|
64
|
+
- A `push:` trigger on branches other than the default runs on every push to a draft. Run branch CI through `pull_request` instead.
|
|
65
|
+
- A skipped job reports success to a required check. Drafts cannot merge, and marking the PR ready reruns every job on the same commit.
|
|
66
|
+
- Keep a secret scan running on drafts. It takes seconds, and a pushed secret is exposed whether the PR is ready or not.
|
|
67
|
+
|
|
68
|
+
Done when a push to a draft runs only what is meant to run there, and `gh pr ready` starts the rest.
|
|
69
|
+
|
|
47
70
|
## Failing checks
|
|
48
71
|
|
|
49
72
|
1. `gh pr checks 42` lists every check on the head commit. `--watch --fail-fast` waits, and stops at the first failure.
|
|
@@ -30,5 +30,5 @@ Fix the bug the user described with this command, here, in this session.
|
|
|
30
30
|
|
|
31
31
|
- The reproduction passes now; run the project's tests, lint and build.
|
|
32
32
|
- Have the fix reviewed (**fast-review**). One that touches auth, permissions or data access: **panel-majority-vote**.
|
|
33
|
-
- Commit on a branch
|
|
33
|
+
- Commit on a branch, open one draft pull request at the first push, and mark it ready once the fix and its test pass locally (**git-workflow**). Report the cause, the fix, the test, and how you verified it.
|
|
34
34
|
- It fixes an entry in `.opencastle/KNOWN-ISSUES.md`: update or remove the entry. A cause others will hit again: record a lesson (**self-improvement**).
|
|
@@ -34,6 +34,6 @@ Implement the change the user gave with this command — a feature, a roadmap it
|
|
|
34
34
|
|
|
35
35
|
## 5. Deliver
|
|
36
36
|
|
|
37
|
-
- Commit on a feature branch
|
|
37
|
+
- Commit on a feature branch, open one draft pull request at the first push, and mark it ready when every part is in and verified; never push to `main` (**git-workflow**). Link the tracker issue when there is one.
|
|
38
38
|
- Report what changed (files), how you verified it, what is still open, and anything you noticed outside the task, with its file and line.
|
|
39
39
|
- Something you confirmed that is true for anyone working here, such as a fix after a failure or a convention the code does not show: save it as about the project (**self-improvement**).
|
|
@@ -14,10 +14,16 @@ description: "Branch names, commit messages, pushing and opening a pull request,
|
|
|
14
14
|
| History | Never `--force` or `--amend` on a shared branch; `--force-with-lease` on your own only |
|
|
15
15
|
| Secrets | None in commits, pull request bodies or output; a leaked one is rotated at once |
|
|
16
16
|
|
|
17
|
+
## One task, one pull request
|
|
18
|
+
|
|
19
|
+
A task (one tracker issue, or one request when there is none) gets one branch and one pull request in each repository it touches. Every part of it lands there as another commit, whoever does the part. A sub-agent commits to the branch it is given and never opens a pull request of its own. A fix the task needs while its pull request is open is another commit on that branch, not a second pull request. Split into several pull requests only when the person asks for a stack (**github-platform**).
|
|
20
|
+
|
|
21
|
+
The pull request is a **draft** from the first push until every part is in and the project's tests, lint and build pass locally. CI runs once it is marked ready, not on each push to a draft (**github-platform** shows the workflow setting), so check locally before marking it ready, and after that push the remaining fixes together rather than one at a time.
|
|
22
|
+
|
|
17
23
|
## Deliver
|
|
18
24
|
|
|
19
25
|
1. Commit, then push: `git push -u origin <branch>`.
|
|
20
|
-
2.
|
|
26
|
+
2. At the first push, open the draft, with its body in a file — an inline `--body` breaks on backticks and quotes in zsh:
|
|
21
27
|
|
|
22
28
|
```sh
|
|
23
29
|
cat > /tmp/pr-body.md << 'EOF'
|
|
@@ -26,10 +32,13 @@ description: "Branch names, commit messages, pushing and opening a pull request,
|
|
|
26
32
|
## Changes
|
|
27
33
|
- ...
|
|
28
34
|
EOF
|
|
29
|
-
GH_PAGER=cat gh pr create --base main --title "TAS-42: Short description" --body-file /tmp/pr-body.md
|
|
35
|
+
GH_PAGER=cat gh pr create --draft --base main --title "TAS-42: Short description" --body-file /tmp/pr-body.md
|
|
30
36
|
```
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
Already open for this task? `gh pr list --head <branch>` finds it: push to its branch, and update its body when the scope grows (`gh pr edit <n> --body-file /tmp/pr-body.md`).
|
|
39
|
+
|
|
40
|
+
3. When every part is in and verified, mark it ready: `gh pr ready <n>`. CI runs now; fix what fails on the same branch.
|
|
41
|
+
4. Do not merge it. Link it from the tracker issue when there is one.
|
|
33
42
|
|
|
34
43
|
## The tracker
|
|
35
44
|
|