@plainconceptsplatform/agent-harness 3.8.2 → 3.9.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/LICENSE +21 -21
- package/README.md +551 -549
- package/cli/commands/join.js +259 -259
- package/cli/commands/migrate.js +310 -310
- package/cli/commands/shared.js +27 -27
- package/cli/commands/single.js +79 -79
- package/cli/commands/update.js +121 -121
- package/cli/commands/wizard.js +134 -134
- package/cli/fragments/archive/az.md +97 -97
- package/cli/fragments/archive/gh.md +96 -96
- package/cli/fragments/archive/gl.md +96 -96
- package/cli/fragments/archive/none.md +75 -75
- package/cli/fragments/guardrails/codegraph.md +5 -5
- package/cli/fragments/guardrails/humanizer.md +4 -4
- package/cli/fragments/guardrails/memory.md +4 -4
- package/cli/fragments/guardrails/rtk.md +3 -3
- package/cli/fragments/guardrails/simple-english.md +4 -4
- package/cli/fragments/ops-backlog/az.md +28 -28
- package/cli/fragments/ops-backlog/gh.md +28 -28
- package/cli/fragments/ops-backlog/jira.md +28 -28
- package/cli/fragments/ops-review/az.md +62 -62
- package/cli/fragments/ops-review/gh.md +51 -51
- package/cli/fragments/ops-review/gl.md +55 -55
- package/cli/fragments/ops-ship/az.md +81 -81
- package/cli/fragments/ops-ship/gh.md +67 -67
- package/cli/fragments/ops-ship/gl.md +84 -84
- package/cli/index.js +116 -116
- package/cli/presets/agents-content.json +34 -34
- package/cli/presets/browser.json +10 -10
- package/cli/presets/clean.json +21 -21
- package/cli/presets/models.json +68 -68
- package/cli/presets/optimization.json +32 -32
- package/cli/presets/platforms.json +76 -76
- package/cli/presets/source.json +23 -23
- package/cli/steps/browser/index.js +48 -48
- package/cli/steps/clean/index.js +120 -120
- package/cli/steps/copy/agents.js +176 -160
- package/cli/steps/copy/commands.js +79 -79
- package/cli/steps/copy/fullstack-engineer.js +81 -89
- package/cli/steps/copy/index.js +88 -88
- package/cli/steps/copy/opencode-json.js +324 -324
- package/cli/steps/copy/skills.js +316 -316
- package/cli/steps/metadata/index.js +115 -115
- package/cli/steps/models/format.js +88 -88
- package/cli/steps/models/index.js +64 -64
- package/cli/steps/models/write.js +38 -38
- package/cli/steps/openspec/index.js +136 -136
- package/cli/steps/optimization/codegraph.js +141 -141
- package/cli/steps/optimization/detect.js +66 -66
- package/cli/steps/optimization/humanizer.js +17 -17
- package/cli/steps/optimization/index.js +158 -158
- package/cli/steps/optimization/memory.js +91 -91
- package/cli/steps/optimization/patch-guardrails.js +111 -111
- package/cli/steps/optimization/simple-english.js +17 -17
- package/cli/steps/optimization/skills-lock.js +30 -30
- package/cli/steps/platform/index.js +109 -109
- package/cli/steps/source/index.js +123 -123
- package/cli/utils/agent-color.js +111 -111
- package/cli/utils/copy.js +134 -134
- package/cli/utils/exec-spinner.js +47 -47
- package/cli/utils/exec.js +134 -134
- package/cli/utils/legacy-check.js +30 -30
- package/cli/utils/models-cache.js +58 -58
- package/cli/utils/models-pricing.js +42 -42
- package/cli/utils/paths.js +82 -82
- package/cli/utils/process.js +3 -3
- package/cli/utils/terminal.js +6 -6
- package/cli/utils/update-manifest.js +75 -75
- package/harness/.opencode/_gitignore +12 -10
- package/harness/.opencode/commands/init.md +5 -5
- package/harness/.opencode/commands/make-architecture.md +5 -5
- package/harness/.opencode/commands/make-design.md +5 -5
- package/harness/.opencode/commands/make-engineer.md +5 -5
- package/harness/.opencode/commands/make-guardrails.md +5 -5
- package/harness/.opencode/commands/make-user-model.md +5 -5
- package/harness/.opencode/commands/ops-backlog.md +10 -10
- package/harness/.opencode/commands/ops-review.md +10 -10
- package/harness/.opencode/commands/ops-ship.md +9 -9
- package/harness/.opencode/commands/plan-apply.md +9 -9
- package/harness/.opencode/commands/plan-archive.md +7 -7
- package/harness/.opencode/commands/plan-explore.md +11 -11
- package/harness/.opencode/commands/plan-goal.md +5 -5
- package/harness/.opencode/commands/plan-propose.md +11 -11
- package/harness/.opencode/commands/plan-quick.md +7 -7
- package/harness/.opencode/commands/plan-story.md +11 -11
- package/harness/.opencode/commands/repo-audit.md +7 -7
- package/harness/.opencode/commands/repo-help.md +5 -5
- package/harness/.opencode/commands/repo-initialize.md +5 -5
- package/harness/.opencode/commands/repo-onboard.md +5 -5
- package/harness/.opencode/commands/repo-verify.md +5 -5
- package/harness/.opencode/package.json +2 -1
- package/harness/.opencode/plugins/pc-commit-coauthor.js +41 -41
- package/harness/.opencode/plugins/pc-subagent-monitor.js +184 -184
- package/harness/.opencode/plugins/pc-subagent-tiers-core.js +337 -0
- package/harness/.opencode/plugins/pc-subagent-tiers.js +34 -345
- package/harness/.opencode/plugins/pc-system-reminders.js +424 -424
- package/harness/.opencode/scripts/check-diff.mjs +305 -305
- package/harness/.opencode/scripts/code-rules.mjs +288 -288
- package/harness/.opencode/scripts/harness-doctor.mjs +52 -0
- package/harness/.opencode/scripts/harness-doctor.test.mjs +58 -0
- package/harness/.opencode/scripts/platform-contract.mjs +366 -366
- package/harness/.opencode/scripts/sync-agents.mjs +29 -0
- package/harness/AGENTS.md +55 -49
- package/harness/ARCHITECTURE.md +13 -13
- package/harness/DESIGN.md +13 -13
- package/harness/opencode.jsonc +36 -36
- package/harness/openspec/config.yaml +20 -20
- package/harness/skills-lock.json +17 -17
- package/package.json +12 -14
- package/skills/README.md +18 -18
- package/skills/agent-harness-cli/SKILL.md +86 -86
- package/skills/browser-automation/SKILL.md +72 -72
- package/skills/pc-guardrails-generic/SKILL.md +53 -53
- package/skills/pc-guardrails-project/SKILL.md +8 -8
- package/skills/pc-make-architecture/SKILL.md +33 -33
- package/skills/pc-make-architecture/structure-template.md +64 -64
- package/skills/pc-make-design/SKILL.md +45 -45
- package/skills/pc-make-engineer/SKILL.md +59 -59
- package/skills/pc-make-engineer/signal-mapping.md +53 -53
- package/skills/pc-make-engineer/template.md +36 -36
- package/skills/pc-make-guardrails/SKILL.md +44 -44
- package/skills/pc-make-guardrails/category-reference.md +112 -112
- package/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
- package/skills/pc-make-merge-risk-assess/category-reference.md +114 -114
- package/skills/pc-make-user-model/SKILL.md +56 -56
- package/skills/pc-ops-ship/SKILL.md +22 -22
- package/skills/pc-plan-apply/SKILL.md +90 -90
- package/skills/pc-plan-apply/simple-mode.md +21 -21
- package/skills/pc-plan-archive/SKILL.md +66 -66
- package/skills/pc-plan-explore/SKILL.md +21 -21
- package/skills/pc-plan-goal/SKILL.md +91 -91
- package/skills/pc-plan-goal/branching.md +39 -39
- package/skills/pc-plan-goal/failure-policy.md +30 -30
- package/skills/pc-plan-goal/output-mode.md +10 -10
- package/skills/pc-plan-goal/output.md +71 -71
- package/skills/pc-plan-propose/SKILL.md +127 -127
- package/skills/pc-plan-propose/task-annotation.md +39 -39
- package/skills/pc-plan-quick/SKILL.md +46 -46
- package/skills/pc-plan-story/SKILL.md +93 -93
- package/skills/pc-repo-audit/SKILL.md +44 -44
- package/skills/pc-repo-help/SKILL.md +87 -87
- package/skills/pc-repo-initialize/SKILL.md +119 -119
- package/skills/pc-repo-onboard/SKILL.md +32 -32
- package/skills/pc-repo-verify/SKILL.md +150 -150
- package/skills/pc-userstory-az/SKILL.md +71 -71
- package/skills/pc-userstory-browser/SKILL.md +64 -64
- package/skills/pc-userstory-gh/SKILL.md +63 -63
- package/skills/pc-userstory-jira/SKILL.md +74 -74
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# Branching procedure
|
|
2
|
-
|
|
3
|
-
Resolve and record the branch names. If the invoking workflow already placed you on a feature branch (`feature/*`, `fix/*`, etc.), it owns the branch: do not stash, switch, pull, or rename. The sandbox hosting the workflow has no git credentials, so those commands would either corrupt the tree or hang, and the workflow has already cut the branch from the default branch. Treat its result as given.
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
BRANCH="$(git branch --show-current)"
|
|
7
|
-
case "$BRANCH" in
|
|
8
|
-
feature/*|fix/*|chore/*|docs/*|refactor/*)
|
|
9
|
-
START_BRANCH="$BRANCH"
|
|
10
|
-
DEFAULT_BRANCH="$BRANCH"
|
|
11
|
-
GOAL_STASH="none"
|
|
12
|
-
;;
|
|
13
|
-
*)
|
|
14
|
-
START_BRANCH="$BRANCH"
|
|
15
|
-
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
16
|
-
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
17
|
-
|
|
18
|
-
# Stash uncommitted work when needed and record that the goal stash exists.
|
|
19
|
-
git stash push -u -m "goal-wip"
|
|
20
|
-
GOAL_STASH="goal-wip"
|
|
21
|
-
|
|
22
|
-
# Create the feature branch from the synchronized default branch.
|
|
23
|
-
git switch "$DEFAULT_BRANCH"
|
|
24
|
-
|
|
25
|
-
if git remote get-url origin >/dev/null 2>&1; then
|
|
26
|
-
git pull origin "$DEFAULT_BRANCH"
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
git switch -c "feature/{slug}"
|
|
30
|
-
BRANCH="$(git branch --show-current)"
|
|
31
|
-
;;
|
|
32
|
-
esac
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Record the branch name and that `feature/{slug}` was applied unconditionally, so downstream phases can restore if they move off it.
|
|
36
|
-
|
|
37
|
-
Everything through archive happens on `$BRANCH`.
|
|
38
|
-
|
|
39
|
-
When a later phase renames `$BRANCH` to match the canonical change slug (Phase 3 of `pc-plan-goal`), skip the rename if the workflow already fixed the name. Renaming would call `git branch -m`, which a credentialless sandbox refuses, and the workflow's `create_pull_request` is told to use the branch as named. Detect this by checking that `$BRANCH` already starts with `feature/`; if it does, keep it.
|
|
1
|
+
# Branching procedure
|
|
2
|
+
|
|
3
|
+
Resolve and record the branch names. If the invoking workflow already placed you on a feature branch (`feature/*`, `fix/*`, etc.), it owns the branch: do not stash, switch, pull, or rename. The sandbox hosting the workflow has no git credentials, so those commands would either corrupt the tree or hang, and the workflow has already cut the branch from the default branch. Treat its result as given.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
BRANCH="$(git branch --show-current)"
|
|
7
|
+
case "$BRANCH" in
|
|
8
|
+
feature/*|fix/*|chore/*|docs/*|refactor/*)
|
|
9
|
+
START_BRANCH="$BRANCH"
|
|
10
|
+
DEFAULT_BRANCH="$BRANCH"
|
|
11
|
+
GOAL_STASH="none"
|
|
12
|
+
;;
|
|
13
|
+
*)
|
|
14
|
+
START_BRANCH="$BRANCH"
|
|
15
|
+
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
16
|
+
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
17
|
+
|
|
18
|
+
# Stash uncommitted work when needed and record that the goal stash exists.
|
|
19
|
+
git stash push -u -m "goal-wip"
|
|
20
|
+
GOAL_STASH="goal-wip"
|
|
21
|
+
|
|
22
|
+
# Create the feature branch from the synchronized default branch.
|
|
23
|
+
git switch "$DEFAULT_BRANCH"
|
|
24
|
+
|
|
25
|
+
if git remote get-url origin >/dev/null 2>&1; then
|
|
26
|
+
git pull origin "$DEFAULT_BRANCH"
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
git switch -c "feature/{slug}"
|
|
30
|
+
BRANCH="$(git branch --show-current)"
|
|
31
|
+
;;
|
|
32
|
+
esac
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Record the branch name and that `feature/{slug}` was applied unconditionally, so downstream phases can restore if they move off it.
|
|
36
|
+
|
|
37
|
+
Everything through archive happens on `$BRANCH`.
|
|
38
|
+
|
|
39
|
+
When a later phase renames `$BRANCH` to match the canonical change slug (Phase 3 of `pc-plan-goal`), skip the rename if the workflow already fixed the name. Renaming would call `git branch -m`, which a credentialless sandbox refuses, and the workflow's `create_pull_request` is told to use the branch as named. Detect this by checking that `$BRANCH` already starts with `feature/`; if it does, keep it.
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# Failure policy
|
|
2
|
-
|
|
3
|
-
`/plan-goal` never asks for input, but must halt instead of shipping broken or incoherent work.
|
|
4
|
-
|
|
5
|
-
Use the failure policy when:
|
|
6
|
-
|
|
7
|
-
- exploration cannot produce a safe and coherent functional interpretation after its one retry,
|
|
8
|
-
- exploration determines the goal is infeasible or outside the repository's feasible responsibility,
|
|
9
|
-
- the proposal produces no actionable tasks,
|
|
10
|
-
- the proposal materially contradicts the exploration brief,
|
|
11
|
-
- a task wave stalls because tasks remain but none are eligible,
|
|
12
|
-
- a task exhausts its single retry,
|
|
13
|
-
- tests, lint, build, type checks, or required verification fail and cannot be cleared by re-waving,
|
|
14
|
-
- any verification command (lint, typecheck, test) exits non-zero after the apply phase and re-waving does not clear it,
|
|
15
|
-
- archive verification still prints `ARCHIVE_FAILED` after one retry,
|
|
16
|
-
- required repository state is missing or inconsistent before output,
|
|
17
|
-
- or a merge conflict cannot be resolved cleanly and automatically.
|
|
18
|
-
|
|
19
|
-
On failure:
|
|
20
|
-
|
|
21
|
-
1. Stop the pipeline.
|
|
22
|
-
2. Do not merge.
|
|
23
|
-
3. Do not push the default branch.
|
|
24
|
-
4. Leave `$BRANCH` intact whenever it exists.
|
|
25
|
-
5. Abort any incomplete merge.
|
|
26
|
-
6. Restore the Phase 1 goal stash on `$START_BRANCH`.
|
|
27
|
-
7. If stash restoration conflicts, preserve the stash and report its reference.
|
|
28
|
-
8. Report: the failed phase, the exact failed postcondition, commands or verification that failed, retry attempts, current branch, repository state, completed commits, archive state, and the safest manual next step.
|
|
29
|
-
|
|
30
|
-
For loop-engineering, a clean failure with the feature branch preserved is the correct outcome. Never merge or ship unverified work.
|
|
1
|
+
# Failure policy
|
|
2
|
+
|
|
3
|
+
`/plan-goal` never asks for input, but must halt instead of shipping broken or incoherent work.
|
|
4
|
+
|
|
5
|
+
Use the failure policy when:
|
|
6
|
+
|
|
7
|
+
- exploration cannot produce a safe and coherent functional interpretation after its one retry,
|
|
8
|
+
- exploration determines the goal is infeasible or outside the repository's feasible responsibility,
|
|
9
|
+
- the proposal produces no actionable tasks,
|
|
10
|
+
- the proposal materially contradicts the exploration brief,
|
|
11
|
+
- a task wave stalls because tasks remain but none are eligible,
|
|
12
|
+
- a task exhausts its single retry,
|
|
13
|
+
- tests, lint, build, type checks, or required verification fail and cannot be cleared by re-waving,
|
|
14
|
+
- any verification command (lint, typecheck, test) exits non-zero after the apply phase and re-waving does not clear it,
|
|
15
|
+
- archive verification still prints `ARCHIVE_FAILED` after one retry,
|
|
16
|
+
- required repository state is missing or inconsistent before output,
|
|
17
|
+
- or a merge conflict cannot be resolved cleanly and automatically.
|
|
18
|
+
|
|
19
|
+
On failure:
|
|
20
|
+
|
|
21
|
+
1. Stop the pipeline.
|
|
22
|
+
2. Do not merge.
|
|
23
|
+
3. Do not push the default branch.
|
|
24
|
+
4. Leave `$BRANCH` intact whenever it exists.
|
|
25
|
+
5. Abort any incomplete merge.
|
|
26
|
+
6. Restore the Phase 1 goal stash on `$START_BRANCH`.
|
|
27
|
+
7. If stash restoration conflicts, preserve the stash and report its reference.
|
|
28
|
+
8. Report: the failed phase, the exact failed postcondition, commands or verification that failed, retry attempts, current branch, repository state, completed commits, archive state, and the safest manual next step.
|
|
29
|
+
|
|
30
|
+
For loop-engineering, a clean failure with the feature branch preserved is the correct outcome. Never merge or ship unverified work.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Output mode
|
|
2
|
-
|
|
3
|
-
Determine the mode only from the first whitespace-delimited token of `$ARGUMENTS`.
|
|
4
|
-
|
|
5
|
-
- `pr`: remove the token, push the feature branch, and create a PR.
|
|
6
|
-
- `push`: remove the token and push the feature branch.
|
|
7
|
-
- `branch`: remove the token, keep the feature branch, merge nothing and push nothing.
|
|
8
|
-
- Any other first token: keep the full input and merge locally into the default branch.
|
|
9
|
-
|
|
10
|
-
Words such as "push notifications" or "PR template" inside the feature description are feature data. They do not change output mode.
|
|
1
|
+
# Output mode
|
|
2
|
+
|
|
3
|
+
Determine the mode only from the first whitespace-delimited token of `$ARGUMENTS`.
|
|
4
|
+
|
|
5
|
+
- `pr`: remove the token, push the feature branch, and create a PR.
|
|
6
|
+
- `push`: remove the token and push the feature branch.
|
|
7
|
+
- `branch`: remove the token, keep the feature branch, merge nothing and push nothing.
|
|
8
|
+
- Any other first token: keep the full input and merge locally into the default branch.
|
|
9
|
+
|
|
10
|
+
Words such as "push notifications" or "PR template" inside the feature description are feature data. They do not change output mode.
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
# Output procedure
|
|
2
|
-
|
|
3
|
-
Before output, require `verify`, `archive`, a clean working tree, no active change directory, and an archive directory for `{change-id}`.
|
|
4
|
-
|
|
5
|
-
## Restore stash
|
|
6
|
-
|
|
7
|
-
If the goal created `goal-wip`, restore it after the mode-specific operation. When restoration conflicts, leave the stash intact, report its `git stash list` reference, and do not drop user work.
|
|
8
|
-
|
|
9
|
-
## Default mode
|
|
10
|
-
|
|
11
|
-
Synchronize the default branch, merge, delete the feature branch, then restore the stash:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
git switch "$DEFAULT_BRANCH"
|
|
15
|
-
|
|
16
|
-
if git remote get-url origin >/dev/null 2>&1; then
|
|
17
|
-
git pull origin "$DEFAULT_BRANCH"
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
git merge --no-ff "$BRANCH" -m "goal: {title} ({change-id})"
|
|
21
|
-
git branch -d "$BRANCH"
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
If the merge conflicts, abort it and use the failure policy. Do not push the default branch.
|
|
25
|
-
|
|
26
|
-
## Push mode
|
|
27
|
-
|
|
28
|
-
Push the feature branch:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
git push -u origin "$BRANCH"
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Restore the stash and leave the branch available.
|
|
35
|
-
|
|
36
|
-
## PR mode
|
|
37
|
-
|
|
38
|
-
Push the feature branch, then load `pc-ops-ship` to create a PR into `$DEFAULT_BRANCH`. Supply title, change id, functional summary, delivered acceptance criteria, task count, verification result, archive path, and commits. Do not merge the PR.
|
|
39
|
-
|
|
40
|
-
Restore the stash.
|
|
41
|
-
|
|
42
|
-
## Branch mode
|
|
43
|
-
|
|
44
|
-
Leave `$BRANCH` in place with its commits. Merge nothing, push nothing, delete nothing.
|
|
45
|
-
|
|
46
|
-
Restore the stash.
|
|
47
|
-
|
|
48
|
-
## Final report
|
|
49
|
-
|
|
50
|
-
Print:
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
Goal: {title}
|
|
54
|
-
Change ID: {change-id}
|
|
55
|
-
Scope classification: focused | standard | complex
|
|
56
|
-
Functional outcome: {one-sentence result}
|
|
57
|
-
Branch: {branch}
|
|
58
|
-
Tasks: {completed}/{total}
|
|
59
|
-
Acceptance criteria: {passed}/{total}
|
|
60
|
-
Commits: {proposal, apply, archive}
|
|
61
|
-
Verification: passed | failed
|
|
62
|
-
Archived: yes | no
|
|
63
|
-
Archive path: {path or none}
|
|
64
|
-
Output mode: default | push | pr | branch
|
|
65
|
-
Final state: merged locally | pushed branch | PR URL | branch preserved | branch preserved after failure
|
|
66
|
-
Stash restoration: not needed | restored | preserved after conflict
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## External gate
|
|
70
|
-
|
|
71
|
-
An unattended caller must verify `openspec list --json` is empty and run the project's lint and typecheck commands before any later git operation.
|
|
1
|
+
# Output procedure
|
|
2
|
+
|
|
3
|
+
Before output, require `verify`, `archive`, a clean working tree, no active change directory, and an archive directory for `{change-id}`.
|
|
4
|
+
|
|
5
|
+
## Restore stash
|
|
6
|
+
|
|
7
|
+
If the goal created `goal-wip`, restore it after the mode-specific operation. When restoration conflicts, leave the stash intact, report its `git stash list` reference, and do not drop user work.
|
|
8
|
+
|
|
9
|
+
## Default mode
|
|
10
|
+
|
|
11
|
+
Synchronize the default branch, merge, delete the feature branch, then restore the stash:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git switch "$DEFAULT_BRANCH"
|
|
15
|
+
|
|
16
|
+
if git remote get-url origin >/dev/null 2>&1; then
|
|
17
|
+
git pull origin "$DEFAULT_BRANCH"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
git merge --no-ff "$BRANCH" -m "goal: {title} ({change-id})"
|
|
21
|
+
git branch -d "$BRANCH"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If the merge conflicts, abort it and use the failure policy. Do not push the default branch.
|
|
25
|
+
|
|
26
|
+
## Push mode
|
|
27
|
+
|
|
28
|
+
Push the feature branch:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git push -u origin "$BRANCH"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Restore the stash and leave the branch available.
|
|
35
|
+
|
|
36
|
+
## PR mode
|
|
37
|
+
|
|
38
|
+
Push the feature branch, then load `pc-ops-ship` to create a PR into `$DEFAULT_BRANCH`. Supply title, change id, functional summary, delivered acceptance criteria, task count, verification result, archive path, and commits. Do not merge the PR.
|
|
39
|
+
|
|
40
|
+
Restore the stash.
|
|
41
|
+
|
|
42
|
+
## Branch mode
|
|
43
|
+
|
|
44
|
+
Leave `$BRANCH` in place with its commits. Merge nothing, push nothing, delete nothing.
|
|
45
|
+
|
|
46
|
+
Restore the stash.
|
|
47
|
+
|
|
48
|
+
## Final report
|
|
49
|
+
|
|
50
|
+
Print:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
Goal: {title}
|
|
54
|
+
Change ID: {change-id}
|
|
55
|
+
Scope classification: focused | standard | complex
|
|
56
|
+
Functional outcome: {one-sentence result}
|
|
57
|
+
Branch: {branch}
|
|
58
|
+
Tasks: {completed}/{total}
|
|
59
|
+
Acceptance criteria: {passed}/{total}
|
|
60
|
+
Commits: {proposal, apply, archive}
|
|
61
|
+
Verification: passed | failed
|
|
62
|
+
Archived: yes | no
|
|
63
|
+
Archive path: {path or none}
|
|
64
|
+
Output mode: default | push | pr | branch
|
|
65
|
+
Final state: merged locally | pushed branch | PR URL | branch preserved | branch preserved after failure
|
|
66
|
+
Stash restoration: not needed | restored | preserved after conflict
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## External gate
|
|
70
|
+
|
|
71
|
+
An unattended caller must verify `openspec list --json` is empty and run the project's lint and typecheck commands before any later git operation.
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pc-plan-propose
|
|
3
|
-
description: Parse a work item or idea and produce an OpenSpec change plan (proposal.md, specs, tasks.md) with enriched task assignments (agent, tier, depends_on, touches). Load when turning a requirement into a structured plan. Invoked by the /plan-propose command (interactive) and the plan-goal pipeline (autonomous).
|
|
4
|
-
license: MIT
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Plan Propose
|
|
8
|
-
|
|
9
|
-
Never write a file before the Step 3 checkpoint resolves to `yes`: build the whole plan in context, and let it hit disk in Step 4. A proposal written before its confirmation is a proposal the user cannot decline.
|
|
10
|
-
|
|
11
|
-
## Input
|
|
12
|
-
|
|
13
|
-
The caller provides:
|
|
14
|
-
- A work item URL, issue key, or direct feature description. Exploration findings may accompany it; incorporate them.
|
|
15
|
-
- Optionally a mode (see below). Default: `interactive`.
|
|
16
|
-
|
|
17
|
-
## Modes
|
|
18
|
-
|
|
19
|
-
- `interactive` (default): every checkpoint below is active. Wait for the user at each one.
|
|
20
|
-
- `autonomous`: there is no user. Never ask anything. Each checkpoint marked with a stop sign states its autonomous resolution inline.
|
|
21
|
-
|
|
22
|
-
## Step 0.a: Check for unarchived changes (stop)
|
|
23
|
-
|
|
24
|
-
Before proposing a new change, inspect `openspec/changes/` (ignore `openspec/changes/archive`). If any change folder exists in `openspec/changes/` (names vary by platform: `gh-*`, `us-*`, or a plain slug), list them in the question text, then call the `question` tool:
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
{
|
|
28
|
-
"questions": [
|
|
29
|
-
{
|
|
30
|
-
"header": "Unarchived changes",
|
|
31
|
-
"question": "There are unarchived changes pending:\n{change-name}\n{change-name}\n...\n\nContinue with the proposal or stop to archive first?",
|
|
32
|
-
"options": [
|
|
33
|
-
{ "label": "continue", "description": "Proceed with the proposal." },
|
|
34
|
-
{ "label": "stop", "description": "End without generating a proposal. Archive the pending change first." }
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
- If the user answers `stop`, end without generating a proposal.
|
|
42
|
-
- If the user answers `continue`, proceed to the next step.
|
|
43
|
-
|
|
44
|
-
Autonomous mode: do not call the `question` tool; treat the answer as `continue` and proceed.
|
|
45
|
-
|
|
46
|
-
## Step 0.b: Load proposal skill
|
|
47
|
-
|
|
48
|
-
If a work item URL or issue key is provided (GitHub Issue, Azure DevOps work item, Jira issue, or browser-based backlog): load `@pc-userstory` skill and fetch the work item before continuing. Backlog platform is set in `.opencode/harness.json` -> `platform.backlog`. If backlog platform is `none`, skip this step and work from direct input.
|
|
49
|
-
|
|
50
|
-
## Step 1: Generate the proposal in memory
|
|
51
|
-
|
|
52
|
-
Load `@openspec-propose` skill and follow its instructions to generate proposal.md, specs, and tasks.md. Do not write them to disk yet. Build the complete proposal content in your context.
|
|
53
|
-
|
|
54
|
-
When `.platform/contract.yml` declares `reuse`, read the paths in `reuse.docs` and the exports of the `reuse.packages` first, and give proposal.md a `## What is reused` section: for each part of the change, the doc page, package export or `reuse.names` entry it builds on, or why none fits. A proposal without it re-implements what the template already ships, and `pc-plan-apply` stops on it.
|
|
55
|
-
|
|
56
|
-
## Step 2: Enrich task assignments
|
|
57
|
-
|
|
58
|
-
1. List every `*-engineer.md` file in `.opencode/agents/`. For each file read:
|
|
59
|
-
- `description:` from the YAML frontmatter: the engineer's specialization summary
|
|
60
|
-
- `## Abilities` section: the skills listed under Development, Testing, Infrastructure (e.g. `@nodejs-backend`, `@secure-nextjs-api-routes`)
|
|
61
|
-
|
|
62
|
-
Build a map of `agent-name -> { description, abilities }`.
|
|
63
|
-
2. For each task, compare the task text and domain against every engineer's description AND abilities. Pick the engineer whose combined profile most closely matches. `fullstack-engineer` is the fallback worker and the body behind `build` and `plan`; prefer a real specialist over it, and never annotate a task with `build` or `plan`, which are the user's own primaries. If no specialist matches a task, leave the agent field blank and record the missing specialization in the proposal. An annotated OpenSpec task needs a real subagent; never substitute the lead or an obsolete generic agent name.
|
|
64
|
-
3. Pick a tier, derive `depends_on`, derive `touches`, and annotate each task line. Follow the [task annotation](task-annotation.md) reference for the full tier selection guide, dependency derivation, touches derivation, and annotation format with examples.
|
|
65
|
-
|
|
66
|
-
## Step 3: Show the plan and ask for confirmation (stop)
|
|
67
|
-
|
|
68
|
-
Display the complete proposal to the user:
|
|
69
|
-
- Change name and description
|
|
70
|
-
- Total task count
|
|
71
|
-
- Full task list with agent (including tier suffix) and dependency annotations
|
|
72
|
-
|
|
73
|
-
Then call the `question` tool:
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"questions": [
|
|
78
|
-
{
|
|
79
|
-
"header": "Save proposal",
|
|
80
|
-
"question": "Save this proposal?",
|
|
81
|
-
"options": [
|
|
82
|
-
{ "label": "yes", "description": "Write all files to disk and proceed." },
|
|
83
|
-
{ "label": "edit", "description": "Provide feedback, revise in memory, show again." },
|
|
84
|
-
{ "label": "stop", "description": "End without writing anything." }
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
- `yes` -> proceed to Step 4 and write all files
|
|
92
|
-
- `edit` -> user provides feedback, revise in memory, show again, ask again
|
|
93
|
-
- `stop` -> end without writing anything
|
|
94
|
-
|
|
95
|
-
Wait for the user's response. Do not proceed without a response.
|
|
96
|
-
|
|
97
|
-
Autonomous mode: do not call the `question` tool; treat the answer as `yes` and write the files immediately.
|
|
98
|
-
|
|
99
|
-
## Step 4: Write (only after the Step 3 checkpoint resolves)
|
|
100
|
-
|
|
101
|
-
Write the proposal files to `openspec/changes/{change-slug}/`:
|
|
102
|
-
- `proposal.md`: the change description and rationale
|
|
103
|
-
- `specs/`: any spec files generated
|
|
104
|
-
- `tasks.md`: the enriched task list with agent annotations
|
|
105
|
-
|
|
106
|
-
## Step 5: Stop (stop)
|
|
107
|
-
|
|
108
|
-
Call the `question` tool:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"questions": [
|
|
113
|
-
{
|
|
114
|
-
"header": "Ready to implement",
|
|
115
|
-
"question": "Ready to implement?",
|
|
116
|
-
"options": [
|
|
117
|
-
{ "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
|
|
118
|
-
{ "label": "no", "description": "Stop here. You can run /plan-apply later." }
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Loading `pc-plan-apply` requires explicit user confirmation.
|
|
126
|
-
|
|
127
|
-
Autonomous mode: do not call the `question` tool. The PROPOSE stage is complete. Hand the change slug and task count back to the caller (the `/plan-goal` pipeline) so it immediately continues to the apply phase. This is a stage boundary, not the end of the run.
|
|
1
|
+
---
|
|
2
|
+
name: pc-plan-propose
|
|
3
|
+
description: Parse a work item or idea and produce an OpenSpec change plan (proposal.md, specs, tasks.md) with enriched task assignments (agent, tier, depends_on, touches). Load when turning a requirement into a structured plan. Invoked by the /plan-propose command (interactive) and the plan-goal pipeline (autonomous).
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan Propose
|
|
8
|
+
|
|
9
|
+
Never write a file before the Step 3 checkpoint resolves to `yes`: build the whole plan in context, and let it hit disk in Step 4. A proposal written before its confirmation is a proposal the user cannot decline.
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
The caller provides:
|
|
14
|
+
- A work item URL, issue key, or direct feature description. Exploration findings may accompany it; incorporate them.
|
|
15
|
+
- Optionally a mode (see below). Default: `interactive`.
|
|
16
|
+
|
|
17
|
+
## Modes
|
|
18
|
+
|
|
19
|
+
- `interactive` (default): every checkpoint below is active. Wait for the user at each one.
|
|
20
|
+
- `autonomous`: there is no user. Never ask anything. Each checkpoint marked with a stop sign states its autonomous resolution inline.
|
|
21
|
+
|
|
22
|
+
## Step 0.a: Check for unarchived changes (stop)
|
|
23
|
+
|
|
24
|
+
Before proposing a new change, inspect `openspec/changes/` (ignore `openspec/changes/archive`). If any change folder exists in `openspec/changes/` (names vary by platform: `gh-*`, `us-*`, or a plain slug), list them in the question text, then call the `question` tool:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"questions": [
|
|
29
|
+
{
|
|
30
|
+
"header": "Unarchived changes",
|
|
31
|
+
"question": "There are unarchived changes pending:\n{change-name}\n{change-name}\n...\n\nContinue with the proposal or stop to archive first?",
|
|
32
|
+
"options": [
|
|
33
|
+
{ "label": "continue", "description": "Proceed with the proposal." },
|
|
34
|
+
{ "label": "stop", "description": "End without generating a proposal. Archive the pending change first." }
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- If the user answers `stop`, end without generating a proposal.
|
|
42
|
+
- If the user answers `continue`, proceed to the next step.
|
|
43
|
+
|
|
44
|
+
Autonomous mode: do not call the `question` tool; treat the answer as `continue` and proceed.
|
|
45
|
+
|
|
46
|
+
## Step 0.b: Load proposal skill
|
|
47
|
+
|
|
48
|
+
If a work item URL or issue key is provided (GitHub Issue, Azure DevOps work item, Jira issue, or browser-based backlog): load `@pc-userstory` skill and fetch the work item before continuing. Backlog platform is set in `.opencode/harness.json` -> `platform.backlog`. If backlog platform is `none`, skip this step and work from direct input.
|
|
49
|
+
|
|
50
|
+
## Step 1: Generate the proposal in memory
|
|
51
|
+
|
|
52
|
+
Load `@openspec-propose` skill and follow its instructions to generate proposal.md, specs, and tasks.md. Do not write them to disk yet. Build the complete proposal content in your context.
|
|
53
|
+
|
|
54
|
+
When `.platform/contract.yml` declares `reuse`, read the paths in `reuse.docs` and the exports of the `reuse.packages` first, and give proposal.md a `## What is reused` section: for each part of the change, the doc page, package export or `reuse.names` entry it builds on, or why none fits. A proposal without it re-implements what the template already ships, and `pc-plan-apply` stops on it.
|
|
55
|
+
|
|
56
|
+
## Step 2: Enrich task assignments
|
|
57
|
+
|
|
58
|
+
1. List every `*-engineer.md` file in `.opencode/agents/`. For each file read:
|
|
59
|
+
- `description:` from the YAML frontmatter: the engineer's specialization summary
|
|
60
|
+
- `## Abilities` section: the skills listed under Development, Testing, Infrastructure (e.g. `@nodejs-backend`, `@secure-nextjs-api-routes`)
|
|
61
|
+
|
|
62
|
+
Build a map of `agent-name -> { description, abilities }`.
|
|
63
|
+
2. For each task, compare the task text and domain against every engineer's description AND abilities. Pick the engineer whose combined profile most closely matches. `fullstack-engineer` is the fallback worker and the body behind `build` and `plan`; prefer a real specialist over it, and never annotate a task with `build` or `plan`, which are the user's own primaries. If no specialist matches a task, leave the agent field blank and record the missing specialization in the proposal. An annotated OpenSpec task needs a real subagent; never substitute the lead or an obsolete generic agent name.
|
|
64
|
+
3. Pick a tier, derive `depends_on`, derive `touches`, and annotate each task line. Follow the [task annotation](task-annotation.md) reference for the full tier selection guide, dependency derivation, touches derivation, and annotation format with examples.
|
|
65
|
+
|
|
66
|
+
## Step 3: Show the plan and ask for confirmation (stop)
|
|
67
|
+
|
|
68
|
+
Display the complete proposal to the user:
|
|
69
|
+
- Change name and description
|
|
70
|
+
- Total task count
|
|
71
|
+
- Full task list with agent (including tier suffix) and dependency annotations
|
|
72
|
+
|
|
73
|
+
Then call the `question` tool:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"questions": [
|
|
78
|
+
{
|
|
79
|
+
"header": "Save proposal",
|
|
80
|
+
"question": "Save this proposal?",
|
|
81
|
+
"options": [
|
|
82
|
+
{ "label": "yes", "description": "Write all files to disk and proceed." },
|
|
83
|
+
{ "label": "edit", "description": "Provide feedback, revise in memory, show again." },
|
|
84
|
+
{ "label": "stop", "description": "End without writing anything." }
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- `yes` -> proceed to Step 4 and write all files
|
|
92
|
+
- `edit` -> user provides feedback, revise in memory, show again, ask again
|
|
93
|
+
- `stop` -> end without writing anything
|
|
94
|
+
|
|
95
|
+
Wait for the user's response. Do not proceed without a response.
|
|
96
|
+
|
|
97
|
+
Autonomous mode: do not call the `question` tool; treat the answer as `yes` and write the files immediately.
|
|
98
|
+
|
|
99
|
+
## Step 4: Write (only after the Step 3 checkpoint resolves)
|
|
100
|
+
|
|
101
|
+
Write the proposal files to `openspec/changes/{change-slug}/`:
|
|
102
|
+
- `proposal.md`: the change description and rationale
|
|
103
|
+
- `specs/`: any spec files generated
|
|
104
|
+
- `tasks.md`: the enriched task list with agent annotations
|
|
105
|
+
|
|
106
|
+
## Step 5: Stop (stop)
|
|
107
|
+
|
|
108
|
+
Call the `question` tool:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"questions": [
|
|
113
|
+
{
|
|
114
|
+
"header": "Ready to implement",
|
|
115
|
+
"question": "Ready to implement?",
|
|
116
|
+
"options": [
|
|
117
|
+
{ "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
|
|
118
|
+
{ "label": "no", "description": "Stop here. You can run /plan-apply later." }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Loading `pc-plan-apply` requires explicit user confirmation.
|
|
126
|
+
|
|
127
|
+
Autonomous mode: do not call the `question` tool. The PROPOSE stage is complete. Hand the change slug and task count back to the caller (the `/plan-goal` pipeline) so it immediately continues to the apply phase. This is a stage boundary, not the end of the run.
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# Task annotation reference
|
|
2
|
-
|
|
3
|
-
## Tier selection
|
|
4
|
-
|
|
5
|
-
Pick a tier for each task based on complexity:
|
|
6
|
-
- `build`: complex code: data models, APIs, auth logic, core business logic, UI components
|
|
7
|
-
- `fast`: light work: i18n keys, config changes, env variables, navigation links, simple markup, verification runs
|
|
8
|
-
- `plan`: reserved for orchestration, do not use for implementation tasks
|
|
9
|
-
|
|
10
|
-
The tier suffix is appended to the agent name with a dot (e.g. `backend-engineer.build`). This is the agent name you write in the annotation. The `pc-subagent-tiers` plugin resolves the model at startup from `models[<tier>]`.
|
|
11
|
-
|
|
12
|
-
## depends_on
|
|
13
|
-
|
|
14
|
-
Derive `depends_on` for each task: the OpenSpec task IDs (`N.M`) it logically needs completed first (a task that consumes another's output: UI needs its RPC, tests need the code, a seed needs its migration). Root tasks get `[]`. Reference the IDs OpenSpec already generated. Never invent new ones.
|
|
15
|
-
|
|
16
|
-
## touches
|
|
17
|
-
|
|
18
|
-
Derive `touches` for each task: the file path(s)/glob(s) it will create or modify (the task text usually names them, e.g. "Modify src/board/components/CreateForm.tsx"). This lets `pc-plan-apply` serialize same-file tasks that have no logical dependency. Include net-new files.
|
|
19
|
-
|
|
20
|
-
## Annotation format
|
|
21
|
-
|
|
22
|
-
Annotate each task line in-place with all three fields:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
- [ ] <task text> <!-- agent: <name>, depends_on: [<ids>], touches: [<globs>] -->
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Example result (note same-file tasks like 1.1/1.2 share `touches`, so `pc-plan-apply` runs them sequentially even with no `depends_on` between them; tier suffix encodes the model):
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
- [ ] 1.1 Add Project model to schema <!-- agent: backend-engineer.build, depends_on: [], touches: [src/types.ts] -->
|
|
32
|
-
- [ ] 1.2 Add projectId field to LoopOptions <!-- agent: backend-engineer.build, depends_on: [], touches: [src/types.ts] -->
|
|
33
|
-
- [ ] 2.1 Project RPC endpoints <!-- agent: backend-engineer.build, depends_on: [1.1], touches: [src/rpc/project/**] -->
|
|
34
|
-
- [ ] 3.1 Accept page UI <!-- agent: frontend-engineer.build, depends_on: [2.1], touches: [src/board/components/CreateForm.tsx] -->
|
|
35
|
-
- [ ] 3.2 i18n keys for invitation flow <!-- agent: frontend-engineer.fast, depends_on: [3.1], touches: [src/i18n/**] -->
|
|
36
|
-
- [ ] 4.1 Run typecheck and fix errors <!-- agent: backend-engineer.fast, depends_on: [2.1,3.1], touches: [] -->
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
`pc-plan-apply` reads these annotations to build conflict-free waves: `depends_on` gates ordering, `touches` keeps concurrent agents file-disjoint, and the tier suffix in `agent` determines the model (resolved at startup by the `pc-subagent-tiers` plugin). `depends_on` is mandatory; `touches` is a best-effort hint.
|
|
1
|
+
# Task annotation reference
|
|
2
|
+
|
|
3
|
+
## Tier selection
|
|
4
|
+
|
|
5
|
+
Pick a tier for each task based on complexity:
|
|
6
|
+
- `build`: complex code: data models, APIs, auth logic, core business logic, UI components
|
|
7
|
+
- `fast`: light work: i18n keys, config changes, env variables, navigation links, simple markup, verification runs
|
|
8
|
+
- `plan`: reserved for orchestration, do not use for implementation tasks
|
|
9
|
+
|
|
10
|
+
The tier suffix is appended to the agent name with a dot (e.g. `backend-engineer.build`). This is the agent name you write in the annotation. The `pc-subagent-tiers` plugin resolves the model at startup from `models[<tier>]`, with `.opencode/harness.user.json` overriding `.opencode/harness.json`, and writes the effective value to `.opencode/harness-models.json`. `tasks.md` names the tier, never a model id.
|
|
11
|
+
|
|
12
|
+
## depends_on
|
|
13
|
+
|
|
14
|
+
Derive `depends_on` for each task: the OpenSpec task IDs (`N.M`) it logically needs completed first (a task that consumes another's output: UI needs its RPC, tests need the code, a seed needs its migration). Root tasks get `[]`. Reference the IDs OpenSpec already generated. Never invent new ones.
|
|
15
|
+
|
|
16
|
+
## touches
|
|
17
|
+
|
|
18
|
+
Derive `touches` for each task: the file path(s)/glob(s) it will create or modify (the task text usually names them, e.g. "Modify src/board/components/CreateForm.tsx"). This lets `pc-plan-apply` serialize same-file tasks that have no logical dependency. Include net-new files.
|
|
19
|
+
|
|
20
|
+
## Annotation format
|
|
21
|
+
|
|
22
|
+
Annotate each task line in-place with all three fields:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- [ ] <task text> <!-- agent: <name>, depends_on: [<ids>], touches: [<globs>] -->
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Example result (note same-file tasks like 1.1/1.2 share `touches`, so `pc-plan-apply` runs them sequentially even with no `depends_on` between them; tier suffix encodes the model):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- [ ] 1.1 Add Project model to schema <!-- agent: backend-engineer.build, depends_on: [], touches: [src/types.ts] -->
|
|
32
|
+
- [ ] 1.2 Add projectId field to LoopOptions <!-- agent: backend-engineer.build, depends_on: [], touches: [src/types.ts] -->
|
|
33
|
+
- [ ] 2.1 Project RPC endpoints <!-- agent: backend-engineer.build, depends_on: [1.1], touches: [src/rpc/project/**] -->
|
|
34
|
+
- [ ] 3.1 Accept page UI <!-- agent: frontend-engineer.build, depends_on: [2.1], touches: [src/board/components/CreateForm.tsx] -->
|
|
35
|
+
- [ ] 3.2 i18n keys for invitation flow <!-- agent: frontend-engineer.fast, depends_on: [3.1], touches: [src/i18n/**] -->
|
|
36
|
+
- [ ] 4.1 Run typecheck and fix errors <!-- agent: backend-engineer.fast, depends_on: [2.1,3.1], touches: [] -->
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`pc-plan-apply` reads these annotations to build conflict-free waves: `depends_on` gates ordering, `touches` keeps concurrent agents file-disjoint, and the tier suffix in `agent` determines the model (resolved at startup by the `pc-subagent-tiers` plugin). `depends_on` is mandatory; `touches` is a best-effort hint.
|