schwarm-cli 0.1.4 → 0.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fda5a7c0a0a68a6e07573a5509cadb8ea7ff600f94a3feabf065317c332a9b40
4
- data.tar.gz: bfd4c31bca63d5862c9df68514c8ab3bdeefb0a1ebbd944c316aeed4522a626d
3
+ metadata.gz: f86723cf9675bb0de813b11efa16be17bd2b8bfa74bd9af1203130cdf7fda0f0
4
+ data.tar.gz: 479a9e83426d1fb675b79dd5780b14264d7a6c8454ee30404c104743aed30fdd
5
5
  SHA512:
6
- metadata.gz: cf2aac68753184cd3ef7fcd28ff24eb75010b84237f2b661e76a00e1582ead6ad07b0789941f9d3c518bd40eadc34bea14d463bc83e7d69dfb62f68f165920a3
7
- data.tar.gz: 9bdf3cbb26adecc1f40e90d681e9cb722bd2ae477cd7faa1ac258f3bf690cc77aa1374cb2744a8fe9bb6583b7b328b242f81e80f19ab79afa2dedad23c5d6b55
6
+ metadata.gz: 9e473284f4c066af2f5ed3a77cc365448574acd73a55e1f72e5d2eb94d1b11db5a95fc4fdaf23c498ecb721ef0f2f596ff753c1c869726446a66d6ae622cf167
7
+ data.tar.gz: b3d2498b0dcea13e9ed75ea1ee865fdf25658a31a5552059cfb617efcead48600f46008fbd4f580766250daa6b99f38619412a4c4cfa32175f6736b7f45e7c3e
@@ -32,7 +32,6 @@ module SchwarmCli
32
32
  desc "create", "Create a new task"
33
33
  option :name, type: :string, required: true, desc: "Task name"
34
34
  option :prompt, type: :string, desc: "Task prompt"
35
- option :prompt_file, type: :string, desc: "Read prompt from file"
36
35
  option :repo, type: :string, desc: "Repository ID, owner/repo, or GitHub URL"
37
36
  option :status, type: :string, desc: "Initial status (draft/waiting)"
38
37
  option :template, type: :string, desc: "Template ID"
@@ -47,7 +46,6 @@ module SchwarmCli
47
46
  desc "update ID", "Update a task"
48
47
  option :name, type: :string, desc: "Task name"
49
48
  option :prompt, type: :string, desc: "Task prompt"
50
- option :prompt_file, type: :string, desc: "Read prompt from file"
51
49
  option :repo, type: :string, desc: "Repository ID, owner/repo, or GitHub URL"
52
50
  option :depends_on, type: :array, desc: "Dependency task IDs"
53
51
  def update(id)
@@ -116,12 +114,11 @@ module SchwarmCli
116
114
 
117
115
  desc "handoff", "Hand off the current local branch to schwarm as a ready task"
118
116
  option :prompt, type: :string, desc: "Task prompt"
119
- option :prompt_file, type: :string, desc: "Read prompt from file"
120
117
  option :repo, type: :string, desc: "Repository ID, owner/repo, or GitHub URL (skips origin auto-detect)"
121
118
  option :name, type: :string, desc: "Task name (defaults to the branch name)"
122
119
  def handoff
123
- prompt = read_prompt
124
- abort "Error: --prompt or --prompt-file is required." if prompt.nil? || prompt.strip.empty?
120
+ prompt = options[:prompt]
121
+ abort "Error: --prompt is required." if prompt.nil? || prompt.strip.empty?
125
122
 
126
123
  handle_errors do
127
124
  result = SchwarmCli::HandsOffTask.new(client: client).call(
@@ -153,7 +150,7 @@ module SchwarmCli
153
150
 
154
151
  def create_attrs
155
152
  {
156
- name: options[:name], prompt: read_prompt,
153
+ name: options[:name], prompt: options[:prompt],
157
154
  github_repository_id: resolve_repo(options[:repo]), status: options[:status],
158
155
  task_template_id: options[:template], dependency_ids: options[:depends_on]
159
156
  }.compact
@@ -164,17 +161,7 @@ module SchwarmCli
164
161
  name: options[:name], github_repository_id: resolve_repo(options[:repo]),
165
162
  dependency_ids: options[:depends_on]
166
163
  }.compact.tap do |attrs|
