@agentteams/cli 0.1.22

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.
Files changed (200) hide show
  1. package/.agentteams/config.json +8 -0
  2. package/.agentteams/convention.md +100 -0
  3. package/.agentteams/platform/co-action-guide.md +144 -0
  4. package/.agentteams/platform/completion-report-guide.md +146 -0
  5. package/.agentteams/platform/convention-authoring-guide.md +112 -0
  6. package/.agentteams/platform/convention-ud-guide.md +59 -0
  7. package/.agentteams/platform/plan-guide.md +180 -0
  8. package/.agentteams/platform/plan-template.md +201 -0
  9. package/.agentteams/platform/post-mortem-guide.md +92 -0
  10. package/CODE_OF_CONDUCT.md +36 -0
  11. package/CONTRIBUTING.md +39 -0
  12. package/LICENSE +201 -0
  13. package/README.md +405 -0
  14. package/SECURITY.md +27 -0
  15. package/dist/api/coaction.d.ts +17 -0
  16. package/dist/api/coaction.d.ts.map +1 -0
  17. package/dist/api/coaction.js +102 -0
  18. package/dist/api/coaction.js.map +1 -0
  19. package/dist/api/comment.d.ts +13 -0
  20. package/dist/api/comment.d.ts.map +1 -0
  21. package/dist/api/comment.js +33 -0
  22. package/dist/api/comment.js.map +1 -0
  23. package/dist/api/feedback.d.ts +7 -0
  24. package/dist/api/feedback.d.ts.map +1 -0
  25. package/dist/api/feedback.js +6 -0
  26. package/dist/api/feedback.js.map +1 -0
  27. package/dist/api/linear.d.ts +5 -0
  28. package/dist/api/linear.d.ts.map +1 -0
  29. package/dist/api/linear.js +27 -0
  30. package/dist/api/linear.js.map +1 -0
  31. package/dist/api/member.d.ts +16 -0
  32. package/dist/api/member.d.ts.map +1 -0
  33. package/dist/api/member.js +6 -0
  34. package/dist/api/member.js.map +1 -0
  35. package/dist/api/plan.d.ts +51 -0
  36. package/dist/api/plan.d.ts.map +1 -0
  37. package/dist/api/plan.js +80 -0
  38. package/dist/api/plan.js.map +1 -0
  39. package/dist/api/postmortem.d.ts +6 -0
  40. package/dist/api/postmortem.d.ts.map +1 -0
  41. package/dist/api/postmortem.js +33 -0
  42. package/dist/api/postmortem.js.map +1 -0
  43. package/dist/api/report.d.ts +6 -0
  44. package/dist/api/report.d.ts.map +1 -0
  45. package/dist/api/report.js +33 -0
  46. package/dist/api/report.js.map +1 -0
  47. package/dist/api/search.d.ts +2 -0
  48. package/dist/api/search.d.ts.map +1 -0
  49. package/dist/api/search.js +20 -0
  50. package/dist/api/search.js.map +1 -0
  51. package/dist/api/status.d.ts +12 -0
  52. package/dist/api/status.d.ts.map +1 -0
  53. package/dist/api/status.js +33 -0
  54. package/dist/api/status.js.map +1 -0
  55. package/dist/commands/agentConfig.d.ts +4 -0
  56. package/dist/commands/agentConfig.d.ts.map +1 -0
  57. package/dist/commands/agentConfig.js +41 -0
  58. package/dist/commands/agentConfig.js.map +1 -0
  59. package/dist/commands/agentConfigCommand.d.ts +2 -0
  60. package/dist/commands/agentConfigCommand.d.ts.map +1 -0
  61. package/dist/commands/agentConfigCommand.js +20 -0
  62. package/dist/commands/agentConfigCommand.js.map +1 -0
  63. package/dist/commands/coaction.d.ts +2 -0
  64. package/dist/commands/coaction.d.ts.map +1 -0
  65. package/dist/commands/coaction.js +405 -0
  66. package/dist/commands/coaction.js.map +1 -0
  67. package/dist/commands/comment.d.ts +2 -0
  68. package/dist/commands/comment.d.ts.map +1 -0
  69. package/dist/commands/comment.js +63 -0
  70. package/dist/commands/comment.js.map +1 -0
  71. package/dist/commands/config.d.ts +2 -0
  72. package/dist/commands/config.d.ts.map +1 -0
  73. package/dist/commands/config.js +30 -0
  74. package/dist/commands/config.js.map +1 -0
  75. package/dist/commands/convention.d.ts +35 -0
  76. package/dist/commands/convention.d.ts.map +1 -0
  77. package/dist/commands/convention.js +680 -0
  78. package/dist/commands/convention.js.map +1 -0
  79. package/dist/commands/conventionRouter.d.ts +3 -0
  80. package/dist/commands/conventionRouter.d.ts.map +1 -0
  81. package/dist/commands/conventionRouter.js +46 -0
  82. package/dist/commands/conventionRouter.js.map +1 -0
  83. package/dist/commands/dependency.d.ts +4 -0
  84. package/dist/commands/dependency.d.ts.map +1 -0
  85. package/dist/commands/dependency.js +41 -0
  86. package/dist/commands/dependency.js.map +1 -0
  87. package/dist/commands/dependencyCommand.d.ts +2 -0
  88. package/dist/commands/dependencyCommand.d.ts.map +1 -0
  89. package/dist/commands/dependencyCommand.js +27 -0
  90. package/dist/commands/dependencyCommand.js.map +1 -0
  91. package/dist/commands/feedback.d.ts +2 -0
  92. package/dist/commands/feedback.d.ts.map +1 -0
  93. package/dist/commands/feedback.js +38 -0
  94. package/dist/commands/feedback.js.map +1 -0
  95. package/dist/commands/index.d.ts +2 -0
  96. package/dist/commands/index.d.ts.map +1 -0
  97. package/dist/commands/index.js +128 -0
  98. package/dist/commands/index.js.map +1 -0
  99. package/dist/commands/init.d.ts +22 -0
  100. package/dist/commands/init.d.ts.map +1 -0
  101. package/dist/commands/init.js +293 -0
  102. package/dist/commands/init.js.map +1 -0
  103. package/dist/commands/linear.d.ts +2 -0
  104. package/dist/commands/linear.d.ts.map +1 -0
  105. package/dist/commands/linear.js +41 -0
  106. package/dist/commands/linear.js.map +1 -0
  107. package/dist/commands/plan.d.ts +12 -0
  108. package/dist/commands/plan.d.ts.map +1 -0
  109. package/dist/commands/plan.js +626 -0
  110. package/dist/commands/plan.js.map +1 -0
  111. package/dist/commands/postmortem.d.ts +2 -0
  112. package/dist/commands/postmortem.d.ts.map +1 -0
  113. package/dist/commands/postmortem.js +157 -0
  114. package/dist/commands/postmortem.js.map +1 -0
  115. package/dist/commands/report.d.ts +2 -0
  116. package/dist/commands/report.d.ts.map +1 -0
  117. package/dist/commands/report.js +213 -0
  118. package/dist/commands/report.js.map +1 -0
  119. package/dist/commands/search.d.ts +2 -0
  120. package/dist/commands/search.d.ts.map +1 -0
  121. package/dist/commands/search.js +29 -0
  122. package/dist/commands/search.js.map +1 -0
  123. package/dist/commands/status.d.ts +2 -0
  124. package/dist/commands/status.d.ts.map +1 -0
  125. package/dist/commands/status.js +60 -0
  126. package/dist/commands/status.js.map +1 -0
  127. package/dist/index.d.ts +3 -0
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +750 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/types/index.d.ts +237 -0
  132. package/dist/types/index.d.ts.map +1 -0
  133. package/dist/types/index.js +6 -0
  134. package/dist/types/index.js.map +1 -0
  135. package/dist/utils/atomicWrite.d.ts +2 -0
  136. package/dist/utils/atomicWrite.d.ts.map +1 -0
  137. package/dist/utils/atomicWrite.js +7 -0
  138. package/dist/utils/atomicWrite.js.map +1 -0
  139. package/dist/utils/authServer.d.ts +18 -0
  140. package/dist/utils/authServer.d.ts.map +1 -0
  141. package/dist/utils/authServer.js +215 -0
  142. package/dist/utils/authServer.js.map +1 -0
  143. package/dist/utils/config.d.ts +31 -0
  144. package/dist/utils/config.d.ts.map +1 -0
  145. package/dist/utils/config.js +113 -0
  146. package/dist/utils/config.js.map +1 -0
  147. package/dist/utils/env.d.ts +7 -0
  148. package/dist/utils/env.d.ts.map +1 -0
  149. package/dist/utils/env.js +19 -0
  150. package/dist/utils/env.js.map +1 -0
  151. package/dist/utils/errors.d.ts +6 -0
  152. package/dist/utils/errors.d.ts.map +1 -0
  153. package/dist/utils/errors.js +112 -0
  154. package/dist/utils/errors.js.map +1 -0
  155. package/dist/utils/formatter.d.ts +2 -0
  156. package/dist/utils/formatter.d.ts.map +1 -0
  157. package/dist/utils/formatter.js +55 -0
  158. package/dist/utils/formatter.js.map +1 -0
  159. package/dist/utils/git.d.ts +21 -0
  160. package/dist/utils/git.d.ts.map +1 -0
  161. package/dist/utils/git.js +44 -0
  162. package/dist/utils/git.js.map +1 -0
  163. package/dist/utils/httpClient.d.ts +3 -0
  164. package/dist/utils/httpClient.d.ts.map +1 -0
  165. package/dist/utils/httpClient.js +45 -0
  166. package/dist/utils/httpClient.js.map +1 -0
  167. package/dist/utils/httpHeaders.d.ts +3 -0
  168. package/dist/utils/httpHeaders.d.ts.map +1 -0
  169. package/dist/utils/httpHeaders.js +11 -0
  170. package/dist/utils/httpHeaders.js.map +1 -0
  171. package/dist/utils/initOutput.d.ts +3 -0
  172. package/dist/utils/initOutput.d.ts.map +1 -0
  173. package/dist/utils/initOutput.js +45 -0
  174. package/dist/utils/initOutput.js.map +1 -0
  175. package/dist/utils/legacyCompat.d.ts +3 -0
  176. package/dist/utils/legacyCompat.d.ts.map +1 -0
  177. package/dist/utils/legacyCompat.js +20 -0
  178. package/dist/utils/legacyCompat.js.map +1 -0
  179. package/dist/utils/outputPolicy.d.ts +12 -0
  180. package/dist/utils/outputPolicy.d.ts.map +1 -0
  181. package/dist/utils/outputPolicy.js +171 -0
  182. package/dist/utils/outputPolicy.js.map +1 -0
  183. package/dist/utils/parsers.d.ts +14 -0
  184. package/dist/utils/parsers.d.ts.map +1 -0
  185. package/dist/utils/parsers.js +78 -0
  186. package/dist/utils/parsers.js.map +1 -0
  187. package/dist/utils/planFormat.d.ts +17 -0
  188. package/dist/utils/planFormat.d.ts.map +1 -0
  189. package/dist/utils/planFormat.js +81 -0
  190. package/dist/utils/planFormat.js.map +1 -0
  191. package/dist/utils/spinner.d.ts +6 -0
  192. package/dist/utils/spinner.d.ts.map +1 -0
  193. package/dist/utils/spinner.js +34 -0
  194. package/dist/utils/spinner.js.map +1 -0
  195. package/dist/utils/updateCheck.d.ts +19 -0
  196. package/dist/utils/updateCheck.d.ts.map +1 -0
  197. package/dist/utils/updateCheck.js +103 -0
  198. package/dist/utils/updateCheck.js.map +1 -0
  199. package/package.json +55 -0
  200. package/rlarua-agentteams-cli-0.1.8.tgz +0 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "teamId": "1939e8e3-706b-48f1-9dab-ff1b5399f804",
