container-superposition 0.1.4 → 0.1.6
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.
- package/README.md +74 -1370
- package/dist/scripts/init.js +350 -185
- package/dist/scripts/init.js.map +1 -1
- package/dist/tool/commands/adopt.d.ts +63 -0
- package/dist/tool/commands/adopt.d.ts.map +1 -0
- package/dist/tool/commands/adopt.js +1104 -0
- package/dist/tool/commands/adopt.js.map +1 -0
- package/dist/tool/commands/hash.d.ts +36 -0
- package/dist/tool/commands/hash.d.ts.map +1 -0
- package/dist/tool/commands/hash.js +242 -0
- package/dist/tool/commands/hash.js.map +1 -0
- package/dist/tool/commands/plan.d.ts +2 -0
- package/dist/tool/commands/plan.d.ts.map +1 -1
- package/dist/tool/commands/plan.js +262 -42
- package/dist/tool/commands/plan.js.map +1 -1
- package/dist/tool/schema/project-config.d.ts +17 -0
- package/dist/tool/schema/project-config.d.ts.map +1 -0
- package/dist/tool/schema/project-config.js +441 -0
- package/dist/tool/schema/project-config.js.map +1 -0
- package/dist/tool/schema/types.d.ts +39 -1
- package/dist/tool/schema/types.d.ts.map +1 -1
- package/dist/tool/utils/backup.d.ts +23 -0
- package/dist/tool/utils/backup.d.ts.map +1 -0
- package/dist/tool/utils/backup.js +123 -0
- package/dist/tool/utils/backup.js.map +1 -0
- package/docs/README.md +12 -2
- package/docs/adopt.md +202 -0
- package/docs/custom-patches.md +1 -1
- package/docs/discovery-commands.md +55 -3
- package/docs/examples.md +40 -6
- package/docs/filesystem-contract.md +58 -0
- package/docs/hash.md +183 -0
- package/docs/minimal-and-editor.md +1 -1
- package/docs/overlays.md +70 -0
- package/docs/presets-architecture.md +1 -1
- package/docs/presets.md +1 -1
- package/docs/publishing.md +36 -23
- package/docs/security.md +43 -0
- package/docs/specs/001-verbose-plan-graph/checklists/requirements.md +36 -0
- package/docs/specs/001-verbose-plan-graph/contracts/plan-verbose-output.md +96 -0
- package/docs/specs/001-verbose-plan-graph/data-model.md +111 -0
- package/docs/specs/001-verbose-plan-graph/plan.md +127 -0
- package/docs/specs/001-verbose-plan-graph/quickstart.md +106 -0
- package/docs/specs/001-verbose-plan-graph/research.md +100 -0
- package/docs/specs/001-verbose-plan-graph/spec.md +128 -0
- package/docs/specs/001-verbose-plan-graph/tasks.md +223 -0
- package/docs/specs/002-superposition-config-file/checklists/requirements.md +36 -0
- package/docs/specs/002-superposition-config-file/contracts/init-project-config.md +98 -0
- package/docs/specs/002-superposition-config-file/data-model.md +126 -0
- package/docs/specs/002-superposition-config-file/plan.md +213 -0
- package/docs/specs/002-superposition-config-file/quickstart.md +140 -0
- package/docs/specs/002-superposition-config-file/research.md +144 -0
- package/docs/specs/002-superposition-config-file/spec.md +136 -0
- package/docs/specs/002-superposition-config-file/tasks.md +215 -0
- package/docs/team-workflow.md +33 -1
- package/docs/workflows.md +139 -0
- package/features/cross-distro-packages/README.md +18 -0
- package/features/cross-distro-packages/devcontainer-feature.json +3 -3
- package/features/cross-distro-packages/install.sh +49 -7
- package/overlays/.presets/sdd.yml +84 -0
- package/overlays/README.md +7 -1
- package/overlays/amp/README.md +70 -0
- package/overlays/amp/devcontainer.patch.json +3 -0
- package/overlays/amp/overlay.yml +15 -0
- package/overlays/amp/setup.sh +21 -0
- package/overlays/amp/verify.sh +21 -0
- package/overlays/claude-code/README.md +83 -0
- package/overlays/claude-code/devcontainer.patch.json +3 -0
- package/overlays/claude-code/overlay.yml +15 -0
- package/overlays/claude-code/setup.sh +21 -0
- package/overlays/claude-code/verify.sh +21 -0
- package/overlays/gemini-cli/README.md +77 -0
- package/overlays/gemini-cli/devcontainer.patch.json +3 -0
- package/overlays/gemini-cli/overlay.yml +15 -0
- package/overlays/gemini-cli/setup.sh +21 -0
- package/overlays/gemini-cli/verify.sh +21 -0
- package/overlays/opencode/README.md +76 -0
- package/overlays/opencode/devcontainer.patch.json +3 -0
- package/overlays/opencode/overlay.yml +14 -0
- package/overlays/opencode/setup.sh +21 -0
- package/overlays/opencode/verify.sh +21 -0
- package/overlays/pandoc/README.md +279 -0
- package/overlays/pandoc/devcontainer.patch.json +14 -0
- package/overlays/pandoc/overlay.yml +19 -0
- package/overlays/pandoc/setup.sh +94 -0
- package/overlays/pandoc/verify.sh +13 -0
- package/overlays/spec-kit/README.md +181 -0
- package/overlays/spec-kit/devcontainer.patch.json +6 -0
- package/overlays/spec-kit/overlay.yml +19 -0
- package/overlays/spec-kit/setup.sh +45 -0
- package/overlays/spec-kit/verify.sh +33 -0
- package/overlays/windsurf-cli/README.md +69 -0
- package/overlays/windsurf-cli/devcontainer.patch.json +3 -0
- package/overlays/windsurf-cli/overlay.yml +15 -0
- package/overlays/windsurf-cli/setup.sh +21 -0
- package/overlays/windsurf-cli/verify.sh +21 -0
- package/package.json +1 -1
- package/tool/schema/config.schema.json +138 -9
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# Pandoc PDF Overlay
|
|
2
|
+
|
|
3
|
+
Adds a complete Markdown → PDF pipeline to your devcontainer, powered by Pandoc, XeLaTeX, and optional Mermaid diagram rendering.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Pandoc 3.x** — Latest release binary from GitHub (not the outdated apt version)
|
|
8
|
+
- **TeX Live / XeLaTeX** — Full Unicode-capable PDF engine (`texlive-xetex`, `texlive-fonts-extra`, `texlive-latex-extra`)
|
|
9
|
+
- **Quality fonts** — Carlito (body), JetBrains Mono (code), Noto Sans Symbols 2 (Unicode fallback) via system packages
|
|
10
|
+
- Uses the `cross-distro-packages` feature with fallback package names for Carlito (`fonts-carlito|fonts-crosextra-carlito`)
|
|
11
|
+
- **`diagram.lua`** — Lua filter from [pandoc-ext/diagram](https://github.com/pandoc-ext/diagram) for rendering code-block diagrams
|
|
12
|
+
- **Mermaid CLI (`mmdc`)** — Installed when the `nodejs` overlay is present; skipped gracefully otherwise
|
|
13
|
+
- **`~/.pandoc/pandoc.yaml`** — Ready-to-use defaults file (XeLaTeX engine, font settings, table tweaks)
|
|
14
|
+
- **VS Code Extensions:** Markdown All in One (`yzhang.markdown-all-in-one`), markdownlint (`DavidAnson.vscode-markdownlint`)
|
|
15
|
+
|
|
16
|
+
## How It Works
|
|
17
|
+
|
|
18
|
+
System packages are installed through the `cross-distro-packages` feature, which handles package-manager detection and now supports fallback package names for distro variants. The setup script then downloads the official Pandoc `.deb` from GitHub releases (Pandoc 3.x is required for `diagram.lua`'s `Figure` AST element). Chromium is installed system-wide to serve as Puppeteer's browser for Mermaid headless rendering.
|
|
19
|
+
|
|
20
|
+
The pipeline:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Markdown
|
|
24
|
+
-> pandoc
|
|
25
|
+
-> diagram.lua (Lua filter, optional)
|
|
26
|
+
-> mmdc (Mermaid CLI, headless Chromium)
|
|
27
|
+
-> XeLaTeX
|
|
28
|
+
-> PDF
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Font discovery is updated with `fc-cache -fv` after installation so XeLaTeX can locate the apt-installed fonts.
|
|
32
|
+
|
|
33
|
+
## Common Commands
|
|
34
|
+
|
|
35
|
+
### Basic PDF export
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Use the default pandoc.yaml
|
|
39
|
+
pandoc -d ~/.pandoc/pandoc.yaml document.md -o document.pdf
|
|
40
|
+
|
|
41
|
+
# Override the output font on the fly
|
|
42
|
+
pandoc -d ~/.pandoc/pandoc.yaml -V mainfont="DejaVu Serif" document.md -o document.pdf
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### PDF with Mermaid diagrams (requires nodejs overlay)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pandoc -d ~/.pandoc/pandoc.yaml \
|
|
49
|
+
--lua-filter ~/.pandoc/filters/diagram.lua \
|
|
50
|
+
document.md -o document.pdf
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Inspect installed fonts
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
fc-list | grep -i carlito
|
|
57
|
+
fc-list | grep -i jetbrains
|
|
58
|
+
fc-list | grep -i "noto sans symbols"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Check Pandoc version
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pandoc --version
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Mermaid Diagram Usage
|
|
68
|
+
|
|
69
|
+
Add fenced `mermaid` code blocks to your Markdown:
|
|
70
|
+
|
|
71
|
+
````markdown
|
|
72
|
+
```mermaid
|
|
73
|
+
graph TD
|
|
74
|
+
A[Start] --> B{Decision}
|
|
75
|
+
B -->|Yes| C[Action]
|
|
76
|
+
B -->|No| D[End]
|
|
77
|
+
```
|
|
78
|
+
````
|
|
79
|
+
|
|
80
|
+
Render with the `diagram.lua` filter:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pandoc -d ~/.pandoc/pandoc.yaml \
|
|
84
|
+
--lua-filter ~/.pandoc/filters/diagram.lua \
|
|
85
|
+
document.md -o document.pdf
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The filter invokes `mmdc` for each `mermaid` block, producing a PNG that XeLaTeX embeds in the PDF. The Puppeteer configuration at `~/.config/mermaid/puppeteer-config.json` points `mmdc` at the system Chromium with `--no-sandbox`, which is required inside containers.
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
### Default `~/.pandoc/pandoc.yaml`
|
|
93
|
+
|
|
94
|
+
The setup script writes a defaults file with proven settings:
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
pdf-engine: xelatex
|
|
98
|
+
|
|
99
|
+
variables:
|
|
100
|
+
mainfont: 'Carlito'
|
|
101
|
+
monofont: 'JetBrains Mono'
|
|
102
|
+
fallbackfont: 'Noto Sans Symbols 2'
|
|
103
|
+
fontsize: 11pt
|
|
104
|
+
linestretch: 1.15
|
|
105
|
+
geometry:
|
|
106
|
+
- top=16mm
|
|
107
|
+
- bottom=16mm
|
|
108
|
+
- left=14mm
|
|
109
|
+
- right=14mm
|
|
110
|
+
header-includes:
|
|
111
|
+
- |
|
|
112
|
+
\usepackage{etoolbox}
|
|
113
|
+
\setlength{\tabcolsep}{3pt}
|
|
114
|
+
\renewcommand{\arraystretch}{1.05}
|
|
115
|
+
\AtBeginEnvironment{longtable}{\small}
|
|
116
|
+
\AtBeginEnvironment{tabular}{\small}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Per-project override
|
|
120
|
+
|
|
121
|
+
Create a `pandoc.yaml` in your project directory to override the defaults:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
# project/pandoc.yaml
|
|
125
|
+
pdf-engine: xelatex
|
|
126
|
+
variables:
|
|
127
|
+
mainfont: 'DejaVu Serif'
|
|
128
|
+
fontsize: 12pt
|
|
129
|
+
toc: true
|
|
130
|
+
toc-depth: 3
|
|
131
|
+
number-sections: true
|
|
132
|
+
lua-filter:
|
|
133
|
+
- ~/.pandoc/filters/diagram.lua
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Then build with:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pandoc -d pandoc.yaml document.md -o document.pdf
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Enable TOC and section numbering
|
|
143
|
+
|
|
144
|
+
Uncomment the relevant lines in `~/.pandoc/pandoc.yaml`:
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
toc: true
|
|
148
|
+
toc-depth: 3
|
|
149
|
+
number-sections: true
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Enable Mermaid rendering by default
|
|
153
|
+
|
|
154
|
+
Uncomment in `~/.pandoc/pandoc.yaml`:
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
lua-filter:
|
|
158
|
+
- ~/.pandoc/filters/diagram.lua
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Unicode and Emoji
|
|
162
|
+
|
|
163
|
+
XeLaTeX handles Unicode well with the Noto and Carlito fonts, but emoji (🎉 🚀) require a colour emoji font (e.g. `fonts-noto-color-emoji`) which is not installed by default due to size. For documents with emoji, either:
|
|
164
|
+
|
|
165
|
+
1. Replace emoji with text equivalents before generating the PDF:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
sed 's/🎉/[celebration]/g; s/🚀/[rocket]/g' doc.md | pandoc -d ~/.pandoc/pandoc.yaml -o doc.pdf
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
2. Install `fonts-noto-color-emoji` and add `\setmainfont{Noto Color Emoji}` for the emoji font fallback in your `header-includes`.
|
|
172
|
+
|
|
173
|
+
## Use Cases
|
|
174
|
+
|
|
175
|
+
- **Architecture documentation** — Architecture Decision Records (ADRs), system design docs
|
|
176
|
+
- **API specifications** — OpenAPI-style documentation with code samples
|
|
177
|
+
- **Technical reports** — Multi-section documents with tables and diagrams
|
|
178
|
+
- **README to PDF** — Convert project READMEs to distributable PDF format
|
|
179
|
+
|
|
180
|
+
**Integrates well with:**
|
|
181
|
+
|
|
182
|
+
- `nodejs` overlay — Enables Mermaid CLI for diagram rendering
|
|
183
|
+
- `git-helpers` overlay — Commit generated PDFs alongside source Markdown
|
|
184
|
+
- `modern-cli-tools` overlay — Use `bat` to preview Markdown, `rg` to search documents
|
|
185
|
+
|
|
186
|
+
## Troubleshooting
|
|
187
|
+
|
|
188
|
+
### `xelatex: command not found`
|
|
189
|
+
|
|
190
|
+
TeX Live was not installed correctly. Re-run the setup script:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
bash .devcontainer/scripts/setup-pandoc.sh
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Missing glyph warnings / blank characters in PDF
|
|
197
|
+
|
|
198
|
+
The font does not include that glyph. For common Unicode symbols, Noto Sans Symbols 2 covers most cases. Verify it is installed:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
fc-list | grep -i "noto sans symbols 2"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
If not found, rebuild the font cache:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
sudo fc-cache -fv
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Wide tables overflow page margins
|
|
211
|
+
|
|
212
|
+
The `header-includes` in `pandoc.yaml` applies `\small` inside `longtable` and `tabular` environments. For very wide tables, also add `\tiny` or use column width constraints in your Markdown:
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
| Col 1 | Col 2 | Col 3 |
|
|
216
|
+
| :---- | :---- | :---- |
|
|
217
|
+
| data | data | data |
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Mermaid: Chromium crashes or `--no-sandbox` error
|
|
221
|
+
|
|
222
|
+
The Puppeteer config at `~/.config/mermaid/puppeteer-config.json` must set `--no-sandbox`:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"executablePath": "/usr/bin/chromium",
|
|
227
|
+
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Verify the file exists and contains the correct content:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
cat ~/.config/mermaid/puppeteer-config.json
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### `mmdc` not found
|
|
238
|
+
|
|
239
|
+
The `nodejs` overlay must be selected to install Mermaid CLI. Check if Node.js is available:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
node --version
|
|
243
|
+
npm --version
|
|
244
|
+
mmdc --version
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
If Node.js is present but `mmdc` is missing, install it manually:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
npm install -g @mermaid-js/mermaid-cli
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Upgrading Pandoc
|
|
254
|
+
|
|
255
|
+
To upgrade to a newer Pandoc release, update `PANDOC_VERSION` in `setup.sh` and re-run it:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
PANDOC_VERSION=3.7.0 # update as needed
|
|
259
|
+
ARCH=$(dpkg --print-architecture)
|
|
260
|
+
PANDOC_DEB="pandoc-${PANDOC_VERSION}-1-${ARCH}.deb"
|
|
261
|
+
curl -fsSL "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${PANDOC_DEB}" \
|
|
262
|
+
-o "/tmp/${PANDOC_DEB}"
|
|
263
|
+
sudo dpkg -i "/tmp/${PANDOC_DEB}"
|
|
264
|
+
rm "/tmp/${PANDOC_DEB}"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## References
|
|
268
|
+
|
|
269
|
+
- [Pandoc releases](https://github.com/jgm/pandoc/releases)
|
|
270
|
+
- [pandoc-ext/diagram Lua filter](https://github.com/pandoc-ext/diagram)
|
|
271
|
+
- [Mermaid CLI](https://github.com/mermaid-js/mermaid-cli)
|
|
272
|
+
- [Puppeteer in containers](https://pptr.dev/troubleshooting#running-puppeteer-in-docker)
|
|
273
|
+
- [TeX Live packages](https://packages.debian.org/search?keywords=texlive)
|
|
274
|
+
|
|
275
|
+
**Related Overlays:**
|
|
276
|
+
|
|
277
|
+
- `nodejs` — Required for Mermaid diagram rendering via `mmdc`
|
|
278
|
+
- `git-helpers` — Secure Git operations for committing generated docs
|
|
279
|
+
- `modern-cli-tools` — Productivity tools for Markdown authoring workflows
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"features": {
|
|
4
|
+
"./features/cross-distro-packages": {
|
|
5
|
+
"apt": "texlive-xetex texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-lang-european fonts-carlito|fonts-crosextra-carlito fonts-noto fonts-noto-extra fonts-noto-mono fonts-jetbrains-mono fontconfig perl chromium",
|
|
6
|
+
"apk": "fontconfig perl chromium"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"customizations": {
|
|
10
|
+
"vscode": {
|
|
11
|
+
"extensions": ["yzhang.markdown-all-in-one", "DavidAnson.vscode-markdownlint"]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: pandoc
|
|
2
|
+
name: Pandoc PDF
|
|
3
|
+
description: Pandoc with XeLaTeX, Mermaid diagrams, and quality fonts for Markdown-to-PDF export
|
|
4
|
+
category: dev
|
|
5
|
+
supports: []
|
|
6
|
+
requires: []
|
|
7
|
+
suggests:
|
|
8
|
+
- nodejs
|
|
9
|
+
conflicts: []
|
|
10
|
+
tags:
|
|
11
|
+
- dev
|
|
12
|
+
- pandoc
|
|
13
|
+
- pdf
|
|
14
|
+
- latex
|
|
15
|
+
- markdown
|
|
16
|
+
- docs
|
|
17
|
+
- mermaid
|
|
18
|
+
ports: []
|
|
19
|
+
order: 25
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# pandoc overlay setup — Markdown -> PDF pipeline
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "📦 Refreshing font cache..."
|
|
7
|
+
sudo fc-cache -fv
|
|
8
|
+
|
|
9
|
+
echo "📦 Installing Pandoc (latest release)..."
|
|
10
|
+
PANDOC_VERSION="3.6.4"
|
|
11
|
+
|
|
12
|
+
if command -v apt-get > /dev/null 2>&1; then
|
|
13
|
+
# Debian/Ubuntu — install official .deb from GitHub releases
|
|
14
|
+
ARCH=$(dpkg --print-architecture)
|
|
15
|
+
PANDOC_DEB="pandoc-${PANDOC_VERSION}-1-${ARCH}.deb"
|
|
16
|
+
curl -fsSL "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${PANDOC_DEB}" \
|
|
17
|
+
-o "/tmp/${PANDOC_DEB}"
|
|
18
|
+
sudo dpkg -i "/tmp/${PANDOC_DEB}"
|
|
19
|
+
rm "/tmp/${PANDOC_DEB}"
|
|
20
|
+
elif command -v apk > /dev/null 2>&1; then
|
|
21
|
+
# Alpine Linux — install via apk (version may differ from pinned release)
|
|
22
|
+
echo "⚠ Alpine detected: installing pandoc via apk (version may differ from ${PANDOC_VERSION})"
|
|
23
|
+
apk add --no-cache pandoc
|
|
24
|
+
else
|
|
25
|
+
echo "❌ Unsupported distro: neither apt-get nor apk found. Cannot install Pandoc."
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
echo "✓ pandoc $(pandoc --version | head -1)"
|
|
30
|
+
|
|
31
|
+
echo "📦 Installing diagram.lua Lua filter..."
|
|
32
|
+
mkdir -p "$HOME/.pandoc/filters"
|
|
33
|
+
curl -fsSL \
|
|
34
|
+
"https://raw.githubusercontent.com/pandoc-ext/diagram/main/_extensions/diagram/diagram.lua" \
|
|
35
|
+
-o "$HOME/.pandoc/filters/diagram.lua"
|
|
36
|
+
|
|
37
|
+
echo "📦 Installing Mermaid CLI (requires Node.js)..."
|
|
38
|
+
if command -v npm &>/dev/null; then
|
|
39
|
+
npm install -g @mermaid-js/mermaid-cli
|
|
40
|
+
# Point mmdc at the system Chromium (avoids Puppeteer downloading its own)
|
|
41
|
+
mkdir -p "$HOME/.config/mermaid"
|
|
42
|
+
cat > "$HOME/.config/mermaid/puppeteer-config.json" <<'EOF'
|
|
43
|
+
{
|
|
44
|
+
"executablePath": "/usr/bin/chromium",
|
|
45
|
+
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
|
|
46
|
+
}
|
|
47
|
+
EOF
|
|
48
|
+
if command -v mmdc >/dev/null 2>&1; then
|
|
49
|
+
echo "✓ Mermaid CLI installed: $(command -v mmdc)"
|
|
50
|
+
else
|
|
51
|
+
echo "⚠ Mermaid CLI install completed but mmdc is not on PATH yet"
|
|
52
|
+
fi
|
|
53
|
+
else
|
|
54
|
+
echo "⚠ Node.js not found — Mermaid CLI skipped. Add the nodejs overlay for diagram support."
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
echo "📦 Writing default pandoc.yaml..."
|
|
58
|
+
mkdir -p "$HOME/.pandoc"
|
|
59
|
+
cat > "$HOME/.pandoc/pandoc.yaml" <<'EOF'
|
|
60
|
+
pdf-engine: xelatex
|
|
61
|
+
|
|
62
|
+
variables:
|
|
63
|
+
mainfont: "Carlito"
|
|
64
|
+
monofont: "JetBrains Mono"
|
|
65
|
+
fallbackfont: "Noto Sans Symbols 2"
|
|
66
|
+
fontsize: 11pt
|
|
67
|
+
linestretch: 1.15
|
|
68
|
+
geometry:
|
|
69
|
+
- top=16mm
|
|
70
|
+
- bottom=16mm
|
|
71
|
+
- left=14mm
|
|
72
|
+
- right=14mm
|
|
73
|
+
header-includes:
|
|
74
|
+
- |
|
|
75
|
+
\usepackage{etoolbox}
|
|
76
|
+
\setlength{\tabcolsep}{3pt}
|
|
77
|
+
\renewcommand{\arraystretch}{1.05}
|
|
78
|
+
\AtBeginEnvironment{longtable}{\small}
|
|
79
|
+
\AtBeginEnvironment{tabular}{\small}
|
|
80
|
+
|
|
81
|
+
# Uncomment to enable TOC and section numbering:
|
|
82
|
+
# toc: true
|
|
83
|
+
# toc-depth: 3
|
|
84
|
+
# number-sections: true
|
|
85
|
+
|
|
86
|
+
# Uncomment to enable Mermaid/diagram rendering (requires nodejs overlay):
|
|
87
|
+
# lua-filter:
|
|
88
|
+
# - ~/.pandoc/filters/diagram.lua
|
|
89
|
+
EOF
|
|
90
|
+
|
|
91
|
+
echo ""
|
|
92
|
+
echo "✓ pandoc overlay setup complete"
|
|
93
|
+
echo "ℹ️ Build a PDF: pandoc -d ~/.pandoc/pandoc.yaml doc.md -o doc.pdf"
|
|
94
|
+
echo "ℹ️ With Mermaid: pandoc -d ~/.pandoc/pandoc.yaml --lua-filter ~/.pandoc/filters/diagram.lua doc.md -o doc.pdf"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
command -v pandoc || { echo "✗ pandoc not found"; exit 1; }
|
|
4
|
+
command -v xelatex || { echo "✗ xelatex not found"; exit 1; }
|
|
5
|
+
[ -f "$HOME/.pandoc/filters/diagram.lua" ] || { echo "✗ diagram.lua not found"; exit 1; }
|
|
6
|
+
[ -f "$HOME/.pandoc/pandoc.yaml" ] || { echo "✗ pandoc.yaml not found"; exit 1; }
|
|
7
|
+
|
|
8
|
+
# Smoke test: render a trivial PDF
|
|
9
|
+
echo "# Test" | pandoc --pdf-engine=xelatex -o /tmp/pandoc-verify-test.pdf && \
|
|
10
|
+
echo "✓ pandoc PDF smoke test passed" || { echo "✗ pandoc PDF render failed"; exit 1; }
|
|
11
|
+
|
|
12
|
+
rm -f /tmp/pandoc-verify-test.pdf
|
|
13
|
+
echo "✓ pandoc overlay: OK"
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Spec Kit (SDD) Overlay
|
|
2
|
+
|
|
3
|
+
Installs the `specify` CLI and its prerequisites (`uv`) for **Spec-Driven Development** — a disciplined workflow that elevates specifications to first-class artifacts driving AI-powered implementation.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **`specify` CLI** — Interactive SDD workflow commands for any supported AI coding agent
|
|
8
|
+
- **`uv`** — Fast Python package manager used to install and run `specify`
|
|
9
|
+
- **20+ AI agent integrations** — Works with Codex, Claude Code, Gemini CLI, GitHub Copilot, Cursor, Windsurf, Amp, and more
|
|
10
|
+
|
|
11
|
+
## What is Spec-Driven Development?
|
|
12
|
+
|
|
13
|
+
Spec-Driven Development (SDD) flips the traditional workflow: instead of vibe-coding, you author rich specifications that become executable artifacts driving AI agents through a disciplined multi-step process:
|
|
14
|
+
|
|
15
|
+
| Step | Command | Description |
|
|
16
|
+
| ---- | ----------------------- | ----------------------------------------- |
|
|
17
|
+
| 1 | `/speckit.constitution` | Create project governing principles |
|
|
18
|
+
| 2 | `/speckit.specify` | Define requirements (what & why, not how) |
|
|
19
|
+
| 3 | `/speckit.clarify` | Clarify underspecified areas |
|
|
20
|
+
| 4 | `/speckit.plan` | Create a technical implementation plan |
|
|
21
|
+
| 5 | `/speckit.analyze` | Cross-artifact consistency analysis |
|
|
22
|
+
| 6 | `/speckit.tasks` | Break plan into actionable tasks |
|
|
23
|
+
| 7 | `/speckit.implement` | Execute tasks with an AI agent |
|
|
24
|
+
|
|
25
|
+
## How It Works
|
|
26
|
+
|
|
27
|
+
This overlay:
|
|
28
|
+
|
|
29
|
+
1. Installs `uv` (Astral's fast Python package manager) if not already present
|
|
30
|
+
2. Uses `uv tool install` to install `specify-cli` from the [github/spec-kit](https://github.com/github/spec-kit) repository
|
|
31
|
+
3. Makes `specify` available on the PATH inside the devcontainer
|
|
32
|
+
|
|
33
|
+
**Why `uv`?** Spec Kit uses `uv` as its package manager for fast, isolated tool installation — it avoids the overhead of creating a full virtual environment while keeping `specify` globally accessible.
|
|
34
|
+
|
|
35
|
+
## Common Commands
|
|
36
|
+
|
|
37
|
+
### Initialize a project
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Initialize SDD for a project with a specific AI agent
|
|
41
|
+
specify init . --here --ai codex
|
|
42
|
+
specify init . --here --ai claude
|
|
43
|
+
specify init . --here --ai gemini
|
|
44
|
+
specify init . --here --ai copilot
|
|
45
|
+
specify init . --here --ai amp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### SDD Workflow
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# After initializing, use the installed slash commands in your AI agent:
|
|
52
|
+
# /speckit.constitution — Define project principles
|
|
53
|
+
# /speckit.specify — Author requirements spec
|
|
54
|
+
# /speckit.clarify — Clarify ambiguities
|
|
55
|
+
# /speckit.plan — Generate implementation plan
|
|
56
|
+
# /speckit.analyze — Check consistency
|
|
57
|
+
# /speckit.tasks — Break into tasks
|
|
58
|
+
# /speckit.implement — Implement with AI
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Utility Commands
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Check specify is available
|
|
65
|
+
specify --version
|
|
66
|
+
|
|
67
|
+
# List supported agents
|
|
68
|
+
specify --help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Supported AI Agents
|
|
72
|
+
|
|
73
|
+
The `specify` CLI supports the following agents (pass as `--ai <agent>`):
|
|
74
|
+
|
|
75
|
+
| Agent | `--ai` flag | Notes |
|
|
76
|
+
| --------------------- | -------------- | --------------------------------------- |
|
|
77
|
+
| OpenAI Codex | `codex` | Requires `codex` overlay |
|
|
78
|
+
| Anthropic Claude Code | `claude` | Requires `claude-code` overlay |
|
|
79
|
+
| Google Gemini CLI | `gemini` | Requires `gemini-cli` overlay |
|
|
80
|
+
| GitHub Copilot | `copilot` | IDE-integrated, no extra overlay needed |
|
|
81
|
+
| Cursor Agent | `cursor-agent` | IDE-integrated |
|
|
82
|
+
| Codeium Windsurf | `windsurf` | Requires `windsurf-cli` overlay |
|
|
83
|
+
| Sourcegraph Amp | `amp` | Requires `amp` overlay |
|
|
84
|
+
| opencode | `opencode` | Requires `opencode` overlay |
|
|
85
|
+
| Roo Code | `roo-code` | IDE-integrated |
|
|
86
|
+
| Kiro CLI | `kiro` | Check upstream docs |
|
|
87
|
+
| Generic (BYOA) | `generic` | Bring your own agent |
|
|
88
|
+
|
|
89
|
+
For the full list see the [spec-kit supported agents documentation](https://github.com/github/spec-kit#-supported-ai-agents).
|
|
90
|
+
|
|
91
|
+
## Use Cases
|
|
92
|
+
|
|
93
|
+
- **Greenfield projects** — Start with a specification before writing any code
|
|
94
|
+
- **Feature development** — Spec out new features before asking AI to implement them
|
|
95
|
+
- **Team alignment** — Share specifications as structured artifacts
|
|
96
|
+
- **AI-assisted refactoring** — Spec the desired end state, let AI plan the migration
|
|
97
|
+
- **Documentation-driven development** — Specifications become living documentation
|
|
98
|
+
|
|
99
|
+
**Integrates well with:**
|
|
100
|
+
|
|
101
|
+
- `codex` — OpenAI Codex CLI (most common with SDD)
|
|
102
|
+
- `claude-code` — Anthropic Claude Code
|
|
103
|
+
- `gemini-cli` — Google Gemini CLI
|
|
104
|
+
- `amp` — Sourcegraph Amp
|
|
105
|
+
- `git-helpers` — Git integration for specification artifacts
|
|
106
|
+
- `pre-commit` — Quality gates for specification files
|
|
107
|
+
|
|
108
|
+
## Configuration
|
|
109
|
+
|
|
110
|
+
The `specify` tool stores its slash-command templates in your project directory after running `specify init`. These files are committed to your repository.
|
|
111
|
+
|
|
112
|
+
**Environment variable (optional):**
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Set a default AI agent to avoid passing --ai on every command
|
|
116
|
+
export SPECIFY_AI_AGENT=codex
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Verification
|
|
120
|
+
|
|
121
|
+
After setup, run the verification script to ensure proper installation:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
bash .devcontainer/scripts/verify-spec-kit.sh
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This checks:
|
|
128
|
+
|
|
129
|
+
- `uv` is installed
|
|
130
|
+
- `specify` CLI is available on PATH
|
|
131
|
+
|
|
132
|
+
## Troubleshooting
|
|
133
|
+
|
|
134
|
+
### `specify` command not found
|
|
135
|
+
|
|
136
|
+
**Solution:**
|
|
137
|
+
|
|
138
|
+
Ensure `$HOME/.local/bin` is on your PATH:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
142
|
+
|
|
143
|
+
# Or add to your shell profile:
|
|
144
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### `uv` not found
|
|
148
|
+
|
|
149
|
+
**Solution:**
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
153
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### `specify` fails to install
|
|
157
|
+
|
|
158
|
+
**Solution:**
|
|
159
|
+
|
|
160
|
+
Check internet connectivity and try reinstalling:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git --force
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## References
|
|
167
|
+
|
|
168
|
+
- [Spec Kit GitHub](https://github.com/github/spec-kit)
|
|
169
|
+
- [Spec-Driven Development Methodology](https://github.com/github/spec-kit/blob/main/spec-driven.md)
|
|
170
|
+
- [Specify CLI Reference](https://github.com/github/spec-kit#-specify-cli-reference)
|
|
171
|
+
- [Supported AI Agents](https://github.com/github/spec-kit#-supported-ai-agents)
|
|
172
|
+
- [uv Documentation](https://docs.astral.sh/uv/)
|
|
173
|
+
|
|
174
|
+
**Related Overlays:**
|
|
175
|
+
|
|
176
|
+
- `codex` — OpenAI Codex CLI
|
|
177
|
+
- `claude-code` — Anthropic Claude Code
|
|
178
|
+
- `gemini-cli` — Google Gemini CLI
|
|
179
|
+
- `amp` — Sourcegraph Amp
|
|
180
|
+
- `opencode` — opencode CLI
|
|
181
|
+
- `windsurf-cli` — Codeium Windsurf CLI
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: spec-kit
|
|
2
|
+
name: Spec Kit (SDD)
|
|
3
|
+
description: Specify CLI for Spec-Driven Development with any AI coding agent
|
|
4
|
+
category: dev
|
|
5
|
+
supports: []
|
|
6
|
+
requires: []
|
|
7
|
+
suggests:
|
|
8
|
+
- python
|
|
9
|
+
- codex
|
|
10
|
+
conflicts: []
|
|
11
|
+
tags:
|
|
12
|
+
- dev
|
|
13
|
+
- ai
|
|
14
|
+
- sdd
|
|
15
|
+
- spec-driven
|
|
16
|
+
- specify
|
|
17
|
+
- spec-kit
|
|
18
|
+
ports: []
|
|
19
|
+
order: 20
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# spec-kit setup — install specify-cli for Spec-Driven Development
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "📦 Installing prerequisites for spec-kit..."
|
|
7
|
+
|
|
8
|
+
# Ensure uv tool bin directory is always on PATH (uv puts shims here regardless
|
|
9
|
+
# of whether uv itself was pre-installed or freshly installed in this script)
|
|
10
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
11
|
+
|
|
12
|
+
# Ensure uv is available (fast Python package manager)
|
|
13
|
+
if ! command -v uv &>/dev/null; then
|
|
14
|
+
echo " Installing uv..."
|
|
15
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
16
|
+
# Re-source in case the installer wrote to a non-standard location
|
|
17
|
+
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
echo "📦 Installing specify-cli..."
|
|
21
|
+
# Pin to a uv-managed Python (avoids broken system Python 3.13 on Debian trixie
|
|
22
|
+
# where stdlib modules like shutil/os can be missing due to Debian's split packages)
|
|
23
|
+
UV_PYTHON_VERSION="3.12"
|
|
24
|
+
echo " Ensuring uv-managed Python ${UV_PYTHON_VERSION} is available..."
|
|
25
|
+
uv python install "${UV_PYTHON_VERSION}"
|
|
26
|
+
|
|
27
|
+
# Install specify-cli using the uv-managed Python, not the system interpreter
|
|
28
|
+
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git \
|
|
29
|
+
--python "${UV_PYTHON_VERSION}"
|
|
30
|
+
|
|
31
|
+
# Verify — use the full path as a fallback in case the shim dir is not yet in PATH
|
|
32
|
+
SPECIFY_BIN="$(uv tool dir 2>/dev/null)/specify-cli/bin/specify"
|
|
33
|
+
if command -v specify &>/dev/null; then
|
|
34
|
+
echo "✓ specify-cli installed: $(specify --version 2>/dev/null || echo 'ok')"
|
|
35
|
+
elif [ -x "$SPECIFY_BIN" ]; then
|
|
36
|
+
echo "✓ specify-cli installed at $SPECIFY_BIN (add ~/.local/bin to PATH)"
|
|
37
|
+
else
|
|
38
|
+
echo "✗ specify-cli installation failed"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
echo "✓ spec-kit setup complete"
|
|
43
|
+
echo "ℹ️ Spec Kit: https://github.com/github/spec-kit"
|
|
44
|
+
echo "ℹ️ Usage: specify init <PROJECT_NAME> --ai <agent>"
|
|
45
|
+
echo "ℹ️ Agents: codex, claude, gemini, copilot, cursor-agent, windsurf, amp, ..."
|