oneie 3.6.25 → 3.6.27

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 (55) hide show
  1. package/.claude/agents/TROUBLESHOOTING.md +530 -0
  2. package/.claude/agents/agent-builder.md +226 -198
  3. package/.claude/agents/agent-claude.md +645 -0
  4. package/.claude/agents/agent-designer.md +166 -11
  5. package/.claude/agents/agent-director.md +109 -41
  6. package/.claude/agents/agent-frontend.md +314 -27
  7. package/.claude/agents/agent-quality.md +377 -0
  8. package/.claude/commands/chat.md +504 -0
  9. package/.claude/commands/create.md +134 -18
  10. package/.claude/commands/fast.md +531 -0
  11. package/.claude/commands/one.md +12 -85
  12. package/.claude/commands/optimize.md +74 -0
  13. package/.claude/commands/plan.md +420 -373
  14. package/.claude/commands/review.md +99 -0
  15. package/.claude/commands/test.md +197 -0
  16. package/.claude/commands/validate.md +140 -0
  17. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  18. package/.claude/hooks/auto-format.sh +106 -0
  19. package/.claude/hooks/formatting.py +187 -0
  20. package/.claude/hooks/ontology-validation.py +255 -0
  21. package/.claude/hooks/validate-imports.py +182 -0
  22. package/.claude/hooks/validate-ontology.py +140 -0
  23. package/CLAUDE.md +105 -0
  24. package/dist/commands/agent.d.ts +18 -0
  25. package/dist/commands/agent.d.ts.map +1 -0
  26. package/dist/commands/agent.js +271 -0
  27. package/dist/commands/agent.js.map +1 -0
  28. package/dist/commands/init.js +1 -1
  29. package/dist/commands/init.js.map +1 -1
  30. package/dist/index.js +20 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/agent-detection.d.ts +19 -0
  33. package/dist/lib/agent-detection.d.ts.map +1 -0
  34. package/dist/lib/agent-detection.js +87 -0
  35. package/dist/lib/agent-detection.js.map +1 -0
  36. package/dist/lib/detect.d.ts +45 -0
  37. package/dist/lib/detect.d.ts.map +1 -0
  38. package/dist/lib/detect.js +221 -0
  39. package/dist/lib/detect.js.map +1 -0
  40. package/llms.txt +257 -0
  41. package/one/knowledge/cascading-context-specification.md +1617 -0
  42. package/one/knowledge/claude-code-integration.md +1293 -0
  43. package/one/knowledge/development-commands.md +251 -0
  44. package/one/knowledge/games-english.md +691 -0
  45. package/one/knowledge/games.md +1082 -0
  46. package/one/knowledge/guidelines.md +314 -0
  47. package/one/knowledge/parallel-agents.md +932 -0
  48. package/one/knowledge/performance.md +459 -0
  49. package/one/knowledge/troubleshooting.md +434 -0
  50. package/one/things/plans/dsl-claude-code.md +1011 -0
  51. package/one/things/plans/npx-agent-safety.md +785 -0
  52. package/one/things/plans/npx-agent.md +1089 -0
  53. package/one/things/plans/remove-backend-development-from-agents.md +1331 -0
  54. package/package.json +3 -2
  55. package/.claude/agents/AUDIT-agent-ops-alignment.md +0 -379
