@agentteams/cli 0.1.22 → 0.1.23-dev.82
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/README.md +2 -2
- package/dist/index.js +0 -0
- package/dist/utils/authServer.js +1 -1
- package/dist/utils/authServer.js.map +1 -1
- package/dist/utils/git.d.ts +1 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +1 -0
- package/dist/utils/git.js.map +1 -1
- package/package.json +3 -3
- package/.agentteams/config.json +0 -8
- package/.agentteams/convention.md +0 -100
- package/.agentteams/platform/co-action-guide.md +0 -144
- package/.agentteams/platform/completion-report-guide.md +0 -146
- package/.agentteams/platform/convention-authoring-guide.md +0 -112
- package/.agentteams/platform/convention-ud-guide.md +0 -59
- package/.agentteams/platform/plan-guide.md +0 -180
- package/.agentteams/platform/plan-template.md +0 -201
- package/.agentteams/platform/post-mortem-guide.md +0 -92
- package/dist/api/status.d.ts +0 -12
- package/dist/api/status.d.ts.map +0 -1
- package/dist/api/status.js +0 -33
- package/dist/api/status.js.map +0 -1
- package/dist/commands/status.d.ts +0 -2
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -60
- package/dist/commands/status.js.map +0 -1
- package/dist/utils/env.d.ts +0 -7
- package/dist/utils/env.d.ts.map +0 -1
- package/dist/utils/env.js +0 -19
- package/dist/utils/env.js.map +0 -1
- package/dist/utils/legacyCompat.d.ts +0 -3
- package/dist/utils/legacyCompat.d.ts.map +0 -1
- package/dist/utils/legacyCompat.js +0 -20
- package/dist/utils/legacyCompat.js.map +0 -1
- package/rlarua-agentteams-cli-0.1.8.tgz +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: -
|
|
3
|
-
description: Reference when updating or deleting project conventions via the CLI.
|
|
4
|
-
---
|
|
5
|
-
# Convention Update/Delete Guide (AgentTeams)
|
|
6
|
-
|
|
7
|
-
> ⚠️ This file is automatically deployed from the server. Do not edit it directly.
|
|
8
|
-
|
|
9
|
-
This guide explains how to update or delete **project convention files** using the `agentteams` CLI.
|
|
10
|
-
|
|
11
|
-
## Preconditions
|
|
12
|
-
|
|
13
|
-
- Update/delete only works for files produced by:
|
|
14
|
-
|
|
15
|
-
~~~bash
|
|
16
|
-
agentteams convention download
|
|
17
|
-
~~~
|
|
18
|
-
|
|
19
|
-
- Uploading arbitrary local files is not supported.
|
|
20
|
-
|
|
21
|
-
## Recommended workflow
|
|
22
|
-
|
|
23
|
-
1) Download conventions (also creates a local manifest used for mapping)
|
|
24
|
-
|
|
25
|
-
~~~bash
|
|
26
|
-
agentteams convention download
|
|
27
|
-
~~~
|
|
28
|
-
|
|
29
|
-
2) Edit the downloaded markdown files under `.agentteams/<category>/*.md`
|
|
30
|
-
|
|
31
|
-
3) Preview changes (default: dry-run)
|
|
32
|
-
|
|
33
|
-
~~~bash
|
|
34
|
-
agentteams convention update --file .agentteams/rules/core-rules.md
|
|
35
|
-
~~~
|
|
36
|
-
|
|
37
|
-
- This prints a diff and does **not** update the server.
|
|
38
|
-
|
|
39
|
-
4) Apply the update to the server
|
|
40
|
-
|
|
41
|
-
~~~bash
|
|
42
|
-
agentteams convention update --file .agentteams/rules/core-rules.md --apply
|
|
43
|
-
~~~
|
|
44
|
-
|
|
45
|
-
## Concurrency/conflict handling
|
|
46
|
-
|
|
47
|
-
- The CLI prints a local diff first (dry-run by default).
|
|
48
|
-
- When applying an update, the CLI sends the server's `updatedAt` value along with the request.
|
|
49
|
-
- The server is authoritative and rejects the update on conflict (HTTP 409). The default policy is to stop safely.
|
|
50
|
-
|
|
51
|
-
## Delete
|
|
52
|
-
|
|
53
|
-
~~~bash
|
|
54
|
-
# dry-run (default)
|
|
55
|
-
agentteams convention delete --file .agentteams/rules/core-rules.md
|
|
56
|
-
|
|
57
|
-
# apply
|
|
58
|
-
agentteams convention delete --file .agentteams/rules/core-rules.md --apply
|
|
59
|
-
~~~
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: model_decision
|
|
3
|
-
description: Reference when creating, executing, or completing a plan.
|
|
4
|
-
---
|
|
5
|
-
# Plan Guide (AgentTeams)
|
|
6
|
-
|
|
7
|
-
> ⚠️ This file is automatically deployed from the server. Do not edit it directly.
|
|
8
|
-
|
|
9
|
-
This guide defines how to **write** a high-quality plan. For execution details (status transitions, CLI commands, comments), follow your project's workflow conventions and CLI help.
|
|
10
|
-
|
|
11
|
-
## What a Plan Is
|
|
12
|
-
|
|
13
|
-
- A plan is a tracked unit of work with a type, status, and priority.
|
|
14
|
-
- Use plans when the work spans multiple steps or requires review and verification.
|
|
15
|
-
- Plans support comments, assignment, and status transitions.
|
|
16
|
-
- Plans have a **type** that classifies the nature of the work:
|
|
17
|
-
- `FEATURE` — New functionality or capability
|
|
18
|
-
- `BUG_FIX` — Fix for a defect or unexpected behavior
|
|
19
|
-
- `ISSUE` — Investigation or issue resolution
|
|
20
|
-
- `REFACTOR` — Code restructuring without behavior change
|
|
21
|
-
- `CHORE` — Maintenance, config, docs, or other housekeeping
|
|
22
|
-
|
|
23
|
-
## Plan Writing Workflow
|
|
24
|
-
|
|
25
|
-
1. **Clarify requirements** — explore the codebase, interview the requester if needed
|
|
26
|
-
2. **Write plan body** — follow Plan Tiers below to pick the right structure
|
|
27
|
-
3. **Gap analysis** — SHOULD run Metis review; use the self-check below if unavailable
|
|
28
|
-
4. **Register** — `agentteams plan create --file {path} --type {type} --priority {level}`
|
|
29
|
-
|
|
30
|
-
Repository linkage note:
|
|
31
|
-
|
|
32
|
-
- If .agentteams/config.json contains `repositoryId`, `plan create` links the new plan to that repository automatically.
|
|
33
|
-
|
|
34
|
-
## Execution Shortcuts
|
|
35
|
-
|
|
36
|
-
For standard execution flows, use lifecycle shortcuts instead of manual multi-step status updates.
|
|
37
|
-
|
|
38
|
-
~~~bash
|
|
39
|
-
# Start plan lifecycle
|
|
40
|
-
agentteams plan start --id {planId}
|
|
41
|
-
|
|
42
|
-
# Finish plan lifecycle
|
|
43
|
-
agentteams plan finish --id {planId}
|
|
44
|
-
|
|
45
|
-
# Finish and include completion report with metrics
|
|
46
|
-
agentteams plan finish --id {planId} \
|
|
47
|
-
--report-title "<what you did and why, in one sentence>" \
|
|
48
|
-
--report-file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
|
|
49
|
-
--quality-score <0-100, see Quality Score dimensions> \
|
|
50
|
-
--report-status <COMPLETED | PARTIAL | FAILED>
|
|
51
|
-
|
|
52
|
-
~~~
|
|
53
|
-
|
|
54
|
-
## Plan Start → Execution Flow
|
|
55
|
-
|
|
56
|
-
When a user explicitly says to start a plan (e.g. "start plan {id}", "let's start {id}"), treat it as an explicit execution approval. Follow this flow:
|
|
57
|
-
|
|
58
|
-
~~~bash
|
|
59
|
-
# 1. Download runbook
|
|
60
|
-
agentteams plan download --id {planId}
|
|
61
|
-
|
|
62
|
-
# 2. Check for blocking comments
|
|
63
|
-
agentteams comment list --plan-id {planId}
|
|
64
|
-
|
|
65
|
-
# 3. Start lifecycle
|
|
66
|
-
agentteams plan start --id {planId}
|
|
67
|
-
~~~
|
|
68
|
-
|
|
69
|
-
**Decision after comment check:**
|
|
70
|
-
|
|
71
|
-
| Comments found | Action |
|
|
72
|
-
|---|---|
|
|
73
|
-
| `RISK` or `MODIFICATION` present | Report to user and wait for confirmation before implementing |
|
|
74
|
-
| None (or `GENERAL` only) | Proceed with implementation immediately |
|
|
75
|
-
|
|
76
|
-
The phrase "start the plan" is an explicit approval signal — do not stop after the CLI status change. Implement unless a blocking comment requires human confirmation.
|
|
77
|
-
|
|
78
|
-
## Entity Reference Resolution
|
|
79
|
-
|
|
80
|
-
Plans may contain entity references in `[label](type:id)` or `[label](type:id:path)` format. Resolve them as follows:
|
|
81
|
-
|
|
82
|
-
1. **ID prefix stripping (IMPORTANT)**: The `id` part may include a type prefix such as `plan_`, `cr_`, `ca_`, `conv_`, or `pm_`. Always strip this prefix before passing the id to any CLI flag (`--id`, `--plan-id`, etc.).
|
|
83
|
-
- Example: `[My Plan](plan:plan_f62762fc-730a-4201-8586-e2541505ed1b)` → use `f62762fc-730a-4201-8586-e2541505ed1b`
|
|
84
|
-
- Full prefix list: `plan_` · `cr_` · `ca_` · `conv_` · `pm_`
|
|
85
|
-
2. Resolution by type:
|
|
86
|
-
- `convention:id:.agentteams/path` → Read the local file at the given path (e.g., `.agentteams/rules/context.md`)
|
|
87
|
-
- `completionReport:id` → Download with `agentteams report download --id {id}` and read the local file
|
|
88
|
-
- `postMortem:id` → Download with `agentteams postmortem download --id {id}` and read the local file
|
|
89
|
-
- `coAction:id` → Download with `agentteams coaction download --id {id}` and read the local file
|
|
90
|
-
|
|
91
|
-
## During Plan Execution
|
|
92
|
-
|
|
93
|
-
Post comments to track progress:
|
|
94
|
-
|
|
95
|
-
- **Risk found**: `agentteams comment create --plan-id {planId} --type RISK --content "<risk description>" --affected-files "<paths>"`
|
|
96
|
-
- **Scope changed**: `agentteams comment create --plan-id {planId} --type MODIFICATION --content "<what changed and why>" --affected-files "<paths>"`
|
|
97
|
-
- **Status update**: `agentteams comment create --plan-id {planId} --type GENERAL --content "<current progress>"`
|
|
98
|
-
|
|
99
|
-
## After Completing or Cancelling a Plan
|
|
100
|
-
|
|
101
|
-
Clean up the local runbook:
|
|
102
|
-
|
|
103
|
-
~~~bash
|
|
104
|
-
agentteams plan cleanup --id {planId}
|
|
105
|
-
~~~
|
|
106
|
-
|
|
107
|
-
## Plan Tiers — Pick the Right Level
|
|
108
|
-
|
|
109
|
-
Not every plan needs the same structure. Pick the tier that matches your task size.
|
|
110
|
-
|
|
111
|
-
### Minimal (1 task, 1–2 files, <30 min)
|
|
112
|
-
|
|
113
|
-
- `## TL;DR` — 1–2 sentence summary, deliverables
|
|
114
|
-
- `## TODOs` — What to do + Acceptance Criteria per task
|
|
115
|
-
|
|
116
|
-
### Standard (2–3 tasks, known scope)
|
|
117
|
-
|
|
118
|
-
Everything in Minimal, plus:
|
|
119
|
-
|
|
120
|
-
- `## Context` — Original Request / Research Findings
|
|
121
|
-
- `## Work Objectives` — Deliverables / Definition of Done / Must Have / Must NOT Have
|
|
122
|
-
- `## Verification Strategy` — QA tool mapping (API→typecheck+test, CLI→test, Web→build)
|
|
123
|
-
- TODOs add: Must NOT do / References
|
|
124
|
-
|
|
125
|
-
### Full (4+ tasks, multi-wave, unfamiliar domain)
|
|
126
|
-
|
|
127
|
-
Everything in Standard, plus:
|
|
128
|
-
|
|
129
|
-
- Context adds: Interview Summary / Metis Review
|
|
130
|
-
- `## Execution Strategy` — Parallel Waves / Dependency Matrix / Agent Dispatch
|
|
131
|
-
- TODOs add: Agent Profile / Parallelization / QA Scenarios / Commit plan
|
|
132
|
-
|
|
133
|
-
> When unsure, start with Standard. Upgrade to Full when tasks reach 4+.
|
|
134
|
-
> `plan-template.md` provides a copyable Full-tier template. For Minimal/Standard, extract only the sections you need.
|
|
135
|
-
|
|
136
|
-
## Task Required Elements
|
|
137
|
-
|
|
138
|
-
Full tier requires all items. Standard tier requires ★ items only.
|
|
139
|
-
|
|
140
|
-
- ★ What to do / Must NOT do
|
|
141
|
-
- Recommended Agent Profile (category + skills + reason)
|
|
142
|
-
- Parallelization (Wave / Blocks / Blocked By)
|
|
143
|
-
- ★ References (Pattern / API / External)
|
|
144
|
-
- ★ Acceptance Criteria
|
|
145
|
-
- QA Scenarios (Tool / Steps / Expected Result / Evidence)
|
|
146
|
-
- Commit (message + files + pre-commit)
|
|
147
|
-
|
|
148
|
-
## Gap Analysis
|
|
149
|
-
|
|
150
|
-
SHOULD: Ask the Metis agent to review the plan draft before registering.
|
|
151
|
-
|
|
152
|
-
If Metis is unavailable, self-check:
|
|
153
|
-
|
|
154
|
-
- [ ] All required sections for the chosen tier present?
|
|
155
|
-
- [ ] Must NOT Have guardrails defined?
|
|
156
|
-
- [ ] Each TODO has acceptance criteria?
|
|
157
|
-
- [ ] Dependency graph correct (no circular blocks)?
|
|
158
|
-
- [ ] File references verified to exist?
|
|
159
|
-
|
|
160
|
-
## Verification Expectations
|
|
161
|
-
|
|
162
|
-
- If you touched API code: run API typecheck + tests.
|
|
163
|
-
- If you touched CLI code: run CLI tests.
|
|
164
|
-
- If you introduced a new endpoint: add at least one request-level test.
|
|
165
|
-
- If you changed a template: update its tests to match.
|
|
166
|
-
|
|
167
|
-
## Common Pitfalls
|
|
168
|
-
|
|
169
|
-
- Skipping tests because changes "look small"
|
|
170
|
-
- Changing API contracts without updating schemas/tests
|
|
171
|
-
- Writing files to project-specific directories when they should be platform-wide
|
|
172
|
-
- Mixing platform content with project conventions (keep them separate)
|
|
173
|
-
- Excessive comments that restate the code
|
|
174
|
-
- Scope creep beyond task spec
|
|
175
|
-
- Over-abstraction or premature generalization
|
|
176
|
-
- Generic names (data, result, item) that obscure intent
|
|
177
|
-
|
|
178
|
-
## References
|
|
179
|
-
|
|
180
|
-
- `plan-template.md` — copyable Full-tier plan template
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: -
|
|
3
|
-
description: Copyable full plan template. Use as starting point when writing a new plan.
|
|
4
|
-
---
|
|
5
|
-
# Plan Template (Full Tier)
|
|
6
|
-
|
|
7
|
-
> ⚠️ This file is automatically deployed from the server. Do not edit it directly.
|
|
8
|
-
|
|
9
|
-
> This template is for **Full tier** plans (4+ tasks, multi-wave, unfamiliar domain).
|
|
10
|
-
> For Minimal or Standard plans, refer to the Plan Tiers section in `plan-guide.md` and extract only the sections you need.
|
|
11
|
-
|
|
12
|
-
## TL;DR
|
|
13
|
-
|
|
14
|
-
> **Quick Summary**: <!-- 1-2 sentence summary of what this plan achieves -->
|
|
15
|
-
>
|
|
16
|
-
> **Deliverables**:
|
|
17
|
-
>
|
|
18
|
-
> - <!-- file/module 1 — what changes -->
|
|
19
|
-
> - <!-- file/module 2 — what changes -->
|
|
20
|
-
>
|
|
21
|
-
> **Estimated Effort**: <!-- Short / Medium / Long -->
|
|
22
|
-
> **Type**: <!-- FEATURE / BUG_FIX / ISSUE / REFACTOR / CHORE -->
|
|
23
|
-
> **Parallel Execution**: <!-- YES / NO -->
|
|
24
|
-
> **Critical Path**: <!-- Task X → Task Y → ... -->
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Context
|
|
29
|
-
|
|
30
|
-
### Original Request
|
|
31
|
-
|
|
32
|
-
<!-- What the user/requester asked for and why -->
|
|
33
|
-
|
|
34
|
-
### Interview Summary
|
|
35
|
-
|
|
36
|
-
<!-- Key decisions from Q&A with the requester (if applicable) -->
|
|
37
|
-
|
|
38
|
-
### Research Findings
|
|
39
|
-
|
|
40
|
-
<!-- What you discovered from exploring the codebase, docs, or external sources -->
|
|
41
|
-
|
|
42
|
-
### Metis Review
|
|
43
|
-
|
|
44
|
-
<!-- Gaps identified by Metis review (or self-check results) -->
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Work Objectives
|
|
49
|
-
|
|
50
|
-
### Core Objective
|
|
51
|
-
|
|
52
|
-
<!-- One sentence: what success looks like -->
|
|
53
|
-
|
|
54
|
-
### Concrete Deliverables
|
|
55
|
-
|
|
56
|
-
- <!-- file/module — description -->
|
|
57
|
-
|
|
58
|
-
### Definition of Done
|
|
59
|
-
|
|
60
|
-
- <!-- Criterion 1 -->
|
|
61
|
-
- <!-- Criterion 2 -->
|
|
62
|
-
|
|
63
|
-
### Must Have
|
|
64
|
-
|
|
65
|
-
- <!-- Non-negotiable requirement -->
|
|
66
|
-
|
|
67
|
-
### Must NOT Have (Guardrails)
|
|
68
|
-
|
|
69
|
-
- <!-- Explicitly forbidden action -->
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Verification Strategy
|
|
74
|
-
|
|
75
|
-
> **ZERO HUMAN INTERVENTION** — ALL verification is agent-executed.
|
|
76
|
-
|
|
77
|
-
### QA Policy
|
|
78
|
-
|
|
79
|
-
- <!-- Tool/command mapping: API→typecheck+test, CLI→test, Web→build+playwright -->
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Execution Strategy
|
|
84
|
-
|
|
85
|
-
### Parallel Execution Waves
|
|
86
|
-
|
|
87
|
-
~~~
|
|
88
|
-
Wave 1:
|
|
89
|
-
├── Task 1: description [category]
|
|
90
|
-
└── Task 2: description [category]
|
|
91
|
-
|
|
92
|
-
Wave 2 (Wave 1 complete):
|
|
93
|
-
└── Task 3: description [category]
|
|
94
|
-
~~~
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## TODOs
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
- 1. Task title
|
|
103
|
-
|
|
104
|
-
**What to do**:
|
|
105
|
-
|
|
106
|
-
<!-- Detailed steps -->
|
|
107
|
-
|
|
108
|
-
**Must NOT do**:
|
|
109
|
-
|
|
110
|
-
- <!-- Forbidden action -->
|
|
111
|
-
|
|
112
|
-
**Recommended Agent Profile**:
|
|
113
|
-
|
|
114
|
-
- **Category**: `<!-- category -->`
|
|
115
|
-
- Reason: <!-- why this category -->
|
|
116
|
-
- **Skills**: <!-- skill list or none -->
|
|
117
|
-
|
|
118
|
-
**Parallelization**:
|
|
119
|
-
|
|
120
|
-
- **Can Run In Parallel**: <!-- YES / NO -->
|
|
121
|
-
- **Parallel Group**: <!-- Wave N -->
|
|
122
|
-
- **Blocks**: <!-- Task N or none -->
|
|
123
|
-
- **Blocked By**: <!-- Task N or none -->
|
|
124
|
-
|
|
125
|
-
**References**:
|
|
126
|
-
|
|
127
|
-
- <!-- file:lines — description -->
|
|
128
|
-
|
|
129
|
-
**Acceptance Criteria**:
|
|
130
|
-
|
|
131
|
-
- <!-- Verifiable criterion -->
|
|
132
|
-
|
|
133
|
-
**QA Scenarios**:
|
|
134
|
-
|
|
135
|
-
~~~
|
|
136
|
-
Scenario: description
|
|
137
|
-
Tool: Bash
|
|
138
|
-
Steps:
|
|
139
|
-
1. command
|
|
140
|
-
Expected Result: what success looks like
|
|
141
|
-
Failure Indicators: what failure looks like
|
|
142
|
-
Evidence: .sisyphus/evidence/task-N-name.txt
|
|
143
|
-
~~~
|
|
144
|
-
|
|
145
|
-
**Commit**: <!-- YES / NO -->
|
|
146
|
-
|
|
147
|
-
- Message: `<!-- type(scope): description -->`
|
|
148
|
-
- Files: <!-- file list -->
|
|
149
|
-
- Pre-commit: `<!-- verification command -->`
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Final Verification Wave
|
|
154
|
-
|
|
155
|
-
- F1. **Final check** — `quick`
|
|
156
|
-
|
|
157
|
-
1. <!-- verification command 1 -->
|
|
158
|
-
2. <!-- verification command 2 -->
|
|
159
|
-
|
|
160
|
-
Output: `<!-- result format -->`
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Commit Strategy
|
|
165
|
-
|
|
166
|
-
- **Task 1**: `<!-- commit message -->`
|
|
167
|
-
- **Task 2**: `<!-- commit message -->`
|
|
168
|
-
|
|
169
|
-
## Success Criteria
|
|
170
|
-
|
|
171
|
-
~~~bash
|
|
172
|
-
# <!-- description -->
|
|
173
|
-
<!-- command -->
|
|
174
|
-
# Expected: <!-- result -->
|
|
175
|
-
~~~
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## QA Scenario Examples
|
|
180
|
-
|
|
181
|
-
### Good (specific, verifiable)
|
|
182
|
-
|
|
183
|
-
~~~
|
|
184
|
-
Scenario: API returns 404 for non-existent plan
|
|
185
|
-
Tool: Bash
|
|
186
|
-
Steps:
|
|
187
|
-
1. curl -s -o /dev/null -w "%{http_code}" http://localhost:3001/api/plans/nonexistent-id
|
|
188
|
-
Expected Result: 404
|
|
189
|
-
Failure Indicators: 200 or 500
|
|
190
|
-
Evidence: .sisyphus/evidence/plan-404.txt
|
|
191
|
-
~~~
|
|
192
|
-
|
|
193
|
-
### Bad (vague, unverifiable)
|
|
194
|
-
|
|
195
|
-
~~~
|
|
196
|
-
Scenario: API works correctly
|
|
197
|
-
Tool: Manual
|
|
198
|
-
Steps:
|
|
199
|
-
1. Test the API
|
|
200
|
-
Expected Result: It works
|
|
201
|
-
~~~
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: model_decision
|
|
3
|
-
description: Reference when writing a post mortem.
|
|
4
|
-
---
|
|
5
|
-
# Post Mortem Guide (AgentTeams)
|
|
6
|
-
|
|
7
|
-
> ⚠️ This file is automatically deployed from the server. Do not edit it directly.
|
|
8
|
-
|
|
9
|
-
A post mortem is a written analysis of an incident, focusing on root cause and prevention.
|
|
10
|
-
|
|
11
|
-
## Goals
|
|
12
|
-
|
|
13
|
-
- Capture what happened and when
|
|
14
|
-
- Identify the root cause (not symptoms)
|
|
15
|
-
- Document the impact (users, revenue, SLA, operations)
|
|
16
|
-
- Define concrete action items to prevent recurrence
|
|
17
|
-
|
|
18
|
-
## Before You Start
|
|
19
|
-
|
|
20
|
-
- Collect logs, alerts, and key timestamps.
|
|
21
|
-
- Identify the affected systems and user segments.
|
|
22
|
-
- Confirm whether this was a one-off or part of a recurring pattern.
|
|
23
|
-
|
|
24
|
-
## Structure
|
|
25
|
-
|
|
26
|
-
- Title: short incident identifier
|
|
27
|
-
- Content: narrative of what happened and what was learned
|
|
28
|
-
- Action items: specific tasks with owners and deadlines
|
|
29
|
-
- Status: OPEN, IN_PROGRESS, or RESOLVED
|
|
30
|
-
|
|
31
|
-
## Root Cause Notes
|
|
32
|
-
|
|
33
|
-
- Prefer a clear causal chain over vague labels.
|
|
34
|
-
- Distinguish: trigger vs contributing factors vs detection failure.
|
|
35
|
-
- Include "why it was not caught earlier".
|
|
36
|
-
|
|
37
|
-
## Tips
|
|
38
|
-
|
|
39
|
-
- Use a clear timeline (timestamps if available)
|
|
40
|
-
- Avoid blame; focus on systems and process
|
|
41
|
-
- Include what detection/monitoring failed and how to improve it
|
|
42
|
-
|
|
43
|
-
## Action Items
|
|
44
|
-
|
|
45
|
-
- Make action items concrete and testable.
|
|
46
|
-
- Prefer small items with clear ownership.
|
|
47
|
-
- Track them like normal plans if they require engineering work.
|
|
48
|
-
|
|
49
|
-
## Post Mortem Content Template
|
|
50
|
-
|
|
51
|
-
Use this structure for the `--content` field or the `--file` content:
|
|
52
|
-
|
|
53
|
-
~~~markdown
|
|
54
|
-
## Summary
|
|
55
|
-
<what happened — 1-2 sentences, be specific>
|
|
56
|
-
|
|
57
|
-
## Timeline
|
|
58
|
-
- HH:MM - <event 1>
|
|
59
|
-
- HH:MM - <event 2>
|
|
60
|
-
|
|
61
|
-
## Root Cause
|
|
62
|
-
<specific cause, not symptoms — describe the causal chain>
|
|
63
|
-
|
|
64
|
-
## Impact
|
|
65
|
-
<who/what was affected and for how long>
|
|
66
|
-
|
|
67
|
-
## What Went Wrong
|
|
68
|
-
- <contributing factor 1>
|
|
69
|
-
- <contributing factor 2>
|
|
70
|
-
|
|
71
|
-
## What Went Well
|
|
72
|
-
- <what helped limit the damage or speed up recovery>
|
|
73
|
-
~~~
|
|
74
|
-
|
|
75
|
-
## Post Mortem File Naming
|
|
76
|
-
|
|
77
|
-
Use `{first 8 characters of planId}-postmortem.md`. Example: if planId is `57a51ec2-cf70-...`, the file name is `57a51ec2-postmortem.md`.
|
|
78
|
-
|
|
79
|
-
## Useful Commands
|
|
80
|
-
|
|
81
|
-
~~~bash
|
|
82
|
-
agentteams postmortem create \
|
|
83
|
-
--plan-id {planId} \
|
|
84
|
-
--title "<what broke — e.g., 'API 500 on plan finish after schema migration'>" \
|
|
85
|
-
--file .agentteams/cli/temp/{planId-first-8-chars}-postmortem.md \
|
|
86
|
-
--action-items "<specific preventive action 1>,<specific preventive action 2>" \
|
|
87
|
-
--status OPEN
|
|
88
|
-
~~~
|
|
89
|
-
|
|
90
|
-
Repository linkage note:
|
|
91
|
-
|
|
92
|
-
- If .agentteams/config.json contains `repositoryId`, `postmortem create` links the postmortem to that repository automatically.
|
package/dist/api/status.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function reportStatus(apiUrl: string, projectId: string, headers: any, body: {
|
|
2
|
-
agent: unknown;
|
|
3
|
-
status: unknown;
|
|
4
|
-
task: unknown;
|
|
5
|
-
issues: string[];
|
|
6
|
-
remaining: string[];
|
|
7
|
-
}): Promise<any>;
|
|
8
|
-
export declare function listStatuses(apiUrl: string, projectId: string, headers: any, params?: Record<string, number>): Promise<any>;
|
|
9
|
-
export declare function getStatus(apiUrl: string, projectId: string, headers: any, id: string): Promise<any>;
|
|
10
|
-
export declare function updateStatus(apiUrl: string, projectId: string, headers: any, id: string, body: Record<string, unknown>): Promise<any>;
|
|
11
|
-
export declare function deleteStatus(apiUrl: string, projectId: string, headers: any, id: string): Promise<any>;
|
|
12
|
-
//# sourceMappingURL=status.d.ts.map
|
package/dist/api/status.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/api/status.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE;IACJ,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,GACA,OAAO,CAAC,GAAG,CAAC,CAId;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,GAAG,CAAC,CAQd;AAED,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,GAAG,CAAC,CAId;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,GAAG,CAAC,CAId;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,GAAG,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,GAAG,CAAC,CAMd"}
|
package/dist/api/status.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { withoutJsonContentType } from '../utils/httpHeaders.js';
|
|
3
|
-
export async function reportStatus(apiUrl, projectId, headers, body) {
|
|
4
|
-
const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
|
|
5
|
-
const response = await axios.post(baseUrl, body, { headers });
|
|
6
|
-
return response.data;
|
|
7
|
-
}
|
|
8
|
-
export async function listStatuses(apiUrl, projectId, headers, params) {
|
|
9
|
-
const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
|
|
10
|
-
const requestConfig = params && Object.keys(params).length > 0
|
|
11
|
-
? { headers, params }
|
|
12
|
-
: { headers };
|
|
13
|
-
const response = await axios.get(baseUrl, requestConfig);
|
|
14
|
-
return response.data;
|
|
15
|
-
}
|
|
16
|
-
export async function getStatus(apiUrl, projectId, headers, id) {
|
|
17
|
-
const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
|
|
18
|
-
const response = await axios.get(`${baseUrl}/${id}`, { headers });
|
|
19
|
-
return response.data;
|
|
20
|
-
}
|
|
21
|
-
export async function updateStatus(apiUrl, projectId, headers, id, body) {
|
|
22
|
-
const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
|
|
23
|
-
const response = await axios.put(`${baseUrl}/${id}`, body, { headers });
|
|
24
|
-
return response.data;
|
|
25
|
-
}
|
|
26
|
-
export async function deleteStatus(apiUrl, projectId, headers, id) {
|
|
27
|
-
const baseUrl = `${apiUrl}/api/projects/${projectId}/agent-statuses`;
|
|
28
|
-
const response = await axios.delete(`${baseUrl}/${id}`, {
|
|
29
|
-
headers: withoutJsonContentType(headers),
|
|
30
|
-
});
|
|
31
|
-
return response.data;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=status.js.map
|
package/dist/api/status.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/api/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,IAMC;IAED,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9D,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,MAA+B;IAE/B,MAAM,OAAO,GAAG,GAAG,MAAM,iBAAiB,SAAS,iBAAiB,CAAC;IACrE,MAAM,aAAa,GAAG,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC;QAC5D,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE;QACrB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;IAEhB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACzD,OAAO,QAAQ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AAE,GAAG,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,GACX,OAAO,CAAC,GAAG,CAAC,CA+Cd"}
|
package/dist/commands/status.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { deleteStatus, getStatus, listStatuses, reportStatus, updateStatus } from '../api/status.js';
|
|
2
|
-
import { splitCsv, toPositiveInteger } from '../utils/parsers.js';
|
|
3
|
-
export async function executeStatusCommand(apiUrl, projectId, headers, action, options) {
|
|
4
|
-
switch (action) {
|
|
5
|
-
case 'report': {
|
|
6
|
-
if (!options.status)
|
|
7
|
-
throw new Error('--status is required for status report');
|
|
8
|
-
if (!options.task)
|
|
9
|
-
throw new Error('--task is required for status report');
|
|
10
|
-
if (options.issues === undefined)
|
|
11
|
-
throw new Error('--issues is required for status report');
|
|
12
|
-
if (options.remaining === undefined)
|
|
13
|
-
throw new Error('--remaining is required for status report');
|
|
14
|
-
return reportStatus(apiUrl, projectId, headers, {
|
|
15
|
-
agent: options.agent,
|
|
16
|
-
status: options.status,
|
|
17
|
-
task: options.task,
|
|
18
|
-
issues: splitCsv(options.issues),
|
|
19
|
-
remaining: splitCsv(options.remaining),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
case 'list': {
|
|
23
|
-
const params = {};
|
|
24
|
-
const page = toPositiveInteger(options.page);
|
|
25
|
-
const pageSize = toPositiveInteger(options.pageSize);
|
|
26
|
-
if (page !== undefined)
|
|
27
|
-
params.page = page;
|
|
28
|
-
if (pageSize !== undefined)
|
|
29
|
-
params.pageSize = pageSize;
|
|
30
|
-
return listStatuses(apiUrl, projectId, headers, params);
|
|
31
|
-
}
|
|
32
|
-
case 'get': {
|
|
33
|
-
if (!options.id)
|
|
34
|
-
throw new Error('--id is required for status get');
|
|
35
|
-
return getStatus(apiUrl, projectId, headers, options.id);
|
|
36
|
-
}
|
|
37
|
-
case 'update': {
|
|
38
|
-
if (!options.id)
|
|
39
|
-
throw new Error('--id is required for status update');
|
|
40
|
-
const body = {};
|
|
41
|
-
if (options.status !== undefined)
|
|
42
|
-
body.status = options.status;
|
|
43
|
-
if (options.task !== undefined)
|
|
44
|
-
body.task = options.task;
|
|
45
|
-
if (options.issues !== undefined)
|
|
46
|
-
body.issues = splitCsv(options.issues);
|
|
47
|
-
if (options.remaining !== undefined)
|
|
48
|
-
body.remaining = splitCsv(options.remaining);
|
|
49
|
-
return updateStatus(apiUrl, projectId, headers, options.id, body);
|
|
50
|
-
}
|
|
51
|
-
case 'delete': {
|
|
52
|
-
if (!options.id)
|
|
53
|
-
throw new Error('--id is required for status delete');
|
|
54
|
-
return deleteStatus(apiUrl, projectId, headers, options.id);
|
|
55
|
-
}
|
|
56
|
-
default:
|
|
57
|
-
throw new Error(`Unknown action: ${action}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAElE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,SAAiB,EACjB,OAAY,EACZ,MAAc,EACd,OAAY;IAEZ,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,IAAI,CAAC,OAAO,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC/E,IAAI,CAAC,OAAO,CAAC,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;YAC3E,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC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