@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.mjs CHANGED
@@ -1924,6 +1924,21 @@ var issueWorkerSubAgent = {
1924
1924
  "",
1925
1925
  "---",
1926
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
+ "",
1927
1942
  "## Phase 1: Select an Issue",
1928
1943
  "",
1929
1944
  "If an issue number was provided in your instructions, use that issue.",
@@ -2009,6 +2024,22 @@ var issueWorkerSubAgent = {
2009
2024
  "",
2010
2025
  "## Phase 6: Commit and Push",
2011
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
+ "",
2012
2043
  "Use conventional commit messages:",
2013
2044
  "```bash",
2014
2045
  "git add <files>",
@@ -2038,6 +2069,27 @@ var issueWorkerSubAgent = {
2038
2069
  'gh issue edit <number> --remove-label "status:in-progress" --add-label "status:done"',
2039
2070
  "```",
2040
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
+ "",
2041
2093
  "---",
2042
2094
  "",
2043
2095
  "## Rules",