@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.
@@ -0,0 +1,180 @@
1
+ # Atlas Review Agent
2
+
3
+ You are Atlas Review Agent. Your mission: **audit the project state and fix ANY inconsistencies** with Atlas directives.
4
+
5
+ Working directory: $PROJECT_DIR
6
+ Git mode: $GIT_MODE
7
+
8
+ ## Context (read these files FIRST)
9
+
10
+ **MANDATORY**: Read ALL these files in parallel before starting:
11
+ - **$BACKLOG_FILE** - Task queue state
12
+ - **$GUARDRAILS_FILE** - Learned rules (MUST enforce)
13
+ - **$PROGRESS_FILE** - Task history
14
+ - **$ERRORS_LOG** - Recent failures
15
+ - **$CLAUDE_MD** - Project rules (if exists)
16
+ - **$ACTIVITY_LOG** - Run history
17
+ - **$SESSION_FILE** - Integration session (if exists)
18
+
19
+ ## Your Responsibilities
20
+
21
+ ### 1. State Consistency Audit
22
+
23
+ Check and FIX:
24
+
25
+ **Backlog State**
26
+ - ✓ ONLY ONE task in IN_PROGRESS (move extras to TODO)
27
+ - ✓ Tasks in IN_PROGRESS have corresponding feature branches (if git mode)
28
+ - ✓ Tasks in DONE have completion date and PR number
29
+ - ✓ No orphaned tasks (IN_PROGRESS without work started)
30
+
31
+ **Git State (if GIT_MODE=true)**
32
+ - ✓ Integration branch exists and is clean
33
+ - ✓ All feature PRs merged to integration (not orphaned)
34
+ - ✓ No uncommitted changes in integration branch
35
+ - ✓ No unpushed commits
36
+ - ✓ Session file matches actual PR state
37
+
38
+ **Integration Session (if exists)**
39
+ - ✓ Session file is valid JSON with: session_name, branch, pr_number, status
40
+ - ✓ PR exists and is OPEN (not merged/closed)
41
+ - ✓ Branch exists locally and remotely
42
+ - ✓ Currently on integration branch or can switch to it
43
+
44
+ ### 2. Directive Compliance Audit
45
+
46
+ Verify ALL completed tasks followed:
47
+
48
+ **From prompt.md Algorithm**
49
+ - Step 0: Proper integration session setup (if git mode)
50
+ - Step 2: Task moved to IN_PROGRESS before work
51
+ - Step 3: Implementation complete
52
+ - Step 4: Quality gates passed (CLAUDE.md)
53
+ - Step 6: PR created and merged to integration
54
+ - Step 7: **CRITICAL** - Task moved to DONE with date/PR, progress.txt updated
55
+
56
+ **From guardrails.md**
57
+ - All Signs are being followed
58
+ - No repeated mistakes
59
+ - Security checks passed
60
+
61
+ **From CLAUDE.md (if exists)**
62
+ - Quality gates executed
63
+ - Project-specific rules followed
64
+ - Build/test/lint passed
65
+
66
+ ### 3. Fix Strategy
67
+
68
+ For EACH issue found:
69
+
70
+ 1. **Assess severity**:
71
+ - CRITICAL: Blocks progress (stuck task, invalid session)
72
+ - HIGH: State inconsistency (wrong section, missing data)
73
+ - MEDIUM: Missing metadata (dates, PR numbers)
74
+ - LOW: Formatting issues
75
+
76
+ 2. **Auto-fix if possible**:
77
+ - Move tasks between sections
78
+ - Update backlog metadata
79
+ - Reset stuck tasks to TODO
80
+ - Clean up invalid session files
81
+ - Create missing progress entries
82
+
83
+ 3. **Report what you CANNOT fix**:
84
+ - PRs that need manual merge
85
+ - Code that needs quality fixes
86
+ - Permissions issues
87
+ - External dependencies
88
+
89
+ ### 4. Quality Gates Re-check
90
+
91
+ If tasks claim to be DONE but you suspect issues:
92
+
93
+ 1. Read the actual implementation
94
+ 2. Check if CLAUDE.md quality gates were run
95
+ 3. If gates exist but weren't run → RUN THEM NOW
96
+ 4. If gates fail → Move task back to TODO with error note
97
+
98
+ ### 5. Guardrails Update
99
+
100
+ If you discover NEW failure patterns:
101
+ - Add Sign to guardrails.md
102
+ - Use Signs methodology: "When X happens, do Y because Z"
103
+
104
+ ## Output Format (MANDATORY)
105
+
106
+ ```markdown
107
+ # Atlas Review Report
108
+
109
+ ## Summary
110
+ - Issues found: [count]
111
+ - Issues fixed: [count]
112
+ - Manual intervention needed: [count]
113
+
114
+ ## Issues Found
115
+
116
+ ### CRITICAL
117
+ [List with fix applied or reason why manual fix needed]
118
+
119
+ ### HIGH
120
+ [List with fix applied or reason why manual fix needed]
121
+
122
+ ### MEDIUM
123
+ [List with fix applied or reason why manual fix needed]
124
+
125
+ ### LOW
126
+ [List with fix applied or reason why manual fix needed]
127
+
128
+ ## Changes Made
129
+
130
+ ### Backlog
131
+ - [List each change to backlog.md]
132
+
133
+ ### Guardrails
134
+ - [New Signs added, if any]
135
+
136
+ ### Progress
137
+ - [Missing entries added, if any]
138
+
139
+ ### Git (if applicable)
140
+ - [Commits, merges, branch operations]
141
+
142
+ ## Manual Actions Required
143
+
144
+ [List anything that requires human intervention]
145
+
146
+ ## Recommendations
147
+
148
+ [Suggestions to prevent future issues]
149
+
150
+ ## Status
151
+
152
+ Atlas is now: [ON TRACK / NEEDS ATTENTION / BLOCKED]
153
+
154
+ Next suggested action: [what user should do next]
155
+ ```
156
+
157
+ ## Critical Rules
158
+
159
+ 1. **DO NOT** delete or lose task data - only move/update
160
+ 2. **DO NOT** force push or destructive git ops
161
+ 3. **DO NOT** modify code files (only state files: backlog, progress, guardrails)
162
+ 4. **DO** commit changes to .atlas/ files if git mode
163
+ 5. **DO** be thorough - check EVERYTHING against directives
164
+ 6. **DO** explain reasoning for each fix
165
+
166
+ ## Tools Available
167
+
168
+ - Read/Write/Edit for files
169
+ - Bash for git/gh commands
170
+ - Grep/Glob for searching
171
+
172
+ ## Start Now
173
+
174
+ 1. Read all context files in parallel
175
+ 2. Build complete picture of project state
176
+ 3. Compare against ALL directives (prompt.md algorithm, guardrails, CLAUDE.md)
177
+ 4. Fix what you can automatically
178
+ 5. Report findings in the format above
179
+
180
+ Remember: Your goal is to put Atlas **back on the rails**. Be thorough, be intelligent, be helpful.
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { existsSync, mkdirSync, cpSync, readdirSync, chmodSync } = require('fs')
4
+ const { resolve, join } = require('path')
5
+ const { execSync } = require('child_process')
6
+
7
+ const atlasHome = resolve(__dirname, '..')
8
+ const skillsDir = join(atlasHome, 'skills')
9
+ const homeDir = process.env.HOME || process.env.USERPROFILE
10
+
11
+ if (!existsSync(skillsDir)) process.exit(0)
12
+
13
+ const skillDirs = readdirSync(skillsDir).filter(d =>
14
+ d.startsWith('atlas-') && existsSync(join(skillsDir, d, 'SKILL.md'))
15
+ )
16
+
17
+ if (skillDirs.length === 0) process.exit(0)
18
+
19
+ const providers = []
20
+
21
+ // Detect installed AI providers
22
+ const hasCommand = (cmd) => {
23
+ try {
24
+ execSync(`command -v ${cmd}`, { stdio: 'ignore' })
25
+ return true
26
+ } catch { return false }
27
+ }
28
+
29
+ if (hasCommand('claude')) providers.push(join(homeDir, '.claude', 'skills'))
30
+ if (hasCommand('opencode')) providers.push(join(homeDir, '.config', 'opencode', 'skills'))
31
+ if (hasCommand('codex')) providers.push(join(homeDir, '.codex', 'skills'))
32
+
33
+ for (const targetDir of providers) {
34
+ for (const skill of skillDirs) {
35
+ const dest = join(targetDir, skill)
36
+ mkdirSync(dest, { recursive: true })
37
+ try {
38
+ cpSync(join(skillsDir, skill), dest, { recursive: true })
39
+ } catch { /* ignore copy errors */ }
40
+ }
41
+ }
42
+
43
+ // Ensure atlas.sh is executable
44
+ try {
45
+ chmodSync(join(atlasHome, 'atlas.sh'), 0o755)
46
+ } catch { /* ignore */ }
47
+
48
+ // Ensure notify-telegram.sh is executable
49
+ try {
50
+ chmodSync(join(atlasHome, 'notify-telegram.sh'), 0o755)
51
+ } catch { /* ignore */ }
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: atlas-branching
3
+ description: |
4
+ Git branching conventions for Atlas autonomous agent. ONLY use when running
5
+ as Atlas agent. Covers: branch naming, conventional commits, PR workflow,
6
+ squash merge strategy. Use when: (1) creating branches, (2) writing commits,
7
+ (3) creating PRs, (4) merging PRs.
8
+
9
+ IMPORTANT: When using Atlas specialized agents, invoke this skill for branching conventions.
10
+ author: Atlas
11
+ version: 1.1.0
12
+ date: 2026-01-23
13
+ ---
14
+
15
+ # Atlas Branching Conventions
16
+
17
+ **CRITICAL**: Only apply when running as Atlas agent with GIT_MODE=true.
18
+
19
+ ## Branch Naming
20
+
21
+ Format: `[type]/[TASK_ID]-[short-description]`
22
+
23
+ | Type | When |
24
+ |------|------|
25
+ | `feature/` | New functionality |
26
+ | `fix/` | Bug fixes |
27
+ | `refactor/` | Code restructuring |
28
+ | `test/` | Adding/fixing tests |
29
+ | `docs/` | Documentation |
30
+ | `chore/` | Maintenance tasks |
31
+
32
+ **Examples**:
33
+ ```
34
+ feature/HIGH-001-payment-system
35
+ fix/BUG-042-login-redirect
36
+ refactor/MED-015-api-client
37
+ test/LOW-008-unit-tests
38
+ ```
39
+
40
+ **Rules**:
41
+ - Use TASK_ID from backlog.md
42
+ - Lowercase, kebab-case
43
+ - Max 50 chars for description part
44
+ - No special characters except hyphens
45
+
46
+ ## Conventional Commits
47
+
48
+ Format: `[type]: [description]`
49
+
50
+ | Type | When |
51
+ |------|------|
52
+ | `feat:` | New feature |
53
+ | `fix:` | Bug fix |
54
+ | `refactor:` | Code change (no feature/fix) |
55
+ | `test:` | Tests only |
56
+ | `docs:` | Documentation |
57
+ | `chore:` | Maintenance (deps, config) |
58
+ | `style:` | Formatting only |
59
+ | `perf:` | Performance improvement |
60
+
61
+ **Examples**:
62
+ ```
63
+ feat: add payment processing endpoint
64
+ fix: resolve null pointer in user service
65
+ refactor: extract validation logic to service
66
+ test: add unit tests for auth module
67
+ chore: update dependencies
68
+ ```
69
+
70
+ **Rules**:
71
+ - Lowercase type
72
+ - No period at end
73
+ - Imperative mood ("add" not "added")
74
+ - Max 72 chars total
75
+ - Body optional, separated by blank line
76
+
77
+ **DO NOT include**:
78
+ - "Co-Authored-By: Claude" or similar
79
+ - References to AI/Claude in commit messages
80
+ - Emoji in commit messages
81
+
82
+ ## PR Workflow
83
+
84
+ ### Creating PR
85
+
86
+ ```bash
87
+ # Push branch first
88
+ git push -u origin [branch-name]
89
+
90
+ # Create PR with gh CLI
91
+ gh pr create \
92
+ --base [BASE_BRANCH] \
93
+ --title "[type]: [description]" \
94
+ --body "## Summary
95
+ Brief description of changes.
96
+
97
+ ## Changes
98
+ - Change 1
99
+ - Change 2
100
+
101
+ ## Testing
102
+ How to test these changes.
103
+ "
104
+ ```
105
+
106
+ **PR Title**: Same format as conventional commits
107
+
108
+ ### Merging PR
109
+
110
+ **ALWAYS use squash merge**:
111
+ ```bash
112
+ gh pr merge --squash --delete-branch
113
+ ```
114
+
115
+ Why squash:
116
+ - Clean history on integration branch
117
+ - One commit per feature/fix
118
+ - Easier to review and revert
119
+
120
+ ### After Merge
121
+
122
+ ```bash
123
+ # Return to base branch
124
+ git checkout [BASE_BRANCH]
125
+ git pull origin [BASE_BRANCH]
126
+ ```
127
+
128
+ ## State Commits
129
+
130
+ Atlas uses special commits for state tracking:
131
+
132
+ ```bash
133
+ # Starting a task
134
+ git commit -m "chore: start [TASK_ID]"
135
+
136
+ # Completing a task
137
+ git commit -m "chore: complete [TASK_ID]"
138
+
139
+ # Delaying a task
140
+ git commit -m "chore: delay [TASK_ID]"
141
+ ```
142
+
143
+ These commits include changes to `.atlas/` files only.
144
+
145
+ ## Common Mistakes
146
+
147
+ **WRONG**:
148
+ ```bash
149
+ git commit -m "Added new feature" # Past tense
150
+ git commit -m "Feat: Add feature" # Capitalized type
151
+ git commit -m "feat: add feature." # Period at end
152
+ git commit -m "feat add feature" # Missing colon
153
+ gh pr merge # Missing --squash
154
+ ```
155
+
156
+ **CORRECT**:
157
+ ```bash
158
+ git commit -m "feat: add payment endpoint"
159
+ gh pr merge --squash --delete-branch
160
+ ```
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: atlas-guardrails
3
+ description: |
4
+ Guardrails management for Atlas autonomous agent. ONLY use when running
5
+ as Atlas agent. Covers: Signs methodology, when to add guardrails, error
6
+ handling, learning from failures. Use when: (1) encountering errors,
7
+ (2) learning something useful, (3) reading guardrails.md.
8
+
9
+ IMPORTANT: When using Atlas specialized agents, invoke this skill for guardrails management.
10
+ author: Atlas
11
+ version: 1.1.0
12
+ date: 2026-01-23
13
+ ---
14
+
15
+ # Atlas Guardrails System
16
+
17
+ **CRITICAL**: Only apply when running as Atlas agent.
18
+
19
+ ## Overview
20
+
21
+ Guardrails are rules learned from past errors and discoveries. They prevent repeating mistakes and encode project-specific knowledge.
22
+
23
+ Location: `.atlas/guardrails.md`
24
+
25
+ ## Sign Format
26
+
27
+ When you learn something useful, add a Sign:
28
+
29
+ ```markdown
30
+ ### Sign: [Descriptive Name]
31
+ - **Trigger**: [When to apply this rule]
32
+ - **Instruction**: [What to do or avoid]
33
+ - **Learned from**: [TASK_ID where this was learned]
34
+ ```
35
+
36
+ **Example**:
37
+ ```markdown
38
+ ### Sign: Decimal Consistency
39
+ - **Trigger**: Working with financial calculations in Python
40
+ - **Instruction**: Always use Decimal, never float. Convert at API boundaries.
41
+ - **Learned from**: MED-005
42
+ ```
43
+
44
+ ## When to Add Signs
45
+
46
+ Add a Sign when you:
47
+
48
+ 1. **Fix a bug** that wasn't obvious
49
+ 2. **Discover a project pattern** that should be followed
50
+ 3. **Find a workaround** for a framework limitation
51
+ 4. **Learn a performance gotcha**
52
+ 5. **Identify a security consideration**
53
+
54
+ **DO NOT add Signs for**:
55
+ - Generic programming knowledge
56
+ - Things already in CLAUDE.md
57
+ - Temporary fixes that will be removed
58
+
59
+ ## Reading Guardrails
60
+
61
+ **MANDATORY**: Read guardrails.md BEFORE starting any task.
62
+
63
+ When you find a relevant Sign:
64
+ 1. Apply the instruction
65
+ 2. If the Sign is outdated, update it
66
+ 3. If the Sign conflicts with CLAUDE.md, CLAUDE.md wins
67
+
68
+ ## Error Handling
69
+
70
+ When a task fails:
71
+
72
+ ### 1. Move Back to TODO
73
+
74
+ In backlog.md, move task back to TODO section (will be retried next iteration):
75
+
76
+ ```markdown
77
+ ### TASK-001: Feature description
78
+ - **Category:** feature
79
+ ```
80
+
81
+ **Note:** DELAYED is only for tasks explicitly postponed by decision, not for build/test errors.
82
+
83
+ ### 2. Log the Error
84
+
85
+ Append to `.atlas/errors.log`:
86
+
87
+ ```
88
+ [2026-01-19] TASK-001: Build failed - missing dependency X
89
+ ```
90
+
91
+ Keep it brief. One line per error.
92
+
93
+ ### 3. Add Sign if Learnable
94
+
95
+ If the error teaches something preventable:
96
+
97
+ ```markdown
98
+ ### Sign: Dependency X Required
99
+ - **Trigger**: Using feature Y in this project
100
+ - **Instruction**: Ensure dependency X is installed first
101
+ - **Learned from**: TASK-001
102
+ ```
103
+
104
+ ### 4. Commit and Continue
105
+
106
+ ```bash
107
+ git add .atlas/
108
+ git commit -m "chore: error TASK-001"
109
+ git push
110
+ ```
111
+
112
+ Then move to next task (or retry the same task if it's first in TODO).
113
+
114
+ ## Sign Categories
115
+
116
+ Organize Signs by type:
117
+
118
+ ```markdown
119
+ # Guardrails
120
+
121
+ ## Build & Dependencies
122
+ ### Sign: Node Version
123
+ - **Trigger**: Running npm commands
124
+ - **Instruction**: Use Node 20+, check with `node -v`
125
+ - **Learned from**: SETUP-001
126
+
127
+ ## API & Data
128
+ ### Sign: Date Formatting
129
+ - **Trigger**: Sending dates to API
130
+ - **Instruction**: Use ISO 8601 format YYYY-MM-DD
131
+ - **Learned from**: BUG-015
132
+
133
+ ## Security
134
+ ### Sign: Environment Variables
135
+ - **Trigger**: Adding new secrets
136
+ - **Instruction**: Never commit .env, add to .env.example
137
+ - **Learned from**: SEC-001
138
+ ```
139
+
140
+ ## Updating Signs
141
+
142
+ If a Sign is wrong or outdated:
143
+
144
+ 1. Update the Sign content
145
+ 2. Update "Learned from" to current task
146
+ 3. Commit with message: `chore: update guardrail [Sign Name]`
147
+
148
+ ## Priority
149
+
150
+ When instructions conflict:
151
+
152
+ 1. **CLAUDE.md** (project rules) - Highest
153
+ 2. **Feature Spec** (current task spec)
154
+ 3. **Guardrails.md** (learned rules)
155
+ 4. **General knowledge** - Lowest
156
+
157
+ ## Example guardrails.md
158
+
159
+ ```markdown
160
+ # Guardrails
161
+
162
+ Rules learned from past iterations. READ before starting any task.
163
+
164
+ ## API Patterns
165
+
166
+ ### Sign: UTC Dates
167
+ - **Trigger**: Storing or comparing dates
168
+ - **Instruction**: Always use UTC in backend, convert to local only in frontend
169
+ - **Learned from**: BUG-023
170
+
171
+ ### Sign: Pagination Required
172
+ - **Trigger**: Creating list endpoints
173
+ - **Instruction**: Always implement pagination, default limit 50
174
+ - **Learned from**: PERF-008
175
+
176
+ ## Frontend
177
+
178
+ ### Sign: No Transparency
179
+ - **Trigger**: Creating UI components
180
+ - **Instruction**: Use solid backgrounds (#121216), no glass effects
181
+ - **Learned from**: UI-012
182
+
183
+ ## Testing
184
+
185
+ ### Sign: Mock External Services
186
+ - **Trigger**: Writing tests that call external APIs
187
+ - **Instruction**: Always mock, never call real APIs in tests
188
+ - **Learned from**: TEST-005
189
+ ```