dev-ready 0.3.0__tar.gz → 0.5.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.
Files changed (141) hide show
  1. {dev_ready-0.3.0 → dev_ready-0.5.0}/.github/workflows/ci.yml +25 -0
  2. {dev_ready-0.3.0 → dev_ready-0.5.0}/.github/workflows/release.yml +1 -1
  3. dev_ready-0.5.0/.github/workflows/vendored-bump.yml +51 -0
  4. {dev_ready-0.3.0 → dev_ready-0.5.0}/.gitignore +2 -0
  5. {dev_ready-0.3.0 → dev_ready-0.5.0}/PKG-INFO +13 -4
  6. {dev_ready-0.3.0 → dev_ready-0.5.0}/README-pypi.md +12 -3
  7. dev_ready-0.5.0/THIRD_PARTY_NOTICES.md +59 -0
  8. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/architecture.md +1 -1
  9. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/catalog-candidates.md +11 -2
  10. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/requirements.md +8 -8
  11. dev_ready-0.5.0/docs/v0.4-overview.md +30 -0
  12. dev_ready-0.5.0/docs/v0.5-overview.md +45 -0
  13. {dev_ready-0.3.0 → dev_ready-0.5.0}/pyproject.toml +2 -1
  14. dev_ready-0.5.0/scripts/bump_vendored.py +24 -0
  15. dev_ready-0.5.0/scripts/check_notices_sync.py +144 -0
  16. dev_ready-0.5.0/scripts/sync_vendored.py +255 -0
  17. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/__init__.py +1 -1
  18. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/cli.py +1 -1
  19. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/generate.py +7 -4
  20. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/manifest/__init__.py +2 -1
  21. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/manifest/loader.py +104 -3
  22. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/manifest/models.py +20 -0
  23. dev_ready-0.5.0/src/dev_ready/manifest.json +269 -0
  24. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/overlay/__init__.py +17 -8
  25. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/claude/CLAUDE.md.tmpl +12 -0
  26. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/caveman/README.md +48 -0
  27. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/caveman/SKILL.md +78 -0
  28. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/code-review/SKILL.md +89 -0
  29. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/code-review/agents/openai.yaml +3 -0
  30. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/diagnosing-bugs/SKILL.md +134 -0
  31. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  32. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  33. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/frontend-design/LICENSE.txt +177 -0
  34. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/frontend-design/SKILL.md +55 -0
  35. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/AI-AND-LLM.md +67 -0
  36. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/ATTACK-CLASSES.md +116 -0
  37. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/CLIENT-SIDE.md +67 -0
  38. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/HUNTING.md +110 -0
  39. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/MEMORY-SAFETY-AND-BINARY.md +58 -0
  40. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/RECONNAISSANCE.md +46 -0
  41. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/SKILL.md +108 -0
  42. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/VALIDATION-AND-REPORTING.md +109 -0
  43. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/WEB-PROTOCOL-AND-AUTH.md +85 -0
  44. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/report-schema.json +210 -0
  45. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/security-audit/validate-findings.cjs +201 -0
  46. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/tdd/SKILL.md +36 -0
  47. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/tdd/agents/openai.yaml +3 -0
  48. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/tdd/mocking.md +59 -0
  49. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/tdd/tests.md +77 -0
  50. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/webapp-testing/LICENSE.txt +202 -0
  51. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/webapp-testing/SKILL.md +96 -0
  52. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/webapp-testing/examples/console_logging.py +35 -0
  53. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/webapp-testing/examples/element_discovery.py +40 -0
  54. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
  55. dev_ready-0.5.0/src/dev_ready/templates/claude/skills/webapp-testing/scripts/with_server.py +106 -0
  56. dev_ready-0.5.0/src/dev_ready/templates/docs/design-linear.md +548 -0
  57. dev_ready-0.5.0/src/dev_ready/templates/docs/design-stripe.md +487 -0
  58. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_cli.py +33 -9
  59. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_generate.py +1 -1
  60. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_manifest.py +142 -0
  61. dev_ready-0.5.0/tests/unit/test_notices_sync.py +438 -0
  62. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_overlay.py +165 -0
  63. dev_ready-0.5.0/tests/unit/test_sync_vendored.py +178 -0
  64. {dev_ready-0.3.0 → dev_ready-0.5.0}/uv.lock +1 -1
  65. dev_ready-0.3.0/THIRD_PARTY_NOTICES.md +0 -29
  66. dev_ready-0.3.0/src/dev_ready/manifest.json +0 -105
  67. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/handoff/SKILL.md +0 -0
  68. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/handoff/references/templates.md +0 -0
  69. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/planning/SKILL.md +0 -0
  70. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/release/SKILL.md +0 -0
  71. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/review/SKILL.md +0 -0
  72. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/review/references/qa.md +0 -0
  73. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/review/references/security.md +0 -0
  74. {dev_ready-0.3.0 → dev_ready-0.5.0}/.agents/skills/review/references/sre.md +0 -0
  75. {dev_ready-0.3.0 → dev_ready-0.5.0}/.claude/skills/handoff/SKILL.md +0 -0
  76. {dev_ready-0.3.0 → dev_ready-0.5.0}/.claude/skills/planning/SKILL.md +0 -0
  77. {dev_ready-0.3.0 → dev_ready-0.5.0}/.claude/skills/release/SKILL.md +0 -0
  78. {dev_ready-0.3.0 → dev_ready-0.5.0}/.claude/skills/review/SKILL.md +0 -0
  79. {dev_ready-0.3.0 → dev_ready-0.5.0}/.github/dependabot.yml +0 -0
  80. {dev_ready-0.3.0 → dev_ready-0.5.0}/.github/workflows/upstream-bump.yml +0 -0
  81. {dev_ready-0.3.0 → dev_ready-0.5.0}/.python-version +0 -0
  82. {dev_ready-0.3.0 → dev_ready-0.5.0}/AGENTS.md +0 -0
  83. {dev_ready-0.3.0 → dev_ready-0.5.0}/CLAUDE.md +0 -0
  84. {dev_ready-0.3.0 → dev_ready-0.5.0}/LICENSE +0 -0
  85. {dev_ready-0.3.0 → dev_ready-0.5.0}/README.md +0 -0
  86. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/cli-spec.md +0 -0
  87. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-001-two-stage-generation-no-fork.md +0 -0
  88. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-002-manifest-pinned-upstream.md +0 -0
  89. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-003-distribution-via-uvx.md +0 -0
  90. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-004-interactive-prompts-escape-hatch.md +0 -0
  91. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-005-consume-upstream-via-copier.md +0 -0
  92. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-006-manifest-prune-list.md +0 -0
  93. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-007-multi-agent-handoff-protocol.md +0 -0
  94. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-008-integration-modes-vendor-vs-pinned.md +0 -0
  95. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-009-manifest-vendored-provenance.md +0 -0
  96. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-010-item-level-catalog-selection.md +0 -0
  97. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/decisions/adr-011-agent-config-restructure.md +0 -0
  98. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/pin-maintenance.md +0 -0
  99. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/releasing.md +0 -0
  100. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/v0.1-overview.md +0 -0
  101. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/v0.2-overview.md +0 -0
  102. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/v0.3-overview.md +0 -0
  103. {dev_ready-0.3.0 → dev_ready-0.5.0}/docs/version-plan.md +0 -0
  104. {dev_ready-0.3.0 → dev_ready-0.5.0}/scripts/bump_upstream.py +0 -0
  105. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/README.md +0 -0
  106. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/__main__.py +0 -0
  107. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/errors.py +0 -0
  108. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/fetch/__init__.py +0 -0
  109. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/fetch/snapshot.py +0 -0
  110. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/prompts/__init__.py +0 -0
  111. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/prompts/_questionary_asker.py +0 -0
  112. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/prompts/answers.py +0 -0
  113. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/prompts/asker.py +0 -0
  114. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/prompts/collect.py +0 -0
  115. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/report/__init__.py +0 -0
  116. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/report/render.py +0 -0
  117. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/README.md +0 -0
  118. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/phase-N/01-plan.md +0 -0
  119. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/phase-N/02-implementation.md +0 -0
  120. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/phase-N/03-review.md +0 -0
  121. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/phase-N/04-qa-review.md +0 -0
  122. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/phase-N/05-security-review.md +0 -0
  123. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/agents/phase-N/06-sre-review.md +0 -0
  124. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/claude/skills/project-orientation/SKILL.md +0 -0
  125. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/claude/skills/react-doctor/SKILL.md +0 -0
  126. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/docs/architecture.md.tmpl +0 -0
  127. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/docs/requirements.md.tmpl +0 -0
  128. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/mcp/mcp.json +0 -0
  129. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/templates/readme/README.md.tmpl +0 -0
  130. {dev_ready-0.3.0 → dev_ready-0.5.0}/src/dev_ready/verify.py +0 -0
  131. {dev_ready-0.3.0 → dev_ready-0.5.0}/templates/README.md +0 -0
  132. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/README.md +0 -0
  133. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/e2e/.gitkeep +0 -0
  134. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/e2e/test_init_real.py +0 -0
  135. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/integration/.gitkeep +0 -0
  136. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/integration/test_fetch_real.py +0 -0
  137. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_bump_upstream.py +0 -0
  138. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_fetch.py +0 -0
  139. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_prompts.py +0 -0
  140. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_report.py +0 -0
  141. {dev_ready-0.3.0 → dev_ready-0.5.0}/tests/unit/test_verify.py +0 -0