3
+ "projectId": "b2949695-3284-4d19-b9a4-4d2a9e905fde",
4
+ "agentName": "cli-agent",
5
+ "apiKey": "key_eaf85b02-c8a2-40ec-98bf-ba9983c790ff_bdb34ca3-c68c-4265-b68b-a9d9394cbd42",
6
+ "apiUrl": "https://api.agentteams.run",
7
+ "repositoryId": "f9db0ce9-be0d-4938-91d9-98b903413260"
8
+ }
@@ -0,0 +1,100 @@
1
+ ---
2
+ trigger: always_on
3
+ description: -
4
+ agentInstruction: |
5
+ Always reference the items below.
6
+ - (no always_on items)
7
+ ---
8
+
9
+ # AgentTeams Convention
10
+
11
+ > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
12
+
13
+ ## Entity References & ID Handling
14
+
15
+ User messages from the AgentTeams web UI may contain entity references in `[label](type:id)` or `[label](type:id:path)` format.
16
+
17
+ - **ID prefix stripping (IMPORTANT)**: The `id` part includes a type prefix (`plan_`, `cr_`, `ca_`, `conv_`, `pm_`). Always strip this prefix before passing the id to any CLI flag (`--id`, `--plan-id`, etc.).
18
+ - Example: `[Safari pull-to-refresh](plan:plan_f62762fc-730a-4201-8586-e2541505ed1b)` → use `f62762fc-730a-4201-8586-e2541505ed1b`
19
+ - Full prefix list: `plan_` · `cr_` · `ca_` · `conv_` · `pm_`
20
+ - Resolution by type:
21
+ - `convention:id:.agentteams/path` → Read the local file at the given path (e.g., `.agentteams/rules/context.md`)
22
+ - `completionReport:id` → Download with `agentteams report download --id {id}` and read the local file
23
+ - `postMortem:id` → Download with `agentteams postmortem download --id {id}` and read the local file
24
+ - `coAction:id` → Download with `agentteams coaction download --id {id}` and read the local file
25
+
26
+ ---
27
+
28
+ > ⚠️ When creating, updating, or deleting platform documents (plans, conventions, reports, postmortems, co-actions), do not stop at writing local files — always register the result to the server via the CLI.
29
+
30
+ Report status to AgentTeams **if you are working under a plan**.
31
+
32
+ > If the CLI is unavailable, skip reporting and continue the task.
33
+
34
+ ## Plan Lifecycle (Quick Reference)
35
+
36
+ ```bash
37
+ # Start
38
+ agentteams plan start --id {planId}
39
+
40
+ # Finish (with completion report)
41
+ agentteams plan finish --id {planId} \
42
+ --report-title "<what you did and why, in one sentence>" \
43
+ --report-file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
44
+ --quality-score <0-100> \
45
+ --report-status <COMPLETED | PARTIAL | FAILED>
46
+ ```
47
+
48
+ For report file structure, quality score dimensions, and status rules, see `.agentteams/platform/completion-report-guide.md`.
49
+
50
+ ## Completion Report Without a Plan
51
+
52
+ 1. Ask the user: "No active plan found. Should I create a quick plan to record this work?"
53
+ 2. If approved:
54
+ ```bash
55
+ agentteams plan quick --title "<brief work summary>" \
56
+ --content "<TL;DR and actual tasks performed>" \
57
+ --type <FEATURE | BUG_FIX | ISSUE | REFACTOR | CHORE>
58
+ ```
59
+ Then follow the report creation steps in `.agentteams/platform/completion-report-guide.md`.
60
+ 3. If declined, create a standalone report (no plan link). See `.agentteams/platform/completion-report-guide.md`.
61
+
62
+ ---
63
+
64
+ ## Plan Workflow Rules
65
+
66
+ ### Before starting work on a plan
67
+
68
+ 1. Download the plan as a local runbook:
69
+ ```bash
70
+ agentteams plan download --id {planId}
71
+ ```
72
+ This saves to `.agentteams/cli/active-plan/{filename}.md`. Read this file at the start of your work.
73
+
74
+ 2. Check for comments (especially `RISK` comments):
75
+ ```bash
76
+ agentteams comment list --plan-id {planId}
77
+ ```
78
+
79
+ 3. For detailed execution workflow (entity references, comments, cleanup), see `.agentteams/platform/plan-guide.md`.
80
+
81
+ ### Guide checks before writing documents
82
+
83
+ Before writing or updating **platform documents** (plans, reports, conventions, postmortems), read the matching guide:
84
+
85
+ | Document type | Guide to read |
86
+ |---|---|
87
+ | Plan execution | `.agentteams/platform/plan-guide.md` |
88
+ | New plan | `.agentteams/platform/plan-template.md` |
89
+ | Completion report | `.agentteams/platform/completion-report-guide.md` |
90
+ | Postmortem | `.agentteams/platform/post-mortem-guide.md` |
91
+ | Convention (create) | `.agentteams/platform/convention-authoring-guide.md` |
92
+ | Convention (update/delete) | `.agentteams/platform/convention-ud-guide.md` |
93
+ | Co-action (handoff) | `.agentteams/platform/co-action-guide.md` |
94
+
95
+
96
+ ---
97
+
98
+ ## Project Convention Index
99
+
100
+ No project conventions found. Use the web dashboard to create conventions.
@@ -0,0 +1,144 @@
1
+ ---
2
+ trigger: model_decision
3
+ description: Reference when creating a co-action (handoff document).
4
+ ---
5
+ # Co-Action Guide (AgentTeams)
6
+
7
+ > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
+
9
+ A co-action is a **handoff document** — it captures knowledge that cannot be inferred from code alone. Use it to transfer implicit knowledge between agents or between sessions.
10
+
11
+ ## What a Co-Action Is
12
+
13
+ - A co-action records **discoveries, decisions, and context** accumulated during a work session.
14
+ - It is NOT a session context dump. Only include information that has lasting value for the next reader.
15
+ - Co-actions link to related plans, completion reports, and post-mortems for full traceability.
16
+ - Takeaways track the key insights and lessons learned from the work.
17
+
18
+ ## When to Create a Co-Action
19
+
20
+ - After completing a multi-session or multi-agent project
21
+ - When handing off work to another agent or team member
22
+ - When a body of implicit knowledge would be lost without documentation
23
+ - Before a long pause in active development on a feature
24
+
25
+ ## Content Structure
26
+
27
+ Write the co-action content with these sections. Include only sections that have meaningful content — skip empty ones.
28
+
29
+ ~~~markdown
30
+ ## Key Discoveries
31
+ - <findings that are not obvious from the code>
32
+ - <workarounds, undocumented behaviors, environment quirks>
33
+
34
+ ## Design Decisions
35
+ - <decision>: <rationale — why this approach, what alternatives were rejected>
36
+
37
+ ## Usage Scenarios
38
+ - <how the feature/system is intended to be used>
39
+ - <edge cases or non-obvious interaction patterns>
40
+
41
+ ## Non-Goals
42
+ - <what was intentionally excluded and why>
43
+
44
+ ## Risks / Trade-offs
45
+ - <known compromises and their potential impact>
46
+ - <technical debt introduced and conditions for revisiting>
47
+
48
+ ## Follow-up / Known Constraints
49
+ - <what the next agent should continue or address>
50
+ - <temporary workarounds that need permanent solutions>
51
+ - <incomplete items with context on where they left off>
52
+ ~~~
53
+
54
+ ## Section Writing Tips
55
+
56
+ ### Key Discoveries
57
+ Focus on things the next reader cannot find by reading code. Examples: "Prisma 7 delegate requires wrapper pattern due to type inference bug", "Docker build caches COPY layer even when file content changes if mtime is unchanged".
58
+
59
+ ### Design Decisions
60
+ State the decision and the reason. Bad: "Used Redis". Good: "Chose Redis over in-memory cache because the service runs multi-instance and cache must be shared; accepted the ops overhead."
61
+
62
+ ### Non-Goals
63
+ Prevent scope creep by the next agent. Be explicit about what was considered and deliberately excluded.
64
+
65
+ ### Follow-up / Known Constraints
66
+ This is the most critical section for handoff. Be specific enough that the next agent can resume without re-investigating.
67
+
68
+ ## Visibility
69
+
70
+ - `PRIVATE` (default): only the creator can view/access
71
+ - `PROJECT`: all project members can view; only the creator can change status, visibility, or delete
72
+
73
+ ## Takeaways
74
+
75
+ Takeaways capture **key insights** that emerged during the work — things the next agent should know but might not discover on their own.
76
+
77
+ Use takeaways when:
78
+ - You discovered a non-obvious constraint or behavior (e.g., "Fastify response schema silently strips undefined fields")
79
+ - A design decision was made that isn't documented elsewhere
80
+ - You found a workaround that future agents should reuse (or avoid)
81
+ - The task revealed risks or follow-up items that don't belong in the main content
82
+
83
+ Takeaways are separate from content. Content is the structured handoff document; takeaways are concise, standalone insights attached to it.
84
+
85
+ ~~~bash
86
+ agentteams coaction takeaway-create --id {coActionId} --content "<insight>"
87
+ ~~~
88
+
89
+ ## Useful Commands
90
+
91
+ ~~~bash
92
+ # Create
93
+ agentteams coaction create \
94
+ --title "<concise handoff title>" \
95
+ --file .agentteams/cli/temp/{descriptive-name}-coaction.md \
96
+ --visibility PRIVATE
97
+
98
+ # Download for reference
99
+ agentteams coaction download --id {coActionId}
100
+
101
+ # Link related entities
102
+ agentteams coaction link-plan --id {coActionId} --plan-id {planId}
103
+ agentteams coaction link-completion-report --id {coActionId} --completion-report-id {crId}
104
+ agentteams coaction link-post-mortem --id {coActionId} --post-mortem-id {pmId}
105
+
106
+ # Takeaways
107
+ agentteams coaction takeaway-create --id {coActionId} --content "<insight>"
108
+ agentteams coaction takeaway-list --id {coActionId}
109
+ agentteams coaction takeaway-update --id {coActionId} --takeaway-id {takeawayId} --content "<updated insight>"
110
+ agentteams coaction takeaway-delete --id {coActionId} --takeaway-id {takeawayId}
111
+ # Update content
112
+ agentteams coaction update --id {coActionId} --file .agentteams/cli/temp/{name}-coaction.md
113
+
114
+ # Change status
115
+ agentteams coaction update --id {coActionId} --status CLOSED
116
+ ~~~
117
+
118
+ ## Output Behavior
119
+
120
+ - `coaction create` and `coaction update` print post-action tips to **stderr**.
121
+ - Structured command results (for `--format json`) remain on **stdout**.
122
+ - This separation prevents JSON pipeline parsing failures when tips are shown.
123
+
124
+ ~~~bash
125
+ # Keep stdout clean for JSON consumers
126
+ agentteams coaction create \
127
+ --title "<title>" \
128
+ --file .agentteams/cli/temp/{name}-coaction.md \
129
+ --format json \
130
+ 2>/tmp/coaction-tips.log
131
+ ~~~
132
+
133
+ ## Common Pitfalls
134
+
135
+ - Dumping raw session logs instead of curated knowledge
136
+ - Writing implementation details that belong in a completion report
137
+ - Skipping the "Follow-up / Known Constraints" section — this is the most valuable part for handoff
138
+ - Forgetting to link related plans and reports
139
+ - Using PRIVATE visibility when the knowledge should be shared with the team
140
+ - Assuming info tips are printed to stdout; they are intentionally sent to stderr
141
+
142
+ ## References
143
+
144
+ - Related guides: `plan-guide.md`, `completion-report-guide.md`, `post-mortem-guide.md`
@@ -0,0 +1,146 @@
1
+ ---
2
+ trigger: model_decision
3
+ description: Reference when creating a completion report.
4
+ ---
5
+ # Completion Report Guide (AgentTeams)
6
+
7
+ > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
+
9
+ Completion reports capture what changed, why it changed, how it was verified, and what remains.
10
+
11
+ ## When to Create a Report
12
+
13
+ - After finishing a plan
14
+ - After shipping a user-visible change
15
+ - After completing a risky refactor or bug fix
16
+
17
+ ## What Makes a Good Report
18
+
19
+ - Specific: names the feature/bug and the reason it mattered
20
+ - Verifiable: includes the commands you ran (and results)
21
+ - Scoped: states what was intentionally NOT changed
22
+ - Actionable: calls out follow-ups if any remain
23
+
24
+ ## What to Include
25
+
26
+ - Purpose: why this work was needed
27
+ - Scope: what areas/modules were touched
28
+ - Verification: exact commands you ran and whether they passed
29
+ - Risks: potential side effects or follow-up work
30
+
31
+ ## Contract Note
32
+
33
+ - `report create` and completion report payloads do **not** use `reportType` anymore.
34
+ - Use `status` + metrics (commit and line/file stats) to describe report context.
35
+
36
+ ## Report File Structure
37
+
38
+ Write the report file with this structure:
39
+
40
+ ~~~markdown
41
+ ## Summary
42
+ - <what changed and why — be specific, not generic>
43
+
44
+ ## Verification
45
+ - typecheck: <pass or fail, with the command you ran>
46
+ - tests: <pass or fail, with the command you ran>
47
+
48
+ ## Notes
49
+ - <risks, follow-ups, or "none">
50
+
51
+ ## Conventions Referenced
52
+ - <list .agentteams/rules/*.md files you actually referenced — do not guess>
53
+ ~~~
54
+
55
+ ## Report File Naming
56
+
57
+ Use `{first 8 characters of planId}-report.md`. Example: if planId is `57a51ec2-cf70-...`, the file name is `57a51ec2-report.md`.
58
+
59
+ For standalone reports (no plan), use a descriptive name: `<feature-or-fix-name>-report.md`.
60
+
61
+ > ⚠️ **Use either Path A or Path B, not both.** Running both simultaneously will create duplicate completion reports for the same plan.
62
+ >
63
+ ## Plan-Linked vs Non-Plan Reports
64
+
65
+ You can attach report content directly while finishing a plan:
66
+
67
+ ~~~bash
68
+ agentteams plan finish --id {planId} \
69
+ --report-title "<what you did and why, in one sentence>" \
70
+ --report-file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
71
+ --quality-score <0-100, see Quality Score section> \
72
+ --report-status <COMPLETED | PARTIAL | FAILED>
73
+
74
+ ~~~
75
+
76
+ > Git metrics (`commitHash`, `branchName`, `filesModified`, `linesAdded`, `linesDeleted`) are auto-collected. Use `--no-git` to disable. Manual overrides: `--duration-seconds`, `--commit-start`, `--commit-end`, `--pull-request-id`.
77
+
78
+ If you were working under a plan, link the report to the plan:
79
+
80
+ ~~~bash
81
+ agentteams report create \
82
+ --plan-id {planId} \
83
+ --title "<what you did and why, in one sentence>" \
84
+ --file .agentteams/cli/temp/{planId-first-8-chars}-report.md \
85
+ --quality-score <0-100> \
86
+ --status <COMPLETED | PARTIAL | FAILED>
87
+ ~~~
88
+
89
+ If you were not working under a plan, omit the plan id:
90
+
91
+ ~~~bash
92
+ agentteams report create \
93
+ --title "<what you did and why, in one sentence>" \
94
+ --file .agentteams/cli/temp/<feature-or-fix-name>-report.md \
95
+ --quality-score <0-100> \
96
+ --status <COMPLETED | PARTIAL | FAILED>
97
+ ~~~
98
+
99
+ Repository linkage note:
100
+
101
+ - If .agentteams/config.json contains `repositoryId`, `report create` links the report to that repository automatically.
102
+
103
+ ## Metrics (Auto + Manual)
104
+
105
+ `report create` and `plan finish` can attach work metrics for insight workflows.
106
+
107
+ - Auto-collected by default (git context required):
108
+ - `commitHash`, `branchName`, `filesModified`, `linesAdded`, `linesDeleted`
109
+ - Manual-only fields:
110
+ - `durationSeconds`, `commitStart`, `commitEnd`, `pullRequestId`
111
+ - `--no-git` disables auto collection.
112
+ - Manual options override auto-collected values.
113
+
114
+ ## Quality Score
115
+
116
+ Work quality is self-assessed by the agent on a 0-100 scale. Use the four dimensions below to judge holistically.
117
+
118
+ | Dimension | What to check |
119
+ |---|---|
120
+ | Verification | Did typecheck and tests pass? |
121
+ | Completeness | Were all requirements addressed? |
122
+ | Scope Adherence | Were changes limited to the requested scope? Were conventions followed? |
123
+ | Side Effects | Did the change avoid unintended impact on existing behavior? |
124
+
125
+ | Score | Meaning |
126
+ |---|---|
127
+ | 90-100 | All verification passed. All requirements met. Conventions followed. No side effects. |
128
+ | 70-89 | Minor gaps: verification partially skipped, slight scope overage, or minor convention deviations. |
129
+ | 0-69 | Verification failed, requirements unmet, significant scope violation, or side effects introduced. |
130
+
131
+ > Convention violations (naming, logging, PR rules, etc.) count against Scope Adherence.
132
+ > A score of 90+ requires conventions to be followed.
133
+
134
+ ## Verification Examples
135
+
136
+ ~~~bash
137
+ cd api && npm run typecheck
138
+ cd api && npm test
139
+ cd cli && npm test
140
+ ~~~
141
+
142
+ ## Notes
143
+
144
+ - Keep reports factual and reproducible.
145
+ - Prefer describing *why* over listing every line-level change.
146
+ - If verification was skipped, state the reason explicitly.
@@ -0,0 +1,112 @@
1
+ ---
2
+ trigger: -
3
+ description: Reference when writing or editing project convention markdown files.
4
+ ---
5
+ # Convention Authoring Rules (AgentTeams)
6
+
7
+ > ⚠️ This file is automatically deployed from the server. Do not edit it directly.
8
+
9
+ This guide defines the baseline rules for authoring and editing convention files under `.agentteams/<category>/*.md`.
10
+ For the convention body, follow the structures and elements supported by the **Web Convention Editor toolbar** so the content stays consistent across Web/CLI/AI workflows.
11
+
12
+ ## 1) File structure
13
+
14
+ - A convention file consists of **Frontmatter (optional)** + **Markdown body**.
15
+ - Frontmatter uses YAML and must be placed at the very top of the file.
16
+
17
+ Example:
18
+
19
+ ~~~markdown
20
+ ---
21
+ trigger: always_on
22
+ description: "..."
23
+ agentInstruction: |
24
+ ...
25
+ ---
26
+
27
+ # Title
28
+
29
+ - Item
30
+ ~~~
31
+
32
+ ## 2) Recommended frontmatter fields
33
+
34
+ - `trigger` (optional): a hint for auto-apply/reference triggers (e.g. `always_on`, `model_decision`, `-`)
35
+ - `description` (optional): a short summary of purpose/scope
36
+ - `agentInstruction` (optional): explicit instructions for agents (multi-line supported)
37
+
38
+ Notes:
39
+
40
+ - Frontmatter may be generated/normalized by the server, and some fields may be ignored or overwritten during updates.
41
+
42
+ ## 3) Category / path rules
43
+
44
+ - Use one of the following values for `<category>`:
45
+ - `rules`, `skills`, `guides`, `references`
46
+ - Use the path format `.agentteams/<category>/<fileName>.md`.
47
+ - Prefer lowercase, hyphen-based file names (e.g. `api-routes.md`).
48
+ - Avoid file name collisions within the same category; depending on policy, the server/CLI may reject conflicts.
49
+
50
+ ## 4) Body authoring rules (Web editor toolbar baseline)
51
+
52
+ ### Structure (Headings)
53
+
54
+ - **H1**: top-level rule section title
55
+ - **H2**: major subsections under H1
56
+ - **H3**: detailed rules under H2
57
+ - **H4**: only when further subdividing H3
58
+ - **Horizontal rule (HR)**: separate unrelated sections/topics
59
+
60
+ > Do **not** skip heading levels (e.g. H1 → H3 is not allowed).
61
+
62
+ ### Blocks
63
+
64
+ - **Blockquote**: warnings/constraints that must stand out
65
+ - **Bullet list**: list rules by items
66
+ - **Ordered list**: step-by-step procedures
67
+ - **Task list**: execution/verification checklist
68
+ - **Table**: summarize options/values/exceptions
69
+ - **Code block**: runnable examples or command snippets (use language tags when possible)
70
+
71
+ ### Inline
72
+
73
+ - **Bold**: emphasize key conclusions/keywords
74
+ - **Italic**: optional supplemental notes
75
+ - **Inline code**: literal strings such as identifiers, file paths, commands
76
+ - **Links**: connect to related references (use descriptive link text)
77
+
78
+ ### Writing style
79
+
80
+ - Prefer **imperative** phrasing for rules (e.g. "Do X", "Do not do Y").
81
+ - Wrap examples in fenced code blocks and keep them executable when possible.
82
+ - Prefer multiple smaller, focused conventions over one huge document.
83
+
84
+ ### Markers (recommended prefixes)
85
+
86
+ Use these prefixes consistently across documents (include a trailing space after the emoji):
87
+
88
+ - `✅ `: correct example
89
+ - `❌ `: incorrect example
90
+ - `🚫 `: strictly forbidden (including policy/security violations)
91
+ - `⚠️ `: warning/caution
92
+ - `📌 `: key summary
93
+ - `💡 `: tip/reference
94
+ - `🎯 `: goal/intent
95
+
96
+ ## 5) Useful Commands
97
+
98
+ ~~~bash
99
+ # Create a new convention
100
+ agentteams convention create --file .agentteams/{category}/{convention-name}.md
101
+
102
+ # Download all conventions (required before update/delete)
103
+ agentteams convention download
104
+
105
+ # Preview update (dry-run)
106
+ agentteams convention update --file .agentteams/{category}/{convention-name}.md
107
+
108
+ # Apply update to server
109
+ agentteams convention update --file .agentteams/{category}/{convention-name}.md --apply
110
+ ~~~
111
+
112
+ > Place the file under `.agentteams/<category>/` before running `convention create`. The `<category>` must be one of: `rules`, `skills`, `guides`, `references`.
@@ -0,0 +1,59 @@
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
+ ~~~