up-cli 0.1.1__py3-none-any.whl → 0.5.0__py3-none-any.whl

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. up/__init__.py +1 -1
  2. up/ai_cli.py +229 -0
  3. up/cli.py +75 -4
  4. up/commands/agent.py +521 -0
  5. up/commands/bisect.py +343 -0
  6. up/commands/branch.py +350 -0
  7. up/commands/dashboard.py +248 -0
  8. up/commands/init.py +195 -6
  9. up/commands/learn.py +1741 -0
  10. up/commands/memory.py +545 -0
  11. up/commands/new.py +108 -10
  12. up/commands/provenance.py +267 -0
  13. up/commands/review.py +239 -0
  14. up/commands/start.py +1124 -0
  15. up/commands/status.py +360 -0
  16. up/commands/summarize.py +122 -0
  17. up/commands/sync.py +317 -0
  18. up/commands/vibe.py +304 -0
  19. up/context.py +421 -0
  20. up/core/__init__.py +69 -0
  21. up/core/checkpoint.py +479 -0
  22. up/core/provenance.py +364 -0
  23. up/core/state.py +678 -0
  24. up/events.py +512 -0
  25. up/git/__init__.py +37 -0
  26. up/git/utils.py +270 -0
  27. up/git/worktree.py +331 -0
  28. up/learn/__init__.py +155 -0
  29. up/learn/analyzer.py +227 -0
  30. up/learn/plan.py +374 -0
  31. up/learn/research.py +511 -0
  32. up/learn/utils.py +117 -0
  33. up/memory.py +1096 -0
  34. up/parallel.py +551 -0
  35. up/summarizer.py +407 -0
  36. up/templates/__init__.py +70 -2
  37. up/templates/config/__init__.py +502 -20
  38. up/templates/docs/SKILL.md +28 -0
  39. up/templates/docs/__init__.py +341 -0
  40. up/templates/docs/standards/HEADERS.md +24 -0
  41. up/templates/docs/standards/STRUCTURE.md +18 -0
  42. up/templates/docs/standards/TEMPLATES.md +19 -0
  43. up/templates/learn/__init__.py +567 -14
  44. up/templates/loop/__init__.py +546 -27
  45. up/templates/mcp/__init__.py +474 -0
  46. up/templates/projects/__init__.py +786 -0
  47. up/ui/__init__.py +14 -0
  48. up/ui/loop_display.py +650 -0
  49. up/ui/theme.py +137 -0
  50. up_cli-0.5.0.dist-info/METADATA +519 -0
  51. up_cli-0.5.0.dist-info/RECORD +55 -0
  52. up_cli-0.1.1.dist-info/METADATA +0 -186
  53. up_cli-0.1.1.dist-info/RECORD +0 -14
  54. {up_cli-0.1.1.dist-info → up_cli-0.5.0.dist-info}/WHEEL +0 -0
  55. {up_cli-0.1.1.dist-info → up_cli-0.5.0.dist-info}/entry_points.txt +0 -0
