liaise 0.0.2__tar.gz
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.
- liaise-0.0.2/.claude/skills/liaise/SKILL.md +45 -0
- liaise-0.0.2/.gitattributes +1 -0
- liaise-0.0.2/.github/workflows/ci.yml +56 -0
- liaise-0.0.2/.gitignore +120 -0
- liaise-0.0.2/LICENSE +21 -0
- liaise-0.0.2/PKG-INFO +82 -0
- liaise-0.0.2/README.md +60 -0
- liaise-0.0.2/liaise/__init__.py +86 -0
- liaise-0.0.2/liaise/__main__.py +16 -0
- liaise-0.0.2/liaise/cli.py +290 -0
- liaise-0.0.2/liaise/config.py +304 -0
- liaise-0.0.2/liaise/data/labels.json +30 -0
- liaise-0.0.2/liaise/data/operating_rules.md +55 -0
- liaise-0.0.2/liaise/dispatch.py +351 -0
- liaise-0.0.2/liaise/github.py +302 -0
- liaise-0.0.2/liaise/intake.py +181 -0
- liaise-0.0.2/liaise/notify.py +52 -0
- liaise-0.0.2/liaise/prompt.py +128 -0
- liaise-0.0.2/liaise/run.py +397 -0
- liaise-0.0.2/liaise/schedule.py +326 -0
- liaise-0.0.2/liaise/state.py +110 -0
- liaise-0.0.2/liaise/tests/__init__.py +1 -0
- liaise-0.0.2/liaise/tests/conftest.py +80 -0
- liaise-0.0.2/liaise/tests/test_config.py +87 -0
- liaise-0.0.2/liaise/tests/test_dispatch.py +419 -0
- liaise-0.0.2/liaise/tests/test_docs.py +139 -0
- liaise-0.0.2/liaise/tests/test_github.py +184 -0
- liaise-0.0.2/liaise/tests/test_intake.py +326 -0
- liaise-0.0.2/liaise/tests/test_no_personal_data.py +157 -0
- liaise-0.0.2/liaise/tests/test_notify.py +34 -0
- liaise-0.0.2/liaise/tests/test_prompt.py +160 -0
- liaise-0.0.2/liaise/tests/test_run.py +528 -0
- liaise-0.0.2/liaise/tests/test_schedule.py +101 -0
- liaise-0.0.2/liaise/tests/test_state.py +167 -0
- liaise-0.0.2/pyproject.toml +161 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: liaise
|
|
3
|
+
description: Use when onboarding a new partner to liaise, checking what liaise is waiting on or has done (liaise status / liaise poll), or explaining what a liaise: state label on a GitHub issue means. Triggers on "add a partner to liaise", "onboard <name> to liaise", "what's liaise waiting on", "check liaise status", "what does liaise:needs-owner mean", "why hasn't liaise picked up this issue".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# liaise: the owner's agent skill
|
|
7
|
+
|
|
8
|
+
`liaise` runs the loop between a non-technical partner and a coding agent, over GitHub issues. This skill is for the owner's own agent — the one helping the owner run `liaise`, not the one `liaise` dispatches to do the work.
|
|
9
|
+
|
|
10
|
+
## Onboarding a new partner
|
|
11
|
+
|
|
12
|
+
Every partner is one config file plus one brief file, both under `~/.config/liaise/`. Nothing about a partner belongs in the `liaise` package itself.
|
|
13
|
+
|
|
14
|
+
1. Pick a short slug (e.g. `pat`).
|
|
15
|
+
2. Write `~/.config/liaise/partners/<slug>.toml` — at minimum `display_name`, `github_logins`, `repo`, `brief`. See the package README's quick start for the full shape, including `dispatch`, `verify`, `deploy`, `escalate`, and any global default you want to override for just this partner.
|
|
16
|
+
3. Write `~/.config/liaise/briefs/<slug>.md` — how to talk to this partner: tone, what they care about, which decisions are theirs and which are the owner's. This goes verbatim into every prompt the coding agent sees for their issues.
|
|
17
|
+
4. Run `liaise setup <slug>` — creates the partner's label and every `liaise:` state label in their repo. Safe to re-run.
|
|
18
|
+
5. Run `liaise poll --partner <slug>` to confirm `liaise` sees their issues and is computing readiness correctly.
|
|
19
|
+
6. If not already installed, `liaise schedule install` sets up the recurring job (once, covers every partner).
|
|
20
|
+
|
|
21
|
+
## Reading `liaise status`
|
|
22
|
+
|
|
23
|
+
`liaise status` reports, per partner: how long ago `liaise` last ran (a stale age past a couple of minutes past the schedule interval means the scheduled job stopped — check `liaise schedule status`), today's dispatch count against the daily cap, and every issue currently in `liaise:needs-owner`. That last list is the actual to-do list — everything else in the loop is either waiting on the partner or already handled.
|
|
24
|
+
|
|
25
|
+
## What each `liaise:` label means
|
|
26
|
+
|
|
27
|
+
Exactly one of these is on a `liaise`-tracked issue at a time. `liaise` never closes an issue — that's the partner's or the owner's call.
|
|
28
|
+
|
|
29
|
+
| Label | What it means | Who set it |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `liaise:intake` | Seen. The partner may still be writing, or the quiet window is running. | liaise |
|
|
32
|
+
| `liaise:paused` | The partner asked to wait (a `#wait#` marker). | liaise |
|
|
33
|
+
| `liaise:working` | A coding agent is dispatched and running right now. | liaise |
|
|
34
|
+
| `liaise:needs-partner` | The agent asked a question and is waiting on the partner to answer. | the agent |
|
|
35
|
+
| `liaise:needs-owner` | Needs the owner: an escalation, a decision, or a crashed/stuck run. | the agent, or liaise on a crash or the daily budget cap |
|
|
36
|
+
| `liaise:deployed` | Live. The partner has been told to try it. | the agent, or liaise after a batch deploy |
|
|
37
|
+
| `liaise:budget` | Today's dispatch cap was hit for this partner. Resumes tomorrow. | liaise |
|
|
38
|
+
|
|
39
|
+
A `liaise:needs-owner` issue is where the owner's own judgment is actually needed — an escalation the agent declined to make alone, or reconciliation after something crashed. Read the issue thread and the dispatch log path (if `liaise` notified with one) before deciding what to do; the label alone only tells you that a decision is due, not what it is.
|
|
40
|
+
|
|
41
|
+
## Why an issue isn't moving
|
|
42
|
+
|
|
43
|
+
- **Still in `liaise:intake` well past the quiet window?** Check `liaise poll` — a marker or a comment from someone who isn't the partner (including the owner) never restarts or shortens the clock, only the partner's own edits and comments do.
|
|
44
|
+
- **Nothing happening at all?** `liaise status`'s `last_run` age is the first thing to check — a stale scheduled job looks exactly like an unready issue from the partner's side.
|
|
45
|
+
- **Hit the daily cap?** `liaise:budget` resumes automatically the next day; there's nothing to do.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.ipynb linguist-documentation
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# wads CI — calls the reusable workflow hosted in i2mint/wads.
|
|
2
|
+
#
|
|
3
|
+
# All configuration comes from this repo's pyproject.toml [tool.wads.ci.*].
|
|
4
|
+
# To customize the workflow itself (rare), replace this file with the
|
|
5
|
+
# full inline template `wads/data/github_ci_uv.yml` from i2mint/wads.
|
|
6
|
+
#
|
|
7
|
+
# Pinning: `@master` floats with wads. If you need version stability for
|
|
8
|
+
# a release-sensitive repo, change `@master` to a wads tag (e.g. `@0.2.15`;
|
|
9
|
+
# tags have no `v` prefix). A stub whose `secrets:` block passes the JSON
|
|
10
|
+
# transport (the default below) needs a tag from a release after 0.2.14 —
|
|
11
|
+
# older tags don't declare that secret and GitHub then rejects the
|
|
12
|
+
# workflow at parse time.
|
|
13
|
+
# CI failure does not block a published release — it blocks the publish
|
|
14
|
+
# step itself — so floating master is generally safe.
|
|
15
|
+
#
|
|
16
|
+
# Permissions: GitHub validates that the caller grants AT LEAST the
|
|
17
|
+
# permissions any job in the called workflow requests — at workflow-parse
|
|
18
|
+
# time, not at run-time, even if the job would be skipped via `if:`.
|
|
19
|
+
# The reusable workflow needs:
|
|
20
|
+
# contents: write for the publish job's version-bump push-back
|
|
21
|
+
# and for the github-pages job's gh-pages branch push
|
|
22
|
+
# pages: write for the github-pages job's REST API Pages config
|
|
23
|
+
# Both default to `write` on org-account GITHUB_TOKEN and need to be
|
|
24
|
+
# granted explicitly on personal-account callers (where the default is
|
|
25
|
+
# read-only). No `id-token: write` needed — the publish-github-pages
|
|
26
|
+
# action uses peaceiris/actions-gh-pages (branch-based) + REST API,
|
|
27
|
+
# not the OIDC `actions/deploy-pages` flow.
|
|
28
|
+
name: Continuous Integration
|
|
29
|
+
on: [push, pull_request]
|
|
30
|
+
jobs:
|
|
31
|
+
ci:
|
|
32
|
+
uses: i2mint/wads/.github/workflows/uv-ci.yml@master
|
|
33
|
+
permissions:
|
|
34
|
+
contents: write
|
|
35
|
+
pages: write
|
|
36
|
+
# Transport: this repo's whole `secrets` context, serialized into the one
|
|
37
|
+
# secret the reusable workflow declares. Double-encoded (toJSON twice) so
|
|
38
|
+
# the value is a single line — a multiline secret would register its `{`
|
|
39
|
+
# and `}` lines as global log masks. Any secret name works; there is no
|
|
40
|
+
# fixed list to fall outside of. (Cross-owner `secrets: inherit` does not
|
|
41
|
+
# propagate secrets, so it cannot replace this.)
|
|
42
|
+
#
|
|
43
|
+
# Note this hands EVERY secret this repo can read — including org-level
|
|
44
|
+
# ones — to the called workflow. For a minimal secret surface (only the
|
|
45
|
+
# names you list), regenerate with
|
|
46
|
+
# wads-migrate ci-to-stub --transport named
|
|
47
|
+
#
|
|
48
|
+
# *Which* of these become job env vars — and which are required — is
|
|
49
|
+
# driven entirely by [tool.wads.ci.env] in pyproject.toml; nothing is
|
|
50
|
+
# exported unless declared there (`wads-secrets add VAR_NAME` declares
|
|
51
|
+
# one and can set its value). Non-sensitive values don't need a secret:
|
|
52
|
+
# use [tool.wads.ci.env].defaults (committed literals) or a repository
|
|
53
|
+
# *variable* (`gh variable set NAME`) — declared names fall back to
|
|
54
|
+
# repo variables automatically.
|
|
55
|
+
secrets:
|
|
56
|
+
WADS_CI_SECRETS_JSON: ${{ toJSON(toJSON(secrets)) }}
|
liaise-0.0.2/.gitignore
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
.claude/handoffs/
|
|
2
|
+
.claude/scratch/
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
.DS_Store
|
|
11
|
+
# C extensions
|
|
12
|
+
*.so
|
|
13
|
+
|
|
14
|
+
# TLS certificates
|
|
15
|
+
## Ignore all PEM files anywhere
|
|
16
|
+
*.pem
|
|
17
|
+
## Also ignore any certs directory
|
|
18
|
+
certs/
|
|
19
|
+
|
|
20
|
+
# Distribution / packaging
|
|
21
|
+
.Python
|
|
22
|
+
build/
|
|
23
|
+
develop-eggs/
|
|
24
|
+
dist/
|
|
25
|
+
downloads/
|
|
26
|
+
eggs/
|
|
27
|
+
.eggs/
|
|
28
|
+
lib/
|
|
29
|
+
lib64/
|
|
30
|
+
parts/
|
|
31
|
+
sdist/
|
|
32
|
+
var/
|
|
33
|
+
wheels/
|
|
34
|
+
*.egg-info/
|
|
35
|
+
.installed.cfg
|
|
36
|
+
*.egg
|
|
37
|
+
MANIFEST
|
|
38
|
+
_build
|
|
39
|
+
|
|
40
|
+
# PyInstaller
|
|
41
|
+
# Usually these files are written by a python script from a template
|
|
42
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
43
|
+
*.manifest
|
|
44
|
+
*.spec
|
|
45
|
+
|
|
46
|
+
# Installer logs
|
|
47
|
+
pip-log.txt
|
|
48
|
+
pip-delete-this-directory.txt
|
|
49
|
+
|
|
50
|
+
# Unit test / coverage reports
|
|
51
|
+
htmlcov/
|
|
52
|
+
.tox/
|
|
53
|
+
.coverage
|
|
54
|
+
.coverage.*
|
|
55
|
+
.cache
|
|
56
|
+
nosetests.xml
|
|
57
|
+
coverage.xml
|
|
58
|
+
*.cover
|
|
59
|
+
.hypothesis/
|
|
60
|
+
.pytest_cache/
|
|
61
|
+
|
|
62
|
+
# Translations
|
|
63
|
+
*.mo
|
|
64
|
+
*.pot
|
|
65
|
+
|
|
66
|
+
# Django stuff:
|
|
67
|
+
*.log
|
|
68
|
+
local_settings.py
|
|
69
|
+
db.sqlite3
|
|
70
|
+
|
|
71
|
+
# Flask stuff:
|
|
72
|
+
instance/
|
|
73
|
+
.webassets-cache
|
|
74
|
+
|
|
75
|
+
# Scrapy stuff:
|
|
76
|
+
.scrapy
|
|
77
|
+
|
|
78
|
+
# Sphinx documentation
|
|
79
|
+
docs/_build/
|
|
80
|
+
docs/*
|
|
81
|
+
|
|
82
|
+
# PyBuilder
|
|
83
|
+
target/
|
|
84
|
+
|
|
85
|
+
# Jupyter Notebook
|
|
86
|
+
.ipynb_checkpoints
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
.python-version
|
|
90
|
+
|
|
91
|
+
# celery beat schedule file
|
|
92
|
+
celerybeat-schedule
|
|
93
|
+
|
|
94
|
+
# SageMath parsed files
|
|
95
|
+
*.sage.py
|
|
96
|
+
|
|
97
|
+
# Environments
|
|
98
|
+
.env
|
|
99
|
+
.venv
|
|
100
|
+
env/
|
|
101
|
+
venv/
|
|
102
|
+
ENV/
|
|
103
|
+
env.bak/
|
|
104
|
+
venv.bak/
|
|
105
|
+
|
|
106
|
+
# Spyder project settings
|
|
107
|
+
.spyderproject
|
|
108
|
+
.spyproject
|
|
109
|
+
|
|
110
|
+
# Rope project settings
|
|
111
|
+
.ropeproject
|
|
112
|
+
|
|
113
|
+
# mkdocs documentation
|
|
114
|
+
/site
|
|
115
|
+
|
|
116
|
+
# mypy
|
|
117
|
+
.mypy_cache/
|
|
118
|
+
|
|
119
|
+
# PyCharm
|
|
120
|
+
.idea
|
liaise-0.0.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thor Whalen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
liaise-0.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: liaise
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Run the loop between a non-technical partner who tests an app and a coding agent that answers, fixes, builds and redeploys — over GitHub issues
|
|
5
|
+
Project-URL: Homepage, https://github.com/thorwhalen/liaise
|
|
6
|
+
Project-URL: Repository, https://github.com/thorwhalen/liaise
|
|
7
|
+
Project-URL: Documentation, https://thorwhalen.github.io/liaise
|
|
8
|
+
Author: Thor Whalen
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: cw
|
|
13
|
+
Requires-Dist: dol
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
16
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
17
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
18
|
+
Provides-Extra: docs
|
|
19
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == 'docs'
|
|
20
|
+
Requires-Dist: sphinx>=6.0; extra == 'docs'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# liaise
|
|
24
|
+
|
|
25
|
+
`liaise` runs the loop between a non-technical partner who tests an app and a coding agent that answers, fixes, builds and redeploys — over GitHub issues. The partner files what they notice as a GitHub issue; `liaise` watches the repo, waits until they've finished writing, hands the ready issue to a coding agent, and keeps the state visible on the issue itself, so nobody has to learn a tool or a syntax to be part of the loop.
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
pip install liaise
|
|
31
|
+
mkdir -p ~/.config/liaise/partners ~/.config/liaise/briefs
|
|
32
|
+
cat > ~/.config/liaise/config.toml <<'EOF'
|
|
33
|
+
owner_login = "you"
|
|
34
|
+
state_dir = "~/.local/share/liaise"
|
|
35
|
+
EOF
|
|
36
|
+
cat > ~/.config/liaise/partners/pat.toml <<'EOF'
|
|
37
|
+
display_name = "Pat"
|
|
38
|
+
github_logins = ["pat"]
|
|
39
|
+
repo = "example/app"
|
|
40
|
+
brief = "~/.config/liaise/briefs/pat.md"
|
|
41
|
+
EOF
|
|
42
|
+
echo "Pat likes short, plain answers and hates surprises." > ~/.config/liaise/briefs/pat.md
|
|
43
|
+
liaise setup pat
|
|
44
|
+
liaise poll
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
That's read-only by default (non-negotiable #4) — `poll` reports Pat's issues and their readiness without changing anything. Once you believe the plan it shows, `liaise run --once --dry-run` prints what a real pass would do, still without acting; drop `--dry-run` to actually act; and `liaise schedule install` sets up the recurring job once you're ready to stop running it by hand.
|
|
48
|
+
|
|
49
|
+
That's a working loop for one partner (`pat`, testing the fictional `example/app`) polling every couple of minutes. Add more partners by adding more files under `partners/` and `briefs/`.
|
|
50
|
+
|
|
51
|
+
## Concepts
|
|
52
|
+
|
|
53
|
+
**Partners.** Everything about a partner — who they are on GitHub, which repo they test, how to talk to them, what commands verify and deploy their app — is one TOML file under `~/.config/liaise/partners/`. Nothing about a partner ever lives in this package's code.
|
|
54
|
+
|
|
55
|
+
**Issues are the channel.** A partner (or an app filing on their behalf) opens a GitHub issue. `liaise` decides an issue is theirs by author or by a `partner:<slug>` label, and only ever reads their own activity — a comment from anyone else, including the owner, never moves the clock.
|
|
56
|
+
|
|
57
|
+
**Readiness.** `liaise` waits for a quiet window after the partner's last word before treating an issue as ready, so a request written across three comments doesn't get grabbed mid-sentence. A partner can speed that up with a `#startwork#` marker in their text, or pause it with `#wait#` — both optional, and neither is required to use `liaise` at all.
|
|
58
|
+
|
|
59
|
+
**State labels.** Exactly one `liaise:` label is on an issue at a time: `intake`, `paused`, `working`, `needs-partner`, `needs-owner`, `deployed`, or `budget`. That label is the entire state machine — read it on the issue, and you know exactly where things stand. `liaise` never closes an issue; that's the partner's or the owner's call.
|
|
60
|
+
|
|
61
|
+
**Dispatch.** A ready issue gets handed to a coding agent (headless `claude` by default) with a composed prompt: the packaged operating rules, the partner's brief, the issue, which label to set on each exit path, the verify/deploy commands, and a budget. The agent asks questions in the thread, does the work in the repo's own conventions (branch, PR, CI, land), and reports back through the label.
|
|
62
|
+
|
|
63
|
+
**Batch or per-issue deploy.** With `deploy_per = "batch"` (the default), the agent lands each ready issue without deploying, and `liaise` runs the deploy command once after processing every ready issue, then tells each partner it's live. With `deploy_per = "issue"`, the agent deploys and posts itself.
|
|
64
|
+
|
|
65
|
+
**Budgets.** A per-dispatch timeout and turn cap, and a daily dispatch cap per partner — mandatory, not optional. Hitting the daily cap is a visible `liaise:budget` label, never silence.
|
|
66
|
+
|
|
67
|
+
**Notifications.** `liaise` has no dashboard. When something needs the owner — a crash, an escalation, a budget cap — it's a label plus an `ntfy` push if `LIAISE_NTFY_TOPIC` (or whatever `notify.ntfy_topic_env` names) is set. Unset, it's silent, never an error.
|
|
68
|
+
|
|
69
|
+
**Scheduling.** `liaise schedule install` sets up a launchd agent (macOS) or a systemd user timer (Linux) that runs `liaise run --once` every minute or two, with an environment snapshot taken at install time — both schedulers otherwise hand a job a nearly empty environment.
|
|
70
|
+
|
|
71
|
+
## Commands
|
|
72
|
+
|
|
73
|
+
- `liaise setup <partner>` — create the partner's label and every state label in their repo. Idempotent.
|
|
74
|
+
- `liaise poll [--partner SLUG]` — report every partner issue, its state, and a readiness countdown. Changes nothing.
|
|
75
|
+
- `liaise run [--once] [--dry-run] [--partner SLUG]` — intake, label, dispatch ready issues, batch-deploy, reconcile. `--dry-run` prints the plan and changes nothing.
|
|
76
|
+
- `liaise status` — the last run's age, today's dispatch counts, and anything waiting on the owner.
|
|
77
|
+
- `liaise partner list` / `liaise partner show <slug>` — see the resolved config, defaults applied.
|
|
78
|
+
- `liaise schedule install` / `uninstall` / `status` — manage the scheduled job.
|
|
79
|
+
|
|
80
|
+
## Design
|
|
81
|
+
|
|
82
|
+
The non-negotiables (nothing personal in the package, `gh` as the only GitHub credential, labels as the state machine, read-only by default, mandatory budgets, and the rest) are worth reading if you're extending `liaise` rather than just running it — see the design discussion linked from the project's GitHub repository.
|
liaise-0.0.2/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# liaise
|
|
2
|
+
|
|
3
|
+
`liaise` runs the loop between a non-technical partner who tests an app and a coding agent that answers, fixes, builds and redeploys — over GitHub issues. The partner files what they notice as a GitHub issue; `liaise` watches the repo, waits until they've finished writing, hands the ready issue to a coding agent, and keeps the state visible on the issue itself, so nobody has to learn a tool or a syntax to be part of the loop.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
pip install liaise
|
|
9
|
+
mkdir -p ~/.config/liaise/partners ~/.config/liaise/briefs
|
|
10
|
+
cat > ~/.config/liaise/config.toml <<'EOF'
|
|
11
|
+
owner_login = "you"
|
|
12
|
+
state_dir = "~/.local/share/liaise"
|
|
13
|
+
EOF
|
|
14
|
+
cat > ~/.config/liaise/partners/pat.toml <<'EOF'
|
|
15
|
+
display_name = "Pat"
|
|
16
|
+
github_logins = ["pat"]
|
|
17
|
+
repo = "example/app"
|
|
18
|
+
brief = "~/.config/liaise/briefs/pat.md"
|
|
19
|
+
EOF
|
|
20
|
+
echo "Pat likes short, plain answers and hates surprises." > ~/.config/liaise/briefs/pat.md
|
|
21
|
+
liaise setup pat
|
|
22
|
+
liaise poll
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
That's read-only by default (non-negotiable #4) — `poll` reports Pat's issues and their readiness without changing anything. Once you believe the plan it shows, `liaise run --once --dry-run` prints what a real pass would do, still without acting; drop `--dry-run` to actually act; and `liaise schedule install` sets up the recurring job once you're ready to stop running it by hand.
|
|
26
|
+
|
|
27
|
+
That's a working loop for one partner (`pat`, testing the fictional `example/app`) polling every couple of minutes. Add more partners by adding more files under `partners/` and `briefs/`.
|
|
28
|
+
|
|
29
|
+
## Concepts
|
|
30
|
+
|
|
31
|
+
**Partners.** Everything about a partner — who they are on GitHub, which repo they test, how to talk to them, what commands verify and deploy their app — is one TOML file under `~/.config/liaise/partners/`. Nothing about a partner ever lives in this package's code.
|
|
32
|
+
|
|
33
|
+
**Issues are the channel.** A partner (or an app filing on their behalf) opens a GitHub issue. `liaise` decides an issue is theirs by author or by a `partner:<slug>` label, and only ever reads their own activity — a comment from anyone else, including the owner, never moves the clock.
|
|
34
|
+
|
|
35
|
+
**Readiness.** `liaise` waits for a quiet window after the partner's last word before treating an issue as ready, so a request written across three comments doesn't get grabbed mid-sentence. A partner can speed that up with a `#startwork#` marker in their text, or pause it with `#wait#` — both optional, and neither is required to use `liaise` at all.
|
|
36
|
+
|
|
37
|
+
**State labels.** Exactly one `liaise:` label is on an issue at a time: `intake`, `paused`, `working`, `needs-partner`, `needs-owner`, `deployed`, or `budget`. That label is the entire state machine — read it on the issue, and you know exactly where things stand. `liaise` never closes an issue; that's the partner's or the owner's call.
|
|
38
|
+
|
|
39
|
+
**Dispatch.** A ready issue gets handed to a coding agent (headless `claude` by default) with a composed prompt: the packaged operating rules, the partner's brief, the issue, which label to set on each exit path, the verify/deploy commands, and a budget. The agent asks questions in the thread, does the work in the repo's own conventions (branch, PR, CI, land), and reports back through the label.
|
|
40
|
+
|
|
41
|
+
**Batch or per-issue deploy.** With `deploy_per = "batch"` (the default), the agent lands each ready issue without deploying, and `liaise` runs the deploy command once after processing every ready issue, then tells each partner it's live. With `deploy_per = "issue"`, the agent deploys and posts itself.
|
|
42
|
+
|
|
43
|
+
**Budgets.** A per-dispatch timeout and turn cap, and a daily dispatch cap per partner — mandatory, not optional. Hitting the daily cap is a visible `liaise:budget` label, never silence.
|
|
44
|
+
|
|
45
|
+
**Notifications.** `liaise` has no dashboard. When something needs the owner — a crash, an escalation, a budget cap — it's a label plus an `ntfy` push if `LIAISE_NTFY_TOPIC` (or whatever `notify.ntfy_topic_env` names) is set. Unset, it's silent, never an error.
|
|
46
|
+
|
|
47
|
+
**Scheduling.** `liaise schedule install` sets up a launchd agent (macOS) or a systemd user timer (Linux) that runs `liaise run --once` every minute or two, with an environment snapshot taken at install time — both schedulers otherwise hand a job a nearly empty environment.
|
|
48
|
+
|
|
49
|
+
## Commands
|
|
50
|
+
|
|
51
|
+
- `liaise setup <partner>` — create the partner's label and every state label in their repo. Idempotent.
|
|
52
|
+
- `liaise poll [--partner SLUG]` — report every partner issue, its state, and a readiness countdown. Changes nothing.
|
|
53
|
+
- `liaise run [--once] [--dry-run] [--partner SLUG]` — intake, label, dispatch ready issues, batch-deploy, reconcile. `--dry-run` prints the plan and changes nothing.
|
|
54
|
+
- `liaise status` — the last run's age, today's dispatch counts, and anything waiting on the owner.
|
|
55
|
+
- `liaise partner list` / `liaise partner show <slug>` — see the resolved config, defaults applied.
|
|
56
|
+
- `liaise schedule install` / `uninstall` / `status` — manage the scheduled job.
|
|
57
|
+
|
|
58
|
+
## Design
|
|
59
|
+
|
|
60
|
+
The non-negotiables (nothing personal in the package, `gh` as the only GitHub credential, labels as the state machine, read-only by default, mandatory budgets, and the rest) are worth reading if you're extending `liaise` rather than just running it — see the design discussion linked from the project's GitHub repository.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""liaise — the loop between a non-technical partner and a coding agent, over GitHub issues."""
|
|
2
|
+
|
|
3
|
+
from liaise.config import (
|
|
4
|
+
Budget,
|
|
5
|
+
Config,
|
|
6
|
+
ConfigError,
|
|
7
|
+
DispatchConfig,
|
|
8
|
+
EscalateConfig,
|
|
9
|
+
GlobalConfig,
|
|
10
|
+
Markers,
|
|
11
|
+
NotifyConfig,
|
|
12
|
+
PartnerConfig,
|
|
13
|
+
load_config,
|
|
14
|
+
)
|
|
15
|
+
from liaise.github import Comment, FakeGitHub, GhCli, GitHub, GitHubError, Issue
|
|
16
|
+
from liaise.intake import (
|
|
17
|
+
Readiness,
|
|
18
|
+
compute_readiness,
|
|
19
|
+
find_partner_issues,
|
|
20
|
+
is_partner_issue,
|
|
21
|
+
last_partner_activity,
|
|
22
|
+
)
|
|
23
|
+
from liaise.state import STATE_LABELS, current_state, set_state, state_label
|
|
24
|
+
from liaise.state import setup as setup_labels
|
|
25
|
+
from liaise.dispatch import (
|
|
26
|
+
ClaudeHeadless,
|
|
27
|
+
DispatchOutcome,
|
|
28
|
+
DispatchResult,
|
|
29
|
+
Dispatcher,
|
|
30
|
+
EchoDispatcher,
|
|
31
|
+
Job,
|
|
32
|
+
daily_dispatch_count,
|
|
33
|
+
dispatch_issue,
|
|
34
|
+
stored_session_id,
|
|
35
|
+
)
|
|
36
|
+
from liaise.notify import notify
|
|
37
|
+
from liaise.prompt import compose_prompt
|
|
38
|
+
from liaise.run import PlanItem, RunReport, last_run_age, run_once
|
|
39
|
+
from liaise.schedule import install_schedule, schedule_status, uninstall_schedule
|
|
40
|
+
|
|
41
|
+
__all__ = [
|
|
42
|
+
"Budget",
|
|
43
|
+
"ClaudeHeadless",
|
|
44
|
+
"Comment",
|
|
45
|
+
"Config",
|
|
46
|
+
"ConfigError",
|
|
47
|
+
"DispatchConfig",
|
|
48
|
+
"DispatchOutcome",
|
|
49
|
+
"DispatchResult",
|
|
50
|
+
"Dispatcher",
|
|
51
|
+
"EchoDispatcher",
|
|
52
|
+
"EscalateConfig",
|
|
53
|
+
"FakeGitHub",
|
|
54
|
+
"GhCli",
|
|
55
|
+
"GitHub",
|
|
56
|
+
"GitHubError",
|
|
57
|
+
"GlobalConfig",
|
|
58
|
+
"Issue",
|
|
59
|
+
"Job",
|
|
60
|
+
"Markers",
|
|
61
|
+
"NotifyConfig",
|
|
62
|
+
"PartnerConfig",
|
|
63
|
+
"PlanItem",
|
|
64
|
+
"Readiness",
|
|
65
|
+
"RunReport",
|
|
66
|
+
"STATE_LABELS",
|
|
67
|
+
"compose_prompt",
|
|
68
|
+
"compute_readiness",
|
|
69
|
+
"current_state",
|
|
70
|
+
"daily_dispatch_count",
|
|
71
|
+
"dispatch_issue",
|
|
72
|
+
"find_partner_issues",
|
|
73
|
+
"install_schedule",
|
|
74
|
+
"is_partner_issue",
|
|
75
|
+
"last_partner_activity",
|
|
76
|
+
"last_run_age",
|
|
77
|
+
"load_config",
|
|
78
|
+
"notify",
|
|
79
|
+
"run_once",
|
|
80
|
+
"schedule_status",
|
|
81
|
+
"set_state",
|
|
82
|
+
"setup_labels",
|
|
83
|
+
"state_label",
|
|
84
|
+
"stored_session_id",
|
|
85
|
+
"uninstall_schedule",
|
|
86
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# PYTHON_ARGCOMPLETE_OK
|
|
2
|
+
"""``python -m liaise`` — CLI entry point."""
|
|
3
|
+
|
|
4
|
+
import cw
|
|
5
|
+
|
|
6
|
+
from liaise.cli import _dispatch_config, _dispatch_funcs
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
raise SystemExit(
|
|
11
|
+
cw.dispatch(_dispatch_funcs, config=_dispatch_config, prog="liaise")
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
if __name__ == "__main__":
|
|
16
|
+
main()
|