From 15d54af72d501c9b8704ce0489c54fe27d750f7b Mon Sep 17 00:00:00 2001 From: JonghunYu Date: Mon, 26 Jan 2026 12:20:12 +0900 Subject: [PATCH 1/2] feat: add #020 --- .issues/.counter | 2 +- ...nstructions-to-use-gi-create-command-in.md | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md diff --git a/.issues/.counter b/.issues/.counter index 209e3ef..aabe6ec 100644 --- a/.issues/.counter +++ b/.issues/.counter @@ -1 +1 @@ -20 +21 diff --git a/.issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md b/.issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md new file mode 100644 index 0000000..b090f44 --- /dev/null +++ b/.issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md @@ -0,0 +1,33 @@ +--- +id: "020" +assignee: "" +labels: [] +created: 2026-01-26T11:37:46.674936+09:00 +updated: 2026-01-26T11:37:46.674936+09:00 +--- + +# Update AI instructions to use gi create command instead of creating files directly + +## Description + +Currently, the AI instructions in `CLAUDE.md` focus on how to **find and read** existing issues, but do not instruct AI agents on how to **create** new issues. As a result, AI agents may create issue files directly by writing to the `.issues/open/` directory instead of using the proper `gi create` command. + +This is problematic because: +1. The `gi create` command handles ID generation from `.counter` file +2. It generates the proper slug from the title +3. It creates the correct YAML frontmatter with timestamps +4. It ensures consistent file naming format + +## Requirements + +- Update `CLAUDE.md` to add instructions for creating new issues +- Update the `gi init` command output in `cmd/init.go` (`printAIAgentInstructions()` function) to include instructions for creating issues +- Instruct AI agents to use `gi create "issue title"` command +- Document available flags: `--assignee`, `--label` + +## Success Criteria + +- [ ] CLAUDE.md includes a "Creating Issues" section +- [ ] `gi init` output includes instructions for creating issues using `gi create` +- [ ] AI agents use `gi create` command instead of manually creating files +- [ ] Instructions cover common flags for issue creation From 871eee94dc5d6bfec29795f753dd40f3d967ff66 Mon Sep 17 00:00:00 2001 From: JonghunYu Date: Mon, 26 Jan 2026 12:23:35 +0900 Subject: [PATCH 2/2] chore: close #020 --- ...nstructions-to-use-gi-create-command-in.md | 2 +- CLAUDE.md | 21 +++++++++++++++++++ README.md | 13 +++++++++++- cmd/init.go | 13 +++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-) rename .issues/{open => closed}/020-update-ai-instructions-to-use-gi-create-command-in.md (97%) diff --git a/.issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md b/.issues/closed/020-update-ai-instructions-to-use-gi-create-command-in.md similarity index 97% rename from .issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md rename to .issues/closed/020-update-ai-instructions-to-use-gi-create-command-in.md index b090f44..c36923c 100644 --- a/.issues/open/020-update-ai-instructions-to-use-gi-create-command-in.md +++ b/.issues/closed/020-update-ai-instructions-to-use-gi-create-command-in.md @@ -3,7 +3,7 @@ id: "020" assignee: "" labels: [] created: 2026-01-26T11:37:46.674936+09:00 -updated: 2026-01-26T11:37:46.674936+09:00 +updated: 2026-01-26T12:21:38.526905+09:00 --- # Update AI instructions to use gi create command instead of creating files directly diff --git a/CLAUDE.md b/CLAUDE.md index 9dab116..4df3f1f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -46,6 +46,27 @@ git-issue/ This project uses its own issue tracking system (dogfooding). +### Creating Issues + +When creating a new issue, always use the `gi create` command instead of manually creating files: + +```bash +# Create a new issue +gi create "Your issue title here" + +# Create with assignee +gi create "Fix login bug" --assignee username + +# Create with labels (can use multiple --label flags) +gi create "Add dark mode" --label feature --label frontend +``` + +**Important:** Never create issue files directly by writing to `.issues/open/`. The `gi create` command: +- Automatically generates the next issue ID from `.counter` +- Creates the proper slug from the title +- Sets up correct YAML frontmatter with timestamps +- Ensures consistent file naming format + ### Finding Issues When a user references an issue like "#001" or "issue 001": diff --git a/README.md b/README.md index 5549e0a..777c842 100644 --- a/README.md +++ b/README.md @@ -228,11 +228,22 @@ If a user says "implement #001" or "fix issue 001": Example: For "#001", look for `.issues/open/001-*.md` +### Creating Issues + +Always use the `gi create` command instead of manually creating files: + +```bash +gi create "Your issue title" +gi create "Fix bug" --assignee username --label bug +``` + +**Never** create issue files directly - the command handles ID generation and formatting. + ### Working with issues - Always read the full issue before implementing - Reference the issue file path in your responses -- Status is determined by directory: move files between open/ and closed/ to change status +- Use `gi close ` and `gi open ` to change issue status - Maintain the YAML frontmatter structure when editing issues ``` diff --git a/cmd/init.go b/cmd/init.go index a8b7768..95066aa 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -84,11 +84,22 @@ func printAIAgentInstructions() { fmt.Println() fmt.Println("Example: For \"#001\", look for `.issues/open/001-*.md`") fmt.Println() + fmt.Println("### Creating Issues") + fmt.Println() + fmt.Println("Always use the `gi create` command instead of manually creating files:") + fmt.Println() + fmt.Println("```bash") + fmt.Println("gi create \"Your issue title\"") + fmt.Println("gi create \"Fix bug\" --assignee username --label bug") + fmt.Println("```") + fmt.Println() + fmt.Println("**Never** create issue files directly - the command handles ID generation and formatting.") + fmt.Println() fmt.Println("### Working with issues") fmt.Println() fmt.Println("- Always read the full issue before implementing") fmt.Println("- Reference the issue file path in your responses") - fmt.Println("- Status is determined by directory: move files between open/ and closed/ to change status") + fmt.Println("- Use `gi close ` and `gi open ` to change issue status") fmt.Println("- Maintain the YAML frontmatter structure when editing issues") fmt.Println() fmt.Println("─────────────────────────────────────────────────────────────────────────")