devspec 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. devspec-0.1.0.dist-info/METADATA +522 -0
  2. devspec-0.1.0.dist-info/RECORD +133 -0
  3. devspec-0.1.0.dist-info/WHEEL +4 -0
  4. devspec-0.1.0.dist-info/entry_points.txt +2 -0
  5. devspec-0.1.0.dist-info/licenses/LICENSE +201 -0
  6. devspec_installer/__init__.py +3 -0
  7. devspec_installer/__main__.py +5 -0
  8. devspec_installer/cli.py +615 -0
  9. devspec_installer/payload/.agents/rules/devspec-workflow.md +25 -0
  10. devspec_installer/payload/.agents/skills/devspec-clarify.md +14 -0
  11. devspec_installer/payload/.agents/skills/devspec-codebase-structure.md +14 -0
  12. devspec_installer/payload/.agents/skills/devspec-coding-standards.md +14 -0
  13. devspec_installer/payload/.agents/skills/devspec-diagram.md +14 -0
  14. devspec_installer/payload/.agents/skills/devspec-extract.md +14 -0
  15. devspec_installer/payload/.agents/skills/devspec-finalize.md +14 -0
  16. devspec_installer/payload/.agents/skills/devspec-implement.md +14 -0
  17. devspec_installer/payload/.agents/skills/devspec-projectcontext.md +14 -0
  18. devspec_installer/payload/.agents/skills/devspec-review.md +14 -0
  19. devspec_installer/payload/.agents/skills/devspec-rules.md +14 -0
  20. devspec_installer/payload/.agents/skills/devspec-story.md +14 -0
  21. devspec_installer/payload/.agents/skills/devspec-tasks.md +14 -0
  22. devspec_installer/payload/.agents/skills/devspec-techstack.md +14 -0
  23. devspec_installer/payload/.claude/skills/devspec-clarify/SKILL.md +13 -0
  24. devspec_installer/payload/.claude/skills/devspec-codebase-structure/SKILL.md +13 -0
  25. devspec_installer/payload/.claude/skills/devspec-coding-standards/SKILL.md +13 -0
  26. devspec_installer/payload/.claude/skills/devspec-diagram/SKILL.md +13 -0
  27. devspec_installer/payload/.claude/skills/devspec-extract/SKILL.md +13 -0
  28. devspec_installer/payload/.claude/skills/devspec-finalize/SKILL.md +13 -0
  29. devspec_installer/payload/.claude/skills/devspec-implement/SKILL.md +13 -0
  30. devspec_installer/payload/.claude/skills/devspec-projectcontext/SKILL.md +13 -0
  31. devspec_installer/payload/.claude/skills/devspec-review/SKILL.md +13 -0
  32. devspec_installer/payload/.claude/skills/devspec-rules/SKILL.md +13 -0
  33. devspec_installer/payload/.claude/skills/devspec-story/SKILL.md +13 -0
  34. devspec_installer/payload/.claude/skills/devspec-tasks/SKILL.md +13 -0
  35. devspec_installer/payload/.claude/skills/devspec-techstack/SKILL.md +13 -0
  36. devspec_installer/payload/.cursor/rules/devspec-workflow.mdc +23 -0
  37. devspec_installer/payload/.gemini/commands/devspec/clarify.toml +14 -0
  38. devspec_installer/payload/.gemini/commands/devspec/codebase-structure.toml +14 -0
  39. devspec_installer/payload/.gemini/commands/devspec/coding-standards.toml +14 -0
  40. devspec_installer/payload/.gemini/commands/devspec/diagram.toml +14 -0
  41. devspec_installer/payload/.gemini/commands/devspec/extract.toml +14 -0
  42. devspec_installer/payload/.gemini/commands/devspec/finalize.toml +14 -0
  43. devspec_installer/payload/.gemini/commands/devspec/implement.toml +14 -0
  44. devspec_installer/payload/.gemini/commands/devspec/projectcontext.toml +14 -0
  45. devspec_installer/payload/.gemini/commands/devspec/review.toml +14 -0
  46. devspec_installer/payload/.gemini/commands/devspec/rules.toml +14 -0
  47. devspec_installer/payload/.gemini/commands/devspec/story.toml +14 -0
  48. devspec_installer/payload/.gemini/commands/devspec/tasks.toml +14 -0
  49. devspec_installer/payload/.gemini/commands/devspec/techstack.toml +14 -0
  50. devspec_installer/payload/.github/agents/devspec.clarify.agent.md +39 -0
  51. devspec_installer/payload/.github/agents/devspec.codebase-structure.agent.md +39 -0
  52. devspec_installer/payload/.github/agents/devspec.coding-standards.agent.md +40 -0
  53. devspec_installer/payload/.github/agents/devspec.diagram.agent.md +76 -0
  54. devspec_installer/payload/.github/agents/devspec.extract.agent.md +91 -0
  55. devspec_installer/payload/.github/agents/devspec.finalize.agent.md +51 -0
  56. devspec_installer/payload/.github/agents/devspec.implement-task.agent.md +67 -0
  57. devspec_installer/payload/.github/agents/devspec.projectcontext.agent.md +34 -0
  58. devspec_installer/payload/.github/agents/devspec.review.agent.md +42 -0
  59. devspec_installer/payload/.github/agents/devspec.rules.agent.md +35 -0
  60. devspec_installer/payload/.github/agents/devspec.story.agent.md +54 -0
  61. devspec_installer/payload/.github/agents/devspec.tasks.agent.md +44 -0
  62. devspec_installer/payload/.github/agents/devspec.techstack.agent.md +35 -0
  63. devspec_installer/payload/.github/prompts/PATTERNS.md +278 -0
  64. devspec_installer/payload/.github/prompts/README.md +92 -0
  65. devspec_installer/payload/.github/prompts/devspec.clarify.prompt.md +11 -0
  66. devspec_installer/payload/.github/prompts/devspec.codebase-structure.prompt.md +11 -0
  67. devspec_installer/payload/.github/prompts/devspec.coding-standards.prompt.md +11 -0
  68. devspec_installer/payload/.github/prompts/devspec.diagram.prompt.md +11 -0
  69. devspec_installer/payload/.github/prompts/devspec.extract.prompt.md +11 -0
  70. devspec_installer/payload/.github/prompts/devspec.finalize.prompt.md +11 -0
  71. devspec_installer/payload/.github/prompts/devspec.implement.prompt.md +11 -0
  72. devspec_installer/payload/.github/prompts/devspec.projectcontext.prompt.md +11 -0
  73. devspec_installer/payload/.github/prompts/devspec.review.prompt.md +11 -0
  74. devspec_installer/payload/.github/prompts/devspec.rules.prompt.md +11 -0
  75. devspec_installer/payload/.github/prompts/devspec.story.prompt.md +11 -0
  76. devspec_installer/payload/.github/prompts/devspec.tasks.prompt.md +11 -0
  77. devspec_installer/payload/.github/prompts/devspec.techstack.prompt.md +11 -0
  78. devspec_installer/payload/.github/skills/exploration-recovery/SKILL.md +45 -0
  79. devspec_installer/payload/.github/workflows/python-package-ci.yml +42 -0
  80. devspec_installer/payload/.github/workflows/python-package-publish.yml +69 -0
  81. devspec_installer/payload/.github/workflows/winget-package-publish.yml +110 -0
  82. devspec_installer/payload/AGENTS.md +80 -0
  83. devspec_installer/payload/GEMINI.md +35 -0
  84. devspec_installer/payload/README.md +301 -0
  85. devspec_installer/payload/devspec/adapters/README.md +53 -0
  86. devspec_installer/payload/devspec/adapters/antigravity.md +52 -0
  87. devspec_installer/payload/devspec/adapters/claude-code.md +32 -0
  88. devspec_installer/payload/devspec/adapters/codex-skills/devspec-workflow/SKILL.md +17 -0
  89. devspec_installer/payload/devspec/adapters/codex.md +22 -0
  90. devspec_installer/payload/devspec/adapters/command-registry.md +38 -0
  91. devspec_installer/payload/devspec/adapters/compatibility-matrix.md +21 -0
  92. devspec_installer/payload/devspec/adapters/copilot.md +20 -0
  93. devspec_installer/payload/devspec/adapters/cursor.md +22 -0
  94. devspec_installer/payload/devspec/adapters/enterprise-governance.md +36 -0
  95. devspec_installer/payload/devspec/adapters/gemini-cli.md +54 -0
  96. devspec_installer/payload/devspec/adapters/validation-flows.md +90 -0
  97. devspec_installer/payload/devspec/architecture/_template/artifact-queue.md +27 -0
  98. devspec_installer/payload/devspec/architecture/_template/decision.md +45 -0
  99. devspec_installer/payload/devspec/architecture/_template/diagram.md +62 -0
  100. devspec_installer/payload/devspec/architecture/_template/overview.md +37 -0
  101. devspec_installer/payload/devspec/architecture/artifact-queue.md +27 -0
  102. devspec_installer/payload/devspec/architecture/diagrams/README.md +44 -0
  103. devspec_installer/payload/devspec/architecture/overview.md +37 -0
  104. devspec_installer/payload/devspec/constitution.md +26 -0
  105. devspec_installer/payload/devspec/foundation/_template/codebase-structure.md +64 -0
  106. devspec_installer/payload/devspec/foundation/_template/coding-standards.md +46 -0
  107. devspec_installer/payload/devspec/foundation/_template/discovery-exclusions.md +52 -0
  108. devspec_installer/payload/devspec/foundation/_template/exploration-state.md +15 -0
  109. devspec_installer/payload/devspec/foundation/_template/extraction-state.md +45 -0
  110. devspec_installer/payload/devspec/foundation/_template/project-context.md +37 -0
  111. devspec_installer/payload/devspec/foundation/_template/provider-integrations.md +94 -0
  112. devspec_installer/payload/devspec/foundation/_template/rules.md +54 -0
  113. devspec_installer/payload/devspec/foundation/_template/tech-stack.md +49 -0
  114. devspec_installer/payload/devspec/foundation/codebase-structure.md +64 -0
  115. devspec_installer/payload/devspec/foundation/coding-standards.md +46 -0
  116. devspec_installer/payload/devspec/foundation/discovery-exclusions.md +52 -0
  117. devspec_installer/payload/devspec/foundation/extraction-state.md +45 -0
  118. devspec_installer/payload/devspec/foundation/project-context.md +33 -0
  119. devspec_installer/payload/devspec/foundation/provider-integrations.md +94 -0
  120. devspec_installer/payload/devspec/foundation/rules.md +52 -0
  121. devspec_installer/payload/devspec/foundation/tech-stack.md +49 -0
  122. devspec_installer/payload/devspec/glossary.md +111 -0
  123. devspec_installer/payload/devspec/work-items/_template/clarify.md +28 -0
  124. devspec_installer/payload/devspec/work-items/_template/decisions.md +9 -0
  125. devspec_installer/payload/devspec/work-items/_template/diagrams.md +42 -0
  126. devspec_installer/payload/devspec/work-items/_template/finalize.md +65 -0
  127. devspec_installer/payload/devspec/work-items/_template/implement.md +63 -0
  128. devspec_installer/payload/devspec/work-items/_template/meta.md +63 -0
  129. devspec_installer/payload/devspec/work-items/_template/notes.md +7 -0
  130. devspec_installer/payload/devspec/work-items/_template/review.md +41 -0
  131. devspec_installer/payload/devspec/work-items/_template/story.md +59 -0
  132. devspec_installer/payload/devspec/work-items/_template/tasks.md +38 -0
  133. devspec_installer/payload/packaging/devspec-profiles.json +60 -0
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: exploration-recovery
3
+ description: Reuse known working exploration methods, apply discovery exclusions, and avoid repeating failed discovery or repair paths. Use for discovery-heavy, repeated, or failure-prone work such as repository extraction, provider lookup, dependency or code-pattern mapping, validation discovery, implementation repair, and review investigation.
4
+ ---
5
+
6
+ # Exploration Recovery
7
+
8
+ Use this skill to keep repository and provider discovery focused, cheap, and recoverable. Treat `.github/prompts/PATTERNS.md` as the policy source; this skill is the runtime checklist.
9
+
10
+ ## Checklist
11
+
12
+ 1. Define the current scope and goal before probing.
13
+ - Scope examples: repo path, provider, work item, module, technology, or source URL.
14
+ - Goal examples: repository extraction, provider resolution, dependency mapping, code-pattern search, validation discovery, implementation repair, or review investigation.
15
+
16
+ 2. Apply discovery exclusions before broad search, Explore runs, generated scripts, or helper commands.
17
+ - Read `devspec/foundation/discovery-exclusions.md` when present.
18
+ - If it is missing, use `devspec/foundation/_template/discovery-exclusions.md` as the section contract before creating or updating the live artifact.
19
+ - Apply baseline exclusions and ecosystem discovery rules unless the user asks or a project override includes a normally excluded path.
20
+ - Prefer manifests, lockfiles, framework config, scripts, docs, tests, and owned source roots as evidence.
21
+
22
+ 3. Check reusable exploration state before new probing.
23
+ - Read `devspec/foundation/exploration-state.md` when present.
24
+ - If it is missing, continue without it unless this run produces a reusable method outcome worth preserving.
25
+ - Use `devspec/foundation/_template/exploration-state.md` as the section contract before creating the live artifact.
26
+ - Check session memory only as transient context; Git-tracked devspec artifacts remain canonical.
27
+ - Use `Method Ledger` rows matched by both scope and goal, and ignore stale entries from different contexts.
28
+
29
+ 4. Prefer known working and low-cost methods.
30
+ - Use rows with `working` outcome first when the scope, goal, and environment assumptions still match.
31
+ - Skip rows with `failed` outcome unless the retry condition is met or the user gives new direction.
32
+ - Ignore rows with `superseded` outcome when a newer matching method exists.
33
+ - Prefer targeted search, targeted reads, manifests, devspec artifacts, and configured provider tools before generated scripts or broad scans.
34
+ - Limit each scope and goal to one new generated script, helper command, provider lookup path, or expensive search strategy before falling back to direct search and file reads.
35
+
36
+ 5. Record only reusable results.
37
+ - Update `devspec/foundation/exploration-state.md` only for reusable discoveries, skipped failures that changed the path, or successful fallback paths after a failure.
38
+ - Record scope, goal, method, outcome, evidence or failure reason, retry or reuse condition, last verified date, and brief notes.
39
+ - Do not record every search, one-off read, or expected empty result.
40
+
41
+ ## Reporting
42
+
43
+ - Mention skipped known failures only when they materially changed the path taken.
44
+ - Mention excluded paths only when they prevented a likely expensive scan, changed the evidence gathered, or the user asked for diagnostics.
45
+ - Keep final output aligned with the active agent's Output Format and the shared Output Closure Pattern.
@@ -0,0 +1,42 @@
1
+ name: Python Package CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ test:
11
+ name: Python package test (${{ matrix.os }})
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest, windows-latest]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v5
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.12"
28
+
29
+ - name: Run tests
30
+ run: uv run pytest
31
+
32
+ - name: Build Python wheel and sdist
33
+ run: uv build
34
+
35
+ - name: Smoke test Python package
36
+ shell: bash
37
+ run: |
38
+ wheel="$(ls dist/*.whl | head -n 1)"
39
+ temp_dir="$(mktemp -d)"
40
+ uvx --from "$wheel" devspec version
41
+ uvx --from "$wheel" devspec init --target "$temp_dir" --profile core --repo-state existing
42
+ uvx --from "$wheel" devspec doctor --target "$temp_dir" --profile core
@@ -0,0 +1,69 @@
1
+ name: Python Package Publish
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ publish:
7
+ description: "Publish Python package to PyPI"
8
+ required: true
9
+ default: "false"
10
+ type: choice
11
+ options:
12
+ - "false"
13
+ - "true"
14
+ push:
15
+ tags:
16
+ - "v*"
17
+
18
+ permissions:
19
+ contents: write
20
+ id-token: write
21
+
22
+ jobs:
23
+ python-package:
24
+ name: Build and publish Python package
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v5
31
+
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: "3.12"
36
+
37
+ - name: Test
38
+ run: uv run pytest
39
+
40
+ - name: Build Python wheel and sdist
41
+ run: uv build
42
+
43
+ - name: Build devspec framework payload zip
44
+ run: |
45
+ zip -r "dist/devspec-framework-payload-${GITHUB_REF_NAME:-local}.zip" \
46
+ AGENTS.md GEMINI.md README.md devspec .github .claude .cursor .gemini .agents packaging/devspec-profiles.json
47
+ find dist -maxdepth 1 -type f ! -name devspec-python-package-checksums.txt -print0 \
48
+ | sort -z \
49
+ | xargs -0 sha256sum > dist/devspec-python-package-checksums.txt
50
+
51
+ - name: Upload Python package release artifacts
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: devspec-python-package-dist
55
+ path: dist/*
56
+
57
+ - name: Publish Python package to TestPyPI
58
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'false'
59
+ run: uv publish --publish-url https://test.pypi.org/legacy/ dist/*.tar.gz dist/*.whl
60
+
61
+ - name: Publish Python package to PyPI
62
+ if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
63
+ run: uv publish dist/*.tar.gz dist/*.whl
64
+
65
+ - name: Attach Python package release artifacts
66
+ if: startsWith(github.ref, 'refs/tags/v')
67
+ uses: softprops/action-gh-release@v2
68
+ with:
69
+ files: dist/*
@@ -0,0 +1,110 @@
1
+ name: WinGet Package Publish
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ winget-package:
14
+ name: Build WinGet portable package
15
+ runs-on: windows-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v5
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: "3.12"
26
+
27
+ - name: Run tests
28
+ run: uv run pytest
29
+
30
+ - name: Build Python wheel
31
+ run: uv build
32
+
33
+ - name: Build devspec.exe
34
+ shell: pwsh
35
+ run: |
36
+ $ErrorActionPreference = "Stop"
37
+ $wheel = Get-ChildItem dist -Filter "*.whl" | Select-Object -First 1
38
+ if (-not $wheel) {
39
+ throw "No wheel found in dist."
40
+ }
41
+
42
+ uv venv .venv-winget --python 3.12 --clear
43
+ uv pip install --python .\.venv-winget\Scripts\python.exe "pyinstaller>=6.0" $wheel.FullName
44
+
45
+ New-Item -ItemType Directory -Force -Path build\winget | Out-Null
46
+ @(
47
+ "from devspec_installer.cli import main"
48
+ ""
49
+ "raise SystemExit(main())"
50
+ ) | Set-Content -Path build\winget\devspec-entry.py -Encoding UTF8
51
+
52
+ .\.venv-winget\Scripts\pyinstaller.exe `
53
+ --noconfirm `
54
+ --clean `
55
+ --onefile `
56
+ --name devspec `
57
+ --distpath dist\winget `
58
+ --workpath build\pyinstaller `
59
+ --specpath build\pyinstaller `
60
+ --collect-data devspec_installer `
61
+ build\winget\devspec-entry.py
62
+
63
+ - name: Smoke test devspec.exe
64
+ shell: pwsh
65
+ run: |
66
+ $ErrorActionPreference = "Stop"
67
+ $target = Join-Path $env:RUNNER_TEMP "devspec-winget-smoke"
68
+ New-Item -ItemType Directory -Force -Path $target | Out-Null
69
+
70
+ .\dist\winget\devspec.exe version
71
+ .\dist\winget\devspec.exe init --target $target --profile core --repo-state existing
72
+ .\dist\winget\devspec.exe doctor --target $target --profile core
73
+
74
+ - name: Generate WinGet manifests
75
+ shell: pwsh
76
+ run: |
77
+ $ErrorActionPreference = "Stop"
78
+ $hash = (Get-FileHash dist\winget\devspec.exe -Algorithm SHA256).Hash.ToLowerInvariant()
79
+ "$hash devspec.exe" | Set-Content -Path dist\winget\devspec.exe.sha256 -Encoding ASCII
80
+
81
+ $sourceRoot = "packaging\winget\manifests\s\SpecLabs\Devspec\0.1.0"
82
+ $manifestRoot = "dist\winget\manifests\s\SpecLabs\Devspec\0.1.0"
83
+ New-Item -ItemType Directory -Force -Path $manifestRoot | Out-Null
84
+ Copy-Item -Path "$sourceRoot\*.yaml" -Destination $manifestRoot
85
+
86
+ $installerManifest = Join-Path $manifestRoot "SpecLabs.Devspec.installer.yaml"
87
+ $manifest = Get-Content $installerManifest -Raw
88
+ $manifest = $manifest.Replace("REPLACE_WITH_RELEASE_SHA256", $hash)
89
+ $manifest | Set-Content -Path $installerManifest -Encoding UTF8
90
+
91
+ Write-Host "devspec.exe SHA256: $hash"
92
+ Write-Host "WinGet manifests: $manifestRoot"
93
+
94
+ - name: Upload WinGet package artifacts
95
+ uses: actions/upload-artifact@v4
96
+ with:
97
+ name: devspec-winget-package
98
+ path: |
99
+ dist/winget/devspec.exe
100
+ dist/winget/devspec.exe.sha256
101
+ dist/winget/manifests/**/*.yaml
102
+
103
+ - name: Attach WinGet package artifacts
104
+ if: startsWith(github.ref, 'refs/tags/v')
105
+ uses: softprops/action-gh-release@v2
106
+ with:
107
+ files: |
108
+ dist/winget/devspec.exe
109
+ dist/winget/devspec.exe.sha256
110
+ dist/winget/manifests/**/*.yaml
@@ -0,0 +1,80 @@
1
+ # Devspec Agent Instructions
2
+
3
+ Use these instructions for OpenAI Codex, Cursor, Gemini CLI, Google Antigravity, and other agents that read `AGENTS.md`.
4
+
5
+ ## Canonical Workflow
6
+
7
+ `devspec` is a spec-driven development framework. The Git-tracked `devspec/` artifacts are the durable source of truth; chat history and tool memory are transient.
8
+
9
+ Before running or continuing any `devspec` workflow:
10
+
11
+ 1. Read `devspec/adapters/command-registry.md` for the requested command.
12
+ 2. Read the canonical Copilot prompt and agent files named in that registry row.
13
+ 3. Follow `.github/prompts/PATTERNS.md` for shared workflow, recovery, output, discovery, and recommendation behavior.
14
+ 4. Recover from existing `devspec/` artifacts before relying on memory.
15
+ 5. Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
16
+
17
+ ## Structured Questions
18
+
19
+ Follow `.github/prompts/PATTERNS.md#interactive-question-pattern` for user questions. Use clickable multiple-choice options when the host supports them; otherwise render the same option labels as text and ask the user to reply with one label or `Custom Answer`. Preserve question intent, option labels, the recommended option, and the continuation condition in the relevant `Resume State` or `Workflow State` before waiting for input.
20
+
21
+ ## No Intent Drift
22
+
23
+ Do not change the original intent of `.github/prompts/*.prompt.md` or `.github/agents/*.agent.md`.
24
+
25
+ An adapter or agent must not:
26
+
27
+ - change command purpose
28
+ - skip required input or confirmation
29
+ - write a different artifact set
30
+ - relax readiness, review, access, or security gates
31
+ - invent status values outside `devspec/glossary.md`
32
+ - recommend unregistered commands
33
+ - hide platform limitations by changing workflow semantics
34
+
35
+ Record platform gaps in `devspec/adapters/compatibility-matrix.md` when needed.
36
+
37
+ ## Required Flows
38
+
39
+ New repository foundation:
40
+
41
+ ```text
42
+ /devspec.projectcontext
43
+ /devspec.techstack
44
+ /devspec.codebase-structure
45
+ /devspec.coding-standards
46
+ /devspec.rules
47
+ ```
48
+
49
+ Existing repository foundation:
50
+
51
+ ```text
52
+ /devspec.extract
53
+ /devspec.projectcontext
54
+ /devspec.techstack
55
+ /devspec.codebase-structure
56
+ /devspec.coding-standards
57
+ /devspec.rules
58
+ ```
59
+
60
+ Work-item story lifecycle:
61
+
62
+ ```text
63
+ /devspec.story
64
+ /devspec.finalize
65
+ /devspec.tasks
66
+ /devspec.implement
67
+ /devspec.review
68
+ ```
69
+
70
+ Use `/devspec.clarify` only when work-item intake or finalization records a blocking question. Use `/devspec.diagram` for diagram work after relevant context exists.
71
+
72
+ ## Enterprise Validation
73
+
74
+ Use `devspec/adapters/validation-flows.md` as the acceptance checklist for new repository, existing repository, story lifecycle, and cross-tool recovery validation.
75
+
76
+ ## Gemini and Antigravity Notes
77
+
78
+ - Gemini CLI reads `GEMINI.md`, which imports this file and maps native `/devspec:*` commands to canonical `/devspec.*` workflow intent.
79
+ - Google Antigravity reads workspace rules and skills from `.agents/`; native skills use `/devspec-*` names while preserving canonical `/devspec.*` command behavior.
80
+ - Gemini and Antigravity adapters must document platform-specific permission, sandbox, telemetry, and command-name limitations without changing `devspec` semantics.
@@ -0,0 +1,35 @@
1
+ # Devspec Gemini Instructions
2
+
3
+ Use this file as Gemini CLI and Gemini-backed agent context for this repository.
4
+
5
+ @./AGENTS.md
6
+
7
+ ## Gemini Adapter Rules
8
+
9
+ - Treat `AGENTS.md` as the shared cross-agent baseline.
10
+ - Treat `devspec/adapters/command-registry.md` as the canonical command registry.
11
+ - Treat `.github/prompts/*.prompt.md` and `.github/agents/*.agent.md` as the protected reference implementation.
12
+ - Preserve canonical `/devspec.*` command vocabulary even when Gemini CLI invokes native commands such as `/devspec:story`.
13
+ - Recover from Git-tracked `devspec/` artifacts before relying on Gemini session memory.
14
+ - Preserve structured question behavior from `.github/prompts/PATTERNS.md#interactive-question-pattern`; if Gemini does not provide clickable options, render the same option labels as text and preserve the recommended option.
15
+ - Do not store credentials, API keys, tokens, personal settings, or provider secrets in Gemini context, commands, or artifacts.
16
+
17
+ ## Native Gemini Commands
18
+
19
+ Gemini CLI project commands live under `.gemini/commands/devspec/`.
20
+
21
+ | Canonical command | Gemini CLI command |
22
+ | --- | --- |
23
+ | `/devspec.extract` | `/devspec:extract` |
24
+ | `/devspec.projectcontext` | `/devspec:projectcontext` |
25
+ | `/devspec.techstack` | `/devspec:techstack` |
26
+ | `/devspec.codebase-structure` | `/devspec:codebase-structure` |
27
+ | `/devspec.coding-standards` | `/devspec:coding-standards` |
28
+ | `/devspec.rules` | `/devspec:rules` |
29
+ | `/devspec.story` | `/devspec:story` |
30
+ | `/devspec.clarify` | `/devspec:clarify` |
31
+ | `/devspec.finalize` | `/devspec:finalize` |
32
+ | `/devspec.tasks` | `/devspec:tasks` |
33
+ | `/devspec.implement` | `/devspec:implement` |
34
+ | `/devspec.review` | `/devspec:review` |
35
+ | `/devspec.diagram` | `/devspec:diagram` |
@@ -0,0 +1,301 @@
1
+ # devspec
2
+
3
+ `devspec` is a spec-driven development framework for teams using GitHub Copilot and other AI coding agents.
4
+
5
+ It stores planning, implementation, review, and recovery state in Git-tracked files instead of relying on chat history.
6
+
7
+ Use it when you want agents to follow the same workflow for:
8
+
9
+ - project context, architecture, engineering rules, and coding standards
10
+ - feature, bug, and security work-item intake
11
+ - clarification, finalization, task planning, implementation, and review
12
+ - session recovery from repository artifacts
13
+
14
+ ## Quick Start
15
+
16
+ Install with the `devspec` CLI. The recommended one-off path is `uvx`, which avoids a permanent global install and works well on machines where developers cannot write to shared PATH folders.
17
+
18
+ For install, workflow, AI coding agent, multi-repo, provider, validation, and upgrade examples, see [`docs/how-to/README.md`](docs/how-to/README.md).
19
+
20
+ 1. Open the target repository in VS Code or the selected AI coding tool.
21
+ 2. Install all supported adapter files into the repository:
22
+
23
+ ```text
24
+ uvx devspec init --target . --profile all --repo-state existing
25
+ ```
26
+
27
+ Use `--repo-state new` for a new repository.
28
+
29
+ 3. Validate the install:
30
+
31
+ ```text
32
+ uvx devspec doctor --target . --profile all
33
+ ```
34
+
35
+ 4. Commit the copied files.
36
+ 5. Run the foundation flow for a new or existing repository.
37
+ 6. Start the first work item.
38
+
39
+ Manual copy remains supported as a fallback when package managers are blocked. Copy the framework folders listed in [Manual Copy Fallback](#manual-copy-fallback), then commit the copied files.
40
+
41
+ For a new project:
42
+
43
+ ```text
44
+ /devspec.projectcontext
45
+ /devspec.techstack
46
+ /devspec.codebase-structure
47
+ /devspec.coding-standards
48
+ /devspec.rules
49
+ ```
50
+
51
+ For an existing project:
52
+
53
+ ```text
54
+ /devspec.extract
55
+ /devspec.projectcontext
56
+ /devspec.techstack
57
+ /devspec.codebase-structure
58
+ /devspec.coding-standards
59
+ /devspec.rules
60
+ ```
61
+
62
+ Then run the work-item flow:
63
+
64
+ ```text
65
+ /devspec.story
66
+ /devspec.finalize
67
+ /devspec.tasks
68
+ /devspec.implement
69
+ /devspec.review
70
+ ```
71
+
72
+ Use `/devspec.clarify` only when a work item records a blocking question. Use `/devspec.diagram` when a diagram would clarify architecture, workflow, state, sequence, or domain behavior.
73
+
74
+ ## How It Works
75
+
76
+ `devspec` has two workflow layers.
77
+
78
+ | Layer | Purpose | Commands |
79
+ | --- | --- | --- |
80
+ | Foundation | Capture stable project context, architecture, stack, structure, standards, and rules. | `/devspec.extract`, `/devspec.projectcontext`, `/devspec.techstack`, `/devspec.codebase-structure`, `/devspec.coding-standards`, `/devspec.rules` |
81
+ | Work items | Move one feature, bug, or security issue from intake to review. | `/devspec.story`, `/devspec.clarify`, `/devspec.finalize`, `/devspec.tasks`, `/devspec.implement`, `/devspec.review` |
82
+
83
+ ```mermaid
84
+ flowchart TD
85
+ Start["Start"] --> State{"Project state?"}
86
+ State -- "new" --> ProjectContext["/devspec.projectcontext"]
87
+ State -- "existing" --> Extract["/devspec.extract"]
88
+ Extract --> ProjectContext
89
+ ProjectContext --> TechStack["/devspec.techstack"]
90
+ TechStack --> Structure["/devspec.codebase-structure"]
91
+ Structure --> Standards["/devspec.coding-standards"]
92
+ Standards --> Rules["/devspec.rules"]
93
+ Rules --> Story["/devspec.story"]
94
+ Story --> Blocked{"Blocking question?"}
95
+ Blocked -- "yes" --> Clarify["/devspec.clarify"]
96
+ Clarify --> Story
97
+ Blocked -- "no" --> Finalize["/devspec.finalize"]
98
+ Finalize --> Ready{"Ready?"}
99
+ Ready -- "no" --> Clarify
100
+ Ready -- "yes" --> Tasks["/devspec.tasks"]
101
+ Tasks --> Implement["/devspec.implement"]
102
+ Implement --> Review["/devspec.review"]
103
+ Review --> Outcome{"Review outcome?"}
104
+ Outcome -- "changes requested" --> Implement
105
+ Outcome -- "approved" --> Done["Done"]
106
+ ```
107
+
108
+ ## Command Reference
109
+
110
+ | Command | Use when | Main output |
111
+ | --- | --- | --- |
112
+ | `/devspec.extract` | Existing code/docs should seed the foundation. | Foundation, architecture, extraction, and diagram queue artifacts. |
113
+ | `/devspec.projectcontext` | Product and business context must be recorded. | `devspec/foundation/project-context.md` |
114
+ | `/devspec.techstack` | Stack, runtime, hosting, tooling, or support status must be recorded. | `devspec/foundation/tech-stack.md` |
115
+ | `/devspec.codebase-structure` | Repository layout, boundaries, multi-repo access, or integration contracts must be recorded. | `devspec/foundation/codebase-structure.md` |
116
+ | `/devspec.coding-standards` | Engineering standards and observed patterns must be recorded. | `devspec/foundation/coding-standards.md` |
117
+ | `/devspec.rules` | Operational rules, compliance requirements, and gates must be recorded. | `devspec/foundation/rules.md` |
118
+ | `/devspec.story` | A feature, bug, security issue, task, PBI, or provider reference needs intake. | Work-item `meta.md`, `story.md`, `decisions.md`, `notes.md` |
119
+ | `/devspec.clarify` | A blocking question must be resolved. | Work-item `clarify.md` |
120
+ | `/devspec.finalize` | A work item needs an implementation-ready brief. | Work-item `finalize.md` |
121
+ | `/devspec.tasks` | A ready brief needs executable tasks. | Work-item `tasks.md` |
122
+ | `/devspec.implement` | Pending tasks should be implemented and recorded. | Work-item `implement.md` and code changes when applicable |
123
+ | `/devspec.review` | Implemented work needs review against the finalized brief. | Work-item `review.md` |
124
+ | `/devspec.diagram` | A diagram should be created or updated. | Architecture or work-item Mermaid diagram artifacts |
125
+
126
+ For exact command contracts, see `devspec/adapters/command-registry.md`.
127
+
128
+ ## AI Tool Support
129
+
130
+ GitHub Copilot prompt and agent files are the reference implementation. Other adapters are thin wrappers around the same command registry and Git-tracked artifacts.
131
+
132
+ | Tool | Files | Notes |
133
+ | --- | --- | --- |
134
+ | GitHub Copilot | `.github/prompts/`, `.github/agents/` | Native `/devspec.*` command implementation. |
135
+ | Claude Code | `.claude/skills/devspec-*/SKILL.md` | Project skills for canonical commands. |
136
+ | OpenAI Codex | `AGENTS.md`, `devspec/adapters/codex.md` | Repository instructions and Codex guidance. |
137
+ | Cursor | `.cursor/rules/devspec-workflow.mdc`, `AGENTS.md` | Project rules plus shared fallback instructions. |
138
+ | Gemini CLI | `GEMINI.md`, optional `.gemini/commands/devspec/*.toml` | `GEMINI.md` is enough for context; TOML files only add native `/devspec:*` shortcuts. |
139
+ | Google Antigravity | `.agents/rules/devspec-workflow.md`, `.agents/skills/devspec-*.md` | Workspace rule and skills using `/devspec-*` names. |
140
+
141
+ Canonical command names remain `/devspec.*`. Some adapters expose host-native shortcuts such as `/devspec:story` or `/devspec-story`.
142
+
143
+ Related docs:
144
+
145
+ - [`docs/how-to/README.md`](docs/how-to/README.md)
146
+ - [`devspec/adapters/README.md`](devspec/adapters/README.md)
147
+ - [`devspec/adapters/compatibility-matrix.md`](devspec/adapters/compatibility-matrix.md)
148
+ - [`devspec/adapters/validation-flows.md`](devspec/adapters/validation-flows.md)
149
+ - [`devspec/adapters/enterprise-governance.md`](devspec/adapters/enterprise-governance.md)
150
+
151
+ ## Repository Layout
152
+
153
+ | Path | Purpose |
154
+ | --- | --- |
155
+ | `devspec/constitution.md` | Durable project principles across all work items and agents. |
156
+ | `devspec/foundation/` | Product context, stack, structure, standards, rules, exclusions, and provider policy. |
157
+ | `devspec/architecture/` | Architecture overview, diagrams, ADR templates, and artifact queue. |
158
+ | `devspec/work-items/` | One folder per feature, bug, or security work item. |
159
+ | `devspec/adapters/` | Multi-agent registry, compatibility, validation, and governance docs. |
160
+ | `docs/how-to/` | User manual with install, workflow, AI coding agent, multi-repo, provider, validation, and upgrade examples. |
161
+ | `.github/prompts/` | Copilot slash-command prompts. |
162
+ | `.github/agents/` | Copilot agent definitions. |
163
+ | `.github/skills/` | Optional reusable skills. |
164
+ | `AGENTS.md` | Shared instructions for tools that read `AGENTS.md`. |
165
+ | `GEMINI.md` | Gemini-native repository context. |
166
+ | `.claude/`, `.cursor/`, `.gemini/`, `.agents/` | Optional adapter support. |
167
+
168
+ ## Manual Copy Fallback
169
+
170
+ Use manual copy only when the CLI, `uvx`, package managers, and release ZIP automation are blocked. Copy these core files and folders from the `devspec` release into the target repository root:
171
+
172
+ ```text
173
+ devspec/
174
+ .github/prompts/
175
+ .github/agents/
176
+ AGENTS.md
177
+ docs/how-to/
178
+ ```
179
+
180
+ Then copy only the adapter files your team uses:
181
+
182
+ | Tool | Additional files |
183
+ | --- | --- |
184
+ | GitHub Copilot | `.github/skills/` |
185
+ | Claude Code | `.claude/` |
186
+ | OpenAI Codex | No extra files beyond `AGENTS.md` |
187
+ | Cursor | `.cursor/` |
188
+ | Gemini CLI | `GEMINI.md`, `.gemini/` |
189
+ | Google Antigravity | `.agents/` |
190
+
191
+ Do not copy this framework repository's root `README.md` over a target project's README. Keep credentials, provider tokens, local auth files, and personal settings outside copied framework files.
192
+
193
+ ## Operating Rules
194
+
195
+ - Keep `.github/prompts/*.prompt.md` and `.github/agents/*.agent.md` as the protected reference contracts.
196
+ - Keep adapter support additive; do not change command intent for another tool.
197
+ - Store workflow state in Git-tracked `devspec/` artifacts, not chat memory.
198
+ - Use `devspec/glossary.md` for status values.
199
+ - Use `devspec/foundation/codebase-structure.md` for repository access requirements.
200
+ - Keep secrets and provider credentials outside prompt, agent, adapter, and artifact files.
201
+ - Record blockers instead of guessing.
202
+ - Recommend only registered `/devspec.*` commands.
203
+
204
+ ## Multi-Repo Work
205
+
206
+ For multi-repo systems, open one workspace or tool project that includes every repository agents should inspect, edit, test, or coordinate.
207
+
208
+ Record repository roles, local paths, access requirements, and boundaries in:
209
+
210
+ ```text
211
+ devspec/foundation/codebase-structure.md
212
+ ```
213
+
214
+ Access values are defined in:
215
+
216
+ ```text
217
+ devspec/glossary.md#access-requirement-values
218
+ ```
219
+
220
+ ## Provider Integrations
221
+
222
+ Use provider integrations when `/devspec.story` should resolve GitHub, Jira, Azure DevOps, or other external work-item references.
223
+
224
+ Provider policy lives in:
225
+
226
+ ```text
227
+ devspec/foundation/provider-integrations.md
228
+ ```
229
+
230
+ Keep authentication outside prompt artifacts. Prefer read-only provider access unless write-back is explicitly required.
231
+
232
+ ## Validation
233
+
234
+ Enterprise readiness requires these flows to pass for each supported adapter:
235
+
236
+ - new repository foundation flow
237
+ - existing repository extraction flow
238
+ - full story lifecycle
239
+ - cross-tool recovery from Git-tracked artifacts
240
+
241
+ Use:
242
+
243
+ ```text
244
+ devspec/adapters/validation-flows.md
245
+ ```
246
+
247
+ ## Upgrade Notes
248
+
249
+ Use the CLI to inspect and apply framework upgrades:
250
+
251
+ ```text
252
+ devspec diff --target .
253
+ devspec sync --target . --profile all --dry-run
254
+ devspec sync --target . --profile all
255
+ ```
256
+
257
+ Framework-owned files may be replaced or diff-applied during upgrades:
258
+
259
+ - `.github/prompts/`
260
+ - `.github/agents/`
261
+ - `.github/skills/`
262
+ - adapter support folders
263
+ - `AGENTS.md`
264
+ - `GEMINI.md`
265
+ - `devspec/adapters/`
266
+ - `devspec/**/_template/`
267
+ - `docs/how-to/`
268
+
269
+ Project-owned files should be migrated or merged, not overwritten:
270
+
271
+ - `devspec/foundation/*.md`
272
+ - `devspec/architecture/*.md`
273
+ - `devspec/architecture/diagrams/*.md`
274
+ - `devspec/work-items/**`
275
+ - `devspec/constitution.md`
276
+ - `devspec/glossary.md`
277
+
278
+ ## Recommended Adoption
279
+
280
+ 1. Install into one target repository with `uvx devspec init --target . --profile all --repo-state existing`.
281
+ 2. Run the foundation flow.
282
+ 3. Complete one real feature work item.
283
+ 4. Complete one real bug work item.
284
+ 5. Add security-vulnerability flow validation if relevant.
285
+ 6. Adjust foundation docs based on what the first runs teach the team.
286
+
287
+ ## Deployment Development
288
+
289
+ When changing the installer, profile manifest, package metadata, or release automation, run:
290
+
291
+ ```text
292
+ uv run pytest
293
+ powershell -ExecutionPolicy Bypass -File scripts/test-local-install.ps1
294
+ bash scripts/test-local-install.sh
295
+ ```
296
+
297
+ Update `packaging/devspec-profiles.json` whenever adapter files are added, removed, or moved.
298
+
299
+ ## License
300
+
301
+ This repository is released under the [Apache License 2.0](LICENSE).