Skip to content

Auto-add .devkit/ to .gitignore on init - #13

Merged
5uck1ess merged 12 commits into
mainfrom
feat/auto-gitignore
Apr 4, 2026
Merged

Auto-add .devkit/ to .gitignore on init#13
5uck1ess merged 12 commits into
mainfrom
feat/auto-gitignore

Conversation

@5uck1ess

@5uck1ess 5uck1ess commented Apr 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • When devkit creates its .devkit/ state directory in a project, it now automatically ensures .devkit/ is listed in the project's .gitignore
  • Creates .gitignore if it doesn't exist, appends if it does, and skips if .devkit or .devkit/ is already present
  • Best-effort — won't fail the DB open if .gitignore can't be written

Test plan

  • TestEnsureGitignore_CreatesNew — creates .gitignore from scratch
  • TestEnsureGitignore_AppendsToExisting — appends to existing file
  • TestEnsureGitignore_NoTrailingNewline — handles missing trailing newline
  • TestEnsureGitignore_AlreadyPresent — no duplicate entries
  • TestEnsureGitignore_WithoutSlash — recognizes .devkit without trailing /
  • Full test suite passes

5uck1ess added 12 commits April 4, 2026 16:28
When devkit creates .devkit/ in a project, it now ensures the directory
is listed in .gitignore so runtime state (DB, sessions) is never
accidentally committed. Creates .gitignore if absent, appends if
present, and skips if already ignored.
Claude Code discovers commands from the commands/ directory, not the
manifest array. Move 20 command files back from skills/ to commands/
and update manifest paths accordingly.
The manifest is optional per the plugin spec. When present, it
overrides directory scanning, which can interfere with auto-discovery.
Since commands/, skills/, and agents/ directories are already correctly
structured, let Claude Code discover them automatically.
Claude Code auto-discovers skills from skills/{name}/SKILL.md, not
flat files. Move all 14 skill files into the expected structure.
Claude Code constructs the full skill name as pluginName:directoryName
automatically. The frontmatter name should match the directory name
without the plugin prefix, matching the convention used by superpowers,
context-mode, and all other working plugins.
Claude Code derives slash command names from pluginName:filename, not
the frontmatter name field. Working plugins like hookify only use
description in command frontmatter. Remove the redundant name field
from all 20 commands.
Replace three-open pattern (scan, append, re-read) with one ReadFile
and one WriteFile. Fixes unchecked scanner.Err() bug and removes
unused bufio import.
- release.yml: read version solely from plugin.json, stop
  reading/writing manifest.json
- CONTRIBUTING.md: update to commands/ and skills/*/SKILL.md structure,
  remove manifest.json references
- README.md: update directory tree to show commands/, skills/*/SKILL.md,
  and .claude-plugin/ instead of manifest.json
Only proceed with empty content when .gitignore doesn't exist. If the
file exists but can't be read (permission denied, I/O error), bail out
rather than risk overwriting the user's .gitignore.
Cover reviewer suggestions: triple-call idempotency, whitespace-padded
entries, and .devkit/ appearing in the middle of the file.
Explain that the slash command name comes from the filename, not
frontmatter, per tri-review suggestion.
Resolve conflict: manifest.json was modified on main but intentionally
removed in this branch (Claude Code auto-discovers from directories).
@5uck1ess
5uck1ess merged commit 6090238 into main Apr 4, 2026
1 check passed
@5uck1ess
5uck1ess deleted the feat/auto-gitignore branch April 4, 2026 21:11
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