@@ -5,13 +5,23 @@ on:
5
5
  paths-ignore:
6
6
  - 'docs/**'
7
7
  - '*.md'
8
+ - '.agents/**'
8
9
  - '.bob/**'
10
+ - '.claude/**'
11
+ - '.vscode/**'
12
+ - '.gitignore'
13
+ - 'LICENSE'
9
14
  push:
10
15
  branches: [main]
11
16
  paths-ignore:
12
17
  - 'docs/**'
13
18
  - '*.md'
19
+ - '.agents/**'
14
20
  - '.bob/**'
21
+ - '.claude/**'
22
+ - '.vscode/**'
23
+ - '.gitignore'
24
+ - 'LICENSE'
15
25
 
16
26
  permissions:
17
27
  contents: read
@@ -29,6 +39,21 @@ jobs:
29
39
  - name: Test
30
40
  run: uv run pytest
31
41
 
42
+ vendored-drift:
43
+ needs: test
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v7
47
+ - uses: astral-sh/setup-uv@v7
48
+ - name: Sync dependencies
49
+ run: uv sync --dev
50
+ - name: Run vendored drift check
51
+ run: |
52
+ python3 scripts/sync_vendored.py --check
53
+ - name: Run NOTICES sync check
54
+ run: |
55
+ python3 scripts/check_notices_sync.py
56
+
32
57
  # FR-5 lives here, not on the user's machine (docs/architecture.md,
33
58
  # Deployment Architecture): generate a real project against the
34
59
  # manifest-pinned commit, then build and boot it with Docker Compose and
@@ -35,7 +35,7 @@ jobs:
35
35
  /tmp/dev-ready-smoke-venv/bin/dev-ready --version
