@codedrifters/configulator 0.0.189 → 0.0.191

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/lib/index.js CHANGED
@@ -999,8 +999,20 @@ var githubWorkflowBundle = {
999
999
  "6. **Create the issue** using `gh issue create`:",
1000
1000
  " - `--title '<type>: <description>'`",
1001
1001
  " - `--body '<issue body>'`",
1002
- " - `--type '<GitHub issue type>'` (Epic, Feature, Bug, or Task)",
1003
1002
  " - `--label '<type-label>' --label '<priority-label>' --label '<status-label>'`",
1003
+ "7. **Set the GitHub issue type** via the GraphQL `updateIssueIssueType` mutation:",
1004
+ " - Look up the issue's node ID: `gh issue view <issue-number> --json id -q .id`",
1005
+ " - Look up the repo's issue type node IDs (one-time, can be cached):",
1006
+ "",
1007
+ " ```sh",
1008
+ " gh api graphql -f query='query($owner:String!,$repo:String!){repository(owner:$owner,name:$repo){issueTypes(first:20){nodes{id name}}}}' -f owner=<owner> -f repo=<repo>",
1009
+ " ```",
1010
+ "",
1011
+ " - Apply the chosen type to the issue:",
1012
+ "",
1013
+ " ```sh",
1014
+ " gh api graphql -f query='mutation($issueId:ID!,$typeId:ID!){updateIssueIssueType(input:{issueId:$issueId,issueTypeId:$typeId}){issue{number issueType{name}}}}' -f issueId=<issue-node-id> -f typeId=<issue-type-node-id>",
1015
+ " ```",
1004
1016
  "",
1005
1017
  "### Issue Body Template",
1006
1018
  "",
@@ -1021,7 +1033,7 @@ var githubWorkflowBundle = {
1021
1033
  "### Important",
1022
1034
  "",
1023
1035
  "- Always use the conventional prefix in the issue title",
1024
- "- Always assign the correct GitHub issue type",
1036
+ "- Always assign the correct GitHub issue type via the `updateIssueIssueType` GraphQL mutation (step 7) \u2014 never via `gh issue create --type`",
1025
1037
  "- Always include `type:*`, `priority:*`, and `status:*` labels",
1026
1038
  "- If the user does not specify a type, ask before creating the issue",
1027
1039
  "- If the priority cannot be inferred from the description, ask the user before creating the issue",
@@ -1971,6 +1983,21 @@ var issueWorkerSubAgent = {
1971
1983
  "",
1972
1984
  "---",
1973
1985
  "",
1986
+ "## Invocation Mode",
1987
+ "",
1988
+ "You operate in one of two modes:",
1989
+ "",
1990
+ "- **Interactive mode (default):** A human invoked you directly. You must",
1991
+ " pause and request explicit user approval before committing code (Phase 6).",
1992
+ "- **Scheduled mode:** A scheduled task or automation invoked you. You commit,",
1993
+ " push, and open the PR autonomously without pausing.",
1994
+ "",
1995
+ "**You are in scheduled mode if and only if the invocation prompt that",
1996
+ "started this session contains the literal phrase `scheduled mode` (or",
1997
+ "`non-interactive`).** Otherwise, default to interactive mode. When in",
1998
+ "doubt, treat the session as interactive \u2014 pausing for approval is always",
1999
+ "safe; committing without approval is not.",
2000
+ "",
1974
2001
  "## Phase 1: Select an Issue",
1975
2002
  "",
1976
2003
  "If an issue number was provided in your instructions, use that issue.",
@@ -2056,6 +2083,22 @@ var issueWorkerSubAgent = {
2056
2083
  "",
2057
2084
  "## Phase 6: Commit and Push",
2058
2085
  "",
2086
+ "**If you are in interactive mode, pause here.** Before running any `git",
2087
+ "commit`, present the user with a summary of the proposed changes:",
2088
+ "",
2089
+ "```bash",
2090
+ "git status",
2091
+ "git diff --stat",
2092
+ "```",
2093
+ "",
2094
+ "Then state the conventional commit message you intend to use and ask for",
2095
+ "explicit approval to commit, push, and open the PR. Do **not** proceed to",
2096
+ "`git commit` until the user replies with an affirmative response (e.g.,",
2097
+ '"yes", "approved", "go ahead"). If the user requests changes, address',
2098
+ "them and ask again.",
2099
+ "",
2100
+ "**If you are in scheduled mode, skip the pause and proceed directly.**",
2101
+ "",
2059
2102
  "Use conventional commit messages:",
2060
2103
  "```bash",
2061
2104
  "git add <files>",
@@ -2085,6 +2128,27 @@ var issueWorkerSubAgent = {
2085
2128
  'gh issue edit <number> --remove-label "status:in-progress" --add-label "status:done"',
2086
2129
  "```",
2087
2130
  "",
2131
+ "## Phase 9: Branch Cleanup",
2132
+ "",
2133
+ "Auto-merge is enabled, so the PR may not be merged yet. Poll the PR state",
2134
+ "up to 10 times, waiting 30 seconds between polls, until it either merges,",
2135
+ "closes, or the timeout is reached:",
2136
+ "",
2137
+ "```bash",
2138
+ "gh pr view <pr-number> --json state --jq '.state'",
2139
+ "```",
2140
+ "",
2141
+ "- **If the state becomes `MERGED`:** clean up the local branch.",
2142
+ " ```bash",
2143
+ " git checkout {{repository.defaultBranch}}",
2144
+ " git pull origin {{repository.defaultBranch}}",
2145
+ " git branch -D <branch-name>",
2146
+ " ```",
2147
+ "- **If the state becomes `CLOSED` (not merged):** leave the branch in place",
2148
+ " and report that the PR was closed without merging. Do not delete the branch.",
2149
+ "- **If still `OPEN` after the polling window:** report that auto-merge is",
2150
+ " still pending and stop. Do not delete the branch.",
2151
+ "",
2088
2152
  "---",
2089
2153
  "",
2090
2154
  "## Rules",