@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.mjs CHANGED
@@ -940,8 +940,20 @@ var githubWorkflowBundle = {
940
940
  "6. **Create the issue** using `gh issue create`:",
941
941
  " - `--title '<type>: <description>'`",
942
942
  " - `--body '<issue body>'`",
943
- " - `--type '<GitHub issue type>'` (Epic, Feature, Bug, or Task)",
944
943
  " - `--label '<type-label>' --label '<priority-label>' --label '<status-label>'`",
944
+ "7. **Set the GitHub issue type** via the GraphQL `updateIssueIssueType` mutation:",
945
+ " - Look up the issue's node ID: `gh issue view <issue-number> --json id -q .id`",
946
+ " - Look up the repo's issue type node IDs (one-time, can be cached):",
947
+ "",
948
+ " ```sh",
949
+ " 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>",
950
+ " ```",
951
+ "",
952
+ " - Apply the chosen type to the issue:",
953
+ "",
954
+ " ```sh",
955
+ " 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>",
956
+ " ```",
945
957
  "",
946
958
  "### Issue Body Template",
947
959
  "",
@@ -962,7 +974,7 @@ var githubWorkflowBundle = {
962
974
  "### Important",
963
975
  "",
964
976
  "- Always use the conventional prefix in the issue title",
965
- "- Always assign the correct GitHub issue type",
977
+ "- Always assign the correct GitHub issue type via the `updateIssueIssueType` GraphQL mutation (step 7) \u2014 never via `gh issue create --type`",
966
978
  "- Always include `type:*`, `priority:*`, and `status:*` labels",
967
979
  "- If the user does not specify a type, ask before creating the issue",
968
980
  "- If the priority cannot be inferred from the description, ask the user before creating the issue",
@@ -1912,6 +1924,21 @@ var issueWorkerSubAgent = {
1912
1924
  "",
1913
1925
  "---",
1914
1926
  "",
1927
+ "## Invocation Mode",
1928
+ "",
1929
+ "You operate in one of two modes:",
1930
+ "",
1931
+ "- **Interactive mode (default):** A human invoked you directly. You must",
1932
+ " pause and request explicit user approval before committing code (Phase 6).",
1933
+ "- **Scheduled mode:** A scheduled task or automation invoked you. You commit,",
1934
+ " push, and open the PR autonomously without pausing.",
1935
+ "",
1936
+ "**You are in scheduled mode if and only if the invocation prompt that",
1937
+ "started this session contains the literal phrase `scheduled mode` (or",
1938
+ "`non-interactive`).** Otherwise, default to interactive mode. When in",
1939
+ "doubt, treat the session as interactive \u2014 pausing for approval is always",
1940
+ "safe; committing without approval is not.",
1941
+ "",
1915
1942
  "## Phase 1: Select an Issue",
1916
1943
  "",
1917
1944
  "If an issue number was provided in your instructions, use that issue.",
@@ -1997,6 +2024,22 @@ var issueWorkerSubAgent = {
1997
2024
  "",
1998
2025
  "## Phase 6: Commit and Push",
1999
2026
  "",
2027
+ "**If you are in interactive mode, pause here.** Before running any `git",
2028
+ "commit`, present the user with a summary of the proposed changes:",
2029
+ "",
2030
+ "```bash",
2031
+ "git status",
2032
+ "git diff --stat",
2033
+ "```",
2034
+ "",
2035
+ "Then state the conventional commit message you intend to use and ask for",
2036
+ "explicit approval to commit, push, and open the PR. Do **not** proceed to",
2037
+ "`git commit` until the user replies with an affirmative response (e.g.,",
2038
+ '"yes", "approved", "go ahead"). If the user requests changes, address',
2039
+ "them and ask again.",
2040
+ "",
2041
+ "**If you are in scheduled mode, skip the pause and proceed directly.**",
2042
+ "",
2000
2043
  "Use conventional commit messages:",
2001
2044
  "```bash",
2002
2045
  "git add <files>",
@@ -2026,6 +2069,27 @@ var issueWorkerSubAgent = {
2026
2069
  'gh issue edit <number> --remove-label "status:in-progress" --add-label "status:done"',
2027
2070
  "```",
2028
2071
  "",
2072
+ "## Phase 9: Branch Cleanup",
2073
+ "",
2074
+ "Auto-merge is enabled, so the PR may not be merged yet. Poll the PR state",
2075
+ "up to 10 times, waiting 30 seconds between polls, until it either merges,",
2076
+ "closes, or the timeout is reached:",
2077
+ "",
2078
+ "```bash",
2079
+ "gh pr view <pr-number> --json state --jq '.state'",
2080
+ "```",
2081
+ "",
2082
+ "- **If the state becomes `MERGED`:** clean up the local branch.",
2083
+ " ```bash",
2084
+ " git checkout {{repository.defaultBranch}}",
2085
+ " git pull origin {{repository.defaultBranch}}",
2086
+ " git branch -D <branch-name>",
2087
+ " ```",
2088
+ "- **If the state becomes `CLOSED` (not merged):** leave the branch in place",
2089
+ " and report that the PR was closed without merging. Do not delete the branch.",
2090
+ "- **If still `OPEN` after the polling window:** report that auto-merge is",
2091
+ " still pending and stop. Do not delete the branch.",
2092
+ "",
2029
2093
  "---",
2030
2094
  "",
2031
2095
  "## Rules",