package/llms.txt ADDED
@@ -0,0 +1,257 @@
1
+ # ONE CLI - llms.txt
2
+
3
+ This file provides guidance for Large Language Models (LLMs) and AI coding assistants on how to use the ONE Platform CLI.
4
+
5
+ ## For AI Agents: Use `npx oneie agent`
6
+
7
+ **IMPORTANT:** If you are an AI agent (Claude Code, Cursor, Windsurf, GitHub Copilot, or running in CI/CD), ALWAYS use the agent command:
8
+
9
+ ```bash
10
+ npx oneie agent
11
+ ```
12
+
13
+ ### Why Agent Mode?
14
+
15
+ - **Zero interaction** - No prompts, no hanging, completes in 5-10 seconds
16
+ - **Smart detection** - Auto-discovers user/org from git, environment, files
17
+ - **Safe execution** - Never blocks on input, automatic rollback on errors
18
+ - **Universal** - Works with all AI coding tools and CI/CD environments
19
+
20
+ ### Agent Detection
21
+
22
+ The CLI automatically detects agent environments by checking:
23
+ - `CLAUDE_CODE`, `CLAUDE_USER_NAME` - Claude Code
24
+ - `GITHUB_COPILOT` - GitHub Copilot
25
+ - `CURSOR_AI` - Cursor
26
+ - `CODEIUM_API_KEY` - Windsurf
27
+ - `CI`, `GITHUB_ACTIONS`, etc. - CI/CD
28
+ - `!process.stdin.isTTY` - Non-interactive terminal
29
+
30
+ If you run `npx oneie` (interactive command) in an agent environment, you'll see:
31
+ ```
32
+ ⚠️ Agent environment detected!
33
+ Did you mean to run: npx oneie agent
34
+ ```
35
+
36
+ ### Context Detection
37
+
38
+ The agent command auto-detects context with this priority:
39
+
40
+ **User Identity:**
41
+ 1. CLI flags: `--name`, `--email`
42
+ 2. Claude context: `--claude-user`, `--claude-email`, `CLAUDE_USER_NAME`
43
+ 3. Git config: `git config user.name/user.email`
44
+ 4. Environment: `GIT_AUTHOR_NAME`, `GIT_AUTHOR_EMAIL`
45
+ 5. Defaults: `"Developer"`, `"dev@localhost"`
46
+
47
+ **Organization:**
48
+ 1. CLI flags: `--org`
49
+ 2. Claude context: `--claude-org`, `CLAUDE_ORG_NAME`
50
+ 3. Git remote: Parse from github.com/org-name/repo
51
+ 4. package.json: `author.name`, `organization`
52
+ 5. README.md: First H1 heading
53
+ 6. Directory: Parent directory name
54
+ 7. Default: `"Default Organization"`
55
+
56
+ **Website:**
57
+ 1. CLI flag: `--website`
58
+ 2. package.json: `homepage`
59
+ 3. README.md: First URL found
60
+ 4. Git remote: Convert to GitHub URL
61
+
62
+ ### Usage Examples
63
+
64
+ **Basic (fully automatic):**
65
+ ```bash
66
+ npx oneie agent
67
+ ```
68
+
69
+ **With explicit Claude context:**
70
+ ```bash
71
+ npx oneie agent \
72
+ --claude-user="Jane Smith" \
73
+ --claude-email="jane@startup.com" \
74
+ --claude-org="My Startup"
75
+ ```
76
+
77
+ **Quiet mode (for scripts/CI):**
78
+ ```bash
79
+ npx oneie agent --quiet
80
+ ```
81
+
82
+ **Dry run (preview without changes):**
83
+ ```bash
84
+ npx oneie agent --dry-run
85
+ ```
86
+
87
+ **Verbose (show detected agent type):**
88
+ ```bash
89
+ npx oneie agent --verbose
90
+ ```
91
+
92
+ ### What Gets Created
93
+
94
+ When you run `npx oneie agent`, it:
95
+ 1. Copies `/one` directory (ontology, docs, specs)
96
+ 2. Copies `/.claude` directory (agents, commands, hooks)
97
+ 3. Copies root documentation (CLAUDE.md, README.md, LICENSE.md, SECURITY.md, .mcp.json)
98
+ 4. Creates installation folder: `/<org-slug>/`
99
+ 5. Creates `.onboarding.json` handoff file
100
+ 6. Updates `.env.local` with organization settings
101
+ 7. Updates `.gitignore` to exclude installation folder
102
+ 8. Optionally clones web template (if not present)
103
+
104
+ ### Next Steps After Setup
105
+
106
+ After `npx oneie agent` completes:
107
+ 1. Run Claude Code: `claude`
108
+ 2. Use `/one` command to see control center
109
+ 3. Start building with `/chat [idea]` or `/plan convert`
110
+
111
+ ### Available Flags
112
+
113
+ **Context Flags:**
114
+ - `--name="Your Name"` - User name (explicit override)
115
+ - `--email="your@email.com"` - User email (explicit override)
116
+ - `--claude-user="Name"` - User name from Claude context
117
+ - `--claude-email="email"` - User email from Claude
118
+ - `--claude-org="Org"` - Organization from Claude
119
+ - `--org="Organization"` - Organization name (explicit override)
120
+ - `--website="https://example.com"` - Organization website
121
+
122
+ **Behavior Flags:**
123
+ - `--quiet` - Minimal output (for automation)
124
+ - `--verbose` - Detailed output with agent type
125
+ - `--dry-run` - Show plan without executing
126
+ - `--skip-web` - Don't clone web template
127
+
128
+ **Environment Variables:**
129
+ - `CLAUDE_USER_NAME` - User name from Claude Code
130
+ - `CLAUDE_USER_EMAIL` - User email from Claude Code
131
+ - `CLAUDE_ORG_NAME` - Organization from Claude Code
132
+
133
+ ## For Humans: Use `npx oneie`
134
+
135
+ If you are a human user wanting guided interactive setup:
136
+
137
+ ```bash
138
+ npx oneie
139
+ ```
140
+
141
+ Or force interactive mode in agent environment:
142
+
143
+ ```bash
144
+ npx oneie --interactive
145
+ ```
146
+
147
+ ## Common Workflows
148
+
149
+ ### Workflow 1: AI Agent Sets Up Project
150
+
151
+ ```bash
152
+ # User: "Set up ONE Platform for my project"
153
+ # Agent runs:
154
+ npx oneie agent
155
+
156
+ # Output:
157
+ # ✅ Your ONE Platform is ready!
158
+ # Next steps: /one
159
+
160
+ # Agent continues:
161
+ # "Your platform is ready! What would you like to build?"
162
+ ```
163
+
164
+ ### Workflow 2: CI/CD Integration
165
+
166
+ ```yaml
167
+ # .github/workflows/setup.yml
168
+ name: Setup ONE Platform
169
+ on: [push]
170
+ jobs:
171
+ setup:
172
+ runs-on: ubuntu-latest
173
+ steps:
174
+ - uses: actions/checkout@v2
175
+ - run: npx oneie agent --quiet
176
+ - run: cd web && bun install && bun test
177
+ ```
178
+
179
+ ### Workflow 3: Claude Code with Custom Context
180
+
181
+ ```bash
182
+ # Claude Code automatically passes context:
183
+ npx oneie agent \
184
+ --claude-user="$USER_NAME" \
185
+ --claude-email="$USER_EMAIL" \
186
+ --claude-org="$ORG_NAME"
187
+ ```
188
+
189
+ ## Error Handling
190
+
191
+ ### If Agent Detection Fails
192
+
193
+ The CLI will default to safe values:
194
+ - User: "Developer" <dev@localhost>
195
+ - Organization: "Default Organization"
196
+
197
+ You can always override with explicit flags.
198
+
199
+ ### If Git Not Configured
200
+
201
+ The CLI will show a warning but continue with defaults. To fix:
202
+ ```bash
203
+ git config --global user.name "Your Name"
204
+ git config --global user.email "your@email.com"
205
+ ```
206
+
207
+ ### If Installation Fails
208
+
209
+ The CLI automatically rolls back all changes. You can retry:
210
+ ```bash
211
+ npx oneie agent --dry-run # Check what would happen
212
+ npx oneie agent --verbose # See detailed output
213
+ ```
214
+
215
+ ## Performance
216
+
217
+ - **Setup time:** 5-10 seconds (vs 2-3 minutes interactive)
218
+ - **Context detection:** < 1 second
219
+ - **File operations:** ~5 seconds
220
+ - **Total improvement:** 98% faster than interactive
221
+
222
+ ## Agent Experience Philosophy
223
+
224
+ **"Agent Experience First"** - The CLI is designed so agents never get stuck on prompts they can't answer. If an agent accidentally runs the interactive command, it will:
225
+ 1. Detect the agent environment
226
+ 2. Show helpful error message
227
+ 3. Suggest correct command: `npx oneie agent`
228
+ 4. Exit cleanly without hanging
229
+
230
+ This ensures agents can automate project setup as part of natural conversation flow without manual intervention.
231
+
232
+ ## Documentation
233
+
234
+ For complete documentation, see:
235
+ - README.md - Platform overview
236
+ - CLAUDE.md - Instructions for Claude Code
237
+ - /one/knowledge/ontology.md - 6-dimension ontology
238
+ - /web/src/content/docs/getting-started/quick-start.md - Quick start guide
239
+ - /web/src/content/docs/getting-started/claude-commands.md - Claude commands reference
240
+
241
+ ## Support
242
+
243
+ If you encounter issues:
244
+ 1. Run with `--verbose` to see detailed output
245
+ 2. Run with `--dry-run` to preview changes
246
+ 3. Check git configuration: `git config user.name && git config user.email`
247
+ 4. Check GitHub issues: https://github.com/one-ie/cli/issues
248
+
249
+ ## Version
250
+
251
+ Current version: 1.0.0
252
+ Agent command added: v1.1.0
253
+
254
+ ## License
255
+
256
+ Copyright © 2025 ONE
257
+ ONE Free License - see LICENSE.md