dev-ready 0.1.4__tar.gz → 0.2.0__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.
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.gitignore +2 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/CLAUDE.md +2 -2
- {dev_ready-0.1.4 → dev_ready-0.2.0}/PKG-INFO +1 -1
- {dev_ready-0.1.4 → dev_ready-0.2.0}/docs/architecture.md +5 -5
- {dev_ready-0.1.4 → dev_ready-0.2.0}/pyproject.toml +1 -1
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/__init__.py +1 -1
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/fetch/snapshot.py +3 -2
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/manifest/loader.py +9 -7
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/manifest/models.py +4 -0
- dev_ready-0.2.0/src/dev_ready/manifest.json +40 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/verify.py +11 -1
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_fetch.py +15 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_manifest.py +37 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_verify.py +20 -1
- {dev_ready-0.1.4 → dev_ready-0.2.0}/uv.lock +1 -1
- dev_ready-0.1.4/docs/v0.2-plan.md +0 -56
- dev_ready-0.1.4/src/dev_ready/manifest.json +0 -22
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.bob/qa.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.bob/security.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.bob/sre.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.github/dependabot.yml +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.github/workflows/ci.yml +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.github/workflows/release.yml +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.github/workflows/upstream-bump.yml +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/.python-version +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/LICENSE +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/README-pypi.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/README.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/THIRD_PARTY_NOTICES.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/docs/cli-spec.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/docs/releasing.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/docs/requirements.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/docs/v0.1-overview.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/scripts/bump_upstream.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/README.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/__main__.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/cli.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/errors.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/fetch/__init__.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/generate.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/manifest/__init__.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/overlay/__init__.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/prompts/__init__.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/prompts/_questionary_asker.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/prompts/answers.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/prompts/asker.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/prompts/collect.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/report/__init__.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/report/render.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/templates/claude/CLAUDE.md.tmpl +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/templates/claude/skills/project-orientation/SKILL.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/templates/docs/architecture.md.tmpl +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/templates/docs/requirements.md.tmpl +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/src/dev_ready/templates/mcp/mcp.json +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/templates/README.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/README.md +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/e2e/.gitkeep +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/e2e/test_init_real.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/integration/.gitkeep +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/integration/test_fetch_real.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_bump_upstream.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_cli.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_generate.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_overlay.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_prompts.py +0 -0
- {dev_ready-0.1.4 → dev_ready-0.2.0}/tests/unit/test_report.py +0 -0
|
@@ -31,14 +31,14 @@ Current phase: v0.1 complete (v0.1.4 fixes pending release); v0.2 in progress
|
|
|
31
31
|
|
|
32
32
|
## Multi-agent workflow (ADR-007)
|
|
33
33
|
|
|
34
|
-
Roles are fixed. Agents communicate ONLY through
|
|
34
|
+
Roles are fixed. Agents communicate ONLY through on-disk handoff documents in `handoff/<version>/phaseN/` (gitignored — handoffs are working files, never committed; code is committed normally) — never assume chat context from another agent.
|
|
35
35
|
|
|
36
36
|
| Role | Agent | Does | Never does |
|
|
37
37
|
|---|---|---|---|
|
|
38
38
|
| CEO | Moofon | Sets goals, approves plans, merges | — |
|
|
39
39
|
| Tech Lead | Claude Fable 5 (Cowork) | Decisions, plans, handoff docs | Write or edit code |
|
|
40
40
|
| Senior Engineer | Claude Opus 4.8 | Task breakdown for the junior, code review (logic + architecture), fixes escalated hard bugs | Write code the junior can handle |
|
|
41
|
-
| Junior Engineer | Gemini 3.1 Pro (Antigravity) | Implements tasks — writes most of the code; execution report per phase |
|
|
41
|
+
| Junior Engineer | Gemini 3.1 Pro (Antigravity) | Implements tasks in the working tree — writes most of the code; execution report per phase | Run state-changing git (commit/branch/push — only the CEO commits, after reviews); keep grinding on a hard bug (STOP, log it in `reports/problems.md`, move to next task) |
|
|
42
42
|
| QA / Security / SRE | IBM Bob | Reviews per `.bob/qa.md`, `.bob/security.md`, `.bob/sre.md` | — |
|
|
43
43
|
|
|
44
44
|
Handoff files per phase: `01-opus-plan.md`, `02-gemini-implementation.md`, `03-opus-review.md`, `04-bob-qa.md`, `05-bob-security.md`, `06-bob-sre.md`; junior outputs in `reports/`.
|
|
@@ -78,16 +78,16 @@ uvx dev-ready init my-app
|
|
|
78
78
|
|
|
79
79
|
### ADR-007: Multi-agent development team and handoff protocol (v0.2)
|
|
80
80
|
|
|
81
|
-
- Status: Accepted (2026-07-16)
|
|
81
|
+
- Status: Accepted (2026-07-16); amended (2026-07-16): handoffs live under `handoff/<version>/phaseN/` and are gitignored — they are working artifacts of the dev process, not repo content. "Committed" in the original decision is replaced by "on-disk": agents still start from a written document, never from chat history; only source code and docs are committed.
|
|
82
82
|
- Context: dev-ready is developed by one human with several AI agents. v0.1 used a loose Architect -> Engineer -> reviewers flow. Adding Antigravity (Gemini) as a code-writing agent requires explicit roles and explicit handoff artifacts, or agents duplicate work and burn tokens re-deriving context.
|
|
83
|
-
- Decision: fixed roles, communicating only through
|
|
83
|
+
- Decision: fixed roles, communicating only through on-disk markdown handoffs under `handoff/<version>/`:
|
|
84
84
|
- CEO (Moofon): sets goals, approves plans, merges.
|
|
85
85
|
- Tech Lead (Claude Fable 5, Cowork): talks with the CEO; writes decisions, plans, and handoff documents ONLY — never writes or edits code.
|
|
86
86
|
- Senior Engineer (Claude Opus 4.8): reads the tech lead's phase plan, breaks it into implementation tasks with acceptance criteria (a handoff for the junior), reviews the junior's code for logic and architecture, and personally fixes hard bugs the junior escalates.
|
|
87
|
-
- Junior Engineer (Gemini 3.1 Pro, Antigravity): implements the senior's tasks — writes most of the code. On completion writes an execution report (md). On a hard bug or an unimplementable task: STOP generating code (do not thrash tokens), move to the next task
|
|
87
|
+
- Junior Engineer (Gemini 3.1 Pro, Antigravity): implements the senior's tasks in the working tree — writes most of the code, but NEVER runs state-changing git (no commit/branch/push; only the CEO commits, after all reviews pass). On completion ALWAYS writes an execution report (md). On a hard bug or an unimplementable task: STOP generating code (do not thrash tokens), log the bug in `reports/problems.md` (where, what happened, suspected cause), and move to the next task. The presence of `problems.md` blocks the phase on the senior; the senior deletes it when all bugs are fixed, or marks it ESCALATED-TO-CEO if unfixable.
|
|
88
88
|
- IBM Bob (QA / Security / SRE): unchanged; reviewer expectations stay in `.bob/qa.md`, `.bob/security.md`, `.bob/sre.md`.
|
|
89
|
-
- Handoff artifacts per phase, under `
|
|
90
|
-
- Consequences: Every agent starts from a
|
|
89
|
+
- Handoff artifacts per phase, under `handoff/<version>/phaseN/`: `01-opus-plan.md` (tech lead's brief to the senior; the senior writes his task breakdown + implementation details into 02's designated section), `02-gemini-implementation.md` (the single file the junior receives: working rules from the tech lead + the senior's task breakdown), `03-opus-review.md` (senior's review brief: entry check on `reports/problems.md` — if present, fix mode from problems.md + 02; if absent, review the branch, and write problems.md for any non-trivial finding), `04-bob-qa.md`, `05-bob-security.md`, `06-bob-sre.md`. The junior's outputs go to `handoff/<version>/phaseN/reports/` (`execution-report.md` always; `problems.md` when hard bugs exist).
|
|
90
|
+
- Consequences: Every agent starts from a written on-disk document, not from chat history; token spend concentrates in the cheapest capable agent (junior writes most code, senior only reviews and unblocks); the tech lead's no-code rule keeps decisions and implementation auditable separately. FR-10 ships the same scaffold to generated projects as an optional overlay component, so dev-ready users get this workflow for free.
|
|
91
91
|
|
|
92
92
|
## Module Boundary
|
|
93
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dev-ready"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
description = "Scaffold AI-development-ready FastAPI projects: pinned upstream template plus Claude Code skills, MCP config, and design docs"
|
|
5
5
|
readme = "README-pypi.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -72,8 +72,9 @@ def _run_copier(pin: UpstreamPin, staging_dir: Path, data: dict[str, Any]) -> No
|
|
|
72
72
|
# copier.yml/.yaml would otherwise be copied into the
|
|
73
73
|
# generated project (the .git worktree file makes the output
|
|
74
74
|
# look like a checkout of the upstream template).
|
|
75
|
-
# See manifest.json and UpstreamPin.exclude.
|
|
76
|
-
|
|
75
|
+
# See manifest.json and UpstreamPin.exclude. `pin.prune`
|
|
76
|
+
# (curated repo-maintenance files, ADR-006) is merged in alongside `pin.exclude`.
|
|
77
|
+
exclude=pin.exclude + pin.prune,
|
|
77
78
|
# Unanswered template questions take the template's defaults;
|
|
78
79
|
# dev-ready's own prompting happens in `prompts`, never here.
|
|
79
80
|
defaults=True,
|
|
@@ -105,7 +105,8 @@ def _parse_pin(name: str, entry: object, source: str) -> UpstreamPin:
|
|
|
105
105
|
f"{source}: upstream '{name}' field 'verified_at' must be a string or null"
|
|
106
106
|
)
|
|
107
107
|
|
|
108
|
-
exclude =
|
|
108
|
+
exclude = _parse_path_list(name, entry, source, "exclude")
|
|
109
|
+
prune = _parse_path_list(name, entry, source, "prune")
|
|
109
110
|
|
|
110
111
|
return UpstreamPin(
|
|
111
112
|
repo=values["repo"],
|
|
@@ -114,25 +115,26 @@ def _parse_pin(name: str, entry: object, source: str) -> UpstreamPin:
|
|
|
114
115
|
license=values["license"],
|
|
115
116
|
verified_at=verified_at,
|
|
116
117
|
exclude=exclude,
|
|
118
|
+
prune=prune,
|
|
117
119
|
)
|
|
118
120
|
|
|
119
121
|
|
|
120
|
-
def
|
|
121
|
-
"""Validate
|
|
122
|
-
raw = entry.get(
|
|
122
|
+
def _parse_path_list(name: str, entry: dict, source: str, field: str) -> tuple[str, ...]:
|
|
123
|
+
"""Validate optional per-pin path lists (exclude or prune)."""
|
|
124
|
+
raw = entry.get(field)
|
|
123
125
|
if raw is None:
|
|
124
126
|
return ()
|
|
125
127
|
if not isinstance(raw, list):
|
|
126
|
-
raise ManifestError(f"{source}: upstream '{name}' field '
|
|
128
|
+
raise ManifestError(f"{source}: upstream '{name}' field '{field}' must be a list")
|
|
127
129
|
patterns: list[str] = []
|
|
128
130
|
for item in raw:
|
|
129
131
|
if not isinstance(item, str) or not item:
|
|
130
132
|
raise ManifestError(
|
|
131
|
-
f"{source}: upstream '{name}' '
|
|
133
|
+
f"{source}: upstream '{name}' '{field}' entries must be non-empty strings"
|
|
132
134
|
)
|
|
133
135
|
if item.startswith(("/", "\\")) or ".." in item.split("/"):
|
|
134
136
|
raise ManifestError(
|
|
135
|
-
f"{source}: upstream '{name}' '
|
|
137
|
+
f"{source}: upstream '{name}' '{field}' entries must be relative"
|
|
136
138
|
f" paths without '..', got {item!r}"
|
|
137
139
|
)
|
|
138
140
|
patterns.append(item)
|
|
@@ -14,6 +14,9 @@ class UpstreamPin:
|
|
|
14
14
|
Copier follows symlinks by default. The list lives next to the pin so a
|
|
15
15
|
weekly bump PR that hits new dangling entries fails CI loudly and gets
|
|
16
16
|
fixed here, in one reviewed place (ADR-002/ADR-005).
|
|
17
|
+
|
|
18
|
+
`prune` = paths that generate fine but do not belong in a user project
|
|
19
|
+
(curated, reviewed at bump time), vs `exclude` = broken-by-design paths (ADR-006).
|
|
17
20
|
"""
|
|
18
21
|
|
|
19
22
|
repo: str
|
|
@@ -22,6 +25,7 @@ class UpstreamPin:
|
|
|
22
25
|
license: str
|
|
23
26
|
verified_at: str | None = None
|
|
24
27
|
exclude: tuple[str, ...] = ()
|
|
28
|
+
prune: tuple[str, ...] = ()
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
@dataclass(frozen=True)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"upstream": {
|
|
4
|
+
"base_template": {
|
|
5
|
+
"repo": "fastapi/full-stack-fastapi-template",
|
|
6
|
+
"ref": "master",
|
|
7
|
+
"commit": "4cd0d9e51aebd1af6f82d91ad0df4c9e41f4dea2",
|
|
8
|
+
"verified_at": "2026-07-04",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"exclude": [
|
|
11
|
+
".git",
|
|
12
|
+
"copier.yml",
|
|
13
|
+
"copier.yaml",
|
|
14
|
+
".agents/skills/fastapi",
|
|
15
|
+
".agents/skills/sqlmodel",
|
|
16
|
+
".claude/skills/fastapi",
|
|
17
|
+
".claude/skills/sqlmodel"
|
|
18
|
+
],
|
|
19
|
+
"prune": [
|
|
20
|
+
".github/workflows/deploy-production.yml",
|
|
21
|
+
".github/workflows/deploy-staging.yml",
|
|
22
|
+
".github/workflows/issue-manager.yml",
|
|
23
|
+
".github/workflows/labeler.yml",
|
|
24
|
+
".github/workflows/add-to-project.yml",
|
|
25
|
+
".github/workflows/latest-changes.yml",
|
|
26
|
+
".github/workflows/smokeshow.yml",
|
|
27
|
+
".github/workflows/detect-conflicts.yml",
|
|
28
|
+
".github/workflows/zizmor.yml",
|
|
29
|
+
".github/workflows/guard-dependencies.yml",
|
|
30
|
+
".github/labeler.yml",
|
|
31
|
+
"CONTRIBUTING.md",
|
|
32
|
+
"release-notes.md",
|
|
33
|
+
"img/**",
|
|
34
|
+
"scripts/add_latest_release_date.py",
|
|
35
|
+
"hooks/**"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"overlay_version": "0.1.0"
|
|
40
|
+
}
|
|
@@ -12,7 +12,7 @@ from pathlib import Path
|
|
|
12
12
|
|
|
13
13
|
from dev_ready.errors import VerificationError
|
|
14
14
|
|
|
15
|
-
__all__ = ["verify_project", "REQUIRED_UPSTREAM_PATHS"]
|
|
15
|
+
__all__ = ["verify_project", "REQUIRED_UPSTREAM_PATHS", "FORBIDDEN_PATHS"]
|
|
16
16
|
|
|
17
17
|
# Derived from a real fetch of the manifest-pinned commit
|
|
18
18
|
# (fastapi/full-stack-fastapi-template @ 4cd0d9e51aebd1af6f82d91ad0df4c9e41f4dea2).
|
|
@@ -28,6 +28,8 @@ REQUIRED_UPSTREAM_PATHS: tuple[str, ...] = (
|
|
|
28
28
|
"LICENSE",
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
+
FORBIDDEN_PATHS: tuple[str, ...] = (".git", "copier.yml", "copier.yaml")
|
|
32
|
+
|
|
31
33
|
|
|
32
34
|
def verify_project(project_dir: Path) -> None:
|
|
33
35
|
"""Check that `project_dir` has the upstream paths dev-ready depends on.
|
|
@@ -43,3 +45,11 @@ def verify_project(project_dir: Path) -> None:
|
|
|
43
45
|
"commit. Action: file an issue against dev-ready, or do not use "
|
|
44
46
|
"this pin."
|
|
45
47
|
)
|
|
48
|
+
|
|
49
|
+
for path in FORBIDDEN_PATHS:
|
|
50
|
+
if (project_dir / path).exists():
|
|
51
|
+
raise VerificationError(
|
|
52
|
+
f"generated project contains forbidden path {path!r} — an upstream/Copier change "
|
|
53
|
+
"reintroduced a template-repo leak (.git worktree or copier.yml). Action: "
|
|
54
|
+
"file an issue against dev-ready; do not use this pin."
|
|
55
|
+
)
|
|
@@ -98,6 +98,21 @@ def test_pin_without_exclude_passes_empty_exclude(
|
|
|
98
98
|
assert recorded["kwargs"]["exclude"] == ()
|
|
99
99
|
|
|
100
100
|
|
|
101
|
+
def test_pin_with_exclude_and_prune_merges_them(
|
|
102
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
103
|
+
) -> None:
|
|
104
|
+
recorded: dict[str, Any] = {}
|
|
105
|
+
_install_fake_run_copy(monkeypatch, recorded)
|
|
106
|
+
pin = UpstreamPin(
|
|
107
|
+
repo=PIN.repo, ref=PIN.ref, commit=PIN.commit, license=PIN.license,
|
|
108
|
+
exclude=(".agents/skills/fastapi",), prune=("CONTRIBUTING.md", "img")
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
fetch_snapshot(pin, tmp_path / "snapshot")
|
|
112
|
+
|
|
113
|
+
assert recorded["kwargs"]["exclude"] == pin.exclude + pin.prune
|
|
114
|
+
|
|
115
|
+
|
|
101
116
|
def test_template_data_defaults_to_empty_dict(
|
|
102
117
|
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
103
118
|
) -> None:
|
|
@@ -174,9 +174,46 @@ def test_exclude_entries_must_be_relative_without_traversal(bad_entry: str) -> N
|
|
|
174
174
|
parse_manifest(json.dumps(data))
|
|
175
175
|
|
|
176
176
|
|
|
177
|
+
def test_prune_defaults_to_empty_tuple() -> None:
|
|
178
|
+
manifest = parse_manifest(json.dumps(VALID))
|
|
179
|
+
assert manifest.upstream["base_template"].prune == ()
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def test_prune_parsed_as_tuple_of_patterns() -> None:
|
|
183
|
+
data = json.loads(json.dumps(VALID))
|
|
184
|
+
data["upstream"]["base_template"]["prune"] = ["docs/junk.md"]
|
|
185
|
+
pin = parse_manifest(json.dumps(data)).upstream["base_template"]
|
|
186
|
+
assert pin.prune == ("docs/junk.md",)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def test_prune_must_be_a_list() -> None:
|
|
190
|
+
data = json.loads(json.dumps(VALID))
|
|
191
|
+
data["upstream"]["base_template"]["prune"] = ".agents"
|
|
192
|
+
with pytest.raises(ManifestError, match="must be a list"):
|
|
193
|
+
parse_manifest(json.dumps(data))
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
@pytest.mark.parametrize("bad_entry", ["", 42, None])
|
|
197
|
+
def test_prune_entries_must_be_non_empty_strings(bad_entry: object) -> None:
|
|
198
|
+
data = json.loads(json.dumps(VALID))
|
|
199
|
+
data["upstream"]["base_template"]["prune"] = [bad_entry]
|
|
200
|
+
with pytest.raises(ManifestError, match="non-empty strings"):
|
|
201
|
+
parse_manifest(json.dumps(data))
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
@pytest.mark.parametrize("bad_entry", ["/etc/passwd", "\\windows", "../outside", "a/../b"])
|
|
205
|
+
def test_prune_entries_must_be_relative_without_traversal(bad_entry: str) -> None:
|
|
206
|
+
data = json.loads(json.dumps(VALID))
|
|
207
|
+
data["upstream"]["base_template"]["prune"] = [bad_entry]
|
|
208
|
+
with pytest.raises(ManifestError, match="relative"):
|
|
209
|
+
parse_manifest(json.dumps(data))
|
|
210
|
+
|
|
211
|
+
|
|
177
212
|
def test_bundled_manifest_is_valid() -> None:
|
|
178
213
|
manifest = load_default_manifest()
|
|
179
214
|
assert "base_template" in manifest.upstream
|
|
180
215
|
# The pinned FastAPI template ships dangling .venv symlinks that Copier
|
|
181
216
|
# would otherwise follow and crash on (see UpstreamPin.exclude docstring).
|
|
182
217
|
assert manifest.upstream["base_template"].exclude != ()
|
|
218
|
+
assert manifest.upstream["base_template"].prune != ()
|
|
219
|
+
assert ".github/workflows/test-backend.yml" not in manifest.upstream["base_template"].prune
|
|
@@ -5,7 +5,7 @@ from pathlib import Path
|
|
|
5
5
|
import pytest
|
|
6
6
|
|
|
7
7
|
from dev_ready.errors import VerificationError
|
|
8
|
-
from dev_ready.verify import REQUIRED_UPSTREAM_PATHS, verify_project
|
|
8
|
+
from dev_ready.verify import FORBIDDEN_PATHS, REQUIRED_UPSTREAM_PATHS, verify_project
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
_DIRECTORY_ENTRIES = {"backend", "frontend"}
|
|
@@ -55,3 +55,22 @@ def test_verify_error_message_contains_actionable_guidance(tmp_path: Path) -> No
|
|
|
55
55
|
message = str(excinfo.value)
|
|
56
56
|
assert "upstream layout changed" in message
|
|
57
57
|
assert "file an issue" in message
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@pytest.mark.parametrize("forbidden_path", FORBIDDEN_PATHS)
|
|
61
|
+
def test_verify_raises_when_forbidden_path_is_present(
|
|
62
|
+
tmp_path: Path, forbidden_path: str
|
|
63
|
+
) -> None:
|
|
64
|
+
_make_complete_project(tmp_path)
|
|
65
|
+
target = tmp_path / forbidden_path
|
|
66
|
+
if forbidden_path == ".git":
|
|
67
|
+
target.mkdir()
|
|
68
|
+
else:
|
|
69
|
+
target.write_text("stub", encoding="utf-8")
|
|
70
|
+
|
|
71
|
+
with pytest.raises(VerificationError) as excinfo:
|
|
72
|
+
verify_project(tmp_path)
|
|
73
|
+
|
|
74
|
+
message = str(excinfo.value)
|
|
75
|
+
assert forbidden_path in message
|
|
76
|
+
assert "file an issue" in message
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# v0.2 Plan — dev-ready
|
|
2
|
-
|
|
3
|
-
Status: Accepted (2026-07-16). Written by the Tech Lead (ADR-007). Source of truth for phase handoff generation.
|
|
4
|
-
|
|
5
|
-
Scope: FR-7..FR-10 in `docs/requirements.md`; decisions in ADR-006/ADR-007 in `docs/architecture.md`. Everything else is out of scope for v0.2.
|
|
6
|
-
|
|
7
|
-
## Pre-phase: release v0.1.4 first
|
|
8
|
-
|
|
9
|
-
The pending fixes on main must ship before v0.2 work starts, since v0.1.3 output is visibly broken (`.git` + `copier.yml` leak):
|
|
10
|
-
|
|
11
|
-
1. manifest `exclude` additions (`.git`, `copier.yml`, `copier.yaml`) + snapshot.py comment
|
|
12
|
-
2. `upstream-bump.yml` token fallback (`BUMP_PR_TOKEN`) — CEO must create the fine-grained PAT and repo secret
|
|
13
|
-
3. CLAUDE.md.tmpl corrections (`compose.yml`, repo link)
|
|
14
|
-
|
|
15
|
-
Release: bump version to 0.1.4, tag `v0.1.4`, existing release pipeline does the rest.
|
|
16
|
-
|
|
17
|
-
## Phase 1 — prune list + leak guard (FR-7, FR-9)
|
|
18
|
-
|
|
19
|
-
Smallest phase, highest user-visible value. Ships as v0.2.0.
|
|
20
|
-
|
|
21
|
-
- `manifest` module: add optional `prune` key (validation identical to `exclude`: non-empty relative-path strings, no leading `/`, no `..` segments). New field on `UpstreamPin`, default empty tuple.
|
|
22
|
-
- `fetch`: pass `exclude=pin.exclude + pin.prune` to `copier.run_copy` (order irrelevant to Copier; keep exclude first for readability).
|
|
23
|
-
- `manifest.json`: populate `prune` with the audited FR-7 list. NOTE for implementer: Copier exclude patterns are source paths relative to the template root; directory entries need the path form Copier matches (verify `img`, `hooks`, and individual `.github/workflows/*.yml` entries against a real run — the FR-7 list names intents, the implementer confirms exact patterns).
|
|
24
|
-
- `verify`: add `FORBIDDEN_PATHS = (".git", "copier.yml", "copier.yaml")`; `verify_project` raises `VerificationError` (exit 5) if any exists in the staged output. Do NOT add pruned paths here — prune is curation, not corruption; only leak-class paths are forbidden.
|
|
25
|
-
- Tests: manifest parsing (prune present/absent/invalid), fetch merge behavior (unit, no network), verify forbidden-path (tmp_path fixtures). CI generate-and-verify already exercises the real pipeline.
|
|
26
|
-
- Acceptance: a fresh generation contains none of the FR-7 pruned files; all FR-7 KEEP files still present; unit suite green without network.
|
|
27
|
-
|
|
28
|
-
## Phase 2 — project README (FR-8)
|
|
29
|
-
|
|
30
|
-
Depends on Phase 1 (prune must remove upstream README.md first).
|
|
31
|
-
|
|
32
|
-
- Add `README.md` to the `prune` list.
|
|
33
|
-
- New overlay template `templates/readme/README.md.tmpl`: project name heading, one-paragraph stack description, commands section mirroring CLAUDE.md.tmpl, link back to dev-ready and the upstream template. Always applied (like CLAUDE.md), not a selectable component.
|
|
34
|
-
- Overlay no-overwrite rule unchanged — prune guarantees no collision. If prune is somehow disabled and README.md exists, the existing `OverlayError` collision path is the correct behavior; do not special-case.
|
|
35
|
-
- Tests: overlay unit tests for the new file; template token check already generic.
|
|
36
|
-
- Acceptance: generated project has a README about ITSELF, not about the template; no broken `img/` references anywhere.
|
|
37
|
-
|
|
38
|
-
## Phase 3 — agent-team overlay component (FR-10)
|
|
39
|
-
|
|
40
|
-
- Fourth optional component `agents` beside skills/mcp/docs: `--no-agents` flag, checkbox entry, `Answers.include_agents`, default on.
|
|
41
|
-
- New overlay tree `templates/agents/`: `docs/handoffs/README.md` (the protocol: roles table from ADR-007, file naming `phase-N/01-opus-plan.md` … `06-bob-sre.md`, `reports/` convention, stop-and-escalate rule for the junior) plus one skeleton per handoff type with placeholder sections.
|
|
42
|
-
- Generated CLAUDE.md gains an agent-roles section (extend CLAUDE.md.tmpl — keep it short, point at `docs/handoffs/README.md`).
|
|
43
|
-
- Tests: prompts (component matrix now 4-wide), cli flag mapping, overlay tree application.
|
|
44
|
-
- Acceptance: `--yes` generation includes the scaffold; `--no-agents` excludes it; interactive checkbox shows four components.
|
|
45
|
-
|
|
46
|
-
## Phase 4 — close out
|
|
47
|
-
|
|
48
|
-
- Docs: update `docs/v0.1-overview.md` successor or write `v0.2-overview.md`; README-pypi feature list; cli-spec.md flag table (`--no-agents`).
|
|
49
|
-
- Bob passes (QA/Security/SRE per `.bob/`), release v0.2.0.
|
|
50
|
-
|
|
51
|
-
## Standing constraints (binding for every phase)
|
|
52
|
-
|
|
53
|
-
- Hard rules in CLAUDE.md apply unchanged (pins only in manifest.json, network only in `fetch/`, all-or-nothing generation, no-network unit tests, Conventional Commits).
|
|
54
|
-
- No new runtime dependencies in v0.2.
|
|
55
|
-
- Module boundaries per architecture.md; a phase that wants to cross one escalates to the Tech Lead instead of crossing it.
|
|
56
|
-
- Every phase ends with: unit suite green, `ruff check` clean, CI generate-and-verify green.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"manifest_version": 1,
|
|
3
|
-
"upstream": {
|
|
4
|
-
"base_template": {
|
|
5
|
-
"repo": "fastapi/full-stack-fastapi-template",
|
|
6
|
-
"ref": "master",
|
|
7
|
-
"commit": "4cd0d9e51aebd1af6f82d91ad0df4c9e41f4dea2",
|
|
8
|
-
"verified_at": "2026-07-04",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"exclude": [
|
|
11
|
-
".git",
|
|
12
|
-
"copier.yml",
|
|
13
|
-
"copier.yaml",
|
|
14
|
-
".agents/skills/fastapi",
|
|
15
|
-
".agents/skills/sqlmodel",
|
|
16
|
-
".claude/skills/fastapi",
|
|
17
|
-
".claude/skills/sqlmodel"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"overlay_version": "0.1.0"
|
|
22
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|