lovarch-cli 0.2.1__tar.gz

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 (125) hide show
  1. lovarch_cli-0.2.1/.gitignore +76 -0
  2. lovarch_cli-0.2.1/CHANGELOG.md +243 -0
  3. lovarch_cli-0.2.1/LICENSE +38 -0
  4. lovarch_cli-0.2.1/PKG-INFO +232 -0
  5. lovarch_cli-0.2.1/README.md +173 -0
  6. lovarch_cli-0.2.1/lovarch_cli/__init__.py +16 -0
  7. lovarch_cli-0.2.1/lovarch_cli/__main__.py +10 -0
  8. lovarch_cli-0.2.1/lovarch_cli/ai/__init__.py +21 -0
  9. lovarch_cli-0.2.1/lovarch_cli/ai/gateway.py +240 -0
  10. lovarch_cli-0.2.1/lovarch_cli/api.py +111 -0
  11. lovarch_cli-0.2.1/lovarch_cli/auth/__init__.py +32 -0
  12. lovarch_cli-0.2.1/lovarch_cli/auth/keyring_store.py +214 -0
  13. lovarch_cli-0.2.1/lovarch_cli/auth/local_server.py +165 -0
  14. lovarch_cli-0.2.1/lovarch_cli/auth/pkce.py +57 -0
  15. lovarch_cli-0.2.1/lovarch_cli/auth/session.py +189 -0
  16. lovarch_cli-0.2.1/lovarch_cli/cli.py +262 -0
  17. lovarch_cli-0.2.1/lovarch_cli/clients/__init__.py +33 -0
  18. lovarch_cli-0.2.1/lovarch_cli/clients/factory.py +54 -0
  19. lovarch_cli-0.2.1/lovarch_cli/clients/local_client.py +432 -0
  20. lovarch_cli-0.2.1/lovarch_cli/clients/lovarch_storage.py +174 -0
  21. lovarch_cli-0.2.1/lovarch_cli/clients/lovarch_supabase.py +295 -0
  22. lovarch_cli-0.2.1/lovarch_cli/clients/persistence.py +166 -0
  23. lovarch_cli-0.2.1/lovarch_cli/clients/storage.py +66 -0
  24. lovarch_cli-0.2.1/lovarch_cli/commands/__init__.py +10 -0
  25. lovarch_cli-0.2.1/lovarch_cli/commands/account.py +172 -0
  26. lovarch_cli-0.2.1/lovarch_cli/commands/audit.py +394 -0
  27. lovarch_cli-0.2.1/lovarch_cli/commands/config_cmd.py +80 -0
  28. lovarch_cli-0.2.1/lovarch_cli/commands/consolidate.py +217 -0
  29. lovarch_cli-0.2.1/lovarch_cli/commands/context_cmd.py +73 -0
  30. lovarch_cli-0.2.1/lovarch_cli/commands/dev.py +287 -0
  31. lovarch_cli-0.2.1/lovarch_cli/commands/do_cmd.py +120 -0
  32. lovarch_cli-0.2.1/lovarch_cli/commands/init.py +218 -0
  33. lovarch_cli-0.2.1/lovarch_cli/commands/jobs_cmd.py +95 -0
  34. lovarch_cli-0.2.1/lovarch_cli/commands/login.py +202 -0
  35. lovarch_cli-0.2.1/lovarch_cli/commands/mcp_cmd.py +26 -0
  36. lovarch_cli-0.2.1/lovarch_cli/commands/run.py +375 -0
  37. lovarch_cli-0.2.1/lovarch_cli/commands/signup.py +185 -0
  38. lovarch_cli-0.2.1/lovarch_cli/commands/status.py +243 -0
  39. lovarch_cli-0.2.1/lovarch_cli/commands/upgrade.py +108 -0
  40. lovarch_cli-0.2.1/lovarch_cli/commands/verifica_cmd.py +174 -0
  41. lovarch_cli-0.2.1/lovarch_cli/config.py +101 -0
  42. lovarch_cli-0.2.1/lovarch_cli/config_store.py +111 -0
  43. lovarch_cli-0.2.1/lovarch_cli/credits/__init__.py +35 -0
  44. lovarch_cli-0.2.1/lovarch_cli/credits/base.py +84 -0
  45. lovarch_cli-0.2.1/lovarch_cli/credits/factory.py +36 -0
  46. lovarch_cli-0.2.1/lovarch_cli/credits/local.py +34 -0
  47. lovarch_cli-0.2.1/lovarch_cli/credits/lovarch.py +56 -0
  48. lovarch_cli-0.2.1/lovarch_cli/i18n/__init__.py +27 -0
  49. lovarch_cli-0.2.1/lovarch_cli/i18n/loader.py +121 -0
  50. lovarch_cli-0.2.1/lovarch_cli/i18n/translations/en.json +168 -0
  51. lovarch_cli-0.2.1/lovarch_cli/i18n/translations/es.json +168 -0
  52. lovarch_cli-0.2.1/lovarch_cli/i18n/translations/it.json +168 -0
  53. lovarch_cli-0.2.1/lovarch_cli/i18n/translations/pt.json +168 -0
  54. lovarch_cli-0.2.1/lovarch_cli/mcp/__init__.py +9 -0
  55. lovarch_cli-0.2.1/lovarch_cli/mcp/server.py +199 -0
  56. lovarch_cli-0.2.1/lovarch_cli/mcp/tools.py +372 -0
  57. lovarch_cli-0.2.1/lovarch_cli/sample_downloader.py +255 -0
  58. lovarch_cli-0.2.1/lovarch_cli/squad/README.md +206 -0
  59. lovarch_cli-0.2.1/lovarch_cli/squad/agents/auditor-input.md +353 -0
  60. lovarch_cli-0.2.1/lovarch_cli/squad/agents/bim-engineer.md +404 -0
  61. lovarch_cli-0.2.1/lovarch_cli/squad/agents/briefing-architect.md +249 -0
  62. lovarch_cli-0.2.1/lovarch_cli/squad/agents/cad-engineer.md +278 -0
  63. lovarch_cli-0.2.1/lovarch_cli/squad/agents/capitolato-writer.md +256 -0
  64. lovarch_cli-0.2.1/lovarch_cli/squad/agents/computo-engineer.md +258 -0
  65. lovarch_cli-0.2.1/lovarch_cli/squad/agents/concept-designer.md +399 -0
  66. lovarch_cli-0.2.1/lovarch_cli/squad/agents/contratto-architect.md +243 -0
  67. lovarch_cli-0.2.1/lovarch_cli/squad/agents/deliverable-builder.md +253 -0
  68. lovarch_cli-0.2.1/lovarch_cli/squad/agents/energy-prelim.md +388 -0
  69. lovarch_cli-0.2.1/lovarch_cli/squad/agents/pratiche-it.md +251 -0
  70. lovarch_cli-0.2.1/lovarch_cli/squad/agents/progetto-chief.md +768 -0
  71. lovarch_cli-0.2.1/lovarch_cli/squad/agents/quality-dati.md +409 -0
  72. lovarch_cli-0.2.1/lovarch_cli/squad/agents/quality-misure.md +418 -0
  73. lovarch_cli-0.2.1/lovarch_cli/squad/agents/quality-normativa.md +417 -0
  74. lovarch_cli-0.2.1/lovarch_cli/squad/agents/quality-output.md +436 -0
  75. lovarch_cli-0.2.1/lovarch_cli/squad/agents/regolatorio-it.md +278 -0
  76. lovarch_cli-0.2.1/lovarch_cli/squad/checklists/handoff-quality-gate.md +232 -0
  77. lovarch_cli-0.2.1/lovarch_cli/squad/checklists/quality-dati-checklist.md +134 -0
  78. lovarch_cli-0.2.1/lovarch_cli/squad/checklists/quality-misure-checklist.md +139 -0
  79. lovarch_cli-0.2.1/lovarch_cli/squad/checklists/quality-normativa-checklist.md +121 -0
  80. lovarch_cli-0.2.1/lovarch_cli/squad/checklists/quality-output-checklist.md +116 -0
  81. lovarch_cli-0.2.1/lovarch_cli/squad/config.yaml +408 -0
  82. lovarch_cli-0.2.1/lovarch_cli/squad/data/CHANGELOG.md +272 -0
  83. lovarch_cli-0.2.1/lovarch_cli/squad/data/agents-prd.md +428 -0
  84. lovarch_cli-0.2.1/lovarch_cli/squad/data/architettura-progetto-rules.md +328 -0
  85. lovarch_cli-0.2.1/lovarch_cli/squad/data/handoff-card-template.md +231 -0
  86. lovarch_cli-0.2.1/lovarch_cli/squad/data/mocks/catasto-visura.json +72 -0
  87. lovarch_cli-0.2.1/lovarch_cli/squad/data/mocks/firma-envelope.json +43 -0
  88. lovarch_cli-0.2.1/lovarch_cli/squad/data/prezzario-lombardia-sample.json +312 -0
  89. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/api_clients.py +206 -0
  90. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/architect_profile.py +276 -0
  91. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/deliverable_generators.py +844 -0
  92. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/generate_attico_brera_dwg.py +369 -0
  93. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/generate_chianti_dxf.py +368 -0
  94. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/generate_chianti_images.py +223 -0
  95. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/generate_real_sample_images.py +189 -0
  96. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/generate_sample_assets.py +382 -0
  97. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/lovarch_client.py +1046 -0
  98. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/pipeline_runner.py +2095 -0
  99. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/render_dxf_to_png.py +57 -0
  100. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/run_palestra_demo.sh +277 -0
  101. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/simulate_squad_execution.py +515 -0
  102. lovarch_cli-0.2.1/lovarch_cli/squad/scripts/validate-squad.py +383 -0
  103. lovarch_cli-0.2.1/lovarch_cli/squad/tasks/audit-input.md +146 -0
  104. lovarch_cli-0.2.1/lovarch_cli/squad/tasks/compute-metric.md +105 -0
  105. lovarch_cli-0.2.1/lovarch_cli/squad/tasks/consolidate-dossier.md +187 -0
  106. lovarch_cli-0.2.1/lovarch_cli/squad/tasks/generate-cad-plan.md +120 -0
  107. lovarch_cli-0.2.1/lovarch_cli/squad/tasks/generate-ifc-model.md +108 -0
  108. lovarch_cli-0.2.1/lovarch_cli/squad/tasks/write-capitolato.md +100 -0
  109. lovarch_cli-0.2.1/lovarch_cli/squad/templates/asseverazione-tecnica.md +126 -0
  110. lovarch_cli-0.2.1/lovarch_cli/squad/templates/capitolato-uni-11337.md +235 -0
  111. lovarch_cli-0.2.1/lovarch_cli/squad/templates/cila-comune-milano.md +177 -0
  112. lovarch_cli-0.2.1/lovarch_cli/squad/templates/contratto-cnappc.md +220 -0
  113. lovarch_cli-0.2.1/lovarch_cli/squad/workflows/dal-brief-al-cantiere.yaml +218 -0
  114. lovarch_cli-0.2.1/lovarch_cli/squad_loader.py +114 -0
  115. lovarch_cli-0.2.1/lovarch_cli/verify/__init__.py +15 -0
  116. lovarch_cli-0.2.1/lovarch_cli/verify/contratto.py +110 -0
  117. lovarch_cli-0.2.1/lovarch_cli/verify/dossier.py +97 -0
  118. lovarch_cli-0.2.1/lovarch_cli/verify/misure.py +83 -0
  119. lovarch_cli-0.2.1/lovarch_cli/verify/normativa.py +178 -0
  120. lovarch_cli-0.2.1/lovarch_cli/version.py +13 -0
  121. lovarch_cli-0.2.1/lovarch_cli/workflows/__init__.py +9 -0
  122. lovarch_cli-0.2.1/lovarch_cli/workflows/platform.py +212 -0
  123. lovarch_cli-0.2.1/pyproject.toml +117 -0
  124. lovarch_cli-0.2.1/scripts/refresh_squad_vendor.py +96 -0
  125. lovarch_cli-0.2.1/scripts/sync_squad.py +110 -0
