@codedrifters/configulator 0.0.190 → 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
@@ -1983,6 +1983,21 @@ var issueWorkerSubAgent = {
1983
1983
  "",
1984
1984
  "---",
1985
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
+ "",
1986
2001
  "## Phase 1: Select an Issue",
1987
2002
  "",
1988
2003
  "If an issue number was provided in your instructions, use that issue.",
@@ -2068,6 +2083,22 @@ var issueWorkerSubAgent = {
2068
2083
  "",
2069
2084
  "## Phase 6: Commit and Push",
2070
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
+ "",
2071
2102
  "Use conventional commit messages:",
2072
2103
  "```bash",
2073
2104
  "git add <files>",
@@ -2097,6 +2128,27 @@ var issueWorkerSubAgent = {
2097
2128
  'gh issue edit <number> --remove-label "status:in-progress" --add-label "status:done"',
2098
2129
  "```",
2099
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
+ "",
2100
2152
  "---",
2101
2153
  "",
2102
2154
  "## Rules",