Skip to content

chore: switch devcontainer to node-agentic, drop Python - #7

Merged
pofallon merged 2 commits into
mainfrom
chore/node-agentic-devcontainer
Aug 10, 2026
Merged

chore: switch devcontainer to node-agentic, drop Python#7
pofallon merged 2 commits into
mainfrom
chore/node-agentic-devcontainer

Conversation

@pofallon

Copy link
Copy Markdown
Contributor

The backend is Bun + TypeScript, so python-agentic no longer matches the stack. Rebased on node-agentic, keeping this repo's two local customizations on top: CLAUDE_CONFIG_DIR and the ~/.claude + ~/.config/gh credential mounts.

Bun

Comes from the template's node-dev-tools feature. Its default installs everything, so bun would arrive either way, but it's named explicitly since it's this project's runtime, test runner and package manager rather than an optional extra:

"ghcr.io/get2knowio/devcontainer-features/node-dev-tools:2": {
    "install": "typescript,bundlers,linters,watchers,bun"
}

postCreateCommand now runs bun --version too, so a broken install fails the build instead of surfacing later.

Dropping Python

Nothing here needs it — no .py files, no pyproject.toml / requirements.txt / Pipfile / poetry.lock, and nothing in the workflows or scripts shells out to Python.

There's exactly one Python consumer: Spec Kit's agent-context hook, enabled in .specify/extensions.yml, which needs a python3 that can import yaml. python-tools was never satisfying it. In a container built from the old config, with both python and python-tools installed:

$ python3 -c "import yaml"
ModuleNotFoundError: No module named 'yaml'

That feature installs uv/Poetry/ruff/mypy, none of which put PyYAML on the system interpreter, and PEP 668 blocks a plain pip install into it. The hook has been silently skipping — and because it exits 0, it read as "nothing to do" rather than "broken."

Fixing the hook

The script honors $SPECKIT_PYTHON, and the uv tool venv specify itself lives in already ships PyYAML 6.0.3, so containerEnv now points at it. The hook goes from skipping to:

$ bash .specify/extensions/agent-context/scripts/bash/update-agent-context.sh
agent-context: updated CLAUDE.md

If that interpreter ever goes missing the script falls through to python3/python and skips cleanly, so it can't hard-fail. This is a local workaround for get2knowio/devcontainer-features#77ai-clis installs Specify with uv tool install, which isolates the venv, and should expose the interpreter itself. This line can be dropped once that ships.

CLAUDE.md

Turning the hook on for the first time exposed a latent problem: the hand-written "Key design artifacts" list sat inside the <!-- SPECKIT START/END --> markers, so the generator wiped it on first run. Moved below the markers with a comment explaining why, and verified a re-run now leaves it intact.

Left as-is, the first /speckit-plan or /speckit-specify after a rebuild would have quietly deleted it.

Also

node_modules/ was missing from .gitignore entirely — it showed as untracked and was one git add . away from being committed. Added, and replaced the now-dead Python ignore entries (__pycache__, .mypy_cache, .ruff_cache, .venv, …), keeping dist/ and build/ which apply to Node too.

README updated — it still described the container as python-agentic with "Python tooling: uv, Poetry, ruff, mypy".

Testing note

The container this was authored in was built from the old config, so the new one hasn't been built end to end yet — worth a Rebuild Container before merging. The JSONC parses, and the SPECKIT_PYTHON path and hook behavior were verified live.

🤖 Generated with Claude Code

https://claude.ai/code/session_013CvCDKqHEKtVjg1hMbWdv7

GitHub Copilot and others added 2 commits August 10, 2026 12:04
The backend is Bun and TypeScript, so the python-agentic template no
longer matches the stack. Rebased on node-agentic from
get2knowio/devcontainer-templates, keeping this repo's two local
customizations: CLAUDE_CONFIG_DIR and the ~/.claude + ~/.config/gh
credential mounts.

Bun comes from the template's node-dev-tools feature. Its default
installs everything, but bun is named explicitly because it is this
project's runtime, test runner and package manager rather than an
optional extra, and postCreateCommand now checks it so a broken install
fails the build instead of surfacing later.

Dropped the python and python-tools features. Nothing here needs them:
no .py files, no pyproject.toml or requirements.txt, and nothing shells
out to Python. The one Python consumer is Spec Kit's agent-context hook,
which needs a python3 that can import yaml -- and python-tools never
provided that, so the hook has been silently skipping. It installs
uv/Poetry/ruff/mypy, none of which put PyYAML on the system interpreter,
and PEP 668 blocks pip installing into it.

SPECKIT_PYTHON now points at the uv tool venv that specify itself lives
in, which does ship PyYAML, so the hook runs for the first time. If that
interpreter is ever missing the script falls through to python3/python
and skips cleanly. This is a local workaround for
get2knowio/devcontainer-features#77 and can be dropped once that ships.

Turning the hook on exposed a latent problem: the hand-written design
artifact list in CLAUDE.md sat inside the SPECKIT markers, so the
generator discarded it on first run. Moved it below the markers with a
comment, and verified a re-run now leaves it intact.

Also added node_modules to .gitignore, which was missing entirely, and
replaced the now-dead Python ignore entries.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013CvCDKqHEKtVjg1hMbWdv7
The floating `base:ubuntu` tag has rolled over to Ubuntu 26.04 (resolute),
which has no moby-engine/moby-cli packages, so the docker-in-docker feature
aborts during install and the container never builds. main was pinned in
dda0b71; this branch reintroduced the floating tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pofallon
pofallon merged commit 419f1b5 into main Aug 10, 2026
1 check passed
@pofallon
pofallon deleted the chore/node-agentic-devcontainer branch August 10, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant