@codebehind/agent-workflow 1.1.14 → 1.1.15
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/package.json
CHANGED
|
@@ -40,7 +40,7 @@ When asked to prepare a spec:
|
|
|
40
40
|
- Default `acceptance_proof: true` unless user explicitly says otherwise
|
|
41
41
|
- Collect supporting assets into `.agent-workflow/specs/assets/<spec-slug>/`
|
|
42
42
|
- Prefer assets over embedding large JSON, CSV, or screenshots inline
|
|
43
|
-
- When spec is ready, commit the changes, push the
|
|
43
|
+
- When spec is ready, commit the changes. If running non-interactively, also push the branch and open or update a GitLab MR automatically. If running interactively, stop after the commit and ask the user whether to push and open/update the MR before proceeding.
|
|
44
44
|
|
|
45
45
|
### B. Plan implementation
|
|
46
46
|
When asked to implement a spec:
|
|
@@ -71,9 +71,16 @@ Use filenames that reveal purpose, for example:
|
|
|
71
71
|
## GitLab handoff behavior
|
|
72
72
|
1. Stage only the relevant spec, asset, and doc changes.
|
|
73
73
|
2. Create a focused commit.
|
|
74
|
-
3.
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
3. Decide whether to proceed with push and MR:
|
|
75
|
+
- **Non-interactive session** (invoked with `-p`, no user to prompt) → proceed to steps 4–6 automatically.
|
|
76
|
+
- **Prompt includes `with push`** (e.g. "use prepare-spec skill with push …") → proceed to steps 4–6 automatically.
|
|
77
|
+
- **Prompt explicitly instructs full handoff** (e.g. "Full GitLab handoff — push the branch and open or update the MR without asking.") → proceed to steps 4–6 automatically.
|
|
78
|
+
- **All other interactive sessions** → stop here, report the commit, and ask:
|
|
79
|
+
> "Spec committed on `<branch>`. Should I push the branch and open/update the MR? (yes / no)"
|
|
80
|
+
Proceed to steps 4–6 only if the user confirms.
|
|
81
|
+
4. Push the current branch with `scripts/agent/git-push-branch.sh`.
|
|
82
|
+
5. Generate MR body content using `scripts/agent/mr-template.sh spec <spec-path> - - -`.
|
|
83
|
+
6. Open or update the MR using the scripts in `scripts/agent/`.
|
|
77
84
|
|
|
78
85
|
## Final handoff
|
|
79
86
|
Return:
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
INTERACTIVE=false
|
|
5
|
+
PUSH=false
|
|
5
6
|
|
|
6
7
|
# Parse flags
|
|
7
8
|
POSITIONAL=()
|
|
8
9
|
for arg in "$@"; do
|
|
9
10
|
case "$arg" in
|
|
10
11
|
--interactive) INTERACTIVE=true ;;
|
|
12
|
+
--push) PUSH=true ;;
|
|
11
13
|
*) POSITIONAL+=("$arg") ;;
|
|
12
14
|
esac
|
|
13
15
|
done
|
|
14
16
|
set -- "${POSITIONAL[@]}"
|
|
15
17
|
|
|
16
18
|
if [[ $# -lt 2 ]]; then
|
|
17
|
-
echo "Usage: $0 [--interactive] <slug> <notion-url|gdrive-url|local-file>" >&2
|
|
19
|
+
echo "Usage: $0 [--interactive] [--push] <slug> <notion-url|gdrive-url|local-file>" >&2
|
|
18
20
|
exit 1
|
|
19
21
|
fi
|
|
20
22
|
|
|
@@ -39,8 +41,13 @@ echo "Worktree: ${WORKTREE_DIR}" >&2
|
|
|
39
41
|
cd "${WORKTREE_DIR}"
|
|
40
42
|
|
|
41
43
|
if [[ "$INTERACTIVE" == true ]]; then
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
if [[ "$PUSH" == true ]]; then
|
|
45
|
+
echo "Starting interactive Claude session (full GitLab handoff enabled)..." >&2
|
|
46
|
+
exec claude --dangerously-skip-permissions "${SOURCE_PROMPT}. Full GitLab handoff — push the branch and open or update the MR without asking."
|
|
47
|
+
else
|
|
48
|
+
echo "Starting interactive Claude session..." >&2
|
|
49
|
+
exec claude --dangerously-skip-permissions "${SOURCE_PROMPT}"
|
|
50
|
+
fi
|
|
44
51
|
else
|
|
45
52
|
exec claude --dangerously-skip-permissions -p "${SOURCE_PROMPT}"
|
|
46
53
|
fi
|