36
36
 
37
37
  - name: Publish to PyPI
38
- uses: pypa/gh-action-pypi-publish@v1.14.0
38
+ uses: pypa/gh-action-pypi-publish@v1.14.1
39
39
 
40
40
  - name: Create GitHub Release
41
41
  run: gh release create "$GITHUB_REF_NAME" --generate-notes dist/*
@@ -0,0 +1,51 @@
1
+ name: Monthly vendored bump
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 6 1 * *" # 1st of every month, 06:00 UTC
6
+ workflow_dispatch:
7
+
8
+ # For CI to run automatically on the opened PR, this workflow must use a token
9
+ # other than the default GITHUB_TOKEN. See the IMPORTANT note in upstream-bump.yml.
10
+ # Set up a fine-grained PAT with contents:write + pull-requests:write and save
11
+ # it as the BUMP_PR_TOKEN repository secret. If the secret is missing, the PR
12
+ # must be closed and reopened manually (or pushed to) to trigger CI.
13
+ permissions:
14
+ contents: write
15
+ pull-requests: write
16
+
17
+ concurrency:
18
+ group: vendored-bump
19
+ cancel-in-progress: false
20
+
21
+ jobs:
22
+ bump:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v7
26
+
27
+ - name: Resolve latest commits and update manifest
28
+ id: bump
29
+ run: python3 scripts/bump_vendored.py
30
+
31
+ - name: Run vendored sync
32
+ if: steps.bump.outputs.changed == 'true'
33
+ run: python3 scripts/sync_vendored.py
34
+
35
+ - name: Open pull request
36
+ if: steps.bump.outputs.changed == 'true'
37
+ uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
38
+ with:
39
+ token: ${{ secrets.BUMP_PR_TOKEN || secrets.GITHUB_TOKEN }}
40
+ commit-message: "chore: bump vendored pins"
41
+ title: "chore: bump vendored pins"
42
+ branch: chore/vendored-bump
43
+ delete-branch: true
44
+ body: |
45
+ Bumps vendored repo commit pins in `src/dev_ready/manifest.json` and
46
+ re-materializes snapshots under `templates/`.
47
+
48
+ **Bump checklist (complete before merging):**
49
+ - [ ] Re-check the upstream LICENSE file for each bumped repo at the new commit — confirm the license has not changed from what `manifest.json` records.
50
+ - [ ] Review the diff in `templates/` for each vendored repo — confirm no unexpected content was added.
51
+ - [ ] CI `vendored-drift` job passes.
@@ -221,3 +221,5 @@ docs/handoff/
221
221
  .bob/reviews/
222
222
 
223
223
  .vscode/
224
+ .sync-cache/
225
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dev-ready
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: Scaffold AI-development-ready FastAPI projects: pinned upstream template plus Claude Code skills, MCP config, and design docs
5
5
  License: MIT License
6
6
 
@@ -43,14 +43,23 @@ The upstream template is pinned to a CI-verified commit (never an untested "late
43
43
 
44
44
  A generated project based on [fastapi/full-stack-fastapi-template](https://github.com/fastapi/full-stack-fastapi-template) (FastAPI, React, SQLModel, PostgreSQL, Docker Compose), plus an AI tooling overlay so it works well with coding agents out of the box:
45
45
 
46
- - `CLAUDE.md` — project instructions for Claude Code
47
- - Claude Code skills (e.g. project orientation)
46
+ - `CLAUDE.md` — project instructions for Claude Code, including Karpathy-derived development guardrails (MIT, per the upstream README)
47
+ - Claude Code skills — nine pre-configured skills selectable at generation time:
48
+ - **project-orientation** (built-in) — codebase orientation helper
49
+ - **react-doctor** (pinned devDependency) — frontend dependency health checks
50
+ - **caveman** (vendored, MIT) — token-discipline communication mode
51
+ - **tdd** (vendored, MIT) — test-driven development loop
52
+ - **diagnosing-bugs** (vendored, MIT) — diagnosis loop for hard bugs
53
+ - **code-review** (vendored, MIT) — review against coding standards and spec
54
+ - **security-audit** (vendored, MIT) — multi-phase security audit
55
+ - **webapp-testing** (vendored, Apache-2.0) — browser-automation end-to-end testing
56
+ - **frontend-design** (vendored, Apache-2.0) — frontend UI design methodology
48
57
  - MCP server configuration (`mcp.json`)
49
58
  - Design-doc templates (`architecture.md`, `requirements.md`)
50
59
  - Agent-team handoff scaffold (`docs/handoffs/` — a document-driven multi-agent workflow: Tech Lead → Senior → Junior → QA/Security/SRE)
51
60
  - Generation stamp — every generated project gets a `.dev-ready.json` recording the dev-ready version, selected components/items, and pinned upstream commit
52
61
  - Pinned tool integrations — optional, selectable MCP and skill items: a codebase-memory MCP server (`uvx codebase-memory-mcp`) and a `react-doctor` frontend wrapper skill + devDependency
53
- - item-level selection — pick individual items inside the skills and MCP components, not just the whole component
62
+ - Item-level selection — pick individual skills (including vendored ones) and MCP items; vendored skills include their upstream provenance in `.dev-ready.json`
54
63
 
55
64
  Every generated project also gets its own `README.md` (the upstream template's repo README and other repo-maintenance files — `CONTRIBUTING.md`, release notes, deploy workflows, screenshots — are pruned, so nothing template-repo-specific leaks into your project).
56
65
 
@@ -12,14 +12,23 @@ The upstream template is pinned to a CI-verified commit (never an untested "late
12
12
 
13
13
  A generated project based on [fastapi/full-stack-fastapi-template](https://github.com/fastapi/full-stack-fastapi-template) (FastAPI, React, SQLModel, PostgreSQL, Docker Compose), plus an AI tooling overlay so it works well with coding agents out of the box:
14
14
 
15
- - `CLAUDE.md` — project instructions for Claude Code
16
- - Claude Code skills (e.g. project orientation)
15
+ - `CLAUDE.md` — project instructions for Claude Code, including Karpathy-derived development guardrails (MIT, per the upstream README)
16
+ - Claude Code skills — nine pre-configured skills selectable at generation time:
17
+ - **project-orientation** (built-in) — codebase orientation helper
18
+ - **react-doctor** (pinned devDependency) — frontend dependency health checks
19
+ - **caveman** (vendored, MIT) — token-discipline communication mode
20
+ - **tdd** (vendored, MIT) — test-driven development loop
21
+ - **diagnosing-bugs** (vendored, MIT) — diagnosis loop for hard bugs
22
+ - **code-review** (vendored, MIT) — review against coding standards and spec
23
+ - **security-audit** (vendored, MIT) — multi-phase security audit
24
+ - **webapp-testing** (vendored, Apache-2.0) — browser-automation end-to-end testing
25
+ - **frontend-design** (vendored, Apache-2.0) — frontend UI design methodology
17
26
  - MCP server configuration (`mcp.json`)
18
27
  - Design-doc templates (`architecture.md`, `requirements.md`)
19
28
  - Agent-team handoff scaffold (`docs/handoffs/` — a document-driven multi-agent workflow: Tech Lead → Senior → Junior → QA/Security/SRE)
20
29
  - Generation stamp — every generated project gets a `.dev-ready.json` recording the dev-ready version, selected components/items, and pinned upstream commit
21
30
  - Pinned tool integrations — optional, selectable MCP and skill items: a codebase-memory MCP server (`uvx codebase-memory-mcp`) and a `react-doctor` frontend wrapper skill + devDependency
22
- - item-level selection — pick individual items inside the skills and MCP components, not just the whole component
31
+ - Item-level selection — pick individual skills (including vendored ones) and MCP items; vendored skills include their upstream provenance in `.dev-ready.json`
23
32
 
24
33
  Every generated project also gets its own `README.md` (the upstream template's repo README and other repo-maintenance files — `CONTRIBUTING.md`, release notes, deploy workflows, screenshots — are pruned, so nothing template-repo-specific leaks into your project).
25
34
 
@@ -0,0 +1,59 @@
1
+ # Third-Party Notices
2
+
3
+ dev-ready vendors curated snapshots of third-party open-source components under `src/dev_ready/templates/`. The third-party components included in or generated by dev-ready are listed below:
4
+
5
+ ## fastapi/full-stack-fastapi-template
6
+
7
+ - License: MIT
8
+ - Source: https://github.com/fastapi/full-stack-fastapi-template
9
+
10
+ dev-ready does not ship a copy of this template inside the wheel. At generation time (`dev-ready init`), the CLI downloads a snapshot of this repository at the exact commit pinned in `src/dev_ready/manifest.json` (see ADR-002, `docs/architecture.md`) directly onto the end user's machine. The upstream `LICENSE` file is part of that snapshot and arrives inside every generated project unmodified.
11
+
12
+ ## JuliusBrussee/caveman
13
+
14
+ - License: MIT
15
+ - Pinned Commit: 0d95a81d35a9f2d123a5e9430d1cfc43d55f1bb0
16
+ - Source: https://github.com/JuliusBrussee/caveman
17
+ - Subset: `skills/caveman` (token-discipline skill) vendored into `src/dev_ready/templates/claude/skills/caveman`.
18
+
19
+ ## mattpocock/skills
20
+
21
+ - License: MIT
22
+ - Pinned Commit: ed37663cc5fbef691ddfecd080dff42f7e7e350d
23
+ - Source: https://github.com/mattpocock/skills
24
+ - Subset: `skills/engineering/tdd`, `skills/engineering/diagnosing-bugs`, and `skills/engineering/code-review` vendored into `src/dev_ready/templates/claude/skills/`.
25
+
26
+ ## cloudflare/security-audit-skill
27
+
28
+ - License: MIT
29
+ - Pinned Commit: 8bac42001ddd90a4dcd8d5a5045199283a8eba75
30
+ - Source: https://github.com/cloudflare/security-audit-skill
31
+ - Subset: `skills/security-audit` vendored into `src/dev_ready/templates/claude/skills/security-audit`.
32
+
33
+ ## VoltAgent/awesome-design-md
34
+
35
+ - License: MIT
36
+ - Pinned Commit: 664b3e78fd1a298ba11973822da988483256d4b4
37
+ - Source: https://github.com/VoltAgent/awesome-design-md
38
+ - Subset: Selected `DESIGN.md` templates (`design-md/stripe/DESIGN.md`, `design-md/linear.app/DESIGN.md`) vendored into `src/dev_ready/templates/docs/`.
39
+
40
+ ## anthropics/skills
41
+
42
+ - License: Apache-2.0
43
+ - Pinned Commit: 1f630fdf9259cec4a14913127dfd7c3b69ef72eb
44
+ - Source: https://github.com/anthropics/skills
45
+ - Subset: `skills/webapp-testing` and `skills/frontend-design` vendored into `src/dev_ready/templates/claude/skills/`. Each skill carries its own Apache-2.0 `LICENSE.txt` inside its snapshot, which ships into every generated project that selects the skill.
46
+
47
+ ## multica-ai/andrej-karpathy-skills
48
+
49
+ - License: MIT, per README at 2c606141936f1eeef17fa3043a72095b4765b9c2
50
+ - Pinned Commit: 2c606141936f1eeef17fa3043a72095b4765b9c2
51
+ - Integration: adapted-rewrite — attribution only; NOT vendored (no snapshot under `src/dev_ready/templates/`)
52
+ - Source: https://github.com/multica-ai/andrej-karpathy-skills
53
+ - Basis: the upstream repo carries no standalone LICENSE file; its README declares "License MIT". The pinned commit above preserves that grant as evidence. dev-ready adapts (substantially rewords and condenses) the four-principle guardrail guidance into the generated `CLAUDE.md`; it does not redistribute the upstream files verbatim, so there is no `vendored` manifest entry and no drift-checked snapshot.
54
+
55
+ ---
56
+
57
+ Everything else dev-ready writes into a generated project — `CLAUDE.md`, the built-in Claude Code skills overlay (`project-orientation`), MCP configuration, and base design-doc templates under `src/dev_ready/templates/` — is original to this project and is not derived from a third-party source.
58
+
59
+ Runtime Python dependencies (e.g. `questionary`) are ordinary PyPI packages resolved by the installer at install time; they are not vendored into this package and each carries its own license via its own PyPI distribution.
@@ -40,7 +40,7 @@ ADRs live in `docs/decisions/`, one file per decision (moved out of this file by
40
40
  | [ADR-006](decisions/adr-006-manifest-prune-list.md) | Manifest-driven prune list, separate from exclude (v0.2) | Accepted (2026-07-16) |
41
41
  | [ADR-007](decisions/adr-007-multi-agent-handoff-protocol.md) | Multi-agent development team and handoff protocol (v0.2) | Accepted (2026-07-16) |
42
42
  | [ADR-008](decisions/adr-008-integration-modes-vendor-vs-pinned.md) | Two third-party integration modes — vendor vs pinned dependency (v0.3+) | Accepted (2026-07-17) |
43
- | [ADR-009](decisions/adr-009-manifest-vendored-provenance.md) | Manifest `vendored` section with enforced provenance (v0.4) | Proposed (2026-07-17), implemented in v0.4 (FR-15/FR-16/FR-18) |
43
+ | [ADR-009](decisions/adr-009-manifest-vendored-provenance.md) | Manifest `vendored` section with enforced provenance (v0.4) | Implemented |
44
44
  | [ADR-010](decisions/adr-010-item-level-catalog-selection.md) | Item-level component selection with a data-driven catalog (v0.3) | Accepted (2026-07-17) |
45
45
  | [ADR-011](decisions/adr-011-agent-config-restructure.md) | Standard agent-config layout: AGENTS.md, docs/decisions/, docs/handoff/, .agents/skills/ | Accepted (2026-07-20) |
46
46
 
@@ -69,6 +69,15 @@ if third-party) → removed from this file.
69
69
  applicability field; verify/stamp/upgrade must be template-aware.
70
70
  - Target: post-v0.6; requires its own ADR before implementation.
71
71
 
72
+ ### D-3. Generation progress/status indicator (CLI UX)
73
+
74
+ - Decision: Add step-based progress feedback / spinner during generation
75
+ (fetch → overlay → verify → finalize).
76
+ - Motivation: Prevents the CLI from appearing frozen/stuck during multi-second
77
+ template downloading, Copier rendering, overlay copying, and verification.
78
+ - Implementation note: Must check `sys.stdout.isatty()` and gracefully fallback
79
+ to plain text log lines in non-interactive/CI environments.
80
+
72
81
  ---
73
82
 
74
83
  ## Init flow (agreed shape, v0.3 baseline + preserved decisions)
@@ -93,8 +102,8 @@ if third-party) → removed from this file.
93
102
  - memory (exclusive: pick one): code-memory | graphify [candidate]
94
103
  - dev/quality (multi): react-doctor, security-audit [v0.4], caveman
95
104
  [v0.4], ...
96
- 6. Generate → verify → stamp (`.dev-ready.json` records language, template,
97
- items, pins)
105
+ 6. Generate (with step-based status/spinner feedback, D-3) → verify → stamp
106
+ (`.dev-ready.json` records language, template, items, pins)
98
107
 
99
108
  Catalog schema additions implied (fold into FR-14 while the CLI contract is
100
109
  open): item `category`, per-category `exclusive: bool`, and later
@@ -51,12 +51,12 @@ Agreed 2026-07-17. Full detail, rationale, and per-version grouping live in
51
51
  - FR-12 (v0.3, shipped). Codebase-memory MCP item in the `mcp` component: `.mcp.json` entry launching `uvx codebase-memory-mcp==<pin>` — zero manual install, pin in manifest (pinned-dependency mode, ADR-008).
52
52
  - FR-13 (v0.3, shipped). react-doctor item in the `skills` component: pinned devDependency + package script in the generated frontend `package.json`, plus an original wrapper skill; no source redistribution (ADR-008).
53
53
  - FR-14 (v0.3, shipped). Item-level component selection (ADR-010): users pick individual items inside `skills` and `mcp` (e.g. react-doctor without code-memory) — second-level interactive multi-select (all on by default) plus `--skills <ids|all|none>` / `--mcp <ids|all|none>` list flags; item catalog lives in `manifest.json` as data.
54
- - FR-15 (v0.4). Manifest `vendored` section: provenance pins (repo, commit, license, paths) for all vendored content.
55
- - FR-16 (v0.4). Vendored snapshot sync tooling + CI byte-equality drift guard + monthly vendored-bump workflow.
56
- - FR-17 (v0.4). MIT-wave vendoring (curated subsets, each a catalog item): caveman, mattpocock/skills, cloudflare/security-audit-skill, awesome-design-md.
57
- - FR-18 (v0.4). THIRD_PARTY_NOTICES ↔ manifest `vendored` sync check in CI.
58
- - FR-19 (v0.5). anthropics/skills Apache 2.0 example subset with NOTICE propagation (document-processing skills permanently excluded).
59
- - FR-20 (v0.5). Karpathy guardrails content in generated CLAUDE.md — MIT per the upstream README declaration (no standalone LICENSE file; pinned commit preserves the grant), with attribution in NOTICES.
54
+ - FR-15 (v0.4, shipped). Manifest `vendored` section: provenance pins (repo, commit, license, paths) for all vendored content.
55
+ - FR-16 (v0.4, shipped). Vendored snapshot sync tooling + CI byte-equality drift guard + monthly vendored-bump workflow.
56
+ - FR-17 (v0.4, shipped). MIT-wave vendoring (curated subsets, each a catalog item): caveman, mattpocock/skills, cloudflare/security-audit-skill, awesome-design-md.
57
+ - FR-18 (v0.4, shipped). THIRD_PARTY_NOTICES ↔ manifest `vendored` sync check in CI.
58
+ - FR-19 (v0.5, shipped). anthropics/skills Apache 2.0 example subset with NOTICE propagation (document-processing skills permanently excluded).
59
+ - FR-20 (v0.5, shipped). Karpathy guardrails content in generated CLAUDE.md — MIT per the upstream README declaration (no standalone LICENSE file; pinned commit preserves the grant), with attribution in NOTICES.
60
60
  - FR-21 (v0.6). `dev-ready check`: read-only validation of an existing project against its stamp and the CLI's manifest.
61
61
  - FR-22 (v0.6). `dev-ready upgrade`: re-apply overlay-managed files only (per the stamp's item selection); never touches upstream application code; never silently overwrites user edits.
62
62
 
@@ -83,8 +83,8 @@ NFR-5. Cross-platform: macOS, Linux, Windows.
83
83
  1. v0.1: single template, interactive init, pinned manifest, three CI workflows (upstream bump, PR validation, release). DONE (v0.1.4).
84
84
  2. v0.2: prune list (FR-7), project README (FR-8), verify leak guard (FR-9), agent-team overlay (FR-10). DONE (v0.2.2).
85
85
  3. v0.3: pinned tool integrations + selection — generation stamp (FR-11), codebase-memory MCP (FR-12), react-doctor (FR-13), item-level selection (FR-14). See [version-plan.md](version-plan.md). DONE (v0.3.0).
86
- 4. v0.4: vendoring infrastructure + MIT wave (FR-15..FR-18).
87
- 5. v0.5: Apache wave + pending items (FR-19, FR-20).
86
+ 4. v0.4: vendoring infrastructure + MIT wave (FR-15..FR-18). DONE (v0.4.0).
87
+ 5. v0.5: Apache wave + karpathy guardrails (FR-19, FR-20). DONE (v0.5.0).
88
88
  6. v0.6: lifecycle commands — `check` / `upgrade` (FR-21, FR-22).
89
89
  7. Beyond: additional base templates; possible Web UI companion (decisions deferred).
90
90
 
@@ -0,0 +1,30 @@
1
+ # v0.4 Overview — dev-ready
2
+
3
+ Released: v0.4.0 | Status: Released
4
+ Scope: FR-15, FR-16, FR-17, FR-18
5
+
6
+ ## What v0.4 shipped
7
+
8
+ dev-ready v0.4 introduces a complete vendoring infrastructure for external content alongside a major MIT content wave. External skills and documentation templates are now materialised directly in the repository with tracked 40-hex commit pins, zero-drift verification, and automated third-party notice management.
9
+
10
+ ## Phase 1 — vendoring infrastructure (FR-15, FR-16)
11
+
12
+ - `manifest.json` `vendored` section: schema (`VendoredPin`: `repo`, `commit`, `license`, `paths`), loader validation (40-hex commit, path rules, duplicate rejection, dangling-reference check).
13
+ - `scripts/sync_vendored.py`: maintainer/CI tool that clones each vendored repo at its pinned commit and materialises snapshots under `src/dev_ready/templates/`.
14
+ - CI drift job (`vendored-drift` in `ci.yml`): byte-equality check via `sync_vendored.py --check`.
15
+ - Monthly bump workflow (`vendored-bump.yml`): resolves each vendored repo's HEAD, updates commits, opens bump PR.
16
+ - `scripts/bump_vendored.py`: stub script for the bump workflow.
17
+
18
+ ## Phase 2 — MIT wave content + NOTICES automation (FR-17, FR-18)
19
+
20
+ - Four vendored sources materialised (`JuliusBrussee/caveman`, `mattpocock/skills` subset, `cloudflare/security-audit-skill`, `VoltAgent/awesome-design-md`). Skills catalog total: 7 (≤ 10 cap).
21
+ - Stamp schema bumped to `stamp_version: 2`: `.dev-ready.json` now records vendored pins for selected items.
22
+ - `scripts/check_notices_sync.py`: bidirectional CI check — every `vendored` manifest entry appears in `THIRD_PARTY_NOTICES.md`; no orphan NOTICES entries.
23
+ - `THIRD_PARTY_NOTICES.md` rewritten to include all four vendored sources with pinned commits.
24
+
25
+ ## Notable decisions
26
+
27
+ - ADR-009: `manifest.json` `vendored` section with enforced provenance — now Implemented.
28
+ - ADR-008 integration modes: the four v0.4 sources all use `vendor` mode; `react-doctor` remains the sole `pinned-dependency` item.
29
+ - 10-skill catalog cap enforced: 7 skills total after v0.4.
30
+ - DESIGN.md templates from awesome-design-md ride inside the `docs` boolean component — no new catalog surface.
@@ -0,0 +1,45 @@
1
+ # v0.5 Overview — dev-ready
2
+
3
+ Released: v0.5.0 | Status: Released
4
+ Scope: FR-19, FR-20
5
+
6
+ ## What v0.5 shipped
7
+
8
+ dev-ready v0.5 is a content-only release riding entirely on v0.4's vendoring
9
+ machinery: an Apache-2.0 example-skill wave from anthropics/skills (with NOTICE
10
+ propagation into generated projects) and a set of Karpathy-derived development
11
+ guardrails folded into every generated `CLAUDE.md`.
12
+
13
+ ## Phase 1 — anthropics Apache subset + NOTICE propagation (FR-19)
14
+
15
+ - Vendored two Apache-2.0 skills from `anthropics/skills` (pinned commit
16
+ `1f630fdf9259cec4a14913127dfd7c3b69ef72eb`): `webapp-testing` and `frontend-design`.
17
+ Skills catalog total: 9 (≤ 10 cap). Document-processing skills (docx/pdf/pptx/xlsx)
18
+ remain permanently excluded.
19
+ - Apache NOTICE propagation: each vendored skill ships its own Apache-2.0 `LICENSE.txt`
20
+ inside its snapshot, so the grant travels into every generated project that selects it.
21
+ - `scripts/check_notices_sync.py` extended to assert LICENSE-file presence in the
22
+ snapshot of every Apache-2.0 `vendored` entry.
23
+
24
+ ## Phase 2 — karpathy guardrails + close-out (FR-20)
25
+
26
+ - Folded a condensed, four-principle guardrail section (Think before coding, Simplicity
27
+ first, Surgical changes, Goal-driven execution) into `templates/claude/CLAUDE.md.tmpl`,
28
+ adapted from `multica-ai/andrej-karpathy-skills` (MIT, per its README).
29
+ - Integration mode: **adapted-rewrite** (attribution-only) — no `vendored` entry, no
30
+ snapshot. `THIRD_PARTY_NOTICES.md` carries an attribution-only section citing
31
+ "MIT, per README at 2c606141936f1eeef17fa3043a72095b4765b9c2".
32
+ - `scripts/check_notices_sync.py` learned to recognize an explicitly-marked
33
+ attribution-only NOTICES entry (via the `Integration: adapted-rewrite` marker) so it
34
+ is not treated as an orphan — a tested contract extension, not a weakening.
35
+ - Generated `CLAUDE.md` kept short (length budget enforced by test).
36
+
37
+ ## Notable decisions
38
+
39
+ - ADR-008 integration modes: karpathy uses the adapted-rewrite (attribution-only) path,
40
+ the first content integration that is neither vendor-snapshot nor pinned-dependency;
41
+ consistent with ADR-008's existing "karpathy accepted as MIT per its README" note — no
42
+ ADR status change.
43
+ - 10-skill catalog cap held: still 9 skills after v0.5 (FR-20 adds guardrail text, not a
44
+ catalog item).
45
+ - No new runtime or dev dependencies in v0.5.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dev-ready"
3
- version = "0.3.0"
3
+ version = "0.5.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" }
@@ -29,6 +29,7 @@ packages = ["src/dev_ready"]
29
29
  [tool.ruff]
30
30
  line-length = 100
31
31
  src = ["src", "tests"]
32
+ extend-exclude = ["src/dev_ready/templates"]
32
33
 
33
34
  [tool.pytest.ini_options]
34
35
  testpaths = ["tests"]
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env python3
2
+ """Bump commit sha pins for all vendored external repositories in manifest.json.
3
+
4
+ Phase 1 stub script: no vendored repos are configured yet.
5
+ Phase 2 will implement full bump logic.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import os
11
+ import sys
12
+
13
+
14
+ def main() -> int:
15
+ print("no vendored repos to bump")
16
+ github_output = os.environ.get("GITHUB_OUTPUT")
17
+ if github_output:
18
+ with open(github_output, "a", encoding="utf-8") as f:
19
+ f.write("changed=false\n")
20
+ return 0
21
+
22
+
23
+ if __name__ == "__main__":
24
+ sys.exit(main())
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env python3
2
+ """Check bidirectional synchronization between manifest.json and THIRD_PARTY_NOTICES.md.
3
+
4
+ Maintainer tooling outside src/: reads manifest.json and THIRD_PARTY_NOTICES.md,
5
+ verifying that:
6
+ 1. Every manifest `vendored` entry is listed in THIRD_PARTY_NOTICES.md (with matching repo, commit, and license).
7
+ 2. Every vendored repo listed in THIRD_PARTY_NOTICES.md is declared in manifest `vendored`.
8
+ Exits 0 on match, 1 on mismatch.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import re
14
+ import sys
15
+ from pathlib import Path
16
+
17
+ _REPO_ROOT = Path(__file__).resolve().parent.parent
18
+ if str(_REPO_ROOT / "src") not in sys.path:
19
+ sys.path.insert(0, str(_REPO_ROOT / "src"))
20
+
21
+ from dev_ready.manifest.loader import load_manifest # noqa: E402
22
+
23
+ _SECTION_PATTERN = re.compile(r"^##\s+([A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+)", re.MULTILINE)
24
+ _COMMIT_PATTERN = re.compile(r"^\s*-\s*Pinned Commit:\s*([a-fA-F0-9]{40})", re.MULTILINE)
25
+ _LICENSE_PATTERN = re.compile(r"^\s*-\s*License:\s*([^\r\n]+)", re.MULTILINE)
26
+ _ATTRIBUTION_ONLY_PATTERN = re.compile(
27
+ r"^\s*-\s*Integration:\s*adapted", re.IGNORECASE | re.MULTILINE
28
+ )
29
+
30
+
31
+ def parse_notices_content(content: str) -> dict[str, dict[str, str]]:
32
+ """Parse THIRD_PARTY_NOTICES.md content into a repo -> {commit, license} dict.
33
+
34
+ Ignores non-vendored sections (e.g. template downloads without pinned commit).
35
+ Pure function: no filesystem/network side effects.
36
+ """
37
+ results: dict[str, dict[str, str]] = {}
38
+ sections = re.split(r"(?=^##\s+)", content, flags=re.MULTILINE)
39
+
40
+ for section in sections:
41
+ sec_match = _SECTION_PATTERN.search(section)
42
+ if not sec_match:
43
+ continue
44
+ repo = sec_match.group(1)
45
+ # Skip template section if it has no Pinned Commit
46
+ commit_match = _COMMIT_PATTERN.search(section)
47
+ if not commit_match:
48
+ continue
49
+ commit = commit_match.group(1).lower()
50
+
51
+ license_match = _LICENSE_PATTERN.search(section)
52
+ license_str = license_match.group(1).strip() if license_match else ""
53
+
54
+ entry = {"commit": commit, "license": license_str}
55
+ if _ATTRIBUTION_ONLY_PATTERN.search(section):
56
+ entry["attribution_only"] = "true"
57
+ results[repo] = entry
58
+
59
+ return results
60
+
61
+
62
+ def check_notices_sync(
63
+ manifest_path: Path, notices_path: Path, repo_root: Path | None = None
64
+ ) -> list[str]:
65
+ """Return a list of drift error messages between manifest and NOTICES file."""
66
+ if not manifest_path.exists():
67
+ return [f"manifest file missing: {manifest_path}"]
68
+ if not notices_path.exists():
69
+ return [f"NOTICES file missing: {notices_path}"]
70
+
71
+ if repo_root is None:
72
+ repo_root = manifest_path.resolve().parents[2]
73
+
74
+ manifest = load_manifest(manifest_path)
75
+ manifest_map = {
76
+ entry.repo: {"commit": entry.commit.lower(), "license": entry.license}
77
+ for entry in manifest.vendored
78
+ }
79
+
80
+ notices_text = notices_path.read_text(encoding="utf-8")
81
+ notices_map = parse_notices_content(notices_text)
82
+
83
+ diffs: list[str] = []
84
+
85
+ # Check direction 1: manifest -> NOTICES & Apache LICENSE presence
86
+ for entry in manifest.vendored:
87
+ repo = entry.repo
88
+ info = {"commit": entry.commit.lower(), "license": entry.license}
89
+ if repo not in notices_map:
90
+ diffs.append(f"NOTICES mismatch: {repo} is in manifest.json vendored but missing from THIRD_PARTY_NOTICES.md")
91
+ else:
92
+ notice_info = notices_map[repo]
93
+ if notice_info["commit"] != info["commit"]:
94
+ diffs.append(
95
+ f"NOTICES mismatch: {repo} commit mismatch (manifest: {info['commit']}, NOTICES: {notice_info['commit']})"
96
+ )
97
+ if notice_info["license"] != info["license"]:
98
+ diffs.append(
99
+ f"NOTICES mismatch: {repo} license mismatch (manifest: {info['license']}, NOTICES: {notice_info['license']})"
100
+ )
101
+
102
+ if entry.license == "Apache-2.0":
103
+ for path_map in entry.paths:
104
+ committed = repo_root / path_map.dest
105
+ has_license = False
106
+ if committed.is_dir():
107
+ for file_path in committed.rglob("*"):
108
+ if file_path.is_file() and file_path.name.lower().startswith("license"):
109
+ has_license = True
110
+ break
111
+ elif committed.is_file() and committed.name.lower().startswith("license"):
112
+ has_license = True
113
+
114
+ if not has_license:
115
+ diffs.append(
116
+ f"NOTICES mismatch: Apache-2.0 entry {repo} path '{path_map.dest}' has no LICENSE file in its snapshot"
117
+ )
118
+
119
+ # Check direction 2: NOTICES -> manifest
120
+ for repo, info in notices_map.items():
121
+ if info.get("attribution_only"):
122
+ continue
123
+ if repo not in manifest_map:
124
+ diffs.append(f"NOTICES mismatch: {repo} is in THIRD_PARTY_NOTICES.md but missing from manifest.json vendored")
125
+
126
+ return sorted(diffs)
127
+
128
+
129
+ def main() -> int:
130
+ manifest_path = _REPO_ROOT / "src" / "dev_ready" / "manifest.json"
131
+ notices_path = _REPO_ROOT / "THIRD_PARTY_NOTICES.md"
132
+
133
+ diffs = check_notices_sync(manifest_path, notices_path)
134
+ if diffs:
135
+ for err in diffs:
136
+ print(f"NOTICES SYNC ERROR: {err}", file=sys.stderr)
137
+ return 1
138
+
139
+ print("NOTICES sync check: THIRD_PARTY_NOTICES.md matches manifest.json vendored list")
140
+ return 0
141
+
142
+
143
+ if __name__ == "__main__":
144
+ sys.exit(main())