@@ -0,0 +1,76 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ share/python-wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+ MANIFEST
24
+
25
+ # uv / pip
26
+ .venv/
27
+ venv/
28
+ env/
29
+ ENV/
30
+ .python-version
31
+ uv.lock
32
+
33
+ # Testing
34
+ .pytest_cache/
35
+ .coverage
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ coverage.xml
40
+ *.cover
41
+ .cache
42
+
43
+ # Type checking
44
+ .mypy_cache/
45
+ .ruff_cache/
46
+ .dmypy.json
47
+
48
+ # IDE
49
+ .vscode/
50
+ .idea/
51
+ *.swp
52
+ *.swo
53
+ *~
54
+
55
+ # OS
56
+ .DS_Store
57
+ Thumbs.db
58
+
59
+ # CLI runtime data (NEVER commit user credentials)
60
+ .lovarch/
61
+ *.lovarch/
62
+
63
+ # Squad payload — vendored from monorepo Lovarch (see scripts/refresh_squad_vendor.py).
64
+ # Light vendor (~830KB, no sample-inputs); sample-input villa-chianti is shipped
65
+ # via GitHub Releases and downloaded lazily by `lovarch init --sample`.
66
+ # We ignore the heavy sample-inputs even if accidentally rsynced into the tree.
67
+ lovarch_cli/squad/data/sample-input/
68
+ lovarch_cli/squad/data/sample-input-villa-chianti/
69
+
70
+ # Local test outputs
71
+ test-output/
72
+ tests/fixtures/output/
73
+
74
+ # Built bundled docs
75
+ docs/_build/
76
+ site/
@@ -0,0 +1,243 @@
1
+ # Changelog
2
+
3
+ All notable changes to `lovarch-cli` are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ (No unreleased changes yet — last release was v0.2.1.)
11
+
12
+ ## [0.2.1] — 2026-07-03
13
+
14
+ ### Fixed
15
+
16
+ - Python 3.11: f-string with a backslash escape in the expression part
17
+ (verifica contratto) crashed the whole CLI at import time on 3.11
18
+ (3.12+ tolerates it). Moved the escape out of the expression.
19
+ - Lint: unused import in tests.
20
+
21
+ ## [0.2.0] — 2026-07-03
22
+
23
+ ### Added — Premium billing, MCP server, platform workflows, verifica
24
+
25
+ The release that makes the premium CLI bill and behave like the platform:
26
+
27
+ - **Credit debit for real**: premium `lovarch run` now routes ALL paid AI
28
+ through the `cli-ai-generate` / `cli-ai-text` Edge Functions, debiting the
29
+ user's Lovarch credits (1000cr=$1) with refund on failure. The runner no
30
+ longer needs the student's `OPENAI_API_KEY` nor a service_role key —
31
+ persistence writes as the USER (RLS).
32
+ - **MCP server** — `lovarch mcp serve` (stdio; `pip install 'lovarch-cli[mcp]'`
33
+ or bundled). 15 tools: whoami, credits, generate_image, ai_text (multi-model:
34
+ executor=Sonnet 5 · verifier/chief=Opus 4.8, or explicit model from the
35
+ platform catalog), context, render, colors, copy, audit_input, list_projects,
36
+ verify_misure/normativa/contratto/dossier, job_status.
37
+ Register: `claude mcp add lovarch -- lovarch mcp serve`.
38
+ - **`lovarch do render|colors|copy`** — platform workflows from the terminal
39
+ (Render Studio 2D/3D with reference image, brand palettes, marketing copy).
40
+ - **`lovarch verifica misure|normativa|contratto|dossier`** — data checking for
41
+ professionals: deterministic DXF checks (free) + ADVERSARIAL two-model
42
+ document checks (Sonnet extracts → Opus refutes phantom articles; CNAPPC
43
+ contract structure + compenso rule QN_007).
44
+ - **`lovarch context show`** — the personalization bundle agents use (brand,
45
+ style, professional signature, fiscal data, output language).
46
+ - **`lovarch jobs list|status`** — async platform jobs (video/export/upscale).
47
+ - **`lovarch config`** — user preferences + BYO API keys for free mode.
48
+
49
+ ### Changed
50
+
51
+ - User-facing cost is ALWAYS credits — provider USD amounts never appear in any
52
+ CLI/MCP output.
53
+ - Output language strictly follows the user's configured language.
54
+
55
+ ### Dependencies
56
+
57
+ - New: `pypdf` (PDF text extraction) · optional extra `[mcp]`.
58
+
59
+
60
+ ## [0.1.2] — 2026-06-12
61
+
62
+ ### Fixed
63
+
64
+ - `lovarch run` now maps the pipeline's `qa_rejected` exit code (3) to a
65
+ distinct `last_run.status`, instead of collapsing it into a generic
66
+ failure. A QA-rejected dossier is no longer reported as completed.
67
+ - Vendored squad snapshot refreshed with the 2026-06-12 audit corrections
68
+ (pipeline no longer marks a run COMPLETED when a Tier 2 QA agent returns
69
+ REJECT).
70
+
71
+ ### Docs
72
+
73
+ - README version examples and test count aligned with the shipped release.
74
+
75
+ ## [0.1.1] — 2026-05-11
76
+
77
+ ### Added — Squad development loop
78
+
79
+ Unlocks the daily iteration cycle on squad-architettura-progetto agents
80
+ without refresh round-trips. Maintainer edits the monorepo, every
81
+ `lovarch run` invocation picks up the change immediately.
82
+
83
+ - `LOVARCH_SQUAD_SRC` environment variable and `--squad-src` flag on
84
+ `lovarch run` and `lovarch init`. Resolution chain: flag > env var >
85
+ bundled vendor. When an override is active, `lovarch run` prints
86
+ `↳ squad: <path> (source)` so the user knows which payload is in use.
87
+ - New module `lovarch_cli/squad_loader.py` centralizes the resolution
88
+ logic. Validates that the resolved path looks like a squad payload
89
+ (has `scripts/pipeline_runner.py` + `agents/`) and raises
90
+ `SquadNotFoundError` with an actionable message otherwise.
91
+ - `lovarch dev show-squad-root` prints which squad path is currently
92
+ resolved, plus env var value and bundled fallback for debugging.
93
+ - `lovarch dev refresh-squad [--source PATH] [--target PATH] [--dry-run]`
94
+ promotes monorepo edits into the vendored snapshot in this repo.
95
+ Auto-detects target via `__file__` heuristic when running from a dev
96
+ install (`pip install -e`).
97
+ - `docs/agent-development.md` documents the three-environment model
98
+ (DEV / STAGED / PRODUCTION), the daily iteration loop, the promotion
99
+ flow, release cadence, and common pitfalls.
100
+
101
+ ### Other
102
+
103
+ - Initial v0.1.0 stable release infrastructure validated end-to-end
104
+ (homebrew tap auto-bump after the secret-context fix in PR #7,
105
+ GitHub Release attach workflow, brew install + smoke test working
106
+ on Pablo's machine).
107
+
108
+ ### Distribution strategy
109
+
110
+ `lovarch-cli` ships via three channels — **PyPI is NOT one of them** for v0.1:
111
+
112
+ 1. **Homebrew tap** (`brew install lovarch-cli`) — primary install for
113
+ macOS/Linux users
114
+ 2. **pipx from GitHub** (`pipx install git+https://...`) — for Python-savvy
115
+ users who prefer isolated venv
116
+ 3. **Source clone + pip install -e** — for contributors
117
+
118
+ PyPI publication (`pip install lovarch-cli`) is deferred to v0.2+ to avoid
119
+ the token/2FA setup overhead. The `publish-pypi.yml` workflow is kept as
120
+ manual `workflow_dispatch` so it can be activated when wanted, without
121
+ running automatically on every tag.
122
+
123
+ ### Deferred to Q3
124
+
125
+ - **Story 1.3 — `pipeline_runner.py` refactor**: split the 1821-line legacy
126
+ runner into modular phases. Currently shelled out via subprocess; works
127
+ but is hard to unit-test independently. Adding `--legacy-runner` flag
128
+ to allow fallback during the migration.
129
+ - **PyPI publication**: re-enable `publish-pypi.yml` on `push: tags: [v*]`
130
+ trigger once a PyPI account + project-scoped token are configured.
131
+
132
+ ## [0.1.0-beta.1] — 2026-05-10
133
+
134
+ First public BETA. Repository extracted from the Lovarch monorepo into
135
+ `ArchPrime-official/lovarch-cli` via `git filter-repo`. 13 commits of
136
+ CLI-specific history preserved.
137
+
138
+ ### Added — Commands (Fase A)
139
+
140
+ - `lovarch info` — version + squad + mode status panel
141
+ - `lovarch init <name>` — scaffold a project with `input/`, `output/`,
142
+ `project.yaml`. `--sample` lazily downloads the villa-chianti starter
143
+ from GitHub Releases (SHA256 verified, cached in `~/.lovarch/cache/`).
144
+ `--workflow`, `--force`, `--home` overrides.
145
+ - `lovarch audit <name>` — 18-point input checklist in 3 tiers:
146
+ REQUIRED (10 — failure means FAIL verdict), RECOMMENDED (4 — CONCERNS),
147
+ BRIEFING DEPTH (4 — CONCERNS). `--json` flag for CI integration.
148
+ Persists `last_audit` in `project.yaml`.
149
+ - `lovarch run <workflow> <project>` — pre-flight gates (project exists,
150
+ input non-empty, last audit ≠ FAIL, credits for Premium).
151
+ Free mode: subprocess `pipeline_runner.py --dry-run` (simulation, no API
152
+ calls). Premium mode: subprocess `--real` (debits Lovarch credits).
153
+ `--skip-audit`, `--skip-credits`, `--dry-run` escape hatches.
154
+ - `lovarch consolidate <name>` — filename-prefix → 6-folder routing
155
+ (`00-validation/`, `01-bootstrap/`, `02-concept/`, `03-tier1/`,
156
+ `04-tier2/`, `05-dossier/`) + `99-other/` fallback. ZIP includes a
157
+ localized README in 4 languages. Persists `last_dossier` in
158
+ `project.yaml`.
159
+ - `lovarch status [<name>]` — list view (all projects with workflow + audit
160
+ verdict + dossier state + age) or detail view (audit breakdown, dossier
161
+ path/size, output count). Reads only `project.yaml`, no backend.
162
+
163
+ ### Added — Auth & Account
164
+
165
+ - `lovarch signup` — interactive Free signup with GDPR consent. Calls
166
+ `cli-signup` Edge Function in the Lovarch monorepo; persists token
167
+ via OS keyring.
168
+ - `lovarch login` — interactive mode selection (free/premium). Premium
169
+ uses PKCE OAuth flow with local callback server; falls back to manual
170
+ URL if browser cannot open.
171
+ - `lovarch account info` / `lovarch account delete` — GDPR right-to-erasure
172
+ (pseudonymizes remote data, revokes token; optionally wipes
173
+ `~/.lovarch/projects/`).
174
+ - `lovarch upgrade` — opens `/cli-upgrade` (Free) or `/settings/credits`
175
+ (Premium) with `creds.language` preference.
176
+
177
+ ### Added — Infrastructure
178
+
179
+ - 4 languages bundled (it/pt/en/es) with parity anti-drift tests
180
+ (`tests/test_i18n_loader.py`). 120+ keys across `signup`/`account`/
181
+ `login`/`info`/`errors`/`upgrade`/`init`/`audit`/`run`/`consolidate`/
182
+ `status` namespaces. Italian is the default; detection via `--lang`
183
+ flag → `LOVARCH_LANG` env → `LANG` env → `'it'`.
184
+ - `DataPersistenceClient` ABC with `LocalSqliteClient` (Free) and
185
+ `LovarchSupabaseClient` (Premium) implementations. Mirrors the
186
+ `pm_squad_executions` / `pm_squad_steps` / `pm_squad_qa_checks`
187
+ monorepo tables.
188
+ - `CreditsClient` ABC with `FreeCreditsClient` (no-op) and
189
+ `LovarchCreditsClient` (calls `cli-credits-check` Edge Function with
190
+ auto-refresh-on-401).
191
+ - 142 pytest passing in 0.7s (smoke E2E + unit coverage for i18n,
192
+ credits, persistence, audit, init, consolidate, status,
193
+ sample_downloader).
194
+ - CI matrix Python 3.11/3.12/3.13 + pyflakes + smoke (lovarch info /
195
+ arch alias).
196
+ - Bundled squad (architettura-progetto, ~830KB) — 17 agents, 6 tasks,
197
+ 1 workflow (`dal-brief-al-cantiere`), 5 checklists, 4 templates. Heavy
198
+ sample-input villa-chianti (49MB) shipped as a GitHub Releases asset
199
+ and downloaded lazily by `lovarch init --sample`.
200
+ - Build hook (`scripts/sync_squad.py`) two-mode behavior: NO-OP in
201
+ standalone repo (preserves vendor); re-syncs from sibling
202
+ `squads/architettura-progetto/` in monorepo dev.
203
+ - Manual vendor refresh: `scripts/refresh_squad_vendor.py`.
204
+ - Release infrastructure:
205
+ - `.github/workflows/publish-pypi.yml` — verifies tag matches
206
+ `lovarch_cli/version.py`, builds wheel + sdist, uploads to PyPI for
207
+ final tags only (skip pre-release).
208
+ - `.github/workflows/attach-to-release.yml` — attaches wheel + sdist
209
+ to the GitHub Release for every `v*` tag.
210
+ - `.github/workflows/bump-homebrew-formula.yml` — auto-opens bump PR
211
+ in `ArchPrime-official/homebrew-lovarch` when a final tag is pushed.
212
+
213
+ ### Documentation
214
+
215
+ - `docs/squad-vendoring.md` — what is vendored, what isn't, why, how to
216
+ refresh.
217
+ - `docs/release-process.md` — semver bump policy, tag conventions
218
+ (final vs pre-release), PyPI/Homebrew setup steps, rollback guide.
219
+ - `MIGRATION-PLAN.md` — executed runbook documenting the monorepo →
220
+ standalone split (filter-repo, history preservation, etc.).
221
+
222
+ ### Companion repositories
223
+
224
+ - [`ArchPrime-official/homebrew-lovarch`](https://github.com/ArchPrime-official/homebrew-lovarch)
225
+ — Homebrew tap with `Formula/lovarch-cli.rb`. CI tested via
226
+ `brew install --build-from-source` + `brew test` on macos-latest.
227
+
228
+ ### Known limitations
229
+
230
+ - `pip install lovarch-cli` (from PyPI) is intentionally not supported
231
+ in v0.1 — install via `brew tap` + `brew install` OR `pipx install git+...`
232
+ (see README). PyPI deferred to v0.2+.
233
+ - `brew install lovarch-cli` requires the `brew tap archprime-official/lovarch`
234
+ step first (no homebrew-core submission yet).
235
+ - `arch run` shells out to the legacy 1821-line `pipeline_runner.py` —
236
+ Story 1.3 refactor deferred to Q3.
237
+ - Voice/avatar/render features depend on Edge Functions in the Lovarch
238
+ monorepo — Free dry-run does NOT actually call them.
239
+
240
+ [Unreleased]: https://github.com/ArchPrime-official/lovarch-cli/compare/v0.1.1...HEAD
241
+ [0.1.1]: https://github.com/ArchPrime-official/lovarch-cli/compare/v0.1.0...v0.1.1
242
+ [0.1.0]: https://github.com/ArchPrime-official/lovarch-cli/compare/v0.1.0-beta.1...v0.1.0
243
+ [0.1.0-beta.1]: https://github.com/ArchPrime-official/lovarch-cli/releases/tag/v0.1.0-beta.1
@@ -0,0 +1,38 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pablo Ruan Lopes / Lovarch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ ADDITIONAL NOTICE FOR ITALIAN LEGAL/REGULATORY OUTPUT:
26
+
27
+ This software generates pre-compiled drafts of Italian regulatory documents
28
+ (CILA, SCIA, Paesaggistica, Capitolato d'Appalto) based on DPR 380/2001,
29
+ UNI 11337-7, CAM Edilizia 2025, and CNAPPC 2023 frameworks.
30
+
31
+ These outputs DO NOT replace:
32
+ - Qualified electronic signature (firma digitale QES) of a licensed architect
33
+ - Professional liability of an authorized architect (architetto abilitato)
34
+ - On-site survey and structural verification per NTC 2018
35
+ - Health & safety coordination per D.Lgs 81/2008
36
+
37
+ The user assumes full responsibility for verifying outputs and obtaining
38
+ the necessary professional review before submission to any authority.
@@ -0,0 +1,232 @@
1
+ Metadata-Version: 2.4
2
+ Name: lovarch-cli
3
+ Version: 0.2.1
4
+ Summary: AI-powered architectural project execution CLI by Lovarch
5
+ Project-URL: Homepage, https://archprime.io
6
+ Project-URL: Documentation, https://lovarch.com/cli-docs
7
+ Project-URL: Repository, https://github.com/ArchPrime-official/lovarch-cli
8
+ Project-URL: Issues, https://github.com/ArchPrime-official/lovarch-cli/issues
9
+ Project-URL: Changelog, https://github.com/ArchPrime-official/lovarch-cli/releases
10
+ Project-URL: Course, https://lovarch.com/corso
11
+ Author-email: Pablo Ruan Lopes <pablo@archprime.io>
12
+ License: MIT
13
+ License-File: LICENSE
14
+ Keywords: ai,architecture,bim,cad,cila,ifc,italy,lovarch,uni-11337
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Environment :: Console
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: End Users/Desktop
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Natural Language :: English
21
+ Classifier: Natural Language :: Italian
22
+ Classifier: Natural Language :: Portuguese
23
+ Classifier: Natural Language :: Spanish
24
+ Classifier: Operating System :: OS Independent
25
+ Classifier: Programming Language :: Python :: 3
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Programming Language :: Python :: 3.13
29
+ Classifier: Topic :: Multimedia :: Graphics
30
+ Classifier: Topic :: Scientific/Engineering
31
+ Classifier: Topic :: Software Development :: Code Generators
32
+ Requires-Python: >=3.11
33
+ Requires-Dist: ezdxf<2.0,>=1.3
34
+ Requires-Dist: httpx<0.29,>=0.27
35
+ Requires-Dist: ifcopenshell<0.9,>=0.7
36
+ Requires-Dist: keyring<26.0,>=24.0
37
+ Requires-Dist: pillow<12.0,>=10.0
38
+ Requires-Dist: pydantic<3.0,>=2.6
39
+ Requires-Dist: pypdf<6.0,>=4.0
40
+ Requires-Dist: pyyaml<7.0,>=6.0
41
+ Requires-Dist: reportlab<5.0,>=4.0
42
+ Requires-Dist: rich<14.0,>=13.7
43
+ Requires-Dist: typer<0.16,>=0.12
44
+ Requires-Dist: xlsxwriter<4.0,>=3.2
45
+ Provides-Extra: dev
46
+ Requires-Dist: mcp>=1.2; extra == 'dev'
47
+ Requires-Dist: mypy>=1.10; extra == 'dev'
48
+ Requires-Dist: pre-commit>=3.6; extra == 'dev'
49
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
50
+ Requires-Dist: pytest-cov>=4.1; extra == 'dev'
51
+ Requires-Dist: pytest>=8.0; extra == 'dev'
52
+ Requires-Dist: ruff>=0.4; extra == 'dev'
53
+ Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
54
+ Provides-Extra: mcp
55
+ Requires-Dist: mcp>=1.2; extra == 'mcp'
56
+ Provides-Extra: premium
57
+ Requires-Dist: supabase<3.0,>=2.4; extra == 'premium'
58
+ Description-Content-Type: text/markdown
59
+
60
+ # lovarch-cli
61
+
62
+ [![CI](https://github.com/ArchPrime-official/lovarch-cli/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ArchPrime-official/lovarch-cli/actions/workflows/ci.yml)
63
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
64
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
65
+ [![Release](https://img.shields.io/github/v/release/ArchPrime-official/lovarch-cli?include_prereleases)](https://github.com/ArchPrime-official/lovarch-cli/releases)
66
+
67
+ > **AI-powered architectural project execution CLI** — squad di 17 agenti specializzati che esegue audit input, briefing, normativa IT, CAD, BIM/IFC, computo metrico, capitolato, pratiche edilizie (CILA/SCIA), contratto CNAPPC, energy/LCA preliminare, dossier consolidato — in 14 minuti vs 3 settimane di lavoro tradizionale.
68
+
69
+ > ⚠️ **Status: BETA (v0.1.x)** — distribuito via Homebrew tap + pipx-from-git. Usato in produzione dagli iscritti al [Corso IA Avanzato per Architetti](https://lovarch.com/corso) (€1.497). Pubblicazione su PyPI valutata per v0.2+.
70
+
71
+ 🌐 **Lingue:** [🇮🇹 Italiano](README.md) (default) · [🇵🇹 Português](README.pt.md) · [🇬🇧 English](README.en.md) · [🇪🇸 Español](README.es.md)
72
+
73
+ ---
74
+
75
+ ## Cosa fa
76
+
77
+ `lovarch-cli` orchestra il **Squad Architettura-Progetto** di Lovarch — 17 agenti AI con framework documentati (mind clones di Schumacher, Baldwin, Mazria, Deming, Juran, English, Dodds) — per generare 27 deliverable architettonici conformi alla normativa italiana:
78
+
79
+ - **Audit input** (18 controlli) prima di iniziare
80
+ - **CAD quotato** DXF/PDF (UNI ISO 5457, ±1mm)
81
+ - **BIM IFC4 LOD 300**
82
+ - **Computo metrico** (Prezzario Lombardia 2025)
83
+ - **Capitolato Speciale d'Appalto** (UNI 11337-7 + CAM 2025)
84
+ - **Pratiche edilizie pre-compilate** (CILA/SCIA/Paesaggistica)
85
+ - **Contratto CNAPPC** + Equo Compenso L.49/2023
86
+ - **APE Preliminare + LCA Embodied Carbon**
87
+ - **Dossier finale** ZIP con 27 documenti
88
+
89
+ ## Due modalità
90
+
91
+ ### 🆓 Free Mode (registrazione richiesta)
92
+
93
+ ```bash
94
+ lovarch signup
95
+ # → Cadastro: Nome completo, email, telefono, paese, lingua
96
+ ```
97
+
98
+ - Esegui il squad **localmente** con i tuoi propri API keys (OpenAI, Mapbox, fal.ai)
99
+ - Storage in `~/.lovarch/projects/` (filesystem locale)
100
+ - Database in `~/.lovarch/local.db` (SQLite)
101
+ - Tutti i 17 agenti disponibili
102
+ - Tu paghi le tue API direttamente ai provider
103
+
104
+ ### ⭐ Premium Mode (login Lovarch)
105
+
106
+ ```bash
107
+ arch login --premium
108
+ # → Apre il browser per autenticazione Lovarch (PKCE flow)
109
+ ```
110
+
111
+ - Login con il tuo account Lovarch esistente
112
+ - Crediti inclusi nel piano (Personal €49 / Studio €99 / Business €199)
113
+ - Backend Lovarch (Supabase + S3 + Edge Functions ottimizzate)
114
+ - Sincronizzazione web app `lovarch.com/admin/squad-execution/{id}/live`
115
+ - Team member ownership automatico
116
+
117
+ ## Installazione
118
+
119
+ ### 🍺 Homebrew (raccomandato — macOS / Linux)
120
+
121
+ Il modo più semplice. Funziona anche per chi non ha familiarità con Python:
122
+
123
+ ```bash
124
+ brew tap archprime-official/lovarch
125
+ brew install lovarch-cli
126
+ lovarch --version
127
+ ```
128
+
129
+ `brew upgrade lovarch-cli` aggiorna alla nuova release.
130
+
131
+ ### 📦 pipx — install isolato da GitHub
132
+
133
+ Se preferisci un'install Python isolata senza Homebrew (utile su Linux server,
134
+ WSL, o se hai già pipx configurato):
135
+
136
+ ```bash
137
+ # Ultima release (anche pre-release):
138
+ pipx install git+https://github.com/ArchPrime-official/lovarch-cli.git@v0.1.2
139
+
140
+ # Oppure dal branch main (rolling):
141
+ pipx install git+https://github.com/ArchPrime-official/lovarch-cli.git
142
+ ```
143
+
144
+ `pipx upgrade lovarch-cli` aggiorna alla revisione successiva.
145
+
146
+ ### 🛠️ Da sorgente (per sviluppatori / contributori)
147
+
148
+ ```bash
149
+ git clone https://github.com/ArchPrime-official/lovarch-cli.git
150
+ cd lovarch-cli
151
+ python3.12 -m venv .venv && source .venv/bin/activate
152
+ pip install -e ".[dev]"
153
+ pytest tests/ # → 142 passing
154
+ lovarch --version
155
+ ```
156
+
157
+ Vedi [CONTRIBUTING.md](./CONTRIBUTING.md) per il workflow di sviluppo.
158
+
159
+ > Backward compatibility: il comando `arch` è alias di `lovarch` per chi ha già muscle memory dalla versione interna di sviluppo.
160
+ >
161
+ > PyPI: la pubblicazione su `pip install lovarch-cli` è rimandata a v0.2+ (i metodi qui sopra coprono tutti i casi d'uso senza dipendere dalla burocrazia PyPI token/2FA).
162
+
163
+ ## Quick start
164
+
165
+ ```bash
166
+ # Verifica installazione
167
+ lovarch --version # → lovarch-cli 0.1.2
168
+
169
+ # Primo login (interattivo: Free o Premium)
170
+ lovarch login
171
+
172
+ # Inizializza un progetto (con --sample scarica villa-chianti da GitHub Releases)
173
+ lovarch init villa-toscana --sample
174
+
175
+ # Audit dei 18 input prima di girare il pipeline
176
+ lovarch audit villa-toscana
177
+
178
+ # Esegui workflow (Free=dry-run · Premium=produzione)
179
+ lovarch run dal-brief-al-cantiere villa-toscana
180
+
181
+ # Consolida deliverable in DOSSIER.zip
182
+ lovarch consolidate villa-toscana
183
+
184
+ # Stato di tutti i progetti
185
+ lovarch status
186
+ ```
187
+
188
+ ## Comandi disponibili
189
+
190
+ | Comando | Descrizione |
191
+ |---------|-------------|
192
+ | `arch login` | Login Free o Premium |
193
+ | `arch signup` | Cadastro Free interattivo |
194
+ | `arch config` | Configurazione (API keys, lingua, storage path) — _in arrivo (v0.2)_ |
195
+ | `arch init <progetto>` | Crea nuovo progetto con struttura sample-input |
196
+ | `arch audit <progetto>` | Esegue audit input (gate di ingresso) |
197
+ | `arch run <workflow>` | Esegue workflow completo |
198
+ | `arch consolidate <progetto>` | Genera DOSSIER.zip finale |
199
+ | `arch status <id>` | Stato di una esecuzione |
200
+ | `arch upgrade` | CTA per passare da Free a Premium |
201
+ | `arch account delete` | Right-to-erasure GDPR |
202
+
203
+ Vedi `arch --help` per dettagli completi.
204
+
205
+ ## Limiti dichiarati
206
+
207
+ `lovarch-cli` **NON** sostituisce:
208
+
209
+ - ❌ Firma digitale qualificata (QES) dell'architetto abilitato
210
+ - ❌ Calcolo strutturale NTC 2018 (richiede ingegnere strutturale)
211
+ - ❌ Rilievo metrico in loco (richiede sopralluogo)
212
+ - ❌ Coordinamento sicurezza CSP/CSE (D.Lgs 81/2008)
213
+ - ❌ Responsabilità professionale del tecnico
214
+
215
+ L'utente assume la responsabilità di verifica e revisione professionale prima di qualsiasi presentazione ad autorità.
216
+
217
+ ## Licenza
218
+
219
+ MIT License — vedi [LICENSE](LICENSE).
220
+
221
+ ## Link
222
+
223
+ - 🌐 [archprime.io](https://archprime.io) · [lovarch.com](https://lovarch.com)
224
+ - 📚 [Documentazione](https://docs.archprime.io/cli)
225
+ - 🐛 [Issues](https://github.com/ArchPrime-official/lovarch-cli/issues)
226
+ - 📋 [Releases](https://github.com/ArchPrime-official/lovarch-cli/releases) · [Changelog](./CHANGELOG.md)
227
+ - 🤝 [Contributing](./CONTRIBUTING.md)
228
+ - 🎓 [Corso IA Avanzato per Architetti](https://lovarch.com/corso) (€1.497)
229
+
230
+ ---
231
+
232
+ 🤖 Powered by [Lovarch](https://lovarch.com) — AI Growth System for Architects & Designers