Skip to content

Commit 06f554d

Browse files
authored
RIG-401 feat: implementation (#236)
## Summary Pipeline engineer task `20260407-039`. Linear: RIG-401
1 parent 23b651b commit 06f554d

7 files changed

Lines changed: 448 additions & 26 deletions

File tree

engine/pipelines/default.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ launch_stagger_secs: 4
66
templates:
77
verdict_instruction: "Output your verdict on the LAST line of your response"
88
nit_threshold: "0"
9+
language: rust
10+
test_commands: "make check"
911

1012
stages:
1113
analyst:

engine/pipelines/economy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ launch_stagger_secs: 4
66
templates:
77
verdict_instruction: "Output your verdict on the LAST line of your response"
88
nit_threshold: "0"
9+
language: rust
10+
test_commands: "make check"
911

1012
stages:
1113
analyst:

engine/pipelines/honeyjourney.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ launch_stagger_secs: 4
66
templates:
77
verdict_instruction: "Output your verdict on the LAST line of your response"
88
nit_threshold: "0"
9+
language: python
10+
test_commands: "make check"
911

1012
stages:
1113
analyst:

engine/pipelines/prompts/engineer.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,14 @@ You are implementing changes for a Linear issue. You may be:
2121
1. **Starting fresh** — the analyst spec is in the handoff context file
2222
2. **Fixing rejection** — the reviewer found issues listed above in "Rejection Feedback"
2323

24-
### FIRST: Invoke the Rust skill
25-
Before writing any code, invoke the `/rust` skill using the Skill tool. This loads Rust-specific patterns, testing workflow, and quality standards that you MUST follow throughout implementation.
24+
{skill_section}
2625

2726
### Workflow
28-
1. Invoke `/rust` skill (Skill tool, skill: "rust")
29-
2. Read the handoff context file and any rejection feedback
30-
3. Implement the changes (or fix the issues raised by the reviewer)
31-
4. **Pre-commit verification — ALL must pass before committing:**
32-
```bash
33-
cargo fmt
34-
cargo clippy -- -D warnings
35-
cargo test
36-
```
37-
Fix every error before proceeding. Do NOT commit if any step fails.
38-
5. Stage and commit with conventional commit format: `RIG-XX type: description`
39-
6. Push: `git push -u origin HEAD`
27+
1. Read the handoff context file and any rejection feedback
28+
2. Implement the changes (or fix the issues raised by the reviewer)
29+
3. {verification_section}
30+
4. {commit_format_hint}
31+
5. Push: `git push -u origin HEAD`
4032

4133
IMPORTANT: Do NOT call `gh pr create`, `gh pr merge`, or any other `gh` write commands directly. The pipeline engine handles PR creation and all GitHub mutations automatically after your task completes. Your job is to write code, commit, and push.
4234

engine/src/pipeline/callback/task_builder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ pub(super) fn build_handoff_prompt(
346346
}
347347
};
348348

349+
// RIG-401: inject agent_runtime so computed vars (skill_section, etc.) are runtime-aware.
350+
let agent_runtime = stage_cfg.runtime.unwrap_or_default().to_string();
351+
349352
let mut runtime: HashMap<String, String> = HashMap::new();
350353
runtime.insert("issue_id".to_string(), issue_identifier.to_string());
351354
runtime.insert("issue_title".to_string(), issue_title.to_string());
@@ -363,6 +366,7 @@ pub(super) fn build_handoff_prompt(
363366
previous_review.unwrap_or_default().to_string(),
364367
);
365368
runtime.insert("working_dir".to_string(), String::new());
369+
runtime.insert("agent_runtime".to_string(), agent_runtime);
366370

367371
let vars = build_vars(&config.templates, &runtime);
368372
let mut rendered = render_prompt(&prompt_source, &vars);

engine/src/pipeline/poll.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,11 +1290,15 @@ pub(crate) fn build_poll_prompt(
12901290
let previous_review =
12911291
super::callback::lookup_previous_reviewer_handoff(db, identifier).unwrap_or_default();
12921292

1293+
// RIG-401: inject agent_runtime so computed vars (skill_section, etc.) are runtime-aware.
1294+
let agent_runtime = stage_cfg.runtime.unwrap_or_default().to_string();
1295+
12931296
let mut runtime: HashMap<String, String> = HashMap::new();
12941297
runtime.insert("issue_id".to_string(), identifier.to_string());
12951298
runtime.insert("issue_title".to_string(), title.to_string());
12961299
runtime.insert("issue_description".to_string(), description.to_string());
12971300
runtime.insert("previous_review".to_string(), previous_review);
1301+
runtime.insert("agent_runtime".to_string(), agent_runtime);
12981302

12991303
let vars = build_vars(&config.templates, &runtime);
13001304
render_prompt(&prompt_source, &vars)

0 commit comments

Comments
 (0)