@awebai/oats 0.22.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.
Files changed (112) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +380 -0
  3. package/bin/oats.mjs +3294 -0
  4. package/capabilities/oats-authoring/oats.json +12 -0
  5. package/capabilities/oats-aweb/bin/oats-aweb.mjs +297 -0
  6. package/capabilities/oats-aweb/injects/aweb.md +55 -0
  7. package/capabilities/oats-aweb/oats.json +47 -0
  8. package/capabilities/oats-aweb/package.json +20 -0
  9. package/capabilities/oats-jira/bin/oats-jira.mjs +40 -0
  10. package/capabilities/oats-jira/injects/jira.md +10 -0
  11. package/capabilities/oats-jira/oats.json +22 -0
  12. package/capabilities/oats-jira/package.json +25 -0
  13. package/capabilities/oats-jira/skills/jira-tasks/SKILL.md +176 -0
  14. package/capabilities/oats-linear/README.md +234 -0
  15. package/capabilities/oats-linear/bin/oats-linear-hook.mjs +32 -0
  16. package/capabilities/oats-linear/bin/oats-linear.mjs +344 -0
  17. package/capabilities/oats-linear/injects/linear.md +8 -0
  18. package/capabilities/oats-linear/oats.json +24 -0
  19. package/capabilities/oats-linear/package.json +29 -0
  20. package/capabilities/oats-linear/skills/linear-tasks/SKILL.md +217 -0
  21. package/capabilities/oats-linear/test/oats-linear.test.mjs +168 -0
  22. package/capabilities/oats-okf/agents/memory-harvest.md +25 -0
  23. package/capabilities/oats-okf/bin/oats-okf.mjs +283 -0
  24. package/capabilities/oats-okf/injects/okf.md +62 -0
  25. package/capabilities/oats-okf/oats.json +20 -0
  26. package/capabilities/oats-okf/package.json +22 -0
  27. package/capabilities/oats-okf/skills/memory-harvest/SKILL.md +100 -0
  28. package/capabilities/oats-okf/skills/okf/SKILL.md +107 -0
  29. package/capabilities/oats-okf/skills/okf/scripts/okf-validate.mjs +123 -0
  30. package/capabilities/oats-review/agents/reviewer/AGENTS.md +53 -0
  31. package/capabilities/oats-review/agents/reviewer/soul.yaml +6 -0
  32. package/capabilities/oats-review/injects/review.md +68 -0
  33. package/capabilities/oats-review/oats.json +10 -0
  34. package/capabilities/oats-review/skills/code-review/SKILL.md +44 -0
  35. package/capabilities/oats-review/skills/security-review/SKILL.md +59 -0
  36. package/docs/capabilities.md +505 -0
  37. package/docs/capability-manifest.schema.json +223 -0
  38. package/docs/configuration.md +482 -0
  39. package/docs/conventions.md +73 -0
  40. package/docs/design/desktop-ux-plan.md +362 -0
  41. package/docs/design/package-engine-contract.md +813 -0
  42. package/docs/design/package-runtime-api.md +414 -0
  43. package/docs/desktop-cli-api.md +89 -0
  44. package/docs/desktop-succession.md +51 -0
  45. package/docs/desktop.md +187 -0
  46. package/docs/implementation.md +282 -0
  47. package/docs/integrations.md +123 -0
  48. package/docs/knowledge-theory.md +97 -0
  49. package/docs/knowledge.md +139 -0
  50. package/docs/layers.md +110 -0
  51. package/docs/migration-from-oas.md +122 -0
  52. package/docs/oats-config.schema.json +140 -0
  53. package/docs/oats-lock.schema.json +175 -0
  54. package/docs/oats-package.schema.json +129 -0
  55. package/docs/packages.md +442 -0
  56. package/docs/release-lane.md +132 -0
  57. package/docs/release-notes/v0.18.2.md +79 -0
  58. package/docs/release-notes/v0.18.3.md +63 -0
  59. package/docs/release-notes/v0.18.4.md +65 -0
  60. package/docs/release-notes/v0.18.5.md +66 -0
  61. package/docs/release-notes/v0.18.6.md +87 -0
  62. package/docs/release-notes/v0.19.0.md +186 -0
  63. package/docs/release-notes/v0.19.1.md +24 -0
  64. package/docs/release-notes/v0.19.2.md +32 -0
  65. package/docs/release-notes/v0.19.3.md +16 -0
  66. package/docs/release-notes/v0.19.4.md +12 -0
  67. package/docs/release-notes/v0.20.0.md +89 -0
  68. package/docs/release-notes/v0.22.0.md +180 -0
  69. package/docs/souls-and-instances.md +344 -0
  70. package/injects/framework-workspace.md +7 -0
  71. package/injects/instance-boundary.md +43 -0
  72. package/injects/local-soul.md +19 -0
  73. package/injects/oats.md +11 -0
  74. package/injects/work-attached.md +16 -0
  75. package/injects/work-checkout.md +12 -0
  76. package/injects/work-workspace.md +22 -0
  77. package/injects/work-worktree.md +13 -0
  78. package/lib/core.mjs +6792 -0
  79. package/lib/packages.mjs +1375 -0
  80. package/lib/tmux-config.mjs +35 -0
  81. package/package-catalog.json +44 -0
  82. package/package.json +55 -0
  83. package/packages/record/README.md +151 -0
  84. package/packages/record/bin/capture.mjs +256 -0
  85. package/packages/record/bin/recall.mjs +102 -0
  86. package/packages/record/bin/setup.mjs +281 -0
  87. package/packages/record/bin/turn-record.mjs +47 -0
  88. package/packages/record/docs/turn-record-sot.md +350 -0
  89. package/packages/record/lib/canonical.mjs +151 -0
  90. package/packages/record/lib/capture-aw.mjs +179 -0
  91. package/packages/record/lib/capture-cc.mjs +322 -0
  92. package/packages/record/lib/formats.mjs +296 -0
  93. package/packages/record/lib/ignore.mjs +155 -0
  94. package/packages/record/lib/index-db.mjs +524 -0
  95. package/packages/record/lib/project-aweb.mjs +251 -0
  96. package/packages/record/lib/segments.mjs +186 -0
  97. package/packages/record/lib/store.mjs +447 -0
  98. package/packages/record/lib/tags.mjs +114 -0
  99. package/packages/record/package.json +45 -0
  100. package/packages/record/test/vectors/README.md +34 -0
  101. package/packages/record/test/vectors/aweb-projection-v1.json +231 -0
  102. package/packages/record/test/vectors/journal-merge-v1.json +261 -0
  103. package/packages/record/test/vectors/turn-id-v1.json +152 -0
  104. package/packages/record/test/vectors/validate.mjs +391 -0
  105. package/skills/integration-authoring/SKILL.md +76 -0
  106. package/skills/oats/SKILL.md +151 -0
  107. package/skills/oats-config/SKILL.md +162 -0
  108. package/skills/oats-getting-started/SKILL.md +159 -0
  109. package/skills/oats-packages/SKILL.md +180 -0
  110. package/skills/oats-support/SKILL.md +79 -0
  111. package/skills/skill-craft/SKILL.md +109 -0
  112. package/skills/soul-craft/SKILL.md +109 -0
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: jira-tasks
3
+ description: >-
4
+ Jira task tracking and agent roster protocol for OATS agents. Use when you
5
+ are an agent instance working an epic, story, or task in Jira: reading your
6
+ assignment, finding your work queue, joining or leaving an epic's Agent
7
+ Roster, posting progress or handoff comments, transitioning ticket status,
8
+ or creating stories/tasks under an epic. Also use when asked about "the
9
+ board", "the roster", "your ticket", "epic status", or task tracking
10
+ between agents. Uses the acli CLI (Atlassian CLI) from bash.
11
+ ---
12
+
13
+ # Agent task tracking (Jira)
14
+
15
+ Jira is your deployment's **tasks layer** — the shared record for task
16
+ tracking and the agent roster. Agents do not know about projects — you know
17
+ **repos and epics**. The hierarchy:
18
+
19
+ - **Epic** — the unit of work that kicks off, runs, and completes. May touch
20
+ one repo or several. Its description carries the **Agent Roster** — the
21
+ source of truth for who is on the epic and their role. Bugs/support run as
22
+ a standing epic.
23
+ - **Story** — a **group of related tasks** covering one part of the epic's
24
+ work (often one repo's slice, one feature area). Not every task needs a
25
+ story.
26
+ - **Task** — a small bounded item, the thing an agent actually works. Lives
27
+ **either directly under the epic** (standalone item) **or under a story**
28
+ (part of a grouped slice). Everything traces up to an epic.
29
+
30
+ ## Site and project (from your deployment, never hardcoded)
31
+
32
+ Your Jira **site** and **project key** come from the deployment's OATS config
33
+ (`capabilities.oats.jira.<target>.settings: { site, project }`). Find them, in order:
34
+
35
+ 1. Your `TASK.md` briefing — the spawn hook writes a
36
+ `Tasks: Jira — project <KEY> on <site>` line.
37
+ 2. `oats doctor --json` from your work tree (the tasks layer's settings).
38
+ 3. Ask your human.
39
+
40
+ Below, `<PROJECT>` means that project key. If site or project are unset,
41
+ STOP and ask your human to set them — do not guess.
42
+
43
+ **First use**: run `acli jira auth status` — if unauthorized, STOP and tell
44
+ the human to run `acli jira auth login --web`. Never attempt login yourself.
45
+
46
+ ## Identity rules (non-negotiable)
47
+
48
+ - **The human assignee is always the owning engineer** (never change
49
+ assignee to yourself; agents are not Jira users). Do not touch assignee
50
+ unless told.
51
+ - **You are identified by label and description**, not the assignee field:
52
+ - Label `agent-<your-instance-alias>` on any story/task you work.
53
+ - An `Agent:` line in the description (see templates).
54
+ - **Never set or modify sprints.** Never delete tickets. Comment, don't
55
+ rewrite, other agents' descriptions (exception: coordinators maintain the
56
+ roster table).
57
+
58
+ ## Your work queue
59
+
60
+ ```bash
61
+ acli jira workitem search --jql "project = <PROJECT> AND labels = agent-<alias> AND statusCategory != Done ORDER BY rank" --json
62
+ acli jira workitem view <PROJECT>-1234 --json # read one ticket (description, labels, status)
63
+ acli jira workitem search --jql "project = <PROJECT> AND parent = <PROJECT>-<epic> AND statusCategory != Done" --json # epic's direct children (stories + standalone tasks)
64
+ acli jira workitem search --jql "project = <PROJECT> AND parent = <PROJECT>-<story> AND statusCategory != Done" --json # a story's tasks
65
+ ```
66
+
67
+ An epic's full open work = its direct children **plus** the tasks under each
68
+ of its stories — walk one level down from stories when you need the complete
69
+ picture.
70
+
71
+ Record your epic and ticket keys in your instance memory (e.g. `STATE.md`
72
+ `# Context`).
73
+
74
+ ## The Agent Roster (epics)
75
+
76
+ The epic description contains a `## Agent Roster` markdown table — current
77
+ truth for who is on the epic:
78
+
79
+ ```
80
+ ## Agent Roster
81
+
82
+ | Agent (instance) | Soul / class | Repo | Role on epic | Status | Since |
83
+ |---|---|---|---|---|---|
84
+ | coordinator-digest | coordinator (newsletter) | newsletter-service | runs the epic | active | 2026-07-07 |
85
+ | developer-digest-api | developer (newsletter) | newsletter-service | implements API | active | 2026-07-07 |
86
+ ```
87
+
88
+ Protocol:
89
+ - **Joining**: the coordinator (or the spawning agent) adds your row to the
90
+ table (`acli jira workitem edit <epic> --description ...` with the full
91
+ updated description — read it first, edit only the roster table) AND posts
92
+ a comment: `[roster] <alias> joined — role: <role>, repo: <repo>`.
93
+ - **Leaving/retiring**: set the row's Status to `retired` (keep the row — it
94
+ is history) and comment `[roster] <alias> retired — <one-line outcome>`.
95
+ - Only edit the roster table; never rewrite the rest of the epic description.
96
+ - Comments are the event log; the table is current state. On conflict, fix
97
+ the table and note it in a comment.
98
+
99
+ ## Working a ticket
100
+
101
+ 1. Read your ticket and its epic (description + roster) before starting.
102
+ 2. **Milestones** → comment on your ticket, prefixed `[<alias>]`. Mirror the
103
+ entry you record in your instance memory — same events, two audiences.
104
+ 3. **Status transitions** — move your ticket as you work:
105
+ `acli jira workitem transition <PROJECT>-1234 --status "In Progress"`.
106
+ Discover valid statuses with `--help` or by trying; if a transition is
107
+ rejected, comment instead and let the coordinator move it.
108
+ 4. **Done** = your latest commit is review-clean and the branch is handed
109
+ off. Comment the outcome (branch, PR link, verification), then transition.
110
+ 5. **Handoff/blocked** → comment
111
+ `[<alias>] handoff → <next-alias>: <what+where>` or
112
+ `[<alias>] blocked: <what is needed, from whom>`.
113
+
114
+ Tasks ≠ messaging: status and outcomes live here in Jira; conversation lives
115
+ in your deployment's messaging layer. Mail nudges; Jira records.
116
+
117
+ ## Creating tickets (coordinators; developers file follow-ups as Tasks)
118
+
119
+ House rules: summary ≤ 12 words, describe the requirement not the solution,
120
+ bugs always include reproduction steps, keep descriptions to a few bullets.
121
+
122
+ **Choosing the level:**
123
+ - Small bounded item, no siblings needed → **Task directly under the epic**.
124
+ - A part of the epic's work that breaks into several related tasks → **Story
125
+ under the epic, tasks under the story**. The story is the group, not the
126
+ work item — agents are assigned to its tasks (a story worked wholly by one
127
+ agent may carry that agent's label too).
128
+ - Never create a story for a single task, and never nest stories.
129
+
130
+ ```bash
131
+ acli jira workitem create --project <PROJECT> --type Task --summary "<summary>" \
132
+ --parent <PROJECT>-<epic-or-story> --label "agent-<alias>" --description "<see template>"
133
+ acli jira workitem create --project <PROJECT> --type Story --summary "<summary>" \
134
+ --parent <PROJECT>-<epic> --description "<see template>"
135
+ ```
136
+
137
+ ### Story/Task description template
138
+
139
+ ```
140
+ <What & why — 2-4 bullets. Acceptance criteria as a checklist.>
141
+
142
+ ---
143
+ Agent: <instance-alias> (who works this — matches the agent-<alias> label; stories list it only when one agent works the whole story)
144
+ Soul: <soul-name> · Repo: <repo>
145
+ Parent: <PROJECT>-<epic-or-story-key> · Epic: <PROJECT>-<epic-key>
146
+ ```
147
+
148
+ ### Epic description template
149
+
150
+ ```
151
+ <Intent — what this epic delivers and why. Walls — what is explicitly out.>
152
+
153
+ Repos touched: <repo>, <repo>
154
+ Human gates: <security/authz/migration/contract items needing sign-off, or "none">
155
+
156
+ ## Agent Roster
157
+
158
+ | Agent (instance) | Soul / class | Repo | Role on epic | Status | Since |
159
+ |---|---|---|---|---|---|
160
+ ```
161
+
162
+ ### Comment conventions (machine-greppable prefixes)
163
+
164
+ - `[roster] <alias> joined|retired — …`
165
+ - `[<alias>] milestone: …` · `[<alias>] handoff → <alias>: …` ·
166
+ `[<alias>] blocked: …` · `[<alias>] done: branch <name>, <verification>`
167
+
168
+ ## Verify-before-trusting
169
+
170
+ Jira workflows differ per site. On first real use in a deployment: check the
171
+ project's issue types (`Epic/Story/Task/Bug`), whether `--parent` links
172
+ stories/tasks to epics, whether a **Task can take a Story as parent** (some
173
+ Jira configs only allow that via the Sub-task type — if so, use Sub-tasks
174
+ under stories and treat them as tasks), and the exact status names. If
175
+ reality differs, note it in a comment on your ticket and tell your
176
+ coordinator so your deployment's conventions get recorded.
@@ -0,0 +1,234 @@
1
+ # OATS Linear tasks integration
2
+
3
+ Binds the OATS `tasks` layer to [Linear](https://linear.app). It ships the
4
+ `linear-tasks` skill, a short soul injection, a spawn briefing, and JSON-first
5
+ `oats linear ...` commands for issue work.
6
+
7
+ ## Why GraphQL instead of a Linear CLI?
8
+
9
+ Linear's official `@linear/cli` only supports interactive issue creation and
10
+ branch checkout. It cannot list queues, read issues, transition workflow
11
+ states, label ownership, or post comments. Third-party CLIs expose different
12
+ and unstable command contracts. This integration therefore calls Linear's
13
+ official GraphQL API directly with Node's built-in `fetch`; it adds no external
14
+ CLI or SDK dependency.
15
+
16
+ - Endpoint: `https://api.linear.app/graphql`
17
+ - Authentication: personal API key in the `Authorization` header
18
+ - Documentation: <https://linear.app/developers/graphql>
19
+
20
+ ## Setup
21
+
22
+ 1. In Linear, open **Settings → Security & access → API keys** and create a
23
+ personal API key with access to the workspace used by your OATS agents.
24
+ 2. Put the key in your shell or secret manager, never in `oats-config.yaml`:
25
+
26
+ ```bash
27
+ export LINEAR_API_KEY='lin_api_...'
28
+ ```
29
+
30
+ Start/resume agents from an environment that receives this variable. The
31
+ spawn hook warns when it is absent; API commands fail once with an actionable
32
+ authentication error rather than attempting login.
33
+ 3. Activate the bundled integration at the intended target:
34
+
35
+ ```bash
36
+ oats use oats.linear --global --dir /path/to/workspace
37
+ ```
38
+
39
+ 4. Add target settings to that binding (team is the Linear issue-prefix key;
40
+ project is an optional default communicated in each instance briefing):
41
+
42
+ ```yaml
43
+ capabilities:
44
+ layers:
45
+ tasks:
46
+ capability: oats.linear
47
+ from: bundled
48
+ settings: { team: ENG, project: Agent Platform }
49
+ ```
50
+
51
+ 5. Verify resolution and API access (operational commands are available only
52
+ in an active context):
53
+
54
+ ```bash
55
+ oats doctor /path/to/workspace
56
+ oats linear auth
57
+ oats linear teams
58
+ oats linear states --team ENG
59
+ oats linear projects --team ENG
60
+ ```
61
+
62
+ The API key acts as the human who created it. Agents preserve the human
63
+ assignee, identify themselves with `agent-<instance-name>` labels, and do not
64
+ move issues to terminal states without explicit human authorization.
65
+
66
+ ## Command surface
67
+
68
+ All successful output is JSON; errors are JSON on stderr and return non-zero.
69
+ Run an incomplete command for usage, or load the `linear-tasks` skill for the
70
+ workflow and exact examples.
71
+
72
+ ```text
73
+ oats linear auth
74
+ oats linear teams
75
+ oats linear states --team <KEY>
76
+ oats linear projects --team <KEY>
77
+ oats linear labels --team <KEY>
78
+ oats linear issue list|get|create|update|comment ...
79
+ ```
80
+
81
+ Agent labels are created team-locally on first use of `--agent`. Other labels
82
+ must already exist. `--description-file` and `--body-file` avoid shell quoting
83
+ problems for multiline Markdown.
84
+
85
+ ## Projects, project documentation, and related issues
86
+
87
+ ### Operating model
88
+
89
+ Use each Linear object for one kind of durable information:
90
+
91
+ | Linear object | What belongs there | Who manages it with this integration |
92
+ |---|---|---|
93
+ | Project | Outcome, ownership, lifecycle, target dates, and the container for related issues | Humans in the Linear UI; agents can discover it |
94
+ | Project overview | Intent, scope/non-goals, architecture, constraints, human gates, and success criteria | Humans in the Linear UI |
95
+ | Project documents | Detailed designs, decision records, runbooks, research, and other long-form project context | Humans in the Linear UI |
96
+ | Issue | One bounded deliverable with acceptance criteria | Agents through `oats linear issue ...` |
97
+ | Sub-issue | An independently verifiable part of a larger issue | Agents through `--parent` |
98
+ | Issue comment | Milestones, blockers, handoffs, verification, and PR/branch links | Agents through `issue comment` |
99
+ | Messaging | Conversation and nudges | The configured messaging layer, never the durable task record |
100
+
101
+ The project overview and documents explain the work; issues execute it. Keep
102
+ project-wide decisions out of an arbitrary issue description, and keep task
103
+ status out of chat. When a project document governs an issue, link that
104
+ document from the issue description or a durable comment.
105
+
106
+ ### Discover projects
107
+
108
+ The wrapper currently reads project metadata but not project overview/document
109
+ content:
110
+
111
+ ```bash
112
+ oats linear projects --team ENG
113
+ ```
114
+
115
+ The JSON includes project IDs, names, slugs, status, and associated teams. Use
116
+ an exact project name or slug in issue commands. If the configured project is
117
+ missing or ambiguous, stop and ask the human rather than selecting a similar
118
+ name.
119
+
120
+ ### List issues in a project
121
+
122
+ ```bash
123
+ # Open issues in the project
124
+ oats linear issue list --team ENG --project "Agent Platform"
125
+
126
+ # Open issues claimed by one OATS instance
127
+ oats linear issue list --team ENG --project "Agent Platform" \
128
+ --agent my-agent-instance
129
+
130
+ # Include terminal issues when auditing history
131
+ oats linear issue list --team ENG --project "Agent Platform" --all
132
+ ```
133
+
134
+ `issue list` excludes completed, canceled, and duplicate states unless `--all`
135
+ is supplied. Use `issue get` before acting; its JSON includes the issue's
136
+ project and parent context:
137
+
138
+ ```bash
139
+ oats linear issue get ENG-123
140
+ ```
141
+
142
+ ### Create issues in a project
143
+
144
+ Prefer a Markdown file for acceptance criteria:
145
+
146
+ ```bash
147
+ cat > /tmp/issue.md <<'EOF'
148
+ Why this work is needed.
149
+
150
+ Acceptance:
151
+ - [ ] Observable outcome implemented
152
+ - [ ] Verification evidence recorded
153
+ - [ ] Relevant documentation updated
154
+ EOF
155
+
156
+ oats linear issue create --team ENG --project "Agent Platform" \
157
+ --title "Implement token refresh" \
158
+ --description-file /tmp/issue.md \
159
+ --agent my-agent-instance
160
+ ```
161
+
162
+ Create a sub-issue only when it is independently verifiable and the parent
163
+ really decomposes into multiple pieces:
164
+
165
+ ```bash
166
+ oats linear issue create --team ENG --parent ENG-123 \
167
+ --title "Add refresh-token tests" \
168
+ --description-file /tmp/issue.md \
169
+ --agent my-agent-instance
170
+ ```
171
+
172
+ Project membership and parentage are independent: `--project` associates an
173
+ issue with a project; `--parent` makes it a sub-issue. Supply both when the
174
+ sub-issue must explicitly carry project membership.
175
+
176
+ ### Work and report within the project
177
+
178
+ ```bash
179
+ oats linear issue update ENG-123 --agent my-agent-instance
180
+ oats linear issue update ENG-123 --state "In Progress"
181
+ oats linear issue comment ENG-123 \
182
+ --body "[my-agent-instance] milestone: implementation complete; tests pass"
183
+ oats linear issue comment ENG-123 \
184
+ --body "[my-agent-instance] handoff → reviewer: PR <url>; run npm test"
185
+ ```
186
+
187
+ Use the team's exact workflow names from `oats linear states --team ENG`.
188
+ Agents normally stop at the review state. Terminal transitions require both
189
+ explicit human authorization and `--allow-terminal`.
190
+
191
+ ### Manage project overviews and documents
192
+
193
+ The current command wrapper does **not** read or mutate project overview
194
+ Markdown or Linear documents. Manage them through the Linear UI:
195
+
196
+ 1. Open the project returned by `oats linear projects --team <KEY>`.
197
+ 2. Maintain project intent, scope, non-goals, ownership, gates, architecture,
198
+ and success criteria in its overview.
199
+ 3. Keep detailed designs, decisions, and runbooks in project documents.
200
+ 4. Link governing project documents from related issues.
201
+ 5. Record implementation progress on issues; use Linear's project updates for
202
+ human-facing project-level summaries.
203
+
204
+ An agent that needs unavailable project-document context must ask the human for
205
+ its URL/content. It must not infer missing project policy from issue titles.
206
+
207
+ ## Current support boundary
208
+
209
+ | Operation | Supported by `oats linear`? | Current path |
210
+ |---|---:|---|
211
+ | Discover teams, workflow states, projects, and labels | Yes | `teams`, `states`, `projects`, `labels` |
212
+ | List/get/create/update/comment on project issues | Yes | `issue ...` commands |
213
+ | Create sub-issues | Yes | `issue create --parent ...` |
214
+ | Create, rename, schedule, change status, or close a project | No | Linear UI; human-owned |
215
+ | Read or edit project overview Markdown | No | Linear UI |
216
+ | List, read, create, or edit project documents | No | Linear UI |
217
+ | Move an existing issue into/out of a project | No | Linear UI |
218
+ | Change an existing issue's parent | No | Linear UI |
219
+ | Publish Linear project status updates | No | Linear UI |
220
+ | Create issue-to-issue relations such as blocks/related | No | Linear UI |
221
+
222
+ Do not invent GraphQL calls or undocumented command flags to bypass this
223
+ boundary. A future, separately reviewed extension could add commands such as:
224
+
225
+ ```text
226
+ oats linear project get|create|update
227
+ oats linear project issue-add|issue-remove
228
+ oats linear document list|get|create|update
229
+ oats linear project-update create
230
+ oats linear relation create
231
+ ```
232
+
233
+ Before adding those operations, the deployment must decide which project and
234
+ document mutations agents may perform and which remain human-only.
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ /** OATS spawn briefing for the Linear tasks integration. Makes no API calls. */
3
+ const output = (value) => {
4
+ process.stdout.write(JSON.stringify(value) + "\n");
5
+ process.exit(0);
6
+ };
7
+
8
+ const event = process.env.OATS_EVENT || process.argv[2];
9
+ if (event !== "spawn") output({ warning: `oats-linear: unknown event "${event}" (expected spawn)` });
10
+
11
+ let settings = {};
12
+ try { settings = JSON.parse(process.env.OATS_SETTINGS || "{}"); }
13
+ catch { output({ warning: "oats-linear: integrations.linear.settings is not valid JSON" }); }
14
+
15
+ const instance = process.env.OATS_INSTANCE || "unknown-instance";
16
+ const team = settings.team;
17
+ const project = settings.project;
18
+ const label = `agent-${instance}`;
19
+ const target = team
20
+ ? `team ${team}${project ? `, default project ${project}` : ""}`
21
+ : "team unset — ask your human, or set integrations.linear.settings.team in oats-config.yaml";
22
+ const warnings = [];
23
+ if (!team) warnings.push("settings.team is unset");
24
+ if (!process.env.LINEAR_API_KEY) warnings.push("LINEAR_API_KEY is not in the spawn environment");
25
+
26
+ output({
27
+ meta: { label, ...(team ? { team } : {}), ...(project ? { project } : {}) },
28
+ brief: `Tasks: Linear — ${target}. Your agent identity is label "${label}"; keep the human assignee unchanged. Load the linear-tasks skill before touching issues.`,
29
+ ...(warnings.length ? {
30
+ warning: `oats-linear: ${warnings.join("; ")} — see capabilities/oats-linear/README.md`,
31
+ } : {}),
32
+ });