167
- attrs[:prompt] = read_prompt if options[:prompt] || options[:prompt_file]
168
- end
169
- end
170
-
171
- def read_prompt
172
- if options[:prompt_file]
173
- file_path = File.expand_path(options[:prompt_file])
174
- abort "Error: File not found: #{file_path}" unless File.exist?(file_path)
175
- File.read(file_path)
176
- else
177
- options[:prompt]
164
+ attrs[:prompt] = options[:prompt] if options[:prompt]
178
165
  end
179
166
  end
180
167
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SchwarmCli
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
data/schwarm-skill.md CHANGED
@@ -32,7 +32,14 @@ The `schwarm` CLI is installed and configured (`schwarm configure`).
32
32
  ```bash
33
33
  schwarm tasks create --repo <REPO_ID> --name "Fix login bug" --prompt "The login form crashes when email is empty. Fix the validation in app/models/user.rb" --status ready
34
34
  ```
35
- Use `--prompt-file ./prompt.md` for long prompts.
35
+ For a multi-line prompt, pipe via HEREDOC:
36
+ ```bash
37
+ schwarm tasks create --repo <REPO_ID> --name "Fix login bug" --status ready --prompt "$(cat <<'EOF'
38
+ The login form crashes when empty. Fix validation in app/models/user.rb
39
+ and add a regression test.
40
+ EOF
41
+ )"
42
+ ```
36
43
  3. Check the created task:
37
44
  ```bash
38
45
  schwarm tasks show <TASK_ID>
@@ -53,10 +60,24 @@ continues committing to it.
53
60
  ```bash
54
61
  schwarm tasks handoff --prompt "continue the validation logic, add tests"
55
62
  ```
56
- Use `--prompt-file ./handoff.md` for long prompts.
57
63
  3. Take note of the task ID printed on success; you can monitor it like any
58
64
  other task.
59
65
 
66
+ **Keep the prompt short.** The prompt is a pointer, not a spec. Before handing
67
+ off, commit any detailed instructions, design notes, or TODOs into the repo
68
+ (e.g. a `HANDOFF.md`, `AGENTS.md`, or inline comments) so the next agent reads
69
+ them from the working tree. Then the `--prompt` just needs to say what to do
70
+ next and where to look, e.g. `"continue per HANDOFF.md"`.
71
+
72
+ For a multi-line prompt, use a HEREDOC rather than a file flag:
73
+ ```bash
74
+ schwarm tasks handoff --prompt "$(cat <<'EOF'
75
+ Continue the validation work. Start from the TODOs in app/models/user.rb
76
+ and follow the plan in HANDOFF.md.
77
+ EOF
78
+ )"
79
+ ```
80
+
60
81
  **Watch for:**
61
82
  - The command refuses to hand off the base branch (`main`). Create a feature
62
83
  branch first.
@@ -223,7 +244,9 @@ for tasks in a repository.
223
244
  - Check task status before taking actions (e.g., only `retry` works on `error`
224
245
  tasks, only `start` works on `draft` tasks).
225
246
  - When building a DAG, create all tasks as drafts first, then start them all.
226
- - For long prompts, write them to a file and use `--prompt-file`.
247
+ - Keep `--prompt` short commit long-form instructions (plans, TODOs,
248
+ `HANDOFF.md`) into the repo and point the prompt at them. For multi-line
249
+ prompts, pipe via HEREDOC: `--prompt "$(cat <<'EOF' ... EOF)"`.
227
250
  - Run `schwarm <command> help` for full flag documentation on any command.
228
251
  - `schwarm tasks list` excludes archived tasks by default. Use `--all` to
229
252
  include them or `--status archived` to see only archived.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schwarm-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Garrigues