@codebehind/agent-workflow 1.1.4 → 1.1.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebehind/agent-workflow",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Scaffold the agent-workflow spec-driven delivery framework into any repo",
5
5
  "type": "module",
6
6
  "bin": {
@@ -142,19 +142,21 @@ For non-trivial changes not described by a new feature spec:
142
142
 
143
143
  ---
144
144
 
145
- ## Meta-repo specifics
145
+ ## Repo mode
146
146
 
147
- This is the project's meta repository. The `.agent-workflow/` directory exists **only here** — there are no per-submodule workflow directories.
147
+ Check `AGENTS.md` for the declared repo mode.
148
+
149
+ **Single-repo:** All code, specs, plans, docs, and artifacts live here. Commit and MR everything in this repo. One MR per task branch.
150
+
151
+ **Meta-repo:** The `.agent-workflow/` directory exists only here — there are no per-submodule workflow directories.
148
152
 
149
153
  | Content | Location |
150
154
  |---------|---------|
151
155
  | Specs, plans, feature docs, artifacts | This repo under `.agent-workflow/` |
152
- | Backend application code | `backend/` submodulecommit and MR in project-backend |
153
- | Web application code | `web/` submodule — commit and MR in project-web |
154
- | Mobile application code | `mobile/` submodule — commit and MR in project-mobile |
156
+ | Application code | `repos/<module>/` submodulessee `AGENTS.md` for the full list and their GitLab project URLs |
155
157
 
156
- When implementing a spec that touches application code:
157
- 1. Navigate into the relevant submodule directory to make code changes.
158
+ When implementing a spec that touches application code (meta-repo only):
159
+ 1. Navigate into the relevant `repos/<module>/` directory to make code changes.
158
160
  2. Open a separate MR in that submodule's GitLab project.
159
- 3. The meta repo MR covers only spec, plan, docs, and artifacts.
160
- 4. Reference the submodule MR(s) in the meta repo MR description.
161
+ 3. The meta-repo MR covers only spec, plan, docs, and artifacts.
162
+ 4. Reference the submodule MR(s) in the meta-repo MR description.
@@ -4,9 +4,12 @@ This document defines how agents **verify acceptance criteria and report proof**
4
4
 
5
5
  ---
6
6
 
7
- ## Meta-repo note
7
+ ## Where to run acceptance proof
8
8
 
9
- This is the project's meta repository. Application code lives in submodules (for example `backend/`, `web/`, `mobile/`). Acceptance proof that requires a running app (UI screenshots, API curl) must be executed **inside the relevant submodule directory**. Artifacts are then saved here under `.agent-workflow/artifacts/`.
9
+ Check `AGENTS.md` for the repo mode:
10
+
11
+ - **Single-repo:** run the app from the repo root. Save artifacts under `.agent-workflow/artifacts/`.
12
+ - **Meta-repo:** navigate into the relevant `repos/<module>/` directory to start the app and run proof. Save artifacts back here under `.agent-workflow/artifacts/`.
10
13
 
11
14
  ---
12
15
 
@@ -4,10 +4,11 @@ You are operating inside a spec-driven delivery workflow with GitLab merge-reque
4
4
  Follow these rules in every session.
5
5
 
6
6
  ## Read order at session start
7
- 1. Read `.agent-workflow/README.md`
8
- 2. Read `.agent-workflow/codebase.md` if it exists
9
- 3. Read the target spec and any linked feature doc before planning or implementation
10
- 4. Read relevant existing code (inside the appropriate submodule) before proposing structural changes
7
+ 1. Read `AGENTS.md` — determines repo mode (single-repo vs meta-repo) and project context
8
+ 2. Read `.agent-workflow/README.md`
9
+ 3. Read `.agent-workflow/codebase.md` if it exists
10
+ 4. Read the target spec and any linked feature doc before planning or implementation
11
+ 5. Read relevant existing code (in the appropriate directory) before proposing structural changes
11
12
 
12
13
  ## Source of truth
13
14
  - The spec is the source of truth for scope.
@@ -134,5 +135,9 @@ When the user invokes `/prepare-spec`, `/implement-spec`, `/acceptance-proof`, o
134
135
 
135
136
  For acceptance proof on UI tasks, also read `.agent-workflow/playwright-acceptance.md`.
136
137
 
137
- ## Meta-repo rule
138
- This is the project's meta repository. Specs, plans, docs, and artifacts live here. Application code changes go inside submodule directories (`backend/`, `web/`, `mobile/`). Each affected submodule gets its own MR in its own GitLab project. Never commit application code directly to the meta repo.
138
+ ## Repo mode rule
139
+ Read `AGENTS.md` to determine the repo mode declared for this project.
140
+
141
+ **Single-repo mode:** Application code, specs, plans, docs, and artifacts all live in this repository. Commit everything here. One MR per task branch covers all changes.
142
+
143
+ **Meta-repo mode:** Specs, plans, docs, and artifacts live in this repository. Application code lives in `repos/<module>/` submodules as declared in `AGENTS.md`. Never commit application code directly to this repo. Each affected submodule gets its own MR in its own GitLab project. Reference all submodule MR URLs in the meta-repo MR description. For acceptance proof requiring a running app, navigate into the relevant `repos/<module>/` directory; save artifacts back here under `.agent-workflow/artifacts/`.
@@ -67,7 +67,7 @@ After approval:
67
67
 
68
68
  ### 7. Verify
69
69
  For each acceptance criterion:
70
- - run or describe concrete verification steps (for the current project, run inside the relevant submodule directory)
70
+ - run or describe concrete verification steps check `AGENTS.md`: single-repo run from repo root; meta-repo → run inside the relevant `repos/<module>/` directory
71
71
  - save proof into `.agent-workflow/artifacts/acceptance-<spec-slug>-<YYYYMMDD>/`
72
72
  - note pass/fail clearly per `.agent-workflow/acceptance-verification.md`
73
73
 
@@ -76,12 +76,22 @@ Update the most relevant existing doc in `.agent-workflow/docs/` if one already
76
76
  Only create a new doc if no existing doc is the right place.
77
77
 
78
78
  ### 9. GitLab handoff
79
- 1. Stage only the relevant meta-repo files (spec, plan, docs, artifacts — not submodule code).
79
+ Check `AGENTS.md` for repo mode:
80
+
81
+ **Single-repo:**
82
+ 1. Stage all changed files (code, spec, plan, docs, artifacts).
83
+ 2. Commit current changes.
84
+ 3. Push with `scripts/agent/git-push-branch.sh`.
85
+ 4. Generate MR body content using `scripts/agent/mr-template.sh task <spec-path> <plan-path> <doc-path-or-dash> <artifacts-path-or-dash>`.
86
+ 5. Open or update the MR using the scripts in `scripts/agent/`.
87
+
88
+ **Meta-repo:**
89
+ 1. Stage only the files in this repo (spec, plan, docs, artifacts — not `repos/<module>/` code).
80
90
  2. Commit current changes.
81
91
  3. Push with `scripts/agent/git-push-branch.sh`.
82
92
  4. Generate MR body content using `scripts/agent/mr-template.sh task <spec-path> <plan-path> <doc-path-or-dash> <artifacts-path-or-dash>`.
83
93
  5. Open or update the MR using the scripts in `scripts/agent/`.
84
- 6. If submodule code was changed, open separate MRs in the affected submodule GitLab projects and reference them in the meta repo MR description.
94
+ 6. For each `repos/<module>/` that had code changes, open a separate MR in that submodule's GitLab project and reference its URL in the meta-repo MR description.
85
95
 
86
96
  ### 10. Final handoff
87
97
  Provide:
@@ -61,7 +61,7 @@ Use filenames that reveal purpose, for example:
61
61
  - `db-shape-notes.md`
62
62
 
63
63
  ## GitLab handoff behavior
64
- 1. Stage only the relevant spec, asset, and doc changes (no submodule code).
64
+ 1. Stage only the relevant spec, asset, and doc changes.
65
65
  2. Create a focused commit.
66
66
  3. Push the current branch with `scripts/agent/git-push-branch.sh`.
67
67
  4. Generate MR body content using `scripts/agent/mr-template.sh spec <spec-path> - - -`.
@@ -6,6 +6,8 @@ This repository uses a structured feature delivery workflow.
6
6
 
7
7
  **CRITICAL**: Before starting any work, read `.agent-workflow/README.md` to understand the complete workflow.
8
8
 
9
+ See `agents-workflow-dev-process.md` for both the **scripted workflow** (bash scripts, auto worktrees) and the **direct workflow** (manual branch + `claude` in the repo root — no worktrees required).
10
+
9
11
  ## Quick Start
10
12
 
11
13
  1. Read `.agent-workflow/README.md` (workflow process — **Phase A** spec authorship vs **Phase B** delivery).
@@ -16,13 +18,23 @@ This repository uses a structured feature delivery workflow.
16
18
  4. For implementation, read `verification` in each open spec (`true|false`, default to `true` when missing).
17
19
  5. Follow the workflow: **open** spec → plan → implement → document → mark spec `done`.
18
20
 
19
- ## Meta-repo rule
21
+ ## Repo Mode
22
+
23
+ **Mode:** single-repo
24
+ <!-- Change to "meta-repo" if this repo holds only specs/plans/docs and application code lives in repos/<module>/ submodules. -->
25
+
26
+ <!-- If meta-repo, fill in the submodule table below and delete this comment block:
27
+ | Directory | GitLab project URL |
28
+ |------------------|--------------------|
29
+ | repos/backend/ | gitlab.com/org/project-backend |
30
+ | repos/web/ | gitlab.com/org/project-web |
31
+ -->
20
32
 
21
- This is the **Mjaumatish meta repository**. Specs, plans, docs, and artifacts live here. Application code changes go inside submodule directories (`backend/`, `web/`, `mobile/`). Each affected submodule gets its own MR in its own GitLab project.
33
+ **Single-repo:** All application code, specs, plans, docs, and artifacts live in this repository. Commit everything here. One MR per task branch.
22
34
 
23
- - Never commit application code directly to the meta repo.
24
- - When running acceptance proof (UI, API), navigate inside the relevant submodule to start the app and capture evidence. Save artifacts back here under `.agent-workflow/artifacts/`.
25
- - Reference submodule MR URLs in the meta repo MR description.
35
+ <!-- If meta-repo, replace the line above with:
36
+ **Meta-repo:** Specs, plans, docs, and artifacts live here. Application code lives in `repos/<module>/` submodules (see table above). Never commit application code directly to this repo. Each affected submodule gets its own MR in its own GitLab project. Reference submodule MR URLs in the meta-repo MR description. When running acceptance proof (UI, API), navigate into the relevant `repos/<module>/` directory to start the app and capture evidence; save artifacts back here under `.agent-workflow/artifacts/`.
37
+ -->
26
38
 
27
39
  ## Key Points
28
40
 
@@ -40,4 +52,4 @@ This is the **Mjaumatish meta repository**. Specs, plans, docs, and artifacts li
40
52
  - Prefer Playwright screenshots per acceptance criterion or per major UI state.
41
53
  - Distinguish clearly between `implemented`, `verified automatically`, and `human QA pending`.
42
54
  - Follow `.agent-workflow/acceptance-verification.md` and `.agent-workflow/playwright-acceptance.md`.
43
- - For this meta repo: run the app inside the relevant submodule directory; save artifacts here.
55
+ - **Single-repo:** run the app from the repo root. **Meta-repo:** navigate into the relevant `repos/<module>/` directory to start the app; save artifacts here under `.agent-workflow/artifacts/`.
@@ -15,6 +15,15 @@ Work flows through two phases:
15
15
 
16
16
  Phases are kept in **separate Claude sessions** on **separate branches** to keep spec authoring and implementation cleanly isolated.
17
17
 
18
+ There are two ways to run each phase:
19
+
20
+ | Mode | How |
21
+ |------|-----|
22
+ | **Scripted (worktrees)** | Run the bash scripts — they create a git worktree, branch, and start Claude automatically |
23
+ | **Direct (no worktrees)** | Create the branch manually, open Claude in the repo root, invoke the skill yourself |
24
+
25
+ Both modes are fully supported. Choose based on your preference.
26
+
18
27
  ---
19
28
 
20
29
  ## Prerequisites
@@ -50,31 +59,51 @@ Use `_template.md` when creating specs by hand.
50
59
 
51
60
  ## Phase A — Prepare spec
52
61
 
53
- ### Option 1: From a Notion page
62
+ ### Option 1: Scripted (worktrees) — from a Notion page
54
63
 
55
- In the repo root worktree start following command (this will create new git worktree, branch and start new claude session with /prepare-spec skill):
64
+ From the repo root, run:
56
65
 
57
66
  ```bash
58
- scripts/agent/prepare-spec <slug> <notion-link>
67
+ scripts/agent/prepare-spec.sh <slug> <notion-link>
59
68
  ```
60
69
 
61
- This command:
70
+ This script:
62
71
  - creates a worktree at `~/agent-runs/{PROJECT_NAME}/worktrees/spec-<slug>` on branch `agent/spec/<slug>`
63
- - starts Claude session in `~/agent-runs/{PROJECT_NAME}/worktrees/spec-<slug>` on branch `agent/spec/<slug>`
64
- - iniate `/prepare-spec` skill from given <notion-link>
72
+ - starts a Claude session inside that worktree
73
+ - invokes `/prepare-spec` with the given Notion link
65
74
 
66
75
  The agent fetches the Notion page, maps content to the spec template, asks clarifying questions, then writes `.agent-workflow/specs/<date>_<slug>.md` with `status: draft`.
67
76
 
68
- ### Option 2: From a description
77
+ Add `--interactive` to follow along in the same session and skip the automatic GitLab MR:
69
78
 
70
- TBD
79
+ ```bash
80
+ scripts/agent/prepare-spec.sh --interactive <slug> <notion-link>
71
81
  ```
72
- # Still in progress...
82
+
83
+ Claude launches interactively with the first message pre-filled. The worktree and branch are still created — but nothing is pushed or opened in GitLab unless you do it manually.
84
+
85
+ ### Option 2: Direct (no worktrees) — from a Notion page or description
86
+
87
+ Skip the script and run everything yourself:
88
+
89
+ ```bash
90
+ # 1. Create and switch to a spec branch
91
+ git checkout -b agent/spec/<slug>
92
+
93
+ # 2. Open Claude in the repo root
94
+ claude
95
+
96
+ # 3. Inside Claude, invoke the skill
97
+ /prepare-spec <notion-link>
98
+ # or for a free-form description:
99
+ # "Use prepare-spec skill, here is the feature: ..."
73
100
  ```
74
101
 
102
+ The agent will write the spec, commit it, and open a GitLab MR on the current branch — no worktree needed.
103
+
75
104
  ### Option 3: By hand
76
105
 
77
- Copy `.agent-workflow/specs/_template.md` to `.agent-workflow/specs/<name>.md`, fill it in, and set `status: draft` (or `open` if ready).
106
+ Copy `.agent-workflow/specs/_template.md` to `.agent-workflow/specs/<name>.md`, fill it in, and set `status: draft` (or `open` if ready). Then commit and push the branch yourself.
78
107
 
79
108
  ### After spec prep
80
109
 
@@ -89,26 +118,45 @@ Copy `.agent-workflow/specs/_template.md` to `.agent-workflow/specs/<name>.md`,
89
118
 
90
119
  The spec must have `status: open` and be merged to main before starting Phase B.
91
120
 
92
- ### Start a task session
121
+ ### Option 1: Scripted (worktrees)
122
+
123
+ ```bash
124
+ scripts/agent/implement-task.sh <task-name> <spec-file or spec-name>
125
+ ```
93
126
 
94
- From the repo root:
127
+ This script:
128
+ - creates a worktree at `~/agent-runs/{PROJECT_NAME}/worktrees/task-<slug>` on branch `agent/task/<slug>`
129
+ - starts a Claude session inside that worktree
130
+ - invokes `/implement-spec` with the given spec file
131
+
132
+ Add `--interactive` to follow along in the same session and skip the automatic GitLab MR:
95
133
 
96
134
  ```bash
97
- scipts/agent/implement-task.sh <task-name> <spec-file or spec-name>
135
+ scripts/agent/implement-task.sh --interactive <task-name> <spec-file or spec-name>
98
136
  ```
99
137
 
100
- This command:
101
- - creates a worktree at `~/agent-runs/{PROJECT_NAME}/worktrees/task-<slug>` on branch `agent/spec/<slug>`
102
- - starts Claude session in `~/agent-runs/{PROJECT_NAME}/worktrees/task-<slug>` on branch `agent/spec/<slug>`
103
- - iniate `/implement-spec` skill from given <spec-file or spec-name>
104
- - this will follow the local GitLab workflow. Create the plan first, push it, and stop for approval (if needed).
138
+ ### Option 2: Direct (no worktrees)
139
+
140
+ ```bash
141
+ # 1. Create and switch to a task branch from main
142
+ git checkout main && git pull
143
+ git checkout -b agent/task/<slug>
144
+
145
+ # 2. Open Claude in the repo root
146
+ claude
147
+
148
+ # 3. Inside Claude, invoke the skill
149
+ /implement-spec .agent-workflow/specs/<spec-file>.md
150
+ ```
151
+
152
+ The agent takes it from there — plan, push, MR, wait for approval if `verification: true`.
105
153
 
106
154
  ### What the agent does
107
155
 
108
156
  1. Reads the spec, codebase snapshot, and relevant existing docs.
109
157
  2. Creates `.agent-workflow/plans/<spec-name>_plan.md`.
110
158
  3. If `verification: true` (default): commits the plan, pushes, opens/updates an MR, and **waits for your approval**.
111
- 4. After approval (or immediately if `verification: false`): implements the feature — code changes go into the relevant submodule(s) (`backend/`, `web/`, `mobile/`).
159
+ 4. After approval (or immediately if `verification: false`): implements the feature — in single-repo mode, code changes go directly in this repo; in meta-repo mode, changes go into the relevant `repos/<module>/` submodule(s) declared in `AGENTS.md`.
112
160
  5. Runs acceptance verification per the criteria in the spec.
113
161
  6. Writes/updates a feature doc in `.agent-workflow/docs/`.
114
162
  7. Opens or updates the MR with the full summary.
@@ -122,7 +170,7 @@ Reply in the same Claude session:
122
170
  Proceed with implementation.
123
171
  ```
124
172
 
125
- Or start a fresh session in the same worktree and say:
173
+ Or start a fresh session (in the same worktree or the repo root on the same branch) and say:
126
174
 
127
175
  ```
128
176
  Use implement-spec skill for .agent-workflow/specs/<spec-file>.md. Plan is approved, proceed with implementation.
@@ -130,19 +178,27 @@ Use implement-spec skill for .agent-workflow/specs/<spec-file>.md. Plan is appro
130
178
 
131
179
  ---
132
180
 
133
- ## Meta-repo specifics
181
+ ## Repo mode
182
+
183
+ The repo mode is declared in `AGENTS.md`. Check it before starting any implementation.
134
184
 
135
- In case this is a **meta repository**. Specs, plans, docs, and artifacts all live here under `.agent-workflow/`. Application code changes, however, go inside the submodule directories.
185
+ **Single-repo:**
136
186
 
137
187
  | What | Where it lives |
138
188
  |------|---------------|
139
- | Spec, plan, docs, artifacts | `.agent-workflow/` in this meta repo |
140
- | Submodules code changes | `repos/` submodules in sepparate folders with their repositories |
141
- | Acceptance proof (runtime) | Runs inside the relevant submodule; artifacts stored here |
189
+ | Spec, plan, docs, artifacts | `.agent-workflow/` in this repo |
190
+ | Application code | This repo commit and MR everything here |
191
+ | Acceptance proof (runtime) | Run from the repo root; artifacts stored under `.agent-workflow/artifacts/` |
142
192
 
143
- A cross-cutting spec (touching multiple repos) results in one plan here and separate MRs in each affected sub-repo.
193
+ **Meta-repo:**
194
+
195
+ | What | Where it lives |
196
+ |------|---------------|
197
+ | Spec, plan, docs, artifacts | `.agent-workflow/` in this repo |
198
+ | Application code | `repos/<module>/` submodules — see `AGENTS.md` for the full list |
199
+ | Acceptance proof (runtime) | Run inside the relevant `repos/<module>/` directory; artifacts stored here |
144
200
 
145
- In case this is a single repo project, everything will live in this single root folder and repo.
201
+ A cross-cutting spec (touching multiple submodules) results in one plan here and separate MRs in each affected `repos/<module>/` GitLab project.
146
202
 
147
203
  ---
148
204
 
@@ -42,9 +42,9 @@ chmod +x scripts/agent/*.sh
42
42
 
43
43
  ---
44
44
 
45
- ## 3. Create the worktree root directory
45
+ ## 3. Create the worktree root directory *(optional — scripted workflow only)*
46
46
 
47
- Agent worktrees live outside the main repo clone:
47
+ Only needed if you plan to use the bash scripts (`prepare-spec.sh`, `implement-task.sh`) that create git worktrees automatically. Skip this step if you prefer the direct workflow (manual branch + `claude` in the repo root).
48
48
 
49
49
  ```bash
50
50
  mkdir -p ~/agent-runs/{PROJECT_NAME}/worktrees
@@ -77,20 +77,38 @@ Claude Code will read `CLAUDE.md` and `.claude/rules/agentic-workflow.md` automa
77
77
 
78
78
  ## Running a spec session (Phase A)
79
79
 
80
- From the repo root (no worktree needed for spec prep):
81
-
80
+ **Scripted (auto worktree + branch):**
82
81
  ```bash
83
- scripts/agent/prepare-spec <spec-name> <notion-link>
82
+ scripts/agent/prepare-spec.sh <spec-name> <notion-link>
83
+
84
+ # Add --interactive to follow along and skip automatic GitLab MR:
85
+ scripts/agent/prepare-spec.sh --interactive <spec-name> <notion-link>
84
86
  ```
85
87
 
86
- The agent will create a branch `agent/spec/<slug>`, commit the spec, and open a GitLab MR.
88
+ **Direct (manual branch, no worktree):**
89
+ ```bash
90
+ git checkout -b agent/spec/<slug>
91
+ claude
92
+ # then inside Claude: /prepare-spec <notion-link>
93
+ ```
87
94
 
88
95
  ---
89
96
 
90
- ## Running a implementation session (Phase B)
97
+ ## Running an implementation session (Phase B)
91
98
 
99
+ **Scripted (auto worktree + branch):**
92
100
  ```bash
93
- scipts/agent/implement-task.sh <task-name> <spec-file or spec-name>
101
+ scripts/agent/implement-task.sh <task-name> <spec-file or spec-name>
102
+
103
+ # Add --interactive to follow along and skip automatic GitLab MR:
104
+ scripts/agent/implement-task.sh --interactive <task-name> <spec-file or spec-name>
105
+ ```
106
+
107
+ **Direct (manual branch, no worktree):**
108
+ ```bash
109
+ git checkout -b agent/task/<slug>
110
+ claude
111
+ # then inside Claude: /implement-spec .agent-workflow/specs/<spec-file>.md
94
112
  ```
95
113
 
96
114
  ---
@@ -1,8 +1,20 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
+ INTERACTIVE=false
5
+
6
+ # Parse flags
7
+ POSITIONAL=()
8
+ for arg in "$@"; do
9
+ case "$arg" in
10
+ --interactive) INTERACTIVE=true ;;
11
+ *) POSITIONAL+=("$arg") ;;
12
+ esac
13
+ done
14
+ set -- "${POSITIONAL[@]}"
15
+
4
16
  if [[ $# -lt 2 ]]; then
5
- echo "Usage: $0 <slug> <spec_name>" >&2
17
+ echo "Usage: $0 [--interactive] <slug> <spec_name>" >&2
6
18
  exit 1
7
19
  fi
8
20
 
@@ -16,4 +28,10 @@ WORKTREE_DIR=$(echo "${OUTPUT}" | grep '^WORKTREE_DIR=' | cut -d= -f2-)
16
28
 
17
29
  echo "Worktree: ${WORKTREE_DIR}" >&2
18
30
  cd "${WORKTREE_DIR}"
19
- exec claude --dangerously-skip-permissions -p "use implement-spec skill from ${SPEC_NAME}"
31
+
32
+ if [[ "$INTERACTIVE" == true ]]; then
33
+ echo "Starting interactive Claude session (GitLab flow disabled)..." >&2
34
+ exec claude --dangerously-skip-permissions --message "use implement-spec skill from ${SPEC_NAME}. Skip GitLab flow — do not push or open an MR."
35
+ else
36
+ exec claude --dangerously-skip-permissions -p "use implement-spec skill from ${SPEC_NAME}"
37
+ fi
@@ -1,8 +1,20 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
+ INTERACTIVE=false
5
+
6
+ # Parse flags
7
+ POSITIONAL=()
8
+ for arg in "$@"; do
9
+ case "$arg" in
10
+ --interactive) INTERACTIVE=true ;;
11
+ *) POSITIONAL+=("$arg") ;;
12
+ esac
13
+ done
14
+ set -- "${POSITIONAL[@]}"
15
+
4
16
  if [[ $# -lt 2 ]]; then
5
- echo "Usage: $0 <slug> <notion_url>" >&2
17
+ echo "Usage: $0 [--interactive] <slug> <notion_url>" >&2
6
18
  exit 1
7
19
  fi
8
20
 
@@ -16,4 +28,10 @@ WORKTREE_DIR=$(echo "${OUTPUT}" | grep '^WORKTREE_DIR=' | cut -d= -f2-)
16
28
 
17
29
  echo "Worktree: ${WORKTREE_DIR}" >&2
18
30
  cd "${WORKTREE_DIR}"
19
- exec claude --dangerously-skip-permissions -p "use prepare-spec skill from ${NOTION_URL}"
31
+
32
+ if [[ "$INTERACTIVE" == true ]]; then
33
+ echo "Starting interactive Claude session (GitLab flow disabled)..." >&2
34
+ exec claude --dangerously-skip-permissions --message "use prepare-spec skill from ${NOTION_URL}. Skip GitLab flow — do not push or open an MR."
35
+ else
36
+ exec claude --dangerously-skip-permissions -p "use prepare-spec skill from ${NOTION_URL}"
37
+ fi