Skip to content

Optional .gitignore for AI DevKit artifacts on init#46

Open
CuongTranXuan wants to merge 1 commit intocodeaholicguy:mainfrom
CuongTranXuan:main
Open

Optional .gitignore for AI DevKit artifacts on init#46
CuongTranXuan wants to merge 1 commit intocodeaholicguy:mainfrom
CuongTranXuan:main

Conversation

@CuongTranXuan
Copy link

Summary

  • Optional .gitignore updates during ai-devkit init: a managed block for .ai-devkit.json and the configured AI docs directory (default docs/ai/).
  • Opt-in only (default remains “do not ignore”):
    • --gitignore-artifacts CLI flag
    • gitignoreArtifacts: true | false in init templates (YAML/JSON)
    • Interactive confirm when stdin is a TTY and neither flag nor template fixes the choice (default No)
  • Idempotent: only the delimited managed block is replaced; the rest of .gitignore is left as-is. Re-running init updates paths if the docs dir changes (e.g. --docs-dir / template paths.docs).
  • Git-aware: not in a git work tree → skip with a warning; on explicit opt-in, a failed .gitignore write → error and non-zero exit.

Motivation

Some users keep AI DevKit config and phase docs local and don’t want them in the shared repo. Today they have to hand-edit .gitignore after init. This integrates that into init while keeping the default safe for teams that commit docs/ai.

@CuongTranXuan
Copy link
Author

Hi, this is my PR for the issue #22 earlier, hope it can contribute to the project.

Add managed .gitignore block for .ai-devkit.json and the docs dir,
with --gitignore-artifacts, init template gitignoreArtifacts, and
interactive prompt (TTY, default off).

Made-with: Cursor
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