From 89ce2ce85fc62794541738394785d31e2ef5ae2e Mon Sep 17 00:00:00 2001 From: Abhiix0 <24r21a6778@mlrit.ac.in> Date: Sat, 11 Jul 2026 17:28:03 +0530 Subject: [PATCH] Version 1.0.0 --- README.md | 96 +++++++++++++++++++++++++++++++---- docs/changelog.md | 27 ++++++++++ pyproject.toml | 2 +- src/spawn/__init__.py | 2 +- tests/test_agent_generator.py | 2 +- tests/test_rag_generator.py | 2 +- uv.lock | 2 +- 7 files changed, 117 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c2fe36d..eabcfc4 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ It's repetitive. It's inconsistent. And you haven't written a single line of *re | Feature | What it does | |---|---| -| **Intent-based templates** | Backend API (FastAPI / Flask / Django), CLI Application (Typer / Click / Argparse), Automation Tool, AI Chatbot, AI Agent, RAG System, Data Project (Analysis / Dashboard / ETL / Machine Learning) | +| **Intent-based templates** | Backend API (FastAPI / Flask / Django), CLI Application (Typer / Click / Argparse), Automation Tool, AI Chatbot, AI Agent, RAG System, Data Project (Analysis / Dashboard / ETL / Machine Learning), Custom Structure | | **Extras system** | Opt-in ruff, pytest, Docker, GitHub Actions — installed and wired automatically | | **Dependency installation** | `uv add` runs automatically with the right packages for your choices | | **Git + uv** | Optionally runs `git init`, `uv init`, and `uv venv` | @@ -95,8 +95,9 @@ Spawn rejects names with spaces or special characters, and tells you immediately 5 AI Agent 6 RAG System 7 Data Project + 8 Custom Structure -Choose Template [1-7]: 1 +Choose Template [1-8]: 1 ``` **Step 3 — Additional prompts** *(template-dependent)* @@ -433,6 +434,36 @@ Extras []: 1,2 --- +**Custom Structure — Paste your layout** + +``` +Paste your project structure. +Supported formats: Tree (├──/└──), Markdown list (- item), Indented hierarchy +Finish with Ctrl+D (Ctrl+Z then Enter on Windows) + +app/ +├── api/ +├── services/ +└── tests/ +README.md +^Z + +Detected +Folders : 4 +Files : 1 + +Initialize Git? [Y/n]: Y +Initialize uv? [Y/n]: Y +Proceed? [Y/n]: Y +``` + +Custom Structure skips the framework/provider/extras prompts entirely. +Spawn parses the pasted text, shows a preview of detected folders and +files, then creates the structure using the same Git/uv flow as every +other template. + +--- + ### `[7]` Data Project Best for: exploratory data analysis, internal dashboards, data cleaning pipelines, quick ML prototyping. @@ -467,6 +498,37 @@ uv run python src/train.py --- +### `[8]` Custom Structure + +Best for: when you already know exactly what folders and files you want +and none of the predefined templates fit. + +Paste any of three text formats — Unix `tree` output, a Markdown list, +or plain indented hierarchy — and Spawn parses it, shows a preview of +detected folders and files, then creates the structure with Git and uv +already wired up. + +```bash +# Example input (tree format) +app/ +├── api/ +├── services/ +└── tests/ +README.md +.env.example +``` + +``` +Detected +Folders : 4 +Files : 2 +``` + +No framework, provider, or extras prompts — Custom Structure goes +straight from name → paste → confirm → generate. + +--- + ## Other Commands ### `spawn doctor` @@ -481,27 +543,37 @@ spawn doctor ./path/to/project ``` ╭─────────────── 🏥 Project Health Report ───────────────╮ │ │ -│ Documentation │ +│ 🟡 Good │ +│ Some improvements recommended. │ +│ │ +│ Project Score: 62% (81/130) │ +│ │ +│ Documentation — 67% │ │ ✓ README.md — Documentation file present │ │ ⚠ LICENSE — Missing LICENSE file │ +│ ⚠ CHANGELOG.md — Missing CHANGELOG.md │ │ │ -│ Version Control │ +│ Version Control — 100% │ │ ✓ Git Repository — Git initialized │ │ ✓ .gitignore — Git ignore configured │ │ │ -│ Quality │ +│ Configuration — 0% │ +│ ⚠ .env.example — Missing .env.example │ +│ ⚠ pyproject.toml — Missing pyproject.toml │ +│ │ +│ Testing — 100% │ │ ✓ Tests — Test directory configured │ -│ ✓ Ruff — Ruff configured in pyproject.toml │ │ ✓ Pytest — Pytest configured in pyproject.toml │ │ │ -│ Deployment │ +│ Automation — 50% │ │ ⚠ Dockerfile — Missing Dockerfile │ │ ✓ GitHub Actions — GitHub Actions configured │ │ │ -│ Configuration │ -│ ✓ .env.example — Environment template present │ +│ Code Quality — 100% │ +│ ✓ Ruff — Ruff configured in pyproject.toml │ +│ ✓ Type Checking — Type checking configured (mypy.ini) │ +│ ✓ Pre-commit — Pre-commit configured │ │ │ -│ Project Score: 80/100 (80%) │ ╰──────────────────────────────────────────────────────────╯ ``` @@ -509,7 +581,7 @@ spawn doctor ./path/to/project ```bash spawn version -# → Spawn v0.9.0 +# → Spawn v1.0.0 ``` ### Publish to GitHub @@ -549,6 +621,8 @@ All tests should pass. If they don't, please [open an issue](https://github.com/ - [x] **AI Agent intent** — tool-calling agent scaffold with PydanticAI and OpenAI Agents SDK (v0.7.0) - [x] **RAG System intent** — retrieval-augmented generation with LlamaIndex and ChromaDB (v0.8.0) - [x] **Data Project intent** — analysis, dashboard, ETL, ML sub-options (v0.9.0) +- [x] **Custom Structure workflow** — paste any folder layout, Spawn creates it (v1.0.0) +- [x] **Doctor 2.0** — per-category health percentages, CHANGELOG.md and pyproject.toml checks (v1.0.0) --- diff --git a/docs/changelog.md b/docs/changelog.md index 17ea8bf..c5daa74 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -3,6 +3,33 @@ All notable changes to Spawn are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## v1.0.0 — 2026 + +### New Features + +- **Custom Structure workflow** — bootstrap a project from your own pasted folder + structure (Tree, Markdown list, or Indented format) instead of choosing a predefined + blueprint; Spawn parses, previews detected folders/files, and reuses the existing + Git/uv flow +- **Rich `.spawn/meta.json` metadata** — every generated project now records + `created_at`, `generator`, `git`, `uv`, and `source` in addition to the existing + `intent`/`framework`/`provider`/`spawn_version` fields; fully backward compatible +- **Doctor 2.0** — per-category health percentages (Documentation, Version Control, + Configuration, Testing, Automation, Code Quality), three new checks (CHANGELOG.md, + pyproject.toml, Type Checking, Pre-commit), tiered recommendations (Critical / + Recommended / Optional), health rating label (Excellent / Good / Fair / Needs + Attention), and a "Next Best Step" panel + +### Internal + +- `src/spawn/generators/custom_structure.py` — new module: `parse_structure()`, + `ParsedEntry`, `CustomStructureGenerator` +- `ProjectConfig` gains `use_uv: bool = True` and `custom_entries: list | None = None` +- `StructureParseError` added to `core/exceptions.py` +- Doctor checks recategorized: `Quality` → `Testing` / `Code Quality`, + `Deployment` → `Automation` (category names only; check logic unchanged) +- Version bumped to `1.0.0` + ## v0.9.0 — 2026 ### Added diff --git a/pyproject.toml b/pyproject.toml index 8160720..e36c798 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spawn" -version = "0.9.0" +version = "1.0.0" description = "Spawn a ready-to-use Python project in seconds" readme = "README.md" requires-python = ">=3.12" diff --git a/src/spawn/__init__.py b/src/spawn/__init__.py index 77d0c80..8909fef 100644 --- a/src/spawn/__init__.py +++ b/src/spawn/__init__.py @@ -3,4 +3,4 @@ try: __version__ = version("spawn") except PackageNotFoundError: - __version__ = "0.9.0" + __version__ = "1.0.0" diff --git a/tests/test_agent_generator.py b/tests/test_agent_generator.py index 1fba81e..4c5874f 100644 --- a/tests/test_agent_generator.py +++ b/tests/test_agent_generator.py @@ -173,7 +173,7 @@ def test_agent_meta_json_has_correct_intent(tmp_path, monkeypatch): assert meta["intent"] == "agent" assert meta["framework"] == "pydantic-ai" assert meta["provider"] == "openai" - assert meta["spawn_version"] == "0.9.0" + assert meta["spawn_version"] == "1.0.0" def test_agent_meta_json_openai_agents(tmp_path, monkeypatch): diff --git a/tests/test_rag_generator.py b/tests/test_rag_generator.py index 1634dbd..62a9ce2 100644 --- a/tests/test_rag_generator.py +++ b/tests/test_rag_generator.py @@ -174,7 +174,7 @@ def test_rag_meta_json(tmp_path, monkeypatch): assert meta["intent"] == "rag" assert meta["framework"] is None assert meta["provider"] is None - assert meta["spawn_version"] == "0.9.0" + assert meta["spawn_version"] == "1.0.0" # ─── Dependencies ──────────────────────────────────────────────────────── diff --git a/uv.lock b/uv.lock index 78978a0..917509c 100644 --- a/uv.lock +++ b/uv.lock @@ -142,7 +142,7 @@ wheels = [ [[package]] name = "spawn" -version = "0.9.0" +version = "1.0.0" source = { editable = "." } dependencies = [ { name = "rich" },