@wichayutdew/pi-workflows 3.3.0 → 3.5.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/dist/index.js +8 -2
- package/examples/starter-kit/agents/reviewer.md +1 -1
- package/examples/starter-kit/settings.yaml +0 -1
- package/examples/starter-kit/steps/work/implement.md +1 -0
- package/examples/starter-kit/steps/work/intake.md +5 -0
- package/examples/starter-kit/steps/work/plan.md +17 -51
- package/examples/starter-kit/steps/work/prepare-workspace.md +8 -0
- package/examples/starter-kit/steps/work//363/260/215/224 publish-remote.md" +16 -0
- package/examples/starter-kit/work.workflow.yaml +60 -32
- package/package.json +1 -1
- package/src/prompt/step-task.ts +2 -0
- package/src/workflow-status/render-step-detail.ts +11 -4
- package/examples/starter-kit/investigate.workflow.yaml +0 -84
- package/examples/starter-kit/jira.workflow.yaml +0 -75
- package/examples/starter-kit/mr-comment.workflow.yaml +0 -142
- package/examples/starter-kit/mr-review.workflow.yaml +0 -96
- package/examples/starter-kit/steps/investigate/investigate.md +0 -40
- package/examples/starter-kit/steps/investigate/retrieve.md +0 -28
- package/examples/starter-kit/steps/investigate/validate.md +0 -20
- package/examples/starter-kit/steps/jira/create.md +0 -25
- package/examples/starter-kit/steps/jira/draft.md +0 -18
- package/examples/starter-kit/steps/jira/plan.md +0 -30
- package/examples/starter-kit/steps/mr-comment/checkout-source.md +0 -14
- package/examples/starter-kit/steps/mr-comment/fetch.md +0 -16
- package/examples/starter-kit/steps/mr-comment/implement.md +0 -21
- package/examples/starter-kit/steps/mr-comment/plan.md +0 -61
- package/examples/starter-kit/steps/mr-comment/publish.md +0 -17
- package/examples/starter-kit/steps/mr-comment/verify.md +0 -16
- package/examples/starter-kit/steps/mr-review/fetch.md +0 -17
- package/examples/starter-kit/steps/mr-review/publish-approved.md +0 -18
- package/examples/starter-kit/steps/mr-review/review-for-approval.md +0 -53
- package/examples/starter-kit/steps/mr-review/verify-published.md +0 -16
- package/examples/starter-kit/steps/shared/prepare-workspace.md +0 -17
- package/examples/starter-kit/steps/shared/publish-remote.md +0 -16
- package/examples/starter-kit/steps/ticket/implement.md +0 -23
- package/examples/starter-kit/steps/ticket/plan.md +0 -60
- package/examples/starter-kit/steps/ticket/verify.md +0 -24
- package/examples/starter-kit/ticket.workflow.yaml +0 -108
package/dist/index.js
CHANGED
|
@@ -3195,6 +3195,9 @@ function wrapPlain(value, width, theme, color = "text") {
|
|
|
3195
3195
|
});
|
|
3196
3196
|
return wrapped.length > 0 ? wrapped : [theme.fg(color, " ")];
|
|
3197
3197
|
}
|
|
3198
|
+
function summaryLines(theme, value, width) {
|
|
3199
|
+
return [theme.fg("muted", "summary"), ...wrapPlain(value, width, theme)];
|
|
3200
|
+
}
|
|
3198
3201
|
function boundedArtifact(value) {
|
|
3199
3202
|
return value.length <= MAX_DETAIL_ARTIFACT_CHARS ? { value, truncated: false } : {
|
|
3200
3203
|
value: value.slice(0, MAX_DETAIL_ARTIFACT_CHARS),
|
|
@@ -3210,7 +3213,8 @@ function renderResult(theme, attempt, width) {
|
|
|
3210
3213
|
"",
|
|
3211
3214
|
theme.bold(theme.fg("accent", "Submitted result")),
|
|
3212
3215
|
...keyValueLines(theme, "outcome", result.outcome, width, "success"),
|
|
3213
|
-
...
|
|
3216
|
+
...summaryLines(theme, `${result.summary}${result.summaryTruncated ? `
|
|
3217
|
+
… [trace truncated]` : ""}`, width),
|
|
3214
3218
|
...result.workspaceCwd ? keyValueLines(theme, "workspace", result.workspaceCwd, width) : [],
|
|
3215
3219
|
...artifact ? [
|
|
3216
3220
|
theme.fg("muted", "artifact"),
|
|
@@ -3364,7 +3368,7 @@ function renderStepDetail(theme, snapshot, selectedIndex, cache, width) {
|
|
|
3364
3368
|
] : [],
|
|
3365
3369
|
...history ? [
|
|
3366
3370
|
...keyValueLines(theme, "outcome", history.outcome, width, "success"),
|
|
3367
|
-
...
|
|
3371
|
+
...summaryLines(theme, history.summary, width)
|
|
3368
3372
|
] : [],
|
|
3369
3373
|
...currentReason ? keyValueLines(theme, "reason", currentReason, width, "warning") : [],
|
|
3370
3374
|
...entry.isCurrent && snapshot.run.gateFeedback ? keyValueLines(theme, "feedback", snapshot.run.gateFeedback, width, "warning") : [],
|
|
@@ -6122,6 +6126,8 @@ function buildStepTask(options) {
|
|
|
6122
6126
|
...contract.workspaceLines,
|
|
6123
6127
|
"",
|
|
6124
6128
|
"Put a self-contained compact handoff in `summary`; this is the only step context passed to the next fresh child.",
|
|
6129
|
+
"Format all human-facing output—including summaries, gate artifacts, Markdown plans, reports, comments, and replies—for scanning: short headings, then one distinct fact, action, or metadata value per bullet or paragraph. Never pack unrelated values into one line or dense prose.",
|
|
6130
|
+
"When a schema needs several related fields, use a bullet list with one `field`: `value` per row; use JSON only for machine-readable data under `## Machine-readable handoff` in a fenced valid `json` block. Keep prose outside that block.",
|
|
6125
6131
|
...buildNonSuccessSummaryInstructions(contract.outcomes),
|
|
6126
6132
|
...isDelegated ? buildDelegatedCompletionInstructions() : [],
|
|
6127
6133
|
"Do not call the completion tool alongside other tool calls."
|
|
@@ -17,6 +17,7 @@ Latest ledger:
|
|
|
17
17
|
1. **Workspace Integrity**: Operate strictly in `repositories[0].cwd`. Never switch branches, create workspaces, or touch unrelated files.
|
|
18
18
|
2. **Execution Authority**: Run only commands listed in `worker` array. No unapproved commands or external pushes.
|
|
19
19
|
3. **Resumable State**: If pre-existing dirty files were recorded in preparation, leave them intact; do not commit or stash them.
|
|
20
|
+
4. **No External Writes**: Never push, create or update reviews, or mutate Jira from this stage.
|
|
20
21
|
4. **Outcomes**:
|
|
21
22
|
- `ready`: Implementation complete, RED/GREEN evidence logged, commit created. Pass unchanged `json` contract to reviewer.
|
|
22
23
|
- `retry`: Recoverable transient tool/environment issue.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
You are the read-only intake stage. Normalize `{{workflow.input}}` before any branch or worktree exists.
|
|
2
|
+
|
|
3
|
+
If exactly one Jira key is present, retrieve it with Atlassian and return `blocked` if it is malformed, inaccessible, ambiguous, or contradictory. Otherwise use the user requirement. Select a safe Conventional Commit type and concise semantic summary; block rather than guess.
|
|
4
|
+
|
|
5
|
+
Return `ready` with a compact JSON handoff: `mode` (`jira` or `requirement`), `jiraTicket` (observed key or null), `summary`, `branchType`, `acceptanceCriteria`, and evidence. On `{{restart.workspace}}`, preserve the existing run-owned branch identity; block if the new input contradicts its verified Jira key. Never mutate Jira, Git, branches, worktrees, or remotes.
|
|
@@ -1,51 +1,17 @@
|
|
|
1
|
-
You are the planning
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
4. `## Proposed approach` — Numbered actions with target, change, reason, and criterion.
|
|
19
|
-
5. `## Validation` — Verification checks and expected proofs.
|
|
20
|
-
6. `## Risks` — Material risks with mitigation/rollback signals.
|
|
21
|
-
7. `## Execution appendix (machine-readable)` — Fenced JSON with `repositories` array (`cwd`, `baseHead`, `branch`, `commitTitle`, `acceptanceCriteria`, `worker`, `reviewer`).
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"repositories": [
|
|
26
|
-
{
|
|
27
|
-
"cwd": "<bound absolute path>",
|
|
28
|
-
"baseHead": "<observed selected HEAD>",
|
|
29
|
-
"branch": "<dedicated branch>",
|
|
30
|
-
"commitTitle": "type(scope): subject",
|
|
31
|
-
"acceptanceCriteria": ["AC 1", "AC 2"],
|
|
32
|
-
"worker": [
|
|
33
|
-
{"id": "test-red", "command": "...", "purpose": "prove failing test"},
|
|
34
|
-
{"id": "test-green", "command": "...", "purpose": "prove passing test"}
|
|
35
|
-
],
|
|
36
|
-
"reviewer": [
|
|
37
|
-
{"id": "full-tests", "command": "...", "purpose": "run full test suite"},
|
|
38
|
-
{"id": "lint", "command": "...", "purpose": "run linter"}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Artifact limit
|
|
46
|
-
Keep the submitted artifact concise and at most 8,000 characters. Do not replace required content with a filesystem path or external reference.
|
|
47
|
-
|
|
48
|
-
## Outcomes
|
|
49
|
-
- `submit`: Plan ready for Plannotator review. Pass the **complete Markdown text content** directly in the `artifact` parameter.
|
|
50
|
-
- `workspace-refresh`: Source ref advanced unexpectedly and workspace is clean.
|
|
51
|
-
- `blocked`: Unsafe multi-repo requirement or unrecoverable workspace state.
|
|
1
|
+
You are the read-only planning stage. Use the normalized intake handoff in `{{last.summary}}`; inspect the source checkout, origin, base HEAD, target branch, and description template without creating a branch or worktree.
|
|
2
|
+
|
|
3
|
+
Submit exactly:
|
|
4
|
+
# <Outcome title>
|
|
5
|
+
## Goal/Acceptance Criteria
|
|
6
|
+
## Non Goal
|
|
7
|
+
## Implementation Steps and Tests
|
|
8
|
+
List concise add/remove steps and only tests with an assessable benefit.
|
|
9
|
+
## Validation
|
|
10
|
+
List exact independent Bash commands and expected proof.
|
|
11
|
+
## Risks/Decisions Needed
|
|
12
|
+
## Publications Contract/Metadata
|
|
13
|
+
Record observed provider/repository/target, proposed deterministic source branch, semantic title, template evidence, traceability mode, and Jira key or null. Jira mode requires exactly one matching `[KEY]` title key; requirement mode forbids bracketed keys.
|
|
14
|
+
## Execution appendix (machine-readable)
|
|
15
|
+
Include JSON with `repositories` (sourceRoot, baseHead, branch, worker, reviewer), `traceability`, and `publication` (provider, repository, sourceBranch, targetBranch, title, descriptionTemplate, managedDescription).
|
|
16
|
+
|
|
17
|
+
Propose `<type>/<KEY>` for verified Jira or `<type>/<semantic-kebab-summary>` otherwise. No random suffix, run ID, or future worktree path. `submit` only after all metadata is observed.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
You prepare the approved branch after the plan gate. Do not launch subagents.
|
|
2
|
+
|
|
3
|
+
Approved plan: {{reviewed.artifact}}
|
|
4
|
+
Restart workspace: {{restart.workspace}}
|
|
5
|
+
|
|
6
|
+
Create or reuse only the approved `publication.sourceBranch` at approved `repositories[0].baseHead`. The run ID is for ownership/idempotence lookup only and must never be appended to a branch name. Branches are `<type>/<JIRA-KEY>` for verified Jira or `<type>/<semantic-kebab-summary>` otherwise; reject random numbers, timestamps, hashes, and recomputed names.
|
|
7
|
+
|
|
8
|
+
If `{{restart.workspace}}` is set, rebind that exact worktree and existing branch; block if it differs from the approved branch. Preserve user changes and unrelated worktrees. If source HEAD advanced from approved baseHead, return `workspace-refresh` without mutation. Return `ready` with bound workspace path and manifest, `retry` only for transient failures, and `blocked` for unsafe state.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
You publish verified work only. Original request: {{workflow.input}}
|
|
2
|
+
Approved plan: {{reviewed.artifact}}
|
|
3
|
+
|
|
4
|
+
Derive provider, repository, and target branch from observed `origin`; block unsupported or ambiguous hosts. Validate the approved Conventional Commit title before remote action. Use traceability mode/jiraTicket from the artifact, never workflow command identity. Push only with non-force `git push --set-upstream origin <sourceBranch>`.
|
|
5
|
+
|
|
6
|
+
Use GitHub MCP (`pull_request_read`, `create_pull_request`, `update_pull_request`) or GitLab MCP; use matching `gh pr`/`glab mr` fallback only when required MCP operations are unavailable or fail. Resolve repository-file, gitlab-server-default, or "none" descriptionTemplate with validated sha256/template rules.
|
|
7
|
+
|
|
8
|
+
## Existing review safety
|
|
9
|
+
Check for one existing open review. Its title is immutable: never update it. Preserve every byte outside one valid workflow-owned region. Valid matching pairs are:
|
|
10
|
+
|
|
11
|
+
<!-- ai-only-start -->
|
|
12
|
+
<!-- ai-only-end -->
|
|
13
|
+
|
|
14
|
+
For an existing valid pair, replace only its interior with approved managed implementation/test content; skip update when unchanged. With no markers, append exactly one approved pair and preserve existing body. mixed, duplicated, reversed, or malformed markers are `blocked`; never replace the full body. For a new review, preserve the resolved template/static body and append the approved managed region. Do not approve, merge, or close reviews.
|
|
15
|
+
|
|
16
|
+
Return `published` only after push and permitted creation/update; otherwise `retry` before mutation or `blocked` with evidence.
|
|
@@ -1,43 +1,37 @@
|
|
|
1
1
|
version: 1
|
|
2
2
|
id: work
|
|
3
3
|
command: work
|
|
4
|
-
description: '
|
|
5
|
-
start:
|
|
4
|
+
description: 'Plan, implement, verify, and publish Pull Request'
|
|
5
|
+
start: intake
|
|
6
6
|
maxStepVisits: 20
|
|
7
7
|
summaryMaxChars: 30000
|
|
8
8
|
steps:
|
|
9
|
-
|
|
10
|
-
title:
|
|
9
|
+
intake:
|
|
10
|
+
title: Normalize requirement and optional Jira evidence
|
|
11
11
|
prompt:
|
|
12
|
-
file: steps/
|
|
13
|
-
agent:
|
|
14
|
-
workspace:
|
|
15
|
-
bindOn:
|
|
16
|
-
- ready
|
|
17
|
-
allowedRoots:
|
|
18
|
-
- ~/repositories/worktrees
|
|
12
|
+
file: steps/work/intake.md
|
|
13
|
+
agent: planner
|
|
19
14
|
permissions:
|
|
20
|
-
tools: [read, ls, bash]
|
|
15
|
+
tools: [read, ls, bash, mcp]
|
|
21
16
|
mcp: []
|
|
22
17
|
extensions: [/]
|
|
23
|
-
skills: [
|
|
18
|
+
skills: []
|
|
24
19
|
bash:
|
|
25
20
|
mode: unrestricted
|
|
26
21
|
transitions:
|
|
27
22
|
ready: plan
|
|
28
|
-
retry:
|
|
23
|
+
retry: intake
|
|
29
24
|
blocked: $pause
|
|
30
25
|
plan:
|
|
31
|
-
title: Explore and
|
|
26
|
+
title: Explore and approve local work
|
|
32
27
|
prompt:
|
|
33
28
|
file: steps/work/plan.md
|
|
34
29
|
agent: planner
|
|
35
30
|
permissions:
|
|
36
31
|
tools: [read, ls, bash, mcp]
|
|
37
|
-
mcp: [
|
|
32
|
+
mcp: []
|
|
38
33
|
extensions: [/]
|
|
39
|
-
skills:
|
|
40
|
-
[coding-standards, writing-plans, search-code-sourcegraph, caveman]
|
|
34
|
+
skills: []
|
|
41
35
|
bash:
|
|
42
36
|
mode: unrestricted
|
|
43
37
|
gate:
|
|
@@ -47,34 +41,53 @@ steps:
|
|
|
47
41
|
rejectedOutcome: changes-requested
|
|
48
42
|
timeoutMs: 30000
|
|
49
43
|
artifactContract:
|
|
50
|
-
maxChars:
|
|
44
|
+
maxChars: 10000
|
|
51
45
|
requiredSubstrings:
|
|
52
|
-
- '##
|
|
53
|
-
- '##
|
|
54
|
-
- '##
|
|
46
|
+
- '## Goal/Acceptance Criteria'
|
|
47
|
+
- '## Non Goal'
|
|
48
|
+
- '## Implementation Steps and Tests'
|
|
55
49
|
- '## Validation'
|
|
56
|
-
- '## Risks'
|
|
50
|
+
- '## Risks/Decisions Needed'
|
|
51
|
+
- '## Publications Contract/Metadata'
|
|
57
52
|
- '## Execution appendix (machine-readable)'
|
|
58
53
|
forbiddenSubstrings:
|
|
59
54
|
- 'The complete gate artifact is the exact Markdown saved at'
|
|
60
55
|
onValidationFailure: retry
|
|
61
56
|
transitions:
|
|
62
|
-
approved:
|
|
57
|
+
approved: prepare-workspace
|
|
63
58
|
changes-requested: plan
|
|
64
|
-
workspace-refresh: prepare-workspace
|
|
65
59
|
retry: plan
|
|
66
60
|
blocked: $pause
|
|
61
|
+
prepare-workspace:
|
|
62
|
+
title: Prepare approved branch and worktree
|
|
63
|
+
prompt:
|
|
64
|
+
file: steps/work/prepare-workspace.md
|
|
65
|
+
agent: workspace-preparer
|
|
66
|
+
workspace:
|
|
67
|
+
bindOn: [ready]
|
|
68
|
+
allowedRoots: [~/repositories/worktrees]
|
|
69
|
+
permissions:
|
|
70
|
+
tools: [read, ls, bash]
|
|
71
|
+
mcp: []
|
|
72
|
+
extensions: [/]
|
|
73
|
+
skills: []
|
|
74
|
+
bash:
|
|
75
|
+
mode: unrestricted
|
|
76
|
+
transitions:
|
|
77
|
+
ready: implement
|
|
78
|
+
workspace-refresh: plan
|
|
79
|
+
retry: prepare-workspace
|
|
80
|
+
blocked: $pause
|
|
67
81
|
implement:
|
|
68
|
-
title: Implement
|
|
82
|
+
title: Implement approved work
|
|
69
83
|
prompt:
|
|
70
84
|
file: steps/work/implement.md
|
|
71
85
|
agent: worker
|
|
72
86
|
permissions:
|
|
73
87
|
tools: [read, ls, bash, edit, write, mcp]
|
|
74
|
-
mcp: [
|
|
88
|
+
mcp: []
|
|
75
89
|
extensions: [/]
|
|
76
|
-
skills:
|
|
77
|
-
[coding-standards, test-driven-development, lint-commands, caveman]
|
|
90
|
+
skills: []
|
|
78
91
|
bash:
|
|
79
92
|
mode: unrestricted
|
|
80
93
|
transitions:
|
|
@@ -90,12 +103,27 @@ steps:
|
|
|
90
103
|
tools: [read, ls, bash]
|
|
91
104
|
mcp: []
|
|
92
105
|
extensions: [/]
|
|
93
|
-
skills:
|
|
94
|
-
[verification-before-completion, lint-commands, commit-format, caveman]
|
|
106
|
+
skills: []
|
|
95
107
|
bash:
|
|
96
108
|
mode: unrestricted
|
|
97
109
|
transitions:
|
|
98
|
-
passed:
|
|
110
|
+
passed: publish
|
|
99
111
|
failed: implement
|
|
100
112
|
retry: verify
|
|
101
113
|
blocked: verify
|
|
114
|
+
publish:
|
|
115
|
+
title: Publish verified branch and open review
|
|
116
|
+
prompt:
|
|
117
|
+
file: steps/work/publish-remote.md
|
|
118
|
+
agent: worker
|
|
119
|
+
permissions:
|
|
120
|
+
tools: [read, ls, bash, mcp]
|
|
121
|
+
mcp: []
|
|
122
|
+
extensions: [/]
|
|
123
|
+
skills: []
|
|
124
|
+
bash:
|
|
125
|
+
mode: unrestricted
|
|
126
|
+
transitions:
|
|
127
|
+
published: $done
|
|
128
|
+
retry: publish
|
|
129
|
+
blocked: $pause
|
package/package.json
CHANGED
package/src/prompt/step-task.ts
CHANGED
|
@@ -151,6 +151,8 @@ export function buildStepTask(options: BuildStepTaskOptions): string {
|
|
|
151
151
|
...contract.workspaceLines,
|
|
152
152
|
'',
|
|
153
153
|
'Put a self-contained compact handoff in `summary`; this is the only step context passed to the next fresh child.',
|
|
154
|
+
'Format all human-facing output—including summaries, gate artifacts, Markdown plans, reports, comments, and replies—for scanning: short headings, then one distinct fact, action, or metadata value per bullet or paragraph. Never pack unrelated values into one line or dense prose.',
|
|
155
|
+
'When a schema needs several related fields, use a bullet list with one `field`: `value` per row; use JSON only for machine-readable data under `## Machine-readable handoff` in a fenced valid `json` block. Keep prose outside that block.',
|
|
154
156
|
...buildNonSuccessSummaryInstructions(contract.outcomes),
|
|
155
157
|
...(isDelegated ? buildDelegatedCompletionInstructions() : []),
|
|
156
158
|
'Do not call the completion tool alongside other tool calls.',
|
|
@@ -74,6 +74,14 @@ function wrapPlain(
|
|
|
74
74
|
return wrapped.length > 0 ? wrapped : [theme.fg(color, ' ')];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
function summaryLines(
|
|
78
|
+
theme: WorkflowStatusTheme,
|
|
79
|
+
value: string,
|
|
80
|
+
width: number,
|
|
81
|
+
): Array<string> {
|
|
82
|
+
return [theme.fg('muted', 'summary'), ...wrapPlain(value, width, theme)];
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
function boundedArtifact(value: string): {
|
|
78
86
|
readonly value: string;
|
|
79
87
|
readonly truncated: boolean;
|
|
@@ -101,10 +109,9 @@ function renderResult(
|
|
|
101
109
|
'',
|
|
102
110
|
theme.bold(theme.fg('accent', 'Submitted result')),
|
|
103
111
|
...keyValueLines(theme, 'outcome', result.outcome, width, 'success'),
|
|
104
|
-
...
|
|
112
|
+
...summaryLines(
|
|
105
113
|
theme,
|
|
106
|
-
|
|
107
|
-
`${result.summary}${result.summaryTruncated ? ' … [trace truncated]' : ''}`,
|
|
114
|
+
`${result.summary}${result.summaryTruncated ? '\n… [trace truncated]' : ''}`,
|
|
108
115
|
width,
|
|
109
116
|
),
|
|
110
117
|
...(result.workspaceCwd
|
|
@@ -439,7 +446,7 @@ export function renderStepDetail(
|
|
|
439
446
|
...(history
|
|
440
447
|
? [
|
|
441
448
|
...keyValueLines(theme, 'outcome', history.outcome, width, 'success'),
|
|
442
|
-
...
|
|
449
|
+
...summaryLines(theme, history.summary, width),
|
|
443
450
|
]
|
|
444
451
|
: []),
|
|
445
452
|
...(currentReason
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
version: 1
|
|
2
|
-
id: investigate
|
|
3
|
-
command: investigate
|
|
4
|
-
description: 'Derive, approve, investigate, and independently validate an evidence-backed finding. Example: /investigate PROJ-123 Root cause of elevated 500 error rates in checkout service'
|
|
5
|
-
start: retrieve
|
|
6
|
-
maxStepVisits: 12
|
|
7
|
-
summaryMaxChars: 30000
|
|
8
|
-
steps:
|
|
9
|
-
retrieve:
|
|
10
|
-
title: Retrieve investigation scope and Jira evidence
|
|
11
|
-
prompt:
|
|
12
|
-
file: steps/investigate/retrieve.md
|
|
13
|
-
agent: scout
|
|
14
|
-
permissions:
|
|
15
|
-
tools: [read, ls, bash, mcp]
|
|
16
|
-
mcp: [atlassian, context7, sourcegraph, glean, grafana]
|
|
17
|
-
extensions: [/]
|
|
18
|
-
skills: [jira-ticket, start-triage, search-code-sourcegraph, caveman]
|
|
19
|
-
bash:
|
|
20
|
-
mode: unrestricted
|
|
21
|
-
gate:
|
|
22
|
-
provider: plannotator
|
|
23
|
-
submitOutcome: submit
|
|
24
|
-
approvedOutcome: approved
|
|
25
|
-
rejectedOutcome: changes-requested
|
|
26
|
-
timeoutMs: 30000
|
|
27
|
-
artifactContract:
|
|
28
|
-
maxChars: 6000
|
|
29
|
-
requiredSubstrings:
|
|
30
|
-
- '## Brief description'
|
|
31
|
-
- '## Goals'
|
|
32
|
-
- '## Boundaries'
|
|
33
|
-
- '## Evidence & sources'
|
|
34
|
-
- '## Report destination'
|
|
35
|
-
- '## Open evidence gaps'
|
|
36
|
-
forbiddenSubstrings:
|
|
37
|
-
- 'The complete gate artifact is the exact Markdown saved at'
|
|
38
|
-
onValidationFailure: retry
|
|
39
|
-
transitions:
|
|
40
|
-
approved: investigate
|
|
41
|
-
changes-requested: retrieve
|
|
42
|
-
retry: retrieve
|
|
43
|
-
blocked: $pause
|
|
44
|
-
investigate:
|
|
45
|
-
title: Investigate approved scope and write findings
|
|
46
|
-
prompt:
|
|
47
|
-
file: steps/investigate/investigate.md
|
|
48
|
-
agent: worker
|
|
49
|
-
permissions:
|
|
50
|
-
tools: [read, ls, bash, write, mcp]
|
|
51
|
-
mcp: [atlassian, context7, sourcegraph, glean, grafana, gitlab]
|
|
52
|
-
extensions: [/]
|
|
53
|
-
skills:
|
|
54
|
-
[
|
|
55
|
-
coding-standards,
|
|
56
|
-
systematic-debugging,
|
|
57
|
-
start-triage,
|
|
58
|
-
grafana-logs,
|
|
59
|
-
search-code-sourcegraph,
|
|
60
|
-
caveman,
|
|
61
|
-
]
|
|
62
|
-
bash:
|
|
63
|
-
mode: unrestricted
|
|
64
|
-
transitions:
|
|
65
|
-
ready: validate
|
|
66
|
-
retry: investigate
|
|
67
|
-
blocked: $pause
|
|
68
|
-
validate:
|
|
69
|
-
title: Independently validate investigation findings
|
|
70
|
-
prompt:
|
|
71
|
-
file: steps/investigate/validate.md
|
|
72
|
-
agent: reviewer
|
|
73
|
-
permissions:
|
|
74
|
-
tools: [read, ls, bash, mcp]
|
|
75
|
-
mcp: [atlassian, sourcegraph, glean, gitlab]
|
|
76
|
-
extensions: [/]
|
|
77
|
-
skills: [verification-before-completion, caveman]
|
|
78
|
-
bash:
|
|
79
|
-
mode: unrestricted
|
|
80
|
-
transitions:
|
|
81
|
-
approved: $done
|
|
82
|
-
gaps: investigate
|
|
83
|
-
retry: validate
|
|
84
|
-
blocked: validate
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
version: 1
|
|
2
|
-
id: jira
|
|
3
|
-
command: jira
|
|
4
|
-
description: 'Draft, approve, and create a Jira Epic with ordered Stories. Example: /jira ACTB Implement multi-region failover for pricing service'
|
|
5
|
-
start: draft
|
|
6
|
-
maxStepVisits: 12
|
|
7
|
-
summaryMaxChars: 30000
|
|
8
|
-
steps:
|
|
9
|
-
draft:
|
|
10
|
-
title: Normalize Epic and Story input
|
|
11
|
-
prompt:
|
|
12
|
-
file: steps/jira/draft.md
|
|
13
|
-
agent: scout
|
|
14
|
-
permissions:
|
|
15
|
-
tools: [read, ls, bash]
|
|
16
|
-
mcp: []
|
|
17
|
-
extensions: [/]
|
|
18
|
-
skills: [jira-ticket, caveman]
|
|
19
|
-
bash:
|
|
20
|
-
mode: unrestricted
|
|
21
|
-
transitions:
|
|
22
|
-
ready: plan
|
|
23
|
-
retry: draft
|
|
24
|
-
blocked: $pause
|
|
25
|
-
plan:
|
|
26
|
-
title: Validate Jira schema and approve Epic and Story plan
|
|
27
|
-
prompt:
|
|
28
|
-
file: steps/jira/plan.md
|
|
29
|
-
agent: planner
|
|
30
|
-
permissions:
|
|
31
|
-
tools: [read, ls, bash, mcp]
|
|
32
|
-
mcp: [atlassian]
|
|
33
|
-
extensions: [/]
|
|
34
|
-
skills: [jira-ticket, caveman]
|
|
35
|
-
bash:
|
|
36
|
-
mode: unrestricted
|
|
37
|
-
gate:
|
|
38
|
-
provider: plannotator
|
|
39
|
-
submitOutcome: submit
|
|
40
|
-
approvedOutcome: approved
|
|
41
|
-
rejectedOutcome: changes-requested
|
|
42
|
-
timeoutMs: 30000
|
|
43
|
-
artifactContract:
|
|
44
|
-
maxChars: 16000
|
|
45
|
-
requiredSubstrings:
|
|
46
|
-
- '# Create Jira Epic and Stories'
|
|
47
|
-
- '## Jira field contract'
|
|
48
|
-
- '## Epic'
|
|
49
|
-
- '## Ordered Stories'
|
|
50
|
-
- '## Creation sequence'
|
|
51
|
-
- '## Safety limits'
|
|
52
|
-
forbiddenSubstrings:
|
|
53
|
-
- 'The complete gate artifact is the exact Markdown saved at'
|
|
54
|
-
onValidationFailure: retry
|
|
55
|
-
transitions:
|
|
56
|
-
approved: create
|
|
57
|
-
changes-requested: plan
|
|
58
|
-
retry: plan
|
|
59
|
-
blocked: $pause
|
|
60
|
-
create:
|
|
61
|
-
title: Create approved Jira Epic and Stories
|
|
62
|
-
prompt:
|
|
63
|
-
file: steps/jira/create.md
|
|
64
|
-
agent: worker
|
|
65
|
-
permissions:
|
|
66
|
-
tools: [read, ls, bash, mcp]
|
|
67
|
-
mcp: [atlassian]
|
|
68
|
-
extensions: [/]
|
|
69
|
-
skills: [jira-ticket, caveman]
|
|
70
|
-
bash:
|
|
71
|
-
mode: unrestricted
|
|
72
|
-
transitions:
|
|
73
|
-
ready: $done
|
|
74
|
-
retry: create
|
|
75
|
-
blocked: $pause
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
version: 1
|
|
2
|
-
id: mr-comment
|
|
3
|
-
command: mr-comment
|
|
4
|
-
description: 'Fetch unresolved MR or PR comments, approve a fix plan, implement, verify, push, and reply. Example: /mr-comment https://gitlab.com/org/repo/-/merge_requests/123'
|
|
5
|
-
start: fetch
|
|
6
|
-
maxStepVisits: 10
|
|
7
|
-
summaryMaxChars: 30000
|
|
8
|
-
steps:
|
|
9
|
-
fetch:
|
|
10
|
-
title: Fetch merge-request or pull-request evidence
|
|
11
|
-
prompt:
|
|
12
|
-
file: steps/mr-comment/fetch.md
|
|
13
|
-
agent: scout
|
|
14
|
-
permissions:
|
|
15
|
-
tools: [read, ls, bash, mcp]
|
|
16
|
-
mcp: [gitlab, context7]
|
|
17
|
-
extensions: [/]
|
|
18
|
-
skills: [caveman]
|
|
19
|
-
bash:
|
|
20
|
-
mode: unrestricted
|
|
21
|
-
transitions:
|
|
22
|
-
ready: checkout-source
|
|
23
|
-
retry: fetch
|
|
24
|
-
blocked: $pause
|
|
25
|
-
checkout-source:
|
|
26
|
-
title: Check out the reviewed source branch
|
|
27
|
-
prompt:
|
|
28
|
-
file: steps/mr-comment/checkout-source.md
|
|
29
|
-
agent: worker
|
|
30
|
-
workspace:
|
|
31
|
-
bindOn:
|
|
32
|
-
- ready
|
|
33
|
-
allowedRoots:
|
|
34
|
-
- ~/repositories/worktrees
|
|
35
|
-
- .
|
|
36
|
-
permissions:
|
|
37
|
-
tools: [read, ls, bash]
|
|
38
|
-
mcp: []
|
|
39
|
-
extensions: [/]
|
|
40
|
-
skills: [using-git-worktrees, caveman]
|
|
41
|
-
bash:
|
|
42
|
-
mode: unrestricted
|
|
43
|
-
transitions:
|
|
44
|
-
ready: plan
|
|
45
|
-
retry: checkout-source
|
|
46
|
-
blocked: $pause
|
|
47
|
-
plan:
|
|
48
|
-
title: Propose a complete review-comment fix plan
|
|
49
|
-
prompt:
|
|
50
|
-
file: steps/mr-comment/plan.md
|
|
51
|
-
agent: planner
|
|
52
|
-
permissions:
|
|
53
|
-
tools: [read, ls, bash, mcp]
|
|
54
|
-
mcp: [gitlab, sourcegraph, context7]
|
|
55
|
-
extensions: [/]
|
|
56
|
-
skills:
|
|
57
|
-
[
|
|
58
|
-
coding-standards,
|
|
59
|
-
writing-plans,
|
|
60
|
-
receiving-code-review,
|
|
61
|
-
search-code-sourcegraph,
|
|
62
|
-
caveman,
|
|
63
|
-
]
|
|
64
|
-
bash:
|
|
65
|
-
mode: unrestricted
|
|
66
|
-
gate:
|
|
67
|
-
provider: plannotator
|
|
68
|
-
submitOutcome: submit
|
|
69
|
-
approvedOutcome: approved
|
|
70
|
-
rejectedOutcome: changes-requested
|
|
71
|
-
timeoutMs: 30000
|
|
72
|
-
artifactContract:
|
|
73
|
-
maxChars: 10000
|
|
74
|
-
requiredSubstrings:
|
|
75
|
-
- '## Review summary'
|
|
76
|
-
- '## Comment decisions'
|
|
77
|
-
- '## Implementation plan'
|
|
78
|
-
- '## Validation'
|
|
79
|
-
- '## Replies and remote actions'
|
|
80
|
-
- '## Risks'
|
|
81
|
-
- '## Execution appendix (machine-readable)'
|
|
82
|
-
forbiddenSubstrings:
|
|
83
|
-
- 'The complete gate artifact is the exact Markdown saved at'
|
|
84
|
-
onValidationFailure: retry
|
|
85
|
-
transitions:
|
|
86
|
-
approved: implement
|
|
87
|
-
changes-requested: plan
|
|
88
|
-
retry: plan
|
|
89
|
-
blocked: $pause
|
|
90
|
-
implement:
|
|
91
|
-
title: Implement approved review-comment fixes
|
|
92
|
-
prompt:
|
|
93
|
-
file: steps/mr-comment/implement.md
|
|
94
|
-
agent: worker
|
|
95
|
-
permissions:
|
|
96
|
-
tools: [read, ls, bash, edit, write, mcp]
|
|
97
|
-
mcp: [context7]
|
|
98
|
-
extensions: [/]
|
|
99
|
-
skills:
|
|
100
|
-
[coding-standards, test-driven-development, lint-commands, caveman]
|
|
101
|
-
bash:
|
|
102
|
-
mode: unrestricted
|
|
103
|
-
transitions:
|
|
104
|
-
ready: verify
|
|
105
|
-
retry: implement
|
|
106
|
-
blocked: $pause
|
|
107
|
-
verify:
|
|
108
|
-
title: Independently verify review-comment handling
|
|
109
|
-
prompt:
|
|
110
|
-
file: steps/mr-comment/verify.md
|
|
111
|
-
agent: reviewer
|
|
112
|
-
permissions:
|
|
113
|
-
tools: [read, ls, bash]
|
|
114
|
-
mcp: []
|
|
115
|
-
extensions: [/]
|
|
116
|
-
skills: [verification-before-completion, lint-commands, caveman]
|
|
117
|
-
bash:
|
|
118
|
-
mode: unrestricted
|
|
119
|
-
transitions:
|
|
120
|
-
ready: deliver
|
|
121
|
-
no-actions: $done
|
|
122
|
-
failed: implement
|
|
123
|
-
retry: verify
|
|
124
|
-
blocked: verify
|
|
125
|
-
deliver:
|
|
126
|
-
title: Push the verified commit and reply to review comments
|
|
127
|
-
prompt:
|
|
128
|
-
file: steps/mr-comment/publish.md
|
|
129
|
-
agent: worker
|
|
130
|
-
permissions:
|
|
131
|
-
tools: [read, ls, bash, mcp]
|
|
132
|
-
mcp: [gitlab]
|
|
133
|
-
extensions: [/]
|
|
134
|
-
skills: [commit-format, caveman]
|
|
135
|
-
bash:
|
|
136
|
-
mode: unrestricted
|
|
137
|
-
transitions:
|
|
138
|
-
published: $done
|
|
139
|
-
no-actions: $done
|
|
140
|
-
retry: deliver
|
|
141
|
-
superseded: $pause
|
|
142
|
-
blocked: $pause
|