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
@@ -0,0 +1,341 @@
1
+ """Docs system templates."""
2
+
3
+ from pathlib import Path
4
+
5
+ def create_docs_system(target_dir: Path, force: bool = False) -> None:
6
+ """Create the documentation system structure."""
7
+ docs = target_dir / "docs"
8
+
9
+ # Create directory structure
10
+ dirs = [
11
+ "roadmap/vision",
12
+ "roadmap/phases",
13
+ "roadmap/sales",
14
+ "roadmap/implementation",
15
+ "changelog",
16
+ "architecture",
17
+ "features",
18
+ "guides",
19
+ "operations",
20
+ "development",
21
+ "research",
22
+ "todo",
23
+ # New SDLC folders
24
+ "decisions",
25
+ "handoff",
26
+ "learnings",
27
+ "tests",
28
+ "reviews",
29
+ "releases",
30
+ ]
31
+ for d in dirs:
32
+ (docs / d).mkdir(parents=True, exist_ok=True)
33
+
34
+ # Create template files
35
+ _create_main_readme(docs, force)
36
+ _create_context_file(docs, force)
37
+ _create_index_file(docs, force)
38
+ _create_roadmap_readme(docs, force)
39
+ _create_vision_template(docs, force)
40
+ _create_phase_templates(docs, force)
41
+ _create_changelog_readme(docs, force)
42
+ _create_folder_readmes(docs, force)
43
+ _create_sdlc_readmes(docs, force)
44
+
45
+
46
+ def _create_main_readme(docs: Path, force: bool) -> None:
47
+ """Create main docs README."""
48
+ from datetime import date
49
+ content = f"""# Documentation
50
+
51
+ **Updated**: {date.today().isoformat()}
52
+
53
+ ## Structure
54
+
55
+ | Folder | Purpose |
56
+ |--------|---------|
57
+ | roadmap/ | Strategic planning |
58
+ | architecture/ | System design |
59
+ | features/ | Feature specs |
60
+ | changelog/ | Progress tracking |
61
+ | guides/ | User how-to |
62
+ | todo/ | Future work |
63
+ | decisions/ | ADRs |
64
+ | handoff/ | Session continuity |
65
+ | learnings/ | Patterns discovered |
66
+ | tests/ | Test documentation |
67
+ | reviews/ | Code reviews |
68
+ | releases/ | Release notes |
69
+
70
+ ## Key Files
71
+
72
+ - `CONTEXT.md` - AI reads first (current state)
73
+ - `INDEX.md` - Quick reference to find docs
74
+ - `handoff/LATEST.md` - Most recent session handoff
75
+ """
76
+ _write_file(docs / "README.md", content, force)
77
+
78
+
79
+ def _write_file(path: Path, content: str, force: bool) -> None:
80
+ """Write file if it doesn't exist or force is True."""
81
+ if path.exists() and not force:
82
+ return
83
+ path.write_text(content)
84
+
85
+
86
+ def _create_roadmap_readme(docs: Path, force: bool) -> None:
87
+ """Create roadmap README."""
88
+ content = """# Project Roadmap
89
+
90
+ **Created**: {date}
91
+ **Status**: 🔄 Active
92
+
93
+ ---
94
+
95
+ ## Overview
96
+
97
+ This roadmap defines the evolution of the project.
98
+
99
+ ## Current Status
100
+
101
+ | Phase | Status | Progress |
102
+ |-------|--------|----------|
103
+ | Phase 1: Foundation | 📋 Planned | 0% |
104
+ | Phase 2: Intelligence | 📋 Planned | 0% |
105
+ | Phase 3: Scale | 📋 Planned | 0% |
106
+
107
+ ## Folder Structure
108
+
109
+ ```
110
+ docs/roadmap/
111
+ ├── README.md (this file)
112
+ ├── vision/ (Product Vision)
113
+ ├── phases/ (Phase Roadmaps)
114
+ ├── sales/ (Sales Materials)
115
+ └── implementation/ (Implementation Plans)
116
+ ```
117
+
118
+ ## Quick Links
119
+
120
+ - [Product Vision](./vision/PRODUCT_VISION.md)
121
+ - [Phase 1](./phases/PHASE_1_FOUNDATION.md)
122
+ - [Implementation Status](./implementation/STATUS.md)
123
+ """
124
+ from datetime import date
125
+ content = content.replace("{date}", date.today().isoformat())
126
+ _write_file(docs / "roadmap/README.md", content, force)
127
+
128
+
129
+ def _create_vision_template(docs: Path, force: bool) -> None:
130
+ """Create product vision template."""
131
+ content = """# Product Vision
132
+
133
+ **Created**: {date}
134
+ **Status**: 📋 Draft
135
+
136
+ ---
137
+
138
+ ## The Vision
139
+
140
+ > **One-line vision statement here**
141
+
142
+ ## Problem Statement
143
+
144
+ | Pain Point | Impact |
145
+ |------------|--------|
146
+ | Problem 1 | Description |
147
+ | Problem 2 | Description |
148
+
149
+ ## Solution
150
+
151
+ Brief description of the solution.
152
+
153
+ ## Success Metrics
154
+
155
+ | Metric | Target |
156
+ |--------|--------|
157
+ | Metric 1 | Value |
158
+ | Metric 2 | Value |
159
+ """
160
+ from datetime import date
161
+ content = content.replace("{date}", date.today().isoformat())
162
+ _write_file(docs / "roadmap/vision/PRODUCT_VISION.md", content, force)
163
+
164
+
165
+ def _create_phase_templates(docs: Path, force: bool) -> None:
166
+ """Create phase template files."""
167
+ from datetime import date
168
+ today = date.today().isoformat()
169
+
170
+ phase1 = f"""# Phase 1: Foundation
171
+
172
+ **Timeline**: Q1
173
+ **Status**: 📋 Planned
174
+
175
+ ---
176
+
177
+ ## Objectives
178
+
179
+ 1. Objective 1
180
+ 2. Objective 2
181
+
182
+ ## Deliverables
183
+
184
+ | Task | Priority | Status |
185
+ |------|----------|--------|
186
+ | Task 1 | 🔴 Critical | 📋 Planned |
187
+ | Task 2 | 🟠 High | 📋 Planned |
188
+
189
+ ## Success Criteria
190
+
191
+ - [ ] Criterion 1
192
+ - [ ] Criterion 2
193
+ """
194
+ _write_file(docs / "roadmap/phases/PHASE_1_FOUNDATION.md", phase1, force)
195
+
196
+
197
+ def _create_changelog_readme(docs: Path, force: bool) -> None:
198
+ """Create changelog README."""
199
+ content = """# Changelog
200
+
201
+ **Purpose**: Track progress and changes.
202
+
203
+ ## Format
204
+
205
+ Each entry: `YYYY-MM-DD-topic.md`
206
+
207
+ ## Template
208
+
209
+ ```markdown
210
+ # Change Title
211
+
212
+ **Date**: YYYY-MM-DD
213
+ **Status**: ✅ Completed
214
+
215
+ ## Summary
216
+ Brief overview
217
+
218
+ ## Changes
219
+ - Change 1
220
+ - Change 2
221
+ ```
222
+ """
223
+ _write_file(docs / "changelog/README.md", content, force)
224
+
225
+
226
+ def _create_folder_readmes(docs: Path, force: bool) -> None:
227
+ """Create README for each folder."""
228
+ folders = {
229
+ "architecture": "System design docs",
230
+ "features": "Feature specifications",
231
+ "operations": "Deployment guides",
232
+ "development": "Developer guides",
233
+ "guides": "User how-to guides",
234
+ "research": "Research notes",
235
+ "todo": "Future work tracking",
236
+ }
237
+ for folder, purpose in folders.items():
238
+ content = f"# {folder.title()}\n\n**Purpose**: {purpose}\n"
239
+ _write_file(docs / folder / "README.md", content, force)
240
+
241
+
242
+ def _create_context_file(docs: Path, force: bool) -> None:
243
+ """Create CONTEXT.md - AI reads this first."""
244
+ from datetime import date
245
+ content = f"""# Project Context
246
+
247
+ **Updated**: {date.today().isoformat()}
248
+ **Status**: 🔄 Active
249
+
250
+ ---
251
+
252
+ ## Current State
253
+
254
+ | Aspect | Status |
255
+ |--------|--------|
256
+ | Phase | Planning |
257
+ | Focus | Initial setup |
258
+ | Blockers | None |
259
+
260
+ ## Recent Changes
261
+
262
+ - Project initialized
263
+
264
+ ## Next Steps
265
+
266
+ 1. Define project vision
267
+ 2. Set up development environment
268
+ 3. Begin implementation
269
+
270
+ ## Key Files
271
+
272
+ | File | Purpose |
273
+ |------|---------|
274
+ | CLAUDE.md | AI instructions |
275
+ | docs/handoff/LATEST.md | Session continuity |
276
+ """
277
+ _write_file(docs / "CONTEXT.md", content, force)
278
+
279
+
280
+ def _create_sdlc_readmes(docs: Path, force: bool) -> None:
281
+ """Create README files for SDLC folders."""
282
+ sdlc_folders = {
283
+ "decisions": ("Architecture Decision Records", "ADR-NNN-title.md"),
284
+ "handoff": ("Session continuity for AI agents", "LATEST.md"),
285
+ "learnings": ("Patterns and anti-patterns discovered", "YYYY-MM-DD-topic.md"),
286
+ "tests": ("Test documentation and coverage", "component-tests.md"),
287
+ "reviews": ("Code and design reviews", "YYYY-MM-DD-review.md"),
288
+ "releases": ("Release notes and versioning", "vX.Y.Z-YYYY-MM-DD.md"),
289
+ }
290
+ for folder, (purpose, fmt) in sdlc_folders.items():
291
+ content = f"# {folder.title()}\n\n**Purpose**: {purpose}\n\n**Format**: `{fmt}`\n"
292
+ _write_file(docs / folder / "README.md", content, force)
293
+
294
+
295
+ def _create_index_file(docs: Path, force: bool) -> None:
296
+ """Create INDEX.md - Quick reference for AI to find docs."""
297
+ from datetime import date
298
+ content = f"""# Documentation Index
299
+
300
+ **Updated**: {date.today().isoformat()}
301
+
302
+ > AI: Use this index to quickly find relevant documentation.
303
+
304
+ ---
305
+
306
+ ## Quick Reference
307
+
308
+ | Topic | File | Description |
309
+ |-------|------|-------------|
310
+ | Project State | CONTEXT.md | Current status, blockers, next steps |
311
+ | Recent Work | handoff/LATEST.md | Last session summary |
312
+ | Vision | roadmap/vision/PRODUCT_VISION.md | Product goals |
313
+ | Phase 1 | roadmap/phases/PHASE_1_FOUNDATION.md | Current phase |
314
+
315
+ ## By Category
316
+
317
+ ### Architecture
318
+ | Topic | File |
319
+ |-------|------|
320
+ | *Add architecture docs here* | architecture/*.md |
321
+
322
+ ### Features
323
+ | Topic | File |
324
+ |-------|------|
325
+ | *Add feature specs here* | features/*.md |
326
+
327
+ ### Decisions
328
+ | Topic | File |
329
+ |-------|------|
330
+ | *Add ADRs here* | decisions/ADR-*.md |
331
+
332
+ ---
333
+
334
+ ## How to Update
335
+
336
+ When adding new docs, update this index:
337
+ 1. Add entry to relevant category table
338
+ 2. Keep descriptions brief (5-10 words)
339
+ 3. Use relative paths
340
+ """
341
+ _write_file(docs / "INDEX.md", content, force)
@@ -0,0 +1,24 @@
1
+ # Header Standards
2
+
3
+ ## Required Header
4
+
5
+ ```markdown
6
+ # Document Title
7
+
8
+ **Created**: YYYY-MM-DD
9
+ **Updated**: YYYY-MM-DD
10
+ **Status**: [emoji] [description]
11
+ **Priority**: High/Medium/Low
12
+
13
+ ---
14
+ ```
15
+
16
+ ## Status Values
17
+
18
+ | Status | Emoji | Use When |
19
+ |--------|-------|----------|
20
+ | Complete | ✅ | 100% done |
21
+ | In Progress | 🚧 | Active work |
22
+ | Planned | 📋 | Future work |
23
+ | Draft | 📝 | Early stage |
24
+ | Blocked | 🔴 | Blocked |
@@ -0,0 +1,18 @@
1
+ # Folder Structure
2
+
3
+ ```
4
+ docs/
5
+ ├── README.md
6
+ ├── roadmap/
7
+ │ ├── vision/
8
+ │ ├── phases/
9
+ │ └── sales/
10
+ ├── architecture/
11
+ ├── features/
12
+ ├── changelog/
13
+ ├── guides/
14
+ ├── operations/
15
+ ├── development/
16
+ ├── research/
17
+ └── todo/
18
+ ```
@@ -0,0 +1,19 @@
1
+ # Document Templates
2
+
3
+ ## Feature Template
4
+
5
+ ```markdown
6
+ # Feature: [Name]
7
+
8
+ **Created**: YYYY-MM-DD
9
+ **Status**: 📋 Planned
10
+
11
+ ---
12
+
13
+ ## Overview
14
+ Brief description.
15
+
16
+ ## Requirements
17
+ - Requirement 1
18
+ - Requirement 2
19
+ ```