ariadex 0.1.0__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.
Files changed (67) hide show
  1. ariadex-0.1.0/CHANGELOG.md +80 -0
  2. ariadex-0.1.0/LICENSE +21 -0
  3. ariadex-0.1.0/MANIFEST.in +2 -0
  4. ariadex-0.1.0/PKG-INFO +262 -0
  5. ariadex-0.1.0/README.md +230 -0
  6. ariadex-0.1.0/SECURITY.md +63 -0
  7. ariadex-0.1.0/pyproject.toml +100 -0
  8. ariadex-0.1.0/setup.cfg +4 -0
  9. ariadex-0.1.0/src/ariadex/__init__.py +3 -0
  10. ariadex-0.1.0/src/ariadex/__main__.py +6 -0
  11. ariadex-0.1.0/src/ariadex/adapters.py +190 -0
  12. ariadex-0.1.0/src/ariadex/cli.py +1251 -0
  13. ariadex-0.1.0/src/ariadex/concurrency.py +655 -0
  14. ariadex-0.1.0/src/ariadex/config.py +270 -0
  15. ariadex-0.1.0/src/ariadex/control.py +62 -0
  16. ariadex-0.1.0/src/ariadex/handoff.py +342 -0
  17. ariadex-0.1.0/src/ariadex/live_evidence.py +1252 -0
  18. ariadex-0.1.0/src/ariadex/logging.py +465 -0
  19. ariadex-0.1.0/src/ariadex/observability.py +637 -0
  20. ariadex-0.1.0/src/ariadex/operator.py +700 -0
  21. ariadex-0.1.0/src/ariadex/providers.py +86 -0
  22. ariadex-0.1.0/src/ariadex/py.typed +0 -0
  23. ariadex-0.1.0/src/ariadex/release.py +288 -0
  24. ariadex-0.1.0/src/ariadex/resync.py +112 -0
  25. ariadex-0.1.0/src/ariadex/runner.py +1012 -0
  26. ariadex-0.1.0/src/ariadex/spec_graph.py +329 -0
  27. ariadex-0.1.0/src/ariadex/state.py +114 -0
  28. ariadex-0.1.0/src/ariadex/status.py +71 -0
  29. ariadex-0.1.0/src/ariadex/terminal.py +255 -0
  30. ariadex-0.1.0/src/ariadex/tmux_setup.py +342 -0
  31. ariadex-0.1.0/src/ariadex/verify.py +176 -0
  32. ariadex-0.1.0/src/ariadex.egg-info/PKG-INFO +262 -0
  33. ariadex-0.1.0/src/ariadex.egg-info/SOURCES.txt +65 -0
  34. ariadex-0.1.0/src/ariadex.egg-info/dependency_links.txt +1 -0
  35. ariadex-0.1.0/src/ariadex.egg-info/entry_points.txt +2 -0
  36. ariadex-0.1.0/src/ariadex.egg-info/requires.txt +9 -0
  37. ariadex-0.1.0/src/ariadex.egg-info/top_level.txt +1 -0
  38. ariadex-0.1.0/tests/test_active_discovery.py +141 -0
  39. ariadex-0.1.0/tests/test_adapters.py +209 -0
  40. ariadex-0.1.0/tests/test_bounded_run.py +255 -0
  41. ariadex-0.1.0/tests/test_cli.py +170 -0
  42. ariadex-0.1.0/tests/test_concurrency.py +334 -0
  43. ariadex-0.1.0/tests/test_config.py +124 -0
  44. ariadex-0.1.0/tests/test_control.py +68 -0
  45. ariadex-0.1.0/tests/test_docs_consistency.py +250 -0
  46. ariadex-0.1.0/tests/test_failure_paths.py +896 -0
  47. ariadex-0.1.0/tests/test_handoff.py +160 -0
  48. ariadex-0.1.0/tests/test_human_control.py +146 -0
  49. ariadex-0.1.0/tests/test_live_evidence.py +508 -0
  50. ariadex-0.1.0/tests/test_log_governance.py +468 -0
  51. ariadex-0.1.0/tests/test_logging.py +128 -0
  52. ariadex-0.1.0/tests/test_observability.py +524 -0
  53. ariadex-0.1.0/tests/test_operator.py +374 -0
  54. ariadex-0.1.0/tests/test_packaging.py +103 -0
  55. ariadex-0.1.0/tests/test_real_provider.py +208 -0
  56. ariadex-0.1.0/tests/test_release_readiness.py +306 -0
  57. ariadex-0.1.0/tests/test_resync.py +112 -0
  58. ariadex-0.1.0/tests/test_runner.py +393 -0
  59. ariadex-0.1.0/tests/test_spec_graph.py +395 -0
  60. ariadex-0.1.0/tests/test_state.py +72 -0
  61. ariadex-0.1.0/tests/test_status.py +63 -0
  62. ariadex-0.1.0/tests/test_takeover.py +351 -0
  63. ariadex-0.1.0/tests/test_terminal.py +89 -0
  64. ariadex-0.1.0/tests/test_tmux_integration.py +42 -0
  65. ariadex-0.1.0/tests/test_tmux_setup.py +198 -0
  66. ariadex-0.1.0/tests/test_verify.py +84 -0
  67. ariadex-0.1.0/tests/test_workflows.py +159 -0
@@ -0,0 +1,80 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. Versioning is
4
+ informative while the project is pre-release (`0.x`); the packaged version
5
+ lives in exactly one place: `src/ariadex/__init__.py` (`__version__`), and
6
+ `pyproject.toml` reads it dynamically.
7
+
8
+ ## [0.1.0] - 2026-09-12
9
+
10
+ ### Added
11
+
12
+ - PEP 517/518 packaging (`pyproject.toml`, setuptools src-layout) with
13
+ `ariadex` console entry point (`ariadex.cli:main`).
14
+ - Declared runtime: Python `>=3.11`, `PyYAML>=6`. No other runtime
15
+ dependencies.
16
+ - `ariadex --version` reporting the single-source package version.
17
+ - `LICENSE` (MIT), `SECURITY.md`, and pip/pipx/source installation docs.
18
+ - sdist/wheel build validated by installing the wheel into a clean
19
+ environment and running `ariadex --help` and `ariadex init`.
20
+
21
+ ### Scope reaffirmed
22
+
23
+ - tmux and Coding CLIs (`opencode`/`codex`) remain external host
24
+ prerequisites. Ariadex never bundles them and never calls a provider LLM
25
+ API itself.
26
+
27
+ ## [Unreleased MVP history]
28
+
29
+ - `project-foundation-and-cli`, `agent-adapters-and-tmux-driver`,
30
+ `state-driven-runner-and-handoff`,
31
+ `verification-logging-and-observability`, `human-control-and-resync`,
32
+ `tmux-auto-install`, `live-runtime-evidence` (see `HANDOFF.md` and
33
+ `openspec/specs/`).
34
+
35
+ ## [Unreleased post-MVP foundations]
36
+
37
+ - `packaging-and-distribution`, `ci-quality-security-gates`,
38
+ `human-supervision-ergonomics`, `single-runner-concurrency-and-recovery`,
39
+ `log-data-governance`, `spec-dependency-and-execution-governance`,
40
+ `metrics-export-and-notifications` (see `HANDOFF.md` and
41
+ `openspec/specs/`). Notable surface: `doctor`, `preview`, `queue`,
42
+ `history`, `resolve`/`defer`/`reopen`/`reprioritize`, `recover`,
43
+ `prune-logs`, `export-logs`, `events`, `export-events`, per-change
44
+ `depends_on` ordering, single-scheduler lease with crash recovery,
45
+ telemetry retention/redaction, and opt-in redacted notifications.
46
+
47
+ ## [Unreleased audit remediation]
48
+
49
+ - `active-spec-discovery-and-archive-isolation`: archived changes are
50
+ never scheduled as active work.
51
+ - `bounded-run-completion-and-cycle-limit`: cycle-limit exhaustion is an
52
+ explicit incomplete outcome, never success.
53
+ - `takeover-cancellation-and-scheduler-coordination`: takeover and pause
54
+ cancel in-flight scheduling without new provider input.
55
+ - `canonical-spec-and-doc-governance`: complete canonical purposes,
56
+ reconciled current/historical docs, and a consistency test.
57
+ - `real-provider-live-validation`: isolated real OpenCode/Codex lifecycle
58
+ evidence (startup, probe, interrupt, reset, termination, restart).
59
+ - `repository-identity-security-and-release-readiness`: canonical
60
+ repository `https://github.com/lileililiwen/ariadex`, issues-based
61
+ security contact, and a fail-closed release dry run
62
+ (`python -m ariadex.release --tag ...`).
63
+
64
+ ## Release guidance
65
+
66
+ 1. Bump `__version__` in `src/ariadex/__init__.py` only.
67
+ 2. Add a `CHANGELOG.md` entry under a new version heading.
68
+ 3. Build: `python3 -m build` (produces `dist/ariadex-<version>.tar.gz`
69
+ and `dist/ariadex-<version>-py3-none-any.whl`).
70
+ 4. Verify in a clean virtual environment:
71
+ `pip install dist/ariadex-<version>-py3-none-any.whl`,
72
+ then `ariadex --help` and `ariadex init` in a scratch directory.
73
+ 5. Tag the release commit (`git tag ariadex-v<version>`).
74
+ 6. Dry run (publishes nothing, must pass):
75
+ `python -m ariadex.release --tag ariadex-v<version>` checks the
76
+ canonical `origin` remote, package identity URLs, tag/version
77
+ alignment, artifacts, and the security-reporting route. Pushing the
78
+ tag runs the release workflow, which re-verifies every gate and then
79
+ publishes to PyPI via scoped trusted publishing followed by a
80
+ clean-index install check (`--version`, `init`, `status`).
ariadex-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ariadex contributors
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.
@@ -0,0 +1,2 @@
1
+ include LICENSE CHANGELOG.md SECURITY.md README.md pyproject.toml
2
+ global-exclude __pycache__ *.py[cod] *.egg-info
ariadex-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.4
2
+ Name: ariadex
3
+ Version: 0.1.0
4
+ Summary: Human-supervised runtime for long-running AI coding workflows
5
+ Author: Ariadex contributors
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/lileililiwen/ariadex
8
+ Project-URL: Security, https://github.com/lileililiwen/ariadex/blob/main/SECURITY.md
9
+ Project-URL: Changelog, https://github.com/lileililiwen/ariadex/blob/main/CHANGELOG.md
10
+ Keywords: ai,coding,orchestration,tmux
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: PyYAML>=6
24
+ Provides-Extra: dev
25
+ Requires-Dist: build==1.6.1; extra == "dev"
26
+ Requires-Dist: coverage==7.16.0; extra == "dev"
27
+ Requires-Dist: mypy==2.3.1; extra == "dev"
28
+ Requires-Dist: pip-audit==2.10.1; extra == "dev"
29
+ Requires-Dist: ruff==0.16.7; extra == "dev"
30
+ Requires-Dist: types-PyYAML==6.0.12.20260906; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # Ariadex
34
+
35
+ Human-supervised runtime for long-running AI coding workflows.
36
+
37
+ Ariadex keeps Coding CLI work moving across fresh contexts without losing unfinished work. It orchestrates OpenCode and Codex through tmux, with persistent handoffs, verification commands, and explicit human control.
38
+
39
+ ## Status
40
+
41
+ MVP, all eight post-MVP changes, and all six audit remediation fixes
42
+ are implemented, tested, archived, and committed: project foundation
43
+ and CLI, agent adapters and tmux driver, state-driven runner and
44
+ handoff, verification/logging/observability, human control and resync,
45
+ unattended tmux installation, live runtime evidence, packaging and
46
+ distribution, CI/quality/security gates, human supervision ergonomics,
47
+ single-runner concurrency and recovery, log data governance, spec
48
+ dependency and execution governance, metrics export and notifications,
49
+ active-spec discovery and archive isolation, bounded run completion and
50
+ cycle limit, takeover cancellation and scheduler coordination,
51
+ canonical spec and doc governance, real-provider live validation, and
52
+ repository identity and release readiness (505 tests, stdlib only). Three
53
+ follow-up planning changes are active; see [ROADMAP.md](ROADMAP.md) and
54
+ [HANDOFF.md](HANDOFF.md).
55
+
56
+ ## Requirements
57
+
58
+ - Python 3.11+ and PyYAML (`pip install pyyaml`)
59
+ - A Coding CLI: `opencode` or `codex` on PATH
60
+ - tmux: installed automatically on first `run`/`attach` via the system
61
+ package manager (apt-get, dnf, yum, pacman, zypper, apk, or brew),
62
+ using non-interactive `sudo` only when needed. If your host cannot
63
+ install packages, install tmux yourself or pass `--no-auto-install`
64
+ to keep the stop-before-work error.
65
+
66
+ No IDE plugins, LLM API keys, or daemons are required. Ariadex drives the
67
+ Coding CLIs you already use; it never calls a provider LLM API itself.
68
+
69
+ ## Installation
70
+
71
+ Prerequisites (never bundled, never silently downloaded as packages):
72
+
73
+ - Python 3.11+ and PyYAML (installed automatically as a dependency)
74
+ - A Coding CLI: `opencode` or `codex` on PATH
75
+ - tmux: installed automatically on first `run`/`attach` via the system
76
+ package manager, or install it yourself (see Requirements above).
77
+ Pass `--no-auto-install` to keep the stop-before-work error.
78
+
79
+ From PyPI with pipx (recommended for CLI use):
80
+
81
+ ```bash
82
+ pipx install ariadex
83
+ ariadex --help
84
+ ```
85
+
86
+ From PyPI with pip:
87
+
88
+ ```bash
89
+ pip install ariadex
90
+ ariadex --help
91
+ ```
92
+
93
+ From a source checkout (no install; uses `./ariadex` wrapper):
94
+
95
+ ```bash
96
+ git clone https://github.com/lileililiwen/ariadex.git && cd ariadex
97
+ ./ariadex --help
98
+ ```
99
+
100
+ Verify any installation in a scratch directory:
101
+
102
+ ```bash
103
+ ariadex --version
104
+ mkdir /tmp/ariadex-smoke && cd /tmp/ariadex-smoke
105
+ ariadex init
106
+ ```
107
+
108
+ See [CHANGELOG.md](CHANGELOG.md) for release notes and
109
+ [SECURITY.md](SECURITY.md) for the security contact.
110
+
111
+ ## Quickstart
112
+
113
+ ```bash
114
+ git clone https://github.com/lileililiwen/ariadex.git && cd ariadex
115
+ ./ariadex init # create .ariadex/ defaults, never overwrites
116
+ ./ariadex auto # resync from handoff+git+specs, enter AUTO, schedule
117
+ ./ariadex status # mode, agent, spec, session, unresolved, tests, next
118
+ ./ariadex attach # watch the live Coding CLI in tmux
119
+ ```
120
+
121
+ A typical session:
122
+
123
+ ```bash
124
+ ./ariadex run # execute the next durable action (requires AUTO)
125
+ ./ariadex takeover # stop automatic input, keep observing (MANUAL)
126
+ # ... edit code yourself, in tmux or your editor ...
127
+ ./ariadex auto # resync your edits, verify, resume scheduling
128
+ ./ariadex pause # stop new scheduling, leave the CLI running
129
+ ./ariadex resume # leave PAUSE, back to manual control
130
+ ```
131
+
132
+ ## How it works
133
+
134
+ ```text
135
+ Spec -> AI Session -> Handoff -> Fresh Session -> Next Spec
136
+ ```
137
+
138
+ Conversation is temporary state. The repository, specs, and handoff are
139
+ durable state:
140
+
141
+ - `.ariadex/config.yaml` — agent provider, terminal driver, context
142
+ strategy, reset mode, spec directory, handoff path, verification
143
+ commands, retry limit, blocker policy.
144
+ - `.ariadex/handoff.md` — current spec, completed work, unresolved issues
145
+ (`OPEN`/`RESOLVED`/`DEFERRED`/`BLOCKED`), next action, next spec.
146
+ - `.ariadex/state.json` — mode (`AUTO`/`MANUAL`/`PAUSE`), session,
147
+ unresolved count.
148
+ - `.ariadex/runs/` and `.ariadex/metrics.jsonl` — per-cycle logs and
149
+ metrics. Unavailable token usage is recorded as `usage: unavailable`,
150
+ never estimated.
151
+ - `.ariadex/events.jsonl` — versioned attention events (blocker,
152
+ verification failure, stale session, verified completion) plus
153
+ aggregate summaries via `ariadex events` and snapshots via
154
+ `ariadex export-events`. Notifications are opt-in, redacted,
155
+ deduplicated, and rate-limited; delivery failure is recorded locally
156
+ and never changes scheduling.
157
+
158
+ Modes define input ownership: in `AUTO` Ariadex may schedule and send
159
+ input; in `MANUAL` it only observes and logs; in `PAUSE` it starts no new
160
+ scheduling. A spec advances only when every configured verification
161
+ command exits zero; failures schedule bounded retries, then persist as
162
+ unresolved or blocked work. Nothing is ever silently discarded.
163
+
164
+ ## Commands
165
+
166
+ | Command | Effect |
167
+ | ------------------ | ------------------------------------------------------------- |
168
+ | `init` | Create `.ariadex/` defaults without overwriting existing files |
169
+ | `run [--yes] [--preview]` | Execute the next action from durable state (needs `AUTO`) |
170
+ | `auto [--yes] [--preview]` | Resync, enter `AUTO`, and resume scheduling |
171
+ | `attach` | Attach your terminal to the live tmux Coding CLI session |
172
+ | `status [--json]` | Show mode, agent, spec, session, context, elapsed, tests, next |
173
+ | `doctor [--json]` | Preflight config, provider, tmux, specs, verification, lock |
174
+ | `preview [--json]` | Show the exact next action and gate; sends no input |
175
+ | `queue [--status] [--json]` | List unresolved items and history counts |
176
+ | `history <id> [--json]` | Show an item and its transitions |
177
+ | `resolve <id>` | Mark an item RESOLVED (keeps history) |
178
+ | `defer <id> --to --reason` | Mark an item DEFERRED with target and reason |
179
+ | `reopen <id>` | Return an item to OPEN (keeps history) |
180
+ | `reprioritize <id> --priority` | Change an item priority (keeps history) |
181
+ | `recover [--json]` | Reconcile state, handoff, lock, and tmux after interruption |
182
+ | `prune-logs [--yes] [--json]` | Enforce retention/size bounds on telemetry |
183
+ | `export-logs --out [--json]` | Copy telemetry (`runs/` + `metrics.jsonl`) |
184
+ | `events [--limit] [--json]` | Show aggregate summary and recent attention events |
185
+ | `export-events --out [--json]` | Write the versioned export snapshot to a file |
186
+ | `evidence [--gate]`| Run opt-in live runtime evidence (passed/skipped/blocked) |
187
+ | `pause` | Enter `PAUSE`; the CLI session keeps running |
188
+ | `resume` | Leave `PAUSE` (valid only from `PAUSE`) |
189
+ | `takeover` | Enter `MANUAL`; automatic input stops, logs continue |
190
+ | `--no-auto-install`| Never install tmux automatically; stop if it is missing |
191
+
192
+ ## Configuration
193
+
194
+ Edit `.ariadex/config.yaml` after `init`. Key settings:
195
+
196
+ ```yaml
197
+ agent_provider: opencode # opencode | codex
198
+ terminal_driver: tmux # tmux (MVP driver)
199
+ context_strategy: per-spec # per-spec | per-task | token-threshold | manual | never
200
+ reset_mode: auto # soft | hard | auto (fresh-session strength)
201
+ verification_commands: [] # shell commands that gate completion
202
+ retry_limit: 2 # bounded verification retries
203
+ blocker_policy: stop-on-blocker # stop-on-blocker | record-and-continue
204
+ log_retention_days: 30 # telemetry age bound in days (0 keeps everything)
205
+ log_max_bytes: 10485760 # run-log size cap in bytes
206
+ metrics_max_bytes: 5242880 # metrics file cap in bytes (0 disables that cap)
207
+ notifications_enabled: false # opt-in attention signals (blocker, failure, stale, done)
208
+ notification_command: [] # argv receiving the redacted payload JSON on stdin
209
+ notification_webhook: "" # http(s) URL receiving the payload, or empty
210
+ notification_rate_limit: 5 # max deliveries per attention key per window
211
+ notification_window_seconds: 3600 # deduplication/rate-limit window
212
+ ```
213
+
214
+ Add your test/build commands to `verification_commands`; the runner
215
+ executes them in order after adapter work and advances only on full pass.
216
+
217
+ Order specs with optional per-change metadata
218
+ (`openspec/changes/<name>/.openspec.yaml`):
219
+
220
+ ```yaml
221
+ depends_on: [predecessor-change] # must be verified complete first
222
+ ```
223
+
224
+ The runner validates dependencies, rejects cycles, selects only eligible
225
+ specs, and preserves missing/cyclic/blocked reasons as unresolved work
226
+ instead of silently substituting another spec.
227
+
228
+ ## Development
229
+
230
+ ```bash
231
+ pip install -e ".[dev]" # pinned QA toolchain
232
+ python -m unittest discover -s tests # 505 tests, stdlib only
233
+ openspec validate --changes --strict --no-interactive
234
+ ruff check src tests
235
+ ruff format --check src tests
236
+ mypy src/ariadex
237
+ coverage run -m unittest discover -s tests && coverage report # gate: 82%
238
+ pip-audit --desc=on .
239
+ python -m build # sdist + wheel in dist/
240
+ ```
241
+
242
+ Every CI command above runs locally with the pinned `dev` extra. The
243
+ coverage threshold is the measured baseline: raise it, never lower it.
244
+ Bandit/pylint-style rules are intentionally out of the ruff set (they
245
+ demand behavior-affecting changes; deferred to a hardening pass).
246
+ Releases additionally require `ariadex evidence --gate` (no skips
247
+ allowed) via the tag-triggered release workflow.
248
+
249
+ See [AGENTS.md](AGENTS.md) for the OpenSpec delivery workflow (one change
250
+ at a time, two-commit handoff) and [HANDOFF.md](HANDOFF.md) for current
251
+ runtime state and verification evidence.
252
+
253
+ ## Scope boundary
254
+
255
+ Ariadex is an orchestration and lifecycle layer. It does not become an IDE,
256
+ edit code itself, call provider LLM APIs, or reimplement OpenCode, Codex,
257
+ Claude Code, or other Coding CLIs. Still deferred: native PTY driver,
258
+ additional providers, token and cost statistics, advanced retry strategies
259
+ and idle detection, and remote monitoring beyond the provider-neutral
260
+ export boundary. Shipped within the boundary: spec dependency governance,
261
+ single-scheduler crash recovery, log retention/redaction/export, and
262
+ versioned metrics with opt-in notifications.
@@ -0,0 +1,230 @@
1
+ # Ariadex
2
+
3
+ Human-supervised runtime for long-running AI coding workflows.
4
+
5
+ Ariadex keeps Coding CLI work moving across fresh contexts without losing unfinished work. It orchestrates OpenCode and Codex through tmux, with persistent handoffs, verification commands, and explicit human control.
6
+
7
+ ## Status
8
+
9
+ MVP, all eight post-MVP changes, and all six audit remediation fixes
10
+ are implemented, tested, archived, and committed: project foundation
11
+ and CLI, agent adapters and tmux driver, state-driven runner and
12
+ handoff, verification/logging/observability, human control and resync,
13
+ unattended tmux installation, live runtime evidence, packaging and
14
+ distribution, CI/quality/security gates, human supervision ergonomics,
15
+ single-runner concurrency and recovery, log data governance, spec
16
+ dependency and execution governance, metrics export and notifications,
17
+ active-spec discovery and archive isolation, bounded run completion and
18
+ cycle limit, takeover cancellation and scheduler coordination,
19
+ canonical spec and doc governance, real-provider live validation, and
20
+ repository identity and release readiness (505 tests, stdlib only). Three
21
+ follow-up planning changes are active; see [ROADMAP.md](ROADMAP.md) and
22
+ [HANDOFF.md](HANDOFF.md).
23
+
24
+ ## Requirements
25
+
26
+ - Python 3.11+ and PyYAML (`pip install pyyaml`)
27
+ - A Coding CLI: `opencode` or `codex` on PATH
28
+ - tmux: installed automatically on first `run`/`attach` via the system
29
+ package manager (apt-get, dnf, yum, pacman, zypper, apk, or brew),
30
+ using non-interactive `sudo` only when needed. If your host cannot
31
+ install packages, install tmux yourself or pass `--no-auto-install`
32
+ to keep the stop-before-work error.
33
+
34
+ No IDE plugins, LLM API keys, or daemons are required. Ariadex drives the
35
+ Coding CLIs you already use; it never calls a provider LLM API itself.
36
+
37
+ ## Installation
38
+
39
+ Prerequisites (never bundled, never silently downloaded as packages):
40
+
41
+ - Python 3.11+ and PyYAML (installed automatically as a dependency)
42
+ - A Coding CLI: `opencode` or `codex` on PATH
43
+ - tmux: installed automatically on first `run`/`attach` via the system
44
+ package manager, or install it yourself (see Requirements above).
45
+ Pass `--no-auto-install` to keep the stop-before-work error.
46
+
47
+ From PyPI with pipx (recommended for CLI use):
48
+
49
+ ```bash
50
+ pipx install ariadex
51
+ ariadex --help
52
+ ```
53
+
54
+ From PyPI with pip:
55
+
56
+ ```bash
57
+ pip install ariadex
58
+ ariadex --help
59
+ ```
60
+
61
+ From a source checkout (no install; uses `./ariadex` wrapper):
62
+
63
+ ```bash
64
+ git clone https://github.com/lileililiwen/ariadex.git && cd ariadex
65
+ ./ariadex --help
66
+ ```
67
+
68
+ Verify any installation in a scratch directory:
69
+
70
+ ```bash
71
+ ariadex --version
72
+ mkdir /tmp/ariadex-smoke && cd /tmp/ariadex-smoke
73
+ ariadex init
74
+ ```
75
+
76
+ See [CHANGELOG.md](CHANGELOG.md) for release notes and
77
+ [SECURITY.md](SECURITY.md) for the security contact.
78
+
79
+ ## Quickstart
80
+
81
+ ```bash
82
+ git clone https://github.com/lileililiwen/ariadex.git && cd ariadex
83
+ ./ariadex init # create .ariadex/ defaults, never overwrites
84
+ ./ariadex auto # resync from handoff+git+specs, enter AUTO, schedule
85
+ ./ariadex status # mode, agent, spec, session, unresolved, tests, next
86
+ ./ariadex attach # watch the live Coding CLI in tmux
87
+ ```
88
+
89
+ A typical session:
90
+
91
+ ```bash
92
+ ./ariadex run # execute the next durable action (requires AUTO)
93
+ ./ariadex takeover # stop automatic input, keep observing (MANUAL)
94
+ # ... edit code yourself, in tmux or your editor ...
95
+ ./ariadex auto # resync your edits, verify, resume scheduling
96
+ ./ariadex pause # stop new scheduling, leave the CLI running
97
+ ./ariadex resume # leave PAUSE, back to manual control
98
+ ```
99
+
100
+ ## How it works
101
+
102
+ ```text
103
+ Spec -> AI Session -> Handoff -> Fresh Session -> Next Spec
104
+ ```
105
+
106
+ Conversation is temporary state. The repository, specs, and handoff are
107
+ durable state:
108
+
109
+ - `.ariadex/config.yaml` — agent provider, terminal driver, context
110
+ strategy, reset mode, spec directory, handoff path, verification
111
+ commands, retry limit, blocker policy.
112
+ - `.ariadex/handoff.md` — current spec, completed work, unresolved issues
113
+ (`OPEN`/`RESOLVED`/`DEFERRED`/`BLOCKED`), next action, next spec.
114
+ - `.ariadex/state.json` — mode (`AUTO`/`MANUAL`/`PAUSE`), session,
115
+ unresolved count.
116
+ - `.ariadex/runs/` and `.ariadex/metrics.jsonl` — per-cycle logs and
117
+ metrics. Unavailable token usage is recorded as `usage: unavailable`,
118
+ never estimated.
119
+ - `.ariadex/events.jsonl` — versioned attention events (blocker,
120
+ verification failure, stale session, verified completion) plus
121
+ aggregate summaries via `ariadex events` and snapshots via
122
+ `ariadex export-events`. Notifications are opt-in, redacted,
123
+ deduplicated, and rate-limited; delivery failure is recorded locally
124
+ and never changes scheduling.
125
+
126
+ Modes define input ownership: in `AUTO` Ariadex may schedule and send
127
+ input; in `MANUAL` it only observes and logs; in `PAUSE` it starts no new
128
+ scheduling. A spec advances only when every configured verification
129
+ command exits zero; failures schedule bounded retries, then persist as
130
+ unresolved or blocked work. Nothing is ever silently discarded.
131
+
132
+ ## Commands
133
+
134
+ | Command | Effect |
135
+ | ------------------ | ------------------------------------------------------------- |
136
+ | `init` | Create `.ariadex/` defaults without overwriting existing files |
137
+ | `run [--yes] [--preview]` | Execute the next action from durable state (needs `AUTO`) |
138
+ | `auto [--yes] [--preview]` | Resync, enter `AUTO`, and resume scheduling |
139
+ | `attach` | Attach your terminal to the live tmux Coding CLI session |
140
+ | `status [--json]` | Show mode, agent, spec, session, context, elapsed, tests, next |
141
+ | `doctor [--json]` | Preflight config, provider, tmux, specs, verification, lock |
142
+ | `preview [--json]` | Show the exact next action and gate; sends no input |
143
+ | `queue [--status] [--json]` | List unresolved items and history counts |
144
+ | `history <id> [--json]` | Show an item and its transitions |
145
+ | `resolve <id>` | Mark an item RESOLVED (keeps history) |
146
+ | `defer <id> --to --reason` | Mark an item DEFERRED with target and reason |
147
+ | `reopen <id>` | Return an item to OPEN (keeps history) |
148
+ | `reprioritize <id> --priority` | Change an item priority (keeps history) |
149
+ | `recover [--json]` | Reconcile state, handoff, lock, and tmux after interruption |
150
+ | `prune-logs [--yes] [--json]` | Enforce retention/size bounds on telemetry |
151
+ | `export-logs --out [--json]` | Copy telemetry (`runs/` + `metrics.jsonl`) |
152
+ | `events [--limit] [--json]` | Show aggregate summary and recent attention events |
153
+ | `export-events --out [--json]` | Write the versioned export snapshot to a file |
154
+ | `evidence [--gate]`| Run opt-in live runtime evidence (passed/skipped/blocked) |
155
+ | `pause` | Enter `PAUSE`; the CLI session keeps running |
156
+ | `resume` | Leave `PAUSE` (valid only from `PAUSE`) |
157
+ | `takeover` | Enter `MANUAL`; automatic input stops, logs continue |
158
+ | `--no-auto-install`| Never install tmux automatically; stop if it is missing |
159
+
160
+ ## Configuration
161
+
162
+ Edit `.ariadex/config.yaml` after `init`. Key settings:
163
+
164
+ ```yaml
165
+ agent_provider: opencode # opencode | codex
166
+ terminal_driver: tmux # tmux (MVP driver)
167
+ context_strategy: per-spec # per-spec | per-task | token-threshold | manual | never
168
+ reset_mode: auto # soft | hard | auto (fresh-session strength)
169
+ verification_commands: [] # shell commands that gate completion
170
+ retry_limit: 2 # bounded verification retries
171
+ blocker_policy: stop-on-blocker # stop-on-blocker | record-and-continue
172
+ log_retention_days: 30 # telemetry age bound in days (0 keeps everything)
173
+ log_max_bytes: 10485760 # run-log size cap in bytes
174
+ metrics_max_bytes: 5242880 # metrics file cap in bytes (0 disables that cap)
175
+ notifications_enabled: false # opt-in attention signals (blocker, failure, stale, done)
176
+ notification_command: [] # argv receiving the redacted payload JSON on stdin
177
+ notification_webhook: "" # http(s) URL receiving the payload, or empty
178
+ notification_rate_limit: 5 # max deliveries per attention key per window
179
+ notification_window_seconds: 3600 # deduplication/rate-limit window
180
+ ```
181
+
182
+ Add your test/build commands to `verification_commands`; the runner
183
+ executes them in order after adapter work and advances only on full pass.
184
+
185
+ Order specs with optional per-change metadata
186
+ (`openspec/changes/<name>/.openspec.yaml`):
187
+
188
+ ```yaml
189
+ depends_on: [predecessor-change] # must be verified complete first
190
+ ```
191
+
192
+ The runner validates dependencies, rejects cycles, selects only eligible
193
+ specs, and preserves missing/cyclic/blocked reasons as unresolved work
194
+ instead of silently substituting another spec.
195
+
196
+ ## Development
197
+
198
+ ```bash
199
+ pip install -e ".[dev]" # pinned QA toolchain
200
+ python -m unittest discover -s tests # 505 tests, stdlib only
201
+ openspec validate --changes --strict --no-interactive
202
+ ruff check src tests
203
+ ruff format --check src tests
204
+ mypy src/ariadex
205
+ coverage run -m unittest discover -s tests && coverage report # gate: 82%
206
+ pip-audit --desc=on .
207
+ python -m build # sdist + wheel in dist/
208
+ ```
209
+
210
+ Every CI command above runs locally with the pinned `dev` extra. The
211
+ coverage threshold is the measured baseline: raise it, never lower it.
212
+ Bandit/pylint-style rules are intentionally out of the ruff set (they
213
+ demand behavior-affecting changes; deferred to a hardening pass).
214
+ Releases additionally require `ariadex evidence --gate` (no skips
215
+ allowed) via the tag-triggered release workflow.
216
+
217
+ See [AGENTS.md](AGENTS.md) for the OpenSpec delivery workflow (one change
218
+ at a time, two-commit handoff) and [HANDOFF.md](HANDOFF.md) for current
219
+ runtime state and verification evidence.
220
+
221
+ ## Scope boundary
222
+
223
+ Ariadex is an orchestration and lifecycle layer. It does not become an IDE,
224
+ edit code itself, call provider LLM APIs, or reimplement OpenCode, Codex,
225
+ Claude Code, or other Coding CLIs. Still deferred: native PTY driver,
226
+ additional providers, token and cost statistics, advanced retry strategies
227
+ and idle detection, and remote monitoring beyond the provider-neutral
228
+ export boundary. Shipped within the boundary: spec dependency governance,
229
+ single-scheduler crash recovery, log retention/redaction/export, and
230
+ versioned metrics with opt-in notifications.
@@ -0,0 +1,63 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ Only the latest tagged release (currently `0.1.0`) receives security fixes.
6
+ Pre-release `0.x` versions are supported on a best-effort basis.
7
+
8
+ ## Scope notes
9
+
10
+ - Ariadex orchestrates Coding CLIs you already run; it never calls a
11
+ provider LLM API itself and stores no API keys.
12
+ - tmux and provider CLIs (`opencode`/`codex`) are external host
13
+ prerequisites, never bundled artifacts.
14
+ - `.ariadex/runs/` logs and `metrics.jsonl` may contain shell output from
15
+ your own commands. Review them before sharing.
16
+
17
+ ## Sensitive data handling
18
+
19
+ - Run logs and metrics are redacted before persistence: OpenAI-style
20
+ keys, AWS access keys, PEM private-key blocks, `password=`/`token=`
21
+ assignments, `Bearer` tokens, GitHub (`ghp_`/`gho_`/`github_pat_`) and
22
+ GitLab (`glpat-`) tokens, Slack tokens, JWTs, and AWS secret fields are
23
+ replaced with `<redacted>`. Only the redaction count is recorded
24
+ (`redactions:` in logs, `redactions` in metrics); matched values are
25
+ never stored.
26
+ - Redaction is heuristic, not a guarantee. Treat logs as sensitive,
27
+ review `export-logs` output before sharing, and rotate any credential
28
+ that touched a prompt or shell output.
29
+ - Telemetry files use restrictive permissions where supported (directories
30
+ `0700`, files `0600`). On Windows, POSIX modes do not apply and `doctor`
31
+ reports the platform fallback; Windows ACLs govern access instead.
32
+
33
+ ## Retention, backup, and recovery
34
+
35
+ - Retention is explicit and bounded via `log_retention_days` (default 30,
36
+ `0` keeps everything), `log_max_bytes` (default 10485760), and
37
+ `metrics_max_bytes` (default 5242880, `0` disables that cap). Bounds are
38
+ enforced after every cycle and on demand via `ariadex prune-logs`
39
+ (confirmation required for interactive use; `--yes` skips the prompt).
40
+ - `prune-logs` and size rotation remove only telemetry under
41
+ `.ariadex/runs/` and `metrics.jsonl`, oldest first, and report what was
42
+ removed or retained. Handoff history (`.ariadex/handoff.md`), state,
43
+ config, and lock files are never touched; deletion never claims work
44
+ was undone.
45
+ - `ariadex export-logs --out DIR` copies telemetry only into `DIR`,
46
+ refusing when the payload exceeds `--max-bytes` (default 52428800) so an
47
+ unbounded export cannot fill the disk. Back up `DIR` with your usual
48
+ tools; to recover, copy the files back and run `ariadex doctor` and
49
+ `ariadex recover` to reconcile state before resuming.
50
+
51
+ ## Reporting a vulnerability
52
+
53
+ Open a GitHub issue at <https://github.com/lileililiwen/ariadex/issues>
54
+ with the `security` label, or contact the maintainers through the same
55
+ tracker. Include:
56
+
57
+ - affected version (`ariadex --version`)
58
+ - steps to reproduce
59
+ - impact assessment, if known
60
+
61
+ Do not include secrets, API keys, or private log contents in the report.
62
+ Maintainers will acknowledge receipt, assess, and publish a fix with a
63
+ `CHANGELOG.md` entry.