up/ui/theme.py ADDED
@@ -0,0 +1,137 @@
1
+ """Cybersecurity/AI Theme for UP-CLI.
2
+
3
+ A dark, neon-accented theme inspired by cyberpunk aesthetics
4
+ and AI terminal interfaces.
5
+ """
6
+
7
+ from dataclasses import dataclass
8
+ from rich.style import Style
9
+ from rich.theme import Theme
10
+
11
+
12
+ @dataclass
13
+ class CyberTheme:
14
+ """Cybersecurity/AI color palette."""
15
+
16
+ # Primary colors
17
+ PRIMARY = "#00FFFF" # Cyan - main accent
18
+ SECONDARY = "#00FF41" # Matrix green
19
+ ACCENT = "#FF00FF" # Neon magenta
20
+
21
+ # Status colors
22
+ SUCCESS = "#00FF41" # Bright green
23
+ WARNING = "#FFB000" # Amber
24
+ ERROR = "#FF0040" # Neon red
25
+ INFO = "#00BFFF" # Deep sky blue
26
+
27
+ # UI colors
28
+ BORDER = "#00FFFF" # Cyan borders
29
+ BORDER_DIM = "#006666" # Dimmed cyan
30
+ TEXT = "#FFFFFF" # Bright white
31
+ TEXT_DIM = "#666666" # Gray
32
+ TEXT_MUTED = "#404040" # Dark gray
33
+
34
+ # Background accents (for contrast)
35
+ BG_HIGHLIGHT = "#001a1a" # Very dark cyan tint
36
+
37
+ # Progress bar colors
38
+ PROGRESS_COMPLETE = "#00FF41"
39
+ PROGRESS_REMAINING = "#333333"
40
+ PROGRESS_PULSE = "#00FFFF"
41
+
42
+ # Status indicators
43
+ STATUS_RUNNING = "#00FF41"
44
+ STATUS_PAUSED = "#00BFFF"
45
+ STATUS_FAILED = "#FF0040"
46
+ STATUS_COMPLETE = "#00FF41"
47
+ STATUS_VERIFYING = "#FFB000"
48
+
49
+ # Task status
50
+ TASK_COMPLETE = "#00FF41"
51
+ TASK_IN_PROGRESS = "#00FFFF"
52
+ TASK_PENDING = "#666666"
53
+ TASK_FAILED = "#FF0040"
54
+ TASK_SKIPPED = "#FFB000"
55
+
56
+
57
+ # Rich theme for console styling
58
+ THEME = Theme({
59
+ # Status styles
60
+ "status.running": Style(color=CyberTheme.STATUS_RUNNING, bold=True),
61
+ "status.paused": Style(color=CyberTheme.STATUS_PAUSED, bold=True),
62
+ "status.failed": Style(color=CyberTheme.STATUS_FAILED, bold=True),
63
+ "status.complete": Style(color=CyberTheme.STATUS_COMPLETE, bold=True),
64
+ "status.verifying": Style(color=CyberTheme.STATUS_VERIFYING, bold=True),
65
+
66
+ # UI elements
67
+ "title": Style(color=CyberTheme.PRIMARY, bold=True),
68
+ "subtitle": Style(color=CyberTheme.SECONDARY),
69
+ "border": Style(color=CyberTheme.BORDER),
70
+ "border.dim": Style(color=CyberTheme.BORDER_DIM),
71
+
72
+ # Text styles
73
+ "text": Style(color=CyberTheme.TEXT),
74
+ "text.dim": Style(color=CyberTheme.TEXT_DIM),
75
+ "text.muted": Style(color=CyberTheme.TEXT_MUTED),
76
+
77
+ # Task styles
78
+ "task.complete": Style(color=CyberTheme.TASK_COMPLETE),
79
+ "task.progress": Style(color=CyberTheme.TASK_IN_PROGRESS, bold=True),
80
+ "task.pending": Style(color=CyberTheme.TASK_PENDING),
81
+ "task.failed": Style(color=CyberTheme.TASK_FAILED),
82
+ "task.skipped": Style(color=CyberTheme.TASK_SKIPPED),
83
+
84
+ # Progress
85
+ "progress.complete": Style(color=CyberTheme.PROGRESS_COMPLETE),
86
+ "progress.remaining": Style(color=CyberTheme.PROGRESS_REMAINING),
87
+
88
+ # Accents
89
+ "accent": Style(color=CyberTheme.ACCENT),
90
+ "primary": Style(color=CyberTheme.PRIMARY),
91
+ "secondary": Style(color=CyberTheme.SECONDARY),
92
+
93
+ # Standard Rich overrides
94
+ "bar.complete": Style(color=CyberTheme.PROGRESS_COMPLETE),
95
+ "bar.finished": Style(color=CyberTheme.PROGRESS_COMPLETE),
96
+ "bar.pulse": Style(color=CyberTheme.PROGRESS_PULSE),
97
+ "progress.percentage": Style(color=CyberTheme.PRIMARY, bold=True),
98
+ "progress.description": Style(color=CyberTheme.TEXT),
99
+ "progress.elapsed": Style(color=CyberTheme.TEXT_DIM),
100
+ "progress.remaining": Style(color=CyberTheme.TEXT_DIM),
101
+ })
102
+
103
+
104
+ # Unicode symbols for status indicators
105
+ class Symbols:
106
+ """Terminal symbols for status display."""
107
+
108
+ # Status bullets
109
+ COMPLETE = "✓"
110
+ IN_PROGRESS = "→"
111
+ PENDING = "○"
112
+ FAILED = "✗"
113
+ SKIPPED = "⊘"
114
+ ROLLBACK = "↩"
115
+
116
+ # Animated spinner frames
117
+ SPINNER = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
118
+
119
+ # Progress bar characters
120
+ BAR_FULL = "█"
121
+ BAR_EMPTY = "░"
122
+ BAR_PARTIAL = ["▏", "▎", "▍", "▌", "▋", "▊", "▉"]
123
+
124
+ # Decorative
125
+ ARROW_RIGHT = "▸"
126
+ ARROW_DOWN = "▾"
127
+ DOT = "●"
128
+ CIRCUIT = "◈"
129
+ PULSE = "◉"
130
+
131
+ # Box drawing
132
+ CORNER_TL = "╭"
133
+ CORNER_TR = "╮"
134
+ CORNER_BL = "╰"
135
+ CORNER_BR = "╯"
136
+ HORIZONTAL = "─"
137
+ VERTICAL = "│"
@@ -0,0 +1,519 @@
1
+ Metadata-Version: 2.4
2
+ Name: up-cli
3
+ Version: 0.5.0
4
+ Summary: Verifiable, observable AI-assisted development for building stable, high-performance software
5
+ Project-URL: Homepage, https://github.com/yourusername/up-cli
6
+ Project-URL: Documentation, https://github.com/yourusername/up-cli#readme
7
+ Project-URL: Repository, https://github.com/yourusername/up-cli
8
+ Author-email: Your Name <you@example.com>
9
+ License-Expression: MIT
10
+ Keywords: ai,claude,cli,cursor,mcp,productivity,scaffolding
11
+ Classifier: Development Status :: 4 - Beta
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.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: chromadb>=0.4.0
22
+ Requires-Dist: click>=8.0
23
+ Requires-Dist: pyyaml>=6.0
24
+ Requires-Dist: rich>=13.0
25
+ Requires-Dist: tqdm>=4.65.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: mypy>=1.5.0; extra == 'dev'
28
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
29
+ Requires-Dist: pytest>=7.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # up-cli
34
+
35
+ <img width="3498" height="2182" alt="543426914-37655a9f-e661-4ab5-b994-e4e11f97dd95" src="https://github.com/user-attachments/assets/7cbc2614-af8e-41cb-be2f-df2b6cd43b07" />
36
+
37
+
38
+ An AI-powered CLI tool for scaffolding projects with built-in documentation, learning systems, and product-loop workflows designed for use with Claude Code and Cursor AI.
39
+
40
+ **Learned from real practice** - Built on insights from 5+ billion tokens of development experience and commercial products. Extracts best practices from chat history, documentation patterns, and proven workflows.
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ pip install up-cli
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ```bash
51
+ # Create new project
52
+ up new my-project
53
+
54
+ # Or initialize in existing project
55
+ cd existing-project
56
+ up init
57
+
58
+ # Start AI-assisted development with safety rails
59
+ up save # Checkpoint before AI work
60
+ up start # Run AI product loop
61
+ up diff # Review changes
62
+ up review # AI adversarial review
63
+
64
+ # Check system health
65
+ up status
66
+
67
+ # Live dashboard
68
+ up dashboard
69
+ ```
70
+
71
+ ## Commands
72
+
73
+ | Command | Description |
74
+ |---------|-------------|
75
+ | `up new <name>` | Create a new project with full scaffolding |
76
+ | `up new <name> --template <type>` | Create project from specific template |
77
+ | `up init` | Initialize up systems (auto-installs git hooks, builds memory) |
78
+ | `up init --ai claude` | Initialize for Claude Code only |
79
+ | `up init --ai cursor` | Initialize for Cursor AI only |
80
+ | `up init --systems docs,learn` | Initialize specific systems only |
81
+ | `up start` | Start the product loop |
82
+ | `up start --resume` | Resume from last checkpoint |
83
+ | `up start --dry-run` | Preview mode without changes |
84
+ | `up start --parallel` | Parallel multi-agent execution |
85
+ | `up save` | Create checkpoint before AI work |
86
+ | `up reset` | Restore to checkpoint |
87
+ | `up diff` | Review AI changes |
88
+ | `up review` | AI adversarial code review |
89
+ | `up agent spawn <name>` | Create agent worktree |
90
+ | `up agent status` | List all agents |
91
+ | `up agent merge <name>` | Squash and merge |
92
+ | `up bisect` | Find bug-introducing commit |
93
+ | `up provenance list` | View AI operation history |
94
+ | `up branch status` | Show branch hierarchy |
95
+ | `up status` | Show health of all systems |
96
+ | `up dashboard` | Live interactive health dashboard |
97
+ | `up sync` | Sync all systems (memory, docs) |
98
+ | `up hooks` | Install/manage git hooks for auto-sync |
99
+ | `up learn` | Auto-improve project with AI (requires vision map) |
100
+ | `up learn "topic"` | Learn about specific topic with AI research |
101
+ | `up learn "file.md"` | Analyze file with AI (auto-fallback to basic) |
102
+ | `up learn "path"` | Compare and learn from another project |
103
+ | `up learn analyze` | Analyze all research files with AI + progress bar |
104
+ | `up learn plan` | Generate improvement PRD |
105
+ | `up learn --no-ai` | Disable AI (faster, basic extraction only) |
106
+ | `up memory search <query>` | Semantic search in memory |
107
+ | `up memory sync` | Index git commits and files |
108
+ | `up memory branch` | Show branch-specific knowledge |
109
+ | `up memory record` | Record learnings/decisions/errors |
110
+ | `up summarize` | Summarize AI conversation history |
111
+
112
+ ## Project Templates
113
+
114
+ Create projects with pre-configured tech stacks:
115
+
116
+ ```bash
117
+ # FastAPI backend with SQLAlchemy
118
+ up new my-api --template fastapi
119
+
120
+ # Next.js frontend with TypeScript
121
+ up new my-app --template nextjs
122
+
123
+ # Python library with packaging
124
+ up new my-lib --template python-lib
125
+
126
+ # Minimal structure
127
+ up new my-project --template minimal
128
+
129
+ # Full setup with MCP
130
+ up new my-project --template full
131
+ ```
132
+
133
+ | Template | Description |
134
+ |----------|-------------|
135
+ | `minimal` | Basic structure with docs |
136
+ | `standard` | Full up systems (default) |
137
+ | `full` | Everything including MCP server |
138
+ | `fastapi` | FastAPI + SQLAlchemy + pytest |
139
+ | `nextjs` | Next.js 14 + TypeScript + Tailwind |
140
+ | `python-lib` | Python library with pyproject.toml |
141
+
142
+ ## Usage Examples
143
+
144
+ ### Create a new project
145
+
146
+ ```bash
147
+ # Create a new project with all systems
148
+ up new my-saas-app
149
+
150
+ # Create with a specific template
151
+ up new my-api --template fastapi
152
+ ```
153
+
154
+ ### Initialize in existing project
155
+
156
+ ```bash
157
+ cd my-existing-project
158
+
159
+ # Full initialization
160
+ up init
161
+
162
+ # Claude Code focused setup
163
+ up init --ai claude
164
+
165
+ # Only add docs and learn systems
166
+ up init --systems docs,learn
167
+ ```
168
+
169
+ ### Monitor System Health
170
+
171
+ ```bash
172
+ # Quick status check
173
+ up status
174
+
175
+ # Live dashboard (updates every 5 seconds)
176
+ up dashboard
177
+
178
+ # JSON output for scripting
179
+ up status --json
180
+ ```
181
+
182
+ ### Using the Learn System
183
+
184
+ All learn commands use Claude/Cursor AI by default with automatic fallback.
185
+
186
+ ```bash
187
+ # Self-improvement analysis (requires configured vision map)
188
+ up learn
189
+
190
+ # Learn about a specific topic (AI-powered research)
191
+ up learn "caching strategies"
192
+ up learn "authentication"
193
+ up learn "testing best practices"
194
+
195
+ # Learn from another project's design
196
+ up learn "../other-project"
197
+ up learn "~/projects/reference-app"
198
+
199
+ # Learn from a file (AI-powered analysis)
200
+ up learn "docs/architecture.md"
201
+ up learn "guide.txt"
202
+
203
+ # Analyze all research files with AI + progress bar
204
+ up learn analyze
205
+
206
+ # Auto-analyze without vision map requirement
207
+ up learn auto
208
+
209
+ # Check learning system status
210
+ up learn status
211
+
212
+ # Generate a PRD from analysis
213
+ up learn plan
214
+
215
+ # Disable AI for faster basic extraction
216
+ up learn --no-ai "docs/guide.md"
217
+ ```
218
+
219
+ The learn system uses AI by default:
220
+ - **Self-improvement** (`up learn`): Analyzes current project with AI insights. Requires a configured `docs/roadmap/vision/PRODUCT_VISION.md`.
221
+ - **Topic learning** (`up learn "topic"`): AI-powered research for specific topics based on your project's tech stack.
222
+ - **File learning** (`up learn "file.md"`): AI analysis of files with automatic fallback to basic extraction.
223
+ - **Batch analysis** (`up learn analyze`): Process all research files with AI and tqdm progress bar.
224
+ - **Basic mode** (`--no-ai`): Skip AI for faster basic regex extraction.
225
+
226
+ ### Using the Product Loop
227
+
228
+ ```bash
229
+ # Start the product loop
230
+ up start
231
+
232
+ # Resume from checkpoint
233
+ up start --resume
234
+
235
+ # Preview what would happen
236
+ up start --dry-run
237
+
238
+ # Start with specific task
239
+ up start --task US-003
240
+
241
+ # Use custom PRD file
242
+ up start --prd path/to/prd.json
243
+ ```
244
+
245
+ ### Summarize Conversations
246
+
247
+ ```bash
248
+ # Summarize Cursor chat history
249
+ up summarize
250
+
251
+ # Export as JSON
252
+ up summarize --format json --output summary.json
253
+
254
+ # Filter by project
255
+ up summarize --project myproject
256
+ ```
257
+
258
+ ## Systems
259
+
260
+ ### 1. Docs System
261
+
262
+ Comprehensive documentation structure:
263
+
264
+ ```
265
+ docs/
266
+ ├── CONTEXT.md # AI reads first
267
+ ├── INDEX.md # Quick reference
268
+ ├── roadmap/ # Strategic planning
269
+ │ ├── vision/ # Product vision
270
+ │ └── phases/ # Phase roadmaps
271
+ ├── architecture/ # System design
272
+ ├── features/ # Feature specs
273
+ ├── changelog/ # Progress tracking
274
+ ├── handoff/ # Session continuity
275
+ ├── decisions/ # ADRs
276
+ └── learnings/ # Patterns discovered
277
+ ```
278
+
279
+ ### 2. Learn System
280
+
281
+ Research and improvement pipeline:
282
+
283
+ ```
284
+ RESEARCH → ANALYZE → COMPARE → PLAN → IMPLEMENT
285
+ ```
286
+
287
+ Three learning modes:
288
+
289
+ | Mode | Command | Description |
290
+ |------|---------|-------------|
291
+ | Self-improvement | `up learn` | Analyze and improve current project (requires vision map) |
292
+ | Topic learning | `up learn "topic"` | Create research file for specific topic |
293
+ | External learning | `up learn "path"` | Learn from project directory or file |
294
+
295
+ Supported file types for learning:
296
+ - **Documentation**: `.md`, `.markdown`, `.txt`, `.rst`
297
+ - **Python**: `.py` (extracts patterns, classes, functions)
298
+ - **JavaScript/TypeScript**: `.js`, `.ts`, `.tsx`, `.jsx`
299
+ - **Config**: `.json`, `.yaml`, `.yml`, `.toml`
300
+
301
+ Additional commands:
302
+ - `up learn auto` - Analyze without vision map requirement
303
+ - `up learn analyze` - Extract patterns from research files
304
+ - `up learn plan` - Generate improvement PRD
305
+ - `up learn status` - Show learning system status
306
+
307
+ Storage:
308
+ ```
309
+ .claude/skills/learning-system/
310
+ ├── project_profile.json # Current project analysis
311
+ ├── research/ # Topic research files
312
+ ├── external_learnings/ # Learnings from other projects
313
+ ├── file_learnings/ # Learnings from individual files
314
+ ├── insights/ # Extracted patterns
315
+ └── prd.json # Generated improvement plan
316
+ ```
317
+
318
+ ### 3. Product Loop (SESRC)
319
+
320
+ Autonomous development with safety guardrails:
321
+
322
+ | Principle | Implementation |
323
+ |-----------|----------------|
324
+ | **Stable** | Graceful degradation, fallback modes |
325
+ | **Efficient** | Token budgets, incremental testing |
326
+ | **Safe** | Input validation, path whitelisting |
327
+ | **Reliable** | Timeouts, idempotency, rollback |
328
+ | **Cost-effective** | Early termination, ROI threshold |
329
+
330
+ Features:
331
+ - Circuit breaker (max 3 failures)
332
+ - Checkpoint/rollback
333
+ - Health checks
334
+ - Budget limits
335
+
336
+ ### 4. Context Budget
337
+
338
+ Tracks AI context window usage:
339
+
340
+ - Estimates token usage per file/message
341
+ - Warns at 80% capacity
342
+ - Suggests handoff at 90%
343
+ - Persists across sessions
344
+
345
+ ### 5. Long-Term Memory System
346
+
347
+ Persistent knowledge that survives across sessions:
348
+
349
+ ```bash
350
+ # Search for relevant knowledge
351
+ up memory search "authentication"
352
+
353
+ # Sync git commits and files to memory
354
+ up memory sync
355
+
356
+ # Record learnings and decisions
357
+ up memory record --learning "Use dataclasses for configs"
358
+ up memory record --decision "Chose PostgreSQL for ACID compliance"
359
+
360
+ # View branch-specific knowledge
361
+ up memory branch
362
+ up memory branch feature-x --compare main
363
+ ```
364
+
365
+ Features:
366
+ - **Semantic search** using ChromaDB (local embeddings, no API required)
367
+ - **Branch/commit-aware** - knowledge tagged with git context
368
+ - **Auto-indexing** - git hooks sync commits automatically
369
+ - **Cross-session persistence** - remembers learnings, decisions, errors
370
+
371
+ Storage:
372
+ ```
373
+ .up/
374
+ └── memory/
375
+ └── chroma/ # ChromaDB vector database
376
+ ```
377
+
378
+ ### 6. MCP Server Support
379
+
380
+ Model Context Protocol integration:
381
+
382
+ ```
383
+ .mcp/
384
+ ├── config.json # Server configuration
385
+ ├── tools/ # Custom tool definitions
386
+ └── README.md # Usage guide
387
+ ```
388
+
389
+ ## AI Integration
390
+
391
+ ### Automatic Memory Sync
392
+
393
+ When you run `up init`, git hooks are automatically installed:
394
+
395
+ ```bash
396
+ # Git hooks auto-installed by up init
397
+ .git/hooks/
398
+ ├── post-commit # Auto-indexes commits to memory
399
+ └── post-checkout # Updates context on branch switch
400
+ ```
401
+
402
+ This means your knowledge is captured automatically:
403
+ - Every `git commit` is indexed to memory
404
+ - Branch switches update context
405
+ - No manual sync required for commits
406
+
407
+ ### Generated Files
408
+
409
+ | File | Purpose |
410
+ |------|---------|
411
+ | `CLAUDE.md` | Claude Code instructions |
412
+ | `.cursorrules` | Cursor AI rules |
413
+ | `.cursor/rules/*.md` | File-specific rules |
414
+ | `.claude/context_budget.json` | Context tracking |
415
+ | `.up/memory/` | Long-term memory storage |
416
+
417
+ ### Cursor Rules
418
+
419
+ Generated rules for different file types:
420
+ - `main.md` - General project rules
421
+ - `python.md` - Python standards
422
+ - `typescript.md` - TypeScript standards
423
+ - `docs.md` - Documentation standards
424
+ - `tests.md` - Testing standards
425
+
426
+ ## Design Principles & Practices
427
+
428
+ ### AI-First Development
429
+
430
+ **Design for AI collaboration, not just human readability.**
431
+
432
+ - **Context-aware scaffolding** - Project structures optimized for AI agents to navigate and understand quickly
433
+ - **Explicit over implicit** - Clear file naming, directory structures, and documentation that AI can parse without ambiguity
434
+ - **Prompt-friendly patterns** - Code and docs written to be easily referenced in AI conversations
435
+ - **Tool integration** - Native support for Claude Code skills and Cursor AI rules
436
+
437
+ ### Documentation-Driven Development
438
+
439
+ **Documentation is the source of truth, not an afterthought.**
440
+
441
+ - **Docs-first workflow** - Write documentation before implementation to clarify intent
442
+ - **Living documentation** - Docs evolve with the codebase through automated learning systems
443
+ - **Knowledge extraction** - `/learn` commands analyze patterns and generate insights from real usage
444
+ - **Structured knowledge** - Vision, roadmaps, and changelogs in predictable locations for AI and human consumption
445
+
446
+ ### Product Loop Patterns (SESRC)
447
+
448
+ **Autonomous development with safety guardrails.**
449
+
450
+ - **Circuit breaker protection** - Max 3 consecutive failures before stopping to prevent runaway loops
451
+ - **Checkpoint/rollback** - Save state before risky operations, restore on failure
452
+ - **Health checks** - Validate system state between iterations
453
+ - **Budget limits** - Token and time constraints to prevent unbounded execution
454
+ - **Human-in-the-loop** - Critical decisions require explicit approval
455
+
456
+ ### Core Practices
457
+
458
+ | Practice | Description |
459
+ |----------|-------------|
460
+ | **Incremental delivery** | Ship small, working increments over big-bang releases |
461
+ | **Fail fast, recover faster** | Detect issues early, rollback automatically |
462
+ | **Observable by default** | Logging, metrics, and state visible to both AI and humans |
463
+ | **Convention over configuration** | Sensible defaults that work out of the box |
464
+
465
+ ## Development
466
+
467
+ ```bash
468
+ # Install for development
469
+ pip install -e ".[dev]"
470
+
471
+ # Run tests
472
+ pytest
473
+
474
+ # Lint
475
+ ruff check src/
476
+
477
+ # Type check
478
+ mypy src/
479
+ ```
480
+
481
+ ## Project Structure
482
+
483
+ ```
484
+ up-cli/
485
+ ├── src/up/
486
+ │ ├── cli.py # Main CLI
487
+ │ ├── context.py # Context budget management
488
+ │ ├── memory.py # Long-term memory (ChromaDB)
489
+ │ ├── events.py # Event-driven integration
490
+ │ ├── summarizer.py # Conversation analysis
491
+ │ ├── commands/ # CLI commands
492
+ │ │ ├── init.py # Initialize project
493
+ │ │ ├── new.py # Create new project
494
+ │ │ ├── status.py # System health
495
+ │ │ ├── dashboard.py # Live monitoring
496
+ │ │ ├── learn.py # Learning system
497
+ │ │ ├── memory.py # Memory commands
498
+ │ │ ├── sync.py # Sync & hooks
499
+ │ │ ├── start.py # Product loop
500
+ │ │ └── summarize.py # Conversation summary
501
+ │ └── templates/ # Scaffolding templates
502
+ │ ├── config/ # CLAUDE.md, .cursor/rules
503
+ │ ├── docs/ # Documentation system
504
+ │ ├── learn/ # Learning system
505
+ │ ├── loop/ # Product loop
506
+ │ ├── mcp/ # MCP server
507
+ │ └── projects/ # Project templates
508
+ ├── scripts/ # Utility scripts
509
+ │ ├── export_claude_history.py
510
+ │ └── export_cursor_history.py
511
+ ├── docs/ # Documentation
512
+ │ ├── architecture/ # System architecture
513
+ │ └── guides/ # Usage guides
514
+ └── skills/ # Reference skills
515
+ ```
516
+
517
+ ## License
518
+
519
+ MIT