@jxtools/atlas 3.0.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.
package/README.md ADDED
@@ -0,0 +1,280 @@
1
+ <p align="center">
2
+ <h1 align="center">ATLAS</h1>
3
+ <p align="center"><strong>Autonomous Task Loop Agent System</strong></p>
4
+ <p align="center">
5
+ <em>Let AI coding agents work through your backlog while you focus on what matters</em>
6
+ </p>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="#install">Install</a> •
11
+ <a href="#quick-start">Quick Start</a> •
12
+ <a href="#commands">Commands</a> •
13
+ <a href="#how-it-works">How It Works</a> •
14
+ <a href="#configuration">Configuration</a>
15
+ </p>
16
+
17
+ ---
18
+
19
+ ## What is Atlas?
20
+
21
+ Atlas is an **A**utonomous **T**ask **L**oop **A**gent **S**ystem that processes tasks from a markdown backlog using AI coding agents. You define what needs to be done, Atlas handles everything else: branches, code, quality checks, PRs, and merges.
22
+
23
+ ---
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ npm install -g @jxtools/atlas
29
+ ```
30
+
31
+ ### Requirements
32
+
33
+ - **Node.js 18+** (for npm installation)
34
+ - **AI Provider** (at least one):
35
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (default, recommended)
36
+ - [OpenCode](https://opencode.ai)
37
+ - [Codex](https://github.com/openai/codex)
38
+ - **Git** (optional - enables branches, PRs, and commits)
39
+
40
+ ### AI Provider Configuration
41
+
42
+ Atlas supports multiple AI providers:
43
+
44
+ | Provider | Flag | Documentation |
45
+ |----------|------|---------------|
46
+ | Claude Code (default) | `--cli claudecode` | [docs.anthropic.com/claude-code](https://docs.anthropic.com/claude-code) |
47
+ | OpenCode | `--cli opencode` | [opencode.ai/docs](https://opencode.ai/docs) |
48
+ | Codex (OpenAI) | `--cli codex` | [developers.openai.com/codex/cli](https://developers.openai.com/codex/cli) |
49
+
50
+ ```bash
51
+ # Use Claude Code (default)
52
+ atlas 25
53
+
54
+ # Use OpenCode
55
+ atlas --cli opencode 25
56
+
57
+ # Use Codex
58
+ atlas --cli codex 25
59
+
60
+ # Or set environment variable (persists across sessions)
61
+ export ATLAS_CLI=codex
62
+ atlas 25
63
+ ```
64
+
65
+ **Recommendation**: Use Claude Code for `atlas plan` (interactive mode works best). For autonomous execution (`atlas [N]`), any provider works.
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ```bash
72
+ cd your-project
73
+ atlas init
74
+
75
+ # Recommended flow (AI plans + executes)
76
+ atlas plan "add user authentication with JWT"
77
+ atlas 5
78
+ ```
79
+
80
+ If you prefer manual planning, you can still edit `.atlas/backlog.md` directly:
81
+
82
+ ```bash
83
+ # Manual flow (you write tasks)
84
+ # Edit .atlas/backlog.md with your tasks
85
+ atlas
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Commands
91
+
92
+ | Command | Description |
93
+ |---------|-------------|
94
+ | `atlas init` | Initialize `.atlas/` in current project |
95
+ | `atlas plan "..."` | Interactive feature planning (interview -> spec -> tasks) |
96
+ | `atlas [N]` | Run N iterations autonomously (default: 25) |
97
+ | `atlas review [--dry-run]` | Audit Atlas state and auto-fix inconsistencies (or report only with dry-run) |
98
+ | `atlas resume [N]` | Resume an interrupted session from its active integration branch/PR |
99
+ | `atlas clean [--all]` | Clean runtime artifacts from `.atlas/` |
100
+ | `atlas status` | Show task counts and active session info |
101
+ | `atlas doctor` | Check Atlas installation and dependencies |
102
+ | `atlas update` | Show how to update via NPM |
103
+ | `atlas help` | Show help |
104
+
105
+ ---
106
+
107
+ ## Planning Mode
108
+
109
+ For complex features, use `atlas plan` to interview and decompose before autonomous execution:
110
+
111
+ ```bash
112
+ atlas plan "add user authentication with JWT"
113
+ # -> Interactive interview about requirements
114
+ # -> Generates spec in .atlas/specs/
115
+ # -> Creates tasks in backlog with **Spec:** field
116
+
117
+ atlas 5
118
+ # -> Executes 5 tasks autonomously (no human intervention)
119
+ # -> Each task reads the full spec for context (integral view)
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Resuming Sessions
125
+
126
+ If Atlas is interrupted (quota limit, error, Ctrl+C), resume with:
127
+
128
+ ```bash
129
+ atlas resume # Continue with default iterations
130
+ atlas resume 5 # Continue with 5 iterations
131
+ ```
132
+
133
+ Resume will:
134
+ 1. Find the active integration branch
135
+ 2. Verify PR is not merged/closed
136
+ 3. Continue processing tasks from backlog
137
+
138
+ ---
139
+
140
+ ## Reviewing Work
141
+
142
+ After Atlas completes (or is interrupted), audit and fix issues:
143
+
144
+ ```bash
145
+ atlas review # Detect and auto-fix issues
146
+ atlas review --dry-run # Report only, no changes
147
+ atlas --cli opencode review --dry-run # Same, using OpenCode
148
+ ```
149
+
150
+ Review checks for:
151
+ - Tasks stuck in wrong state (multiple IN_PROGRESS, etc.)
152
+ - Orphaned PRs not merged to integration
153
+ - Backlog out of sync with merged PRs
154
+ - Uncommitted changes and unpushed commits
155
+
156
+ Auto-fixes safe issues and reports those requiring manual intervention.
157
+
158
+ ---
159
+
160
+ ## Cleaning Runtime Files
161
+
162
+ Use `clean` to remove local runtime artifacts:
163
+
164
+ ```bash
165
+ atlas clean # Remove .atlas/runs/*.log and temporary files
166
+ atlas clean --all # Also reset activity/errors logs and stale session metadata
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Configuration
172
+
173
+ Override defaults with `ATLAS_` environment variables:
174
+
175
+ ```bash
176
+ export ATLAS_CLI=claudecode # AI provider: claudecode (default), opencode, or codex
177
+ export ATLAS_MAX_ITERATIONS=25 # Max iterations per run
178
+ export ATLAS_TIMEOUT=1200 # Timeout per iteration (seconds)
179
+ export ATLAS_STALE_SECONDS=7200 # Reset stuck tasks (seconds, 0 to disable)
180
+ export ATLAS_DEFAULT_BRANCH=main # Override auto-detected default branch
181
+ export ATLAS_NOTIFY_TELEGRAM=true # Enable Telegram notifications
182
+ export ATLAS_TELEGRAM_BOT="token" # Telegram bot token
183
+ export ATLAS_TELEGRAM_CHAT="id" # Telegram chat ID
184
+ ```
185
+
186
+ ---
187
+
188
+ ## How It Works
189
+
190
+ ```
191
+ for each iteration:
192
+ 1. Resume task in IN_PROGRESS, or pick first from TODO
193
+ 2. [git] Create branch from integration: [type]/[TASK_ID]-[description]
194
+ 3. Move to IN_PROGRESS [git: + commit]
195
+ 4. Implement task
196
+ 5. Run quality gates (from CLAUDE.md)
197
+ 6. [git] Create PR -> merge (squash) to integration branch
198
+ 7. Move to DONE [git: + commit]
199
+ 8. Write to progress.txt and guardrails.md
200
+ 9. If error -> log to errors.log, move back to TODO
201
+ 10. If no tasks -> exit loop
202
+ ```
203
+
204
+ **Modes:**
205
+ - **Git mode** (default): Creates integration branch, PRs merge there, human reviews before main
206
+ - **Local mode**: Works without git - changes stay in working directory
207
+
208
+ **Features:**
209
+ - Context files pre-loaded (backlog, guardrails, progress, CLAUDE.md)
210
+ - Commits state changes immediately (crash recovery) [git mode]
211
+ - Stale tasks auto-reset to TODO after timeout
212
+
213
+ ---
214
+
215
+ ## Backlog Format
216
+
217
+ ```markdown
218
+ ## TODO
219
+ ### HIGH-001: Task title
220
+ - **Category:** feature
221
+ - **Description:** What needs to be done
222
+
223
+ ## IN_PROGRESS
224
+
225
+ ## DONE
226
+ ### HIGH-000: Completed task
227
+ - **Completed:** 2026-01-15
228
+ - **PR:** #1
229
+
230
+ ## DELAYED
231
+ ### LOW-001: Blocked task
232
+ - **Reason:** Why it's blocked
233
+ ```
234
+
235
+ ---
236
+
237
+ ## Project Structure
238
+
239
+ After `atlas init` (`specs/` appears after `atlas plan`):
240
+
241
+ ```
242
+ your-project/
243
+ ├── CLAUDE.md # Project rules + quality gates (you create this)
244
+ └── .atlas/
245
+ ├── backlog.md # Task list
246
+ ├── progress.txt # Learnings from completed tasks
247
+ ├── guardrails.md # Rules from past errors
248
+ ├── errors.log # Failure log
249
+ ├── activity.log # Run history
250
+ ├── specs/ # Feature specs (created by atlas plan)
251
+ └── runs/ # Iteration logs
252
+ ```
253
+
254
+ ---
255
+
256
+ ## Quality Gates
257
+
258
+ Define in your project's `CLAUDE.md`:
259
+
260
+ ```markdown
261
+ ## Quality Gates
262
+ - `npm run build` must pass
263
+ - `npm test` must pass
264
+ ```
265
+
266
+ Atlas reads CLAUDE.md before each task.
267
+
268
+ ---
269
+
270
+ ## Update
271
+
272
+ ```bash
273
+ npm update -g @jxtools/atlas
274
+ ```
275
+
276
+ ---
277
+
278
+ ## License
279
+
280
+ ISC