Skip to content

feat: vendor stokowski for Linear-driven agent orchestration - #101

Merged
bougyman merged 5 commits into
mainfrom
issue-100
Aug 13, 2026
Merged

feat: vendor stokowski for Linear-driven agent orchestration#101
bougyman merged 5 commits into
mainfrom
issue-100

Conversation

@bougyman

Copy link
Copy Markdown
Member

Summary

  • Vendors Sugar-Coffee/stokowski as a git submodule (vendor/stokowski) and checks in a shared workflow.yaml + .ai/prompts/*.md - safe to commit since tracker.api_key is omitted entirely, so Stokowski resolves it from the LINEAR_API_KEY env var at runtime rather than anything in the file.
  • Adds mix stokowski (root repo_tasks project) - for now it only validates workflow.yaml is safe (exists, gitignored if it ever does carry a literal key, no bare api_key literal). Actually launching a session via uv run --project vendor/stokowski is deliberately deferred to a follow-up.
  • Removes the lc escript target - it never actually worked once exqlite (a NIF-backed dep) was added, since NIFs can't load from inside an escript archive, and nothing in CI or docs ever exercised it.
  • Documents mix run as the supported way to invoke lc locally, plus a standing rule to dogfood lc itself for Linear access rather than an MCP server or other integration skill (app/usage-rules.md, indexed from AGENTS.md).
  • Closes Add stokowski framework for agent orchestration #100. Mirrored as CRY-38 in Linear's "Linear CLI" project.

Follow-ups (not in this PR)

  • Wire mix stokowski up to actually start a session once the uv run invocation has been tested end-to-end.
  • Upstream PR to Sugar-Coffee/stokowski: WorkflowConfig.agent_env() in stokowski/config.py checks the raw tracker.api_key string instead of the resolved value (unlike ProjectConfig.agent_env()) - on a bad $VAR reference it silently clobbers an otherwise-correct LINEAR_API_KEY env var with an empty string. The README setup guide (step 3) and single-project config reference also only show the bare-literal api_key pattern.

Test plan

  • mix test in app/ - 227/227 passed
  • mix format --check-formatted clean in both app/ and the root repo_tasks project
  • mix usage_rules.sync --check clean in app/
  • Verified workflow.yaml/.ai/prompts/*.md contain no literal secrets before committing (only commented $LINEAR_API_KEY examples)
  • Dogfooded lc itself (via mix run, no MCP) to create CRY-38 in Linear's "Linear CLI" project, confirming the documented mix run invocation actually works end-to-end

🤖 Generated with Claude Code

Vendors Sugar-Coffee/stokowski as a git submodule and checks in a
shared workflow.yaml + .ai/prompts/*.md - safe to commit since
tracker.api_key is omitted entirely, so Stokowski resolves it from the
LINEAR_API_KEY env var at runtime rather than anything in the file.

Adds `mix stokowski` (root repo_tasks project), which for now only
validates workflow.yaml is safe (exists, gitignored if it ever does
carry a literal key, no bare api_key literal) - actually launching a
session is a follow-up.

Removes the `lc` escript target: it never worked once exqlite (a
NIF-backed dep) was added, since NIFs can't load from inside an
escript archive, and nothing in CI or docs ever exercised it. Documents
`mix run` as the supported way to invoke `lc` locally in
app/usage-rules.md, along with a standing rule to dogfood `lc` itself
for Linear access rather than an MCP server or other integration
skill.
Copilot AI lite review requested due to automatic review settings August 13, 2026 17:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR vendors the Stokowski agent-orchestration framework (as a submodule) and introduces a repo-level Stokowski workflow + prompt templates, along with a new mix stokowski task intended to validate that the checked-in workflow.yaml is safe (no literal Linear API key). It also removes the unused/broken lc escript target and updates repo guidance to dogfood lc via mix run instead of using external Linear integrations.

Changes:

  • Add a checked-in workflow.yaml and .ai/prompts/*.md templates to define a Linear-driven agent workflow.
  • Add mix stokowski (repo_tasks) and a minimal test scaffold for it; add Python 3.14.1 to mise.toml for Stokowski.
  • Remove the lc escript target and update documentation/comments to reflect mix run/release usage.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
workflow.yaml Adds the shared Stokowski workflow configuration for this repo.
.ai/prompts/global.md Global prompt preamble for all agent stages.
.ai/prompts/investigate.md Investigation-stage prompt template.
.ai/prompts/implement.md Implementation-stage prompt template.
.ai/prompts/review.md Code-review-stage prompt template.
.ai/prompts/merge.md Merge-stage prompt template.
lib/mix/tasks/stokowski.ex Introduces mix stokowski safety validation task for workflow.yaml.
test/mix/tasks/stokowski_test.exs Adds initial ExUnit coverage for the new Mix task.
mise.toml Pins Python to support running vendored Stokowski.
.gitmodules Adds vendor/stokowski submodule entry.
app/mix.exs Removes the escript target for lc.
app/.gitignore Removes the ignore entry for the old lc escript artifact.
app/usage-rules.md Documents dogfooding lc via mix run and avoiding Linear MCP/skills.
app/lib/linear_cli/application.ex Updates comments to reflect Burrito release vs mix run (no escript).
app/lib/linear_cli/oban_repo.ex Updates comments to remove escript references.
AGENTS.md Indexes the new dogfooding rule from app/usage-rules.md.
Suppressed comments (2)

lib/mix/tasks/stokowski.ex:38

  • mix stokowski currently requires workflow.yaml to be gitignored, but this PR also adds and tracks workflow.yaml in the repo. That makes mix stokowski fail in the normal (tracked) case and contradicts the PR description/intent (checked-in workflow with no literal key). Drop the unconditional gitignore gate; the existing api_key literal check already prevents committing a secret.
    unless gitignored?(workflow) do
      Mix.raise(
        "#{workflow} is not gitignored - it can hold a live Linear API key, add it to .gitignore before continuing"
      )
    end

lib/mix/tasks/stokowski.ex:61

  • After removing the unconditional gitignore check in run/1, gitignored?/1 becomes unused. Keeping an unused private function will introduce warnings and can hide real unused-code issues later; it should be removed (or only added back when it’s actually needed).
  defp gitignored?(path) do
    match?({_, 0}, System.cmd("git", ["check-ignore", "-q", path], stderr_to_stdout: true))
  end

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/mix/tasks/stokowski.ex
Comment thread test/mix/tasks/stokowski_test.exs
Comment thread workflow.yaml Outdated
Comment thread workflow.yaml Outdated
Comment thread workflow.yaml Outdated
Comment thread workflow.yaml Outdated
Comment thread workflow.yaml Outdated
Comment thread workflow.yaml Outdated
Comment thread workflow.yaml
Comment thread workflow.yaml
bougyman added a commit that referenced this pull request Aug 13, 2026
…ge-rules (#103)

## Summary
- Adds `documents/motivation.adoc` - the accessibility need driving this
whole project, in writing.
- Adds an `## Accessibility` section to `app/usage-rules.md` with the
concrete commitments it implies: plain linear text output stays
first-class, no meaning conveyed by color alone, no TUI as the primary
interface, line-based prompts, `--output json` as a fully-supported path
for every command.
- Indexes it from `AGENTS.md`'s Standards section, same pattern as
Conventional Commits.
- Closes #102.

## Test plan
- [x] Reviewed `documents/motivation.adoc` content directly with the
author before writing
- [x] Confirmed `app/usage-rules.md`/`AGENTS.md` additions don't overlap
with the still-unmerged dogfooding section in #101 - independent,
non-conflicting appends to the same files

🤖 Generated with [Claude Code](https://claude.com/claude-code)
workflow.yaml is meant to be tracked in this repo, not gitignored -
the moduledoc and error messages said otherwise, contradicting what
this PR actually does. The task now only checks tracker.api_key isn't
a bare literal (a best-effort guard against a leaked key), not that
the file stays untracked.
- Fix four state definitions in workflow.yaml pointing at prompts/*.md
  - the committed prompts actually live at .ai/prompts/*.md, so
  Stokowski couldn't have loaded any of them as written.
- Reword workflow.yaml's header comments: it's the repo's own checked-in
  config now, not a template to copy, and prompts live under
  .ai/prompts/, not prompts/.
- Replace workspace.root's personal path with a neutral default shared
  contributors can use out of the box.
- Add test coverage for the literal-api_key rejection path (previously
  only the missing-file case was covered).

Not applying Copilot's suggestion to switch workflow.yaml's clone hook
from SSH to HTTPS - SSH with a primed agent failing loudly is
preferable to HTTPS quietly working via cached creds on disk.
@bougyman
bougyman merged commit b68fc57 into main Aug 13, 2026
2 checks passed
@bougyman
bougyman deleted the issue-100 branch August 13, 2026 20:34
bougyman added a commit that referenced this pull request Aug 13, 2026
## Summary
- `mix stokowski` now actually launches a session after its existing
safety checks pass: `uv run --project vendor/stokowski --extra web
--with-editable vendor/stokowski -- stokowski <workflow> <args...>`.
Flags are passed straight through (`--dry-run`, `--port`, `--host`,
`-v`).
- `--with-editable` is required alongside `--project` -
`vendor/stokowski`'s `pyproject.toml` has no `[build-system]` table, so
a plain `uv run --project` only syncs dependencies and never installs
the `stokowski` package/entry point itself. Confirmed directly: without
it, `uv run --project vendor/stokowski -- stokowski --help` fails with
`Failed to spawn: stokowski` even though the venv builds cleanly and
installs all 23 dependency packages.
- Closes #105.

## Follow-up (not in this PR)
- The missing `[build-system]` table is an upstream packaging gap in
`Sugar-Coffee/stokowski` itself. This PR works around it locally via
`--with-editable`; fixing it upstream will be rolled into the same
eventual PR as the `LINEAR_API_KEY` resolution fix from #100/#101's
plan.

## Test plan
- [x] `mix format --check-formatted` clean
- [x] `mix test test/mix/tasks/stokowski_test.exs` - 2/2 passed
- [x] Ran the actual task end-to-end against the real `workflow.yaml`
and a real `LINEAR_API_KEY`: config validated, env-var-fallback key
resolved correctly, real Linear API call succeeded (`200 OK`), correct
neutral `workspace.root` from #101 picked up

🤖 Generated with [Claude Code](https://claude.com/claude-code)
bougyman pushed a commit that referenced this pull request Aug 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.1...v1.5.0)
(2026-08-13)


### Features

* launch stokowski sessions via mix stokowski
([#106](#106))
([550ed26](550ed26))
* vendor stokowski for Linear-driven agent orchestration
([#101](#101))
([b68fc57](b68fc57))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add stokowski framework for agent orchestration

2 participants