Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ coverage/
.agent-relay.stale.*/
.relay/
.ricky/
.trajectories/
.workflow-artifacts/
.factory/
.mcp.json
Expand Down
65 changes: 65 additions & 0 deletions .trajectories/completed/2026-05/traj_2f8sfg3akql2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"id": "traj_2f8sfg3akql2",
"version": 1,
"task": {
"title": "Harden Ricky workflow never-fail coverage"
},
"status": "completed",
"startedAt": "2026-05-08T14:46:04.652Z",
"completedAt": "2026-05-08T14:54:06.222Z",
"agents": [
{
"name": "default",
"role": "lead",
"joinedAt": "2026-05-08T14:48:29.461Z"
}
],
"chapters": [
{
"id": "chap_e5f3y6nkmd4t",
"title": "Work",
"agentName": "default",
"startedAt": "2026-05-08T14:48:29.461Z",
"endedAt": "2026-05-08T14:54:06.222Z",
"events": [
{
"ts": 1778251709462,
"type": "decision",
"content": "Harden generated workflows with repair-aware retry instead of fail-fast: Harden generated workflows with repair-aware retry instead of fail-fast",
"raw": {
"question": "Harden generated workflows with repair-aware retry instead of fail-fast",
"chosen": "Harden generated workflows with repair-aware retry instead of fail-fast",
"alternatives": [],
"reasoning": "Relay now supports deterministic gate repair agents; Ricky should emit workflows that opt into that behavior for ordinary, master, and child workflows so generated workflows do not terminate on repairable checks."
},
"significance": "high"
},
{
"ts": 1778252041693,
"type": "reflection",
"content": "Ricky generator now emits repair-aware retry for ordinary, master, and child workflows; pipeline tests cover code, doc, low-risk, and master shapes; local auto-fix and full suite are green after syncing package proof script allowlist.",
"raw": {
"confidence": 0.9
},
"significance": "high",
"tags": [
"confidence:0.9"
]
}
]
}
],
"retrospective": {
"summary": "Hardened Ricky workflow generation so generated workflows opt into repair-aware retry with repairAgent/repairRetries, added validation and generation tests across code, doc, low-risk, master, and child workflow shapes, kept local auto-fix coverage green, and synced package proof/docs for existing eval scripts so the full suite passes.",
"approach": "Standard approach",
"confidence": 0.92
},
"commits": [],
"filesChanged": [],
"projectId": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail",
"tags": [],
"_trace": {
"startRef": "33549385e357061346be25e7be0c64d49abdfef9",
"endRef": "33549385e357061346be25e7be0c64d49abdfef9"
}
}
32 changes: 32 additions & 0 deletions .trajectories/completed/2026-05/traj_2f8sfg3akql2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Trajectory: Harden Ricky workflow never-fail coverage

> **Status:** ✅ Completed
> **Confidence:** 92%
> **Started:** May 8, 2026 at 04:46 PM
> **Completed:** May 8, 2026 at 04:54 PM

---

## Summary

Hardened Ricky workflow generation so generated workflows opt into repair-aware retry with repairAgent/repairRetries, added validation and generation tests across code, doc, low-risk, master, and child workflow shapes, kept local auto-fix coverage green, and synced package proof/docs for existing eval scripts so the full suite passes.

**Approach:** Standard approach

---

## Key Decisions

### Harden generated workflows with repair-aware retry instead of fail-fast
- **Chose:** Harden generated workflows with repair-aware retry instead of fail-fast
- **Reasoning:** Relay now supports deterministic gate repair agents; Ricky should emit workflows that opt into that behavior for ordinary, master, and child workflows so generated workflows do not terminate on repairable checks.

---

## Chapters

### 1. Work
*Agent: default*

- Harden generated workflows with repair-aware retry instead of fail-fast: Harden generated workflows with repair-aware retry instead of fail-fast
- Ricky generator now emits repair-aware retry for ordinary, master, and child workflows; pipeline tests cover code, doc, low-risk, and master shapes; local auto-fix and full suite are green after syncing package proof script allowlist.
98 changes: 98 additions & 0 deletions .trajectories/completed/2026-05/traj_b77ch3xz99r8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"id": "traj_b77ch3xz99r8",
"version": 1,
"task": {
"title": "Avoid master child workflow false terminal failures"
},
"status": "completed",
"startedAt": "2026-05-08T15:04:46.241Z",
"completedAt": "2026-05-08T15:12:41.150Z",
"agents": [
{
"name": "default",
"role": "lead",
"joinedAt": "2026-05-08T15:12:30.504Z"
}
],
"chapters": [
{
"id": "chap_c2qwv9dhlskk",
"title": "Work",
"agentName": "default",
"startedAt": "2026-05-08T15:12:30.504Z",
"endedAt": "2026-05-08T15:12:41.150Z",
"events": [
{
"ts": 1778253150505,
"type": "decision",
"content": "Keep nested Ricky child auto-fix enabled from master workflows: Keep nested Ricky child auto-fix enabled from master workflows",
"raw": {
"question": "Keep nested Ricky child auto-fix enabled from master workflows",
"chosen": "Keep nested Ricky child auto-fix enabled from master workflows",
"alternatives": [],
"reasoning": "The cloud failure showed master-generated child runs using --no-auto-fix, which prevented the child workflow from repairing its own deterministic blocker before the master failed."
},
"significance": "high"
},
{
"ts": 1778253150534,
"type": "decision",
"content": "Make generated child final validation non-terminal: Make generated child final validation non-terminal",
"raw": {
"question": "Make generated child final validation non-terminal",
"chosen": "Make generated child final validation non-terminal",
"alternatives": [],
"reasoning": "Parallel child workflows can observe temporary integrated-repo typecheck failures caused by sibling slices; the master final validation should own the hard integrated check after all child signoffs."
},
"significance": "high"
},
{
"ts": 1778253150554,
"type": "decision",
"content": "Retry after workflow repair provider exceptions: Retry after workflow repair provider exceptions",
"raw": {
"question": "Retry after workflow repair provider exceptions",
"chosen": "Retry after workflow repair provider exceptions",
"alternatives": [],
"reasoning": "Malformed or missing structured artifacts from the repair persona should consume a bounded retry and resume the workflow, not stop the auto-fix loop after the first attempt."
},
"significance": "high"
},
{
"ts": 1778253156553,
"type": "reflection",
"content": "Generated workflows now keep repair loops active at both master and child layers, and legacy artifacts get deterministic repair for the old no-auto-fix and hard child validation patterns.",
"raw": {
"focalPoints": [
"nested-auto-fix",
"parallel-validation",
"repair-provider-resilience"
],
"adjustments": "Added regression coverage for generation, deterministic legacy repair, and provider exception retry.",
"confidence": 0.9
},
"significance": "high",
"tags": [
"focal:nested-auto-fix",
"focal:parallel-validation",
"focal:repair-provider-resilience",
"confidence:0.9"
]
}
]
}
],
"retrospective": {
"summary": "Updated Ricky workflow generation and auto-fix resilience so generated master workflows keep nested child auto-fix enabled, generated child final validation no longer terminally blocks on parallel sibling repo state, legacy generated artifacts can be deterministically repaired, and repair-provider exceptions trigger bounded retry/resume instead of immediate failure.",
"approach": "Standard approach",
"confidence": 0.9
},
"commits": [],
"filesChanged": [],
"projectId": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail",
"tags": [],
"_trace": {
"startRef": "800ddc84f3a68aa0c7edc6cdcfd513c612d8adf5",
"endRef": "800ddc84f3a68aa0c7edc6cdcfd513c612d8adf5"
}
}
42 changes: 42 additions & 0 deletions .trajectories/completed/2026-05/traj_b77ch3xz99r8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Trajectory: Avoid master child workflow false terminal failures

> **Status:** ✅ Completed
> **Confidence:** 90%
> **Started:** May 8, 2026 at 05:04 PM
> **Completed:** May 8, 2026 at 05:12 PM

---

## Summary

Updated Ricky workflow generation and auto-fix resilience so generated master workflows keep nested child auto-fix enabled, generated child final validation no longer terminally blocks on parallel sibling repo state, legacy generated artifacts can be deterministically repaired, and repair-provider exceptions trigger bounded retry/resume instead of immediate failure.

**Approach:** Standard approach

---

## Key Decisions

### Keep nested Ricky child auto-fix enabled from master workflows
- **Chose:** Keep nested Ricky child auto-fix enabled from master workflows
- **Reasoning:** The cloud failure showed master-generated child runs using --no-auto-fix, which prevented the child workflow from repairing its own deterministic blocker before the master failed.

### Make generated child final validation non-terminal
- **Chose:** Make generated child final validation non-terminal
- **Reasoning:** Parallel child workflows can observe temporary integrated-repo typecheck failures caused by sibling slices; the master final validation should own the hard integrated check after all child signoffs.

### Retry after workflow repair provider exceptions
- **Chose:** Retry after workflow repair provider exceptions
- **Reasoning:** Malformed or missing structured artifacts from the repair persona should consume a bounded retry and resume the workflow, not stop the auto-fix loop after the first attempt.

---

## Chapters

### 1. Work
*Agent: default*

- Keep nested Ricky child auto-fix enabled from master workflows: Keep nested Ricky child auto-fix enabled from master workflows
- Make generated child final validation non-terminal: Make generated child final validation non-terminal
- Retry after workflow repair provider exceptions: Retry after workflow repair provider exceptions
- Generated workflows now keep repair loops active at both master and child layers, and legacy artifacts get deterministic repair for the old no-auto-fix and hard child validation patterns.
20 changes: 20 additions & 0 deletions .trajectories/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"lastUpdated": "2026-05-08T15:12:41.286Z",
"trajectories": {
"traj_2f8sfg3akql2": {
"title": "Harden Ricky workflow never-fail coverage",
"status": "completed",
"startedAt": "2026-05-08T14:46:04.652Z",
"completedAt": "2026-05-08T14:54:06.222Z",
"path": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail/.trajectories/completed/2026-05/traj_2f8sfg3akql2.json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Trajectory index contains hardcoded absolute local path that breaks on all other machines

The .trajectories/index.json file (newly tracked after removing .trajectories/ from .gitignore) stores the trajectory path as an absolute local filesystem path: /Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail/.trajectories/completed/2026-05/traj_2f8sfg3akql2.json. The trail CLI tool (documented in AGENTS.md:86-170) uses this index to resolve trajectory files via commands like trail show <id> and trail list. On any machine other than the original author's, this path is invalid, making the index functionally broken for trajectory resolution. The same absolute path pattern appears in projectId at .trajectories/completed/2026-05/traj_2f8sfg3akql2.json:59.

Suggested change
"path": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail/.trajectories/completed/2026-05/traj_2f8sfg3akql2.json"
"path": ".trajectories/completed/2026-05/traj_2f8sfg3akql2.json"
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Absolute path in committed index may cause portability issues.

The path field contains an absolute filesystem path (/Users/khaliqgant/Projects/AgentWorkforce/...), which will not work for other developers or in CI environments. Consider using a relative path from the repository root.

🔧 Suggested fix
-      "path": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail/.trajectories/completed/2026-05/traj_2f8sfg3akql2.json"
+      "path": ".trajectories/completed/2026-05/traj_2f8sfg3akql2.json"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"path": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail/.trajectories/completed/2026-05/traj_2f8sfg3akql2.json"
"path": ".trajectories/completed/2026-05/traj_2f8sfg3akql2.json"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.trajectories/index.json at line 10, The index entry contains an absolute
"path" value which breaks portability; update the "path" field in
.trajectories/index.json (the JSON object with key "path") to a relative path
from the repo root (e.g., "
.trajectories/completed/2026-05/traj_2f8sfg3akql2.json") and, if this file is
generated, modify the generator to produce relative paths (use
path.relative(repoRoot, filePath) or equivalent) so all entries use
repository-relative paths instead of user-specific absolute paths.

},
"traj_b77ch3xz99r8": {
"title": "Avoid master child workflow false terminal failures",
"status": "completed",
"startedAt": "2026-05-08T15:04:46.241Z",
"completedAt": "2026-05-08T15:12:41.150Z",
"path": "/Users/khaliqgant/Projects/AgentWorkforce/ricky-workflow-never-fail/.trajectories/completed/2026-05/traj_b77ch3xz99r8.json"
}
}
}
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ Every agent working in this repo must follow these rules when authoring, reviewi
- **Review stage:** Every significant workflow must include review by an agent distinct from the writer when possible. Prefer `writer=codex` with `reviewer=claude`, `writer=claude` with `reviewer=codex`, and both reviewers for critical workflows. Review artifacts for significant workflows must be written under `.workflow-artifacts/`.
- **80-to-100 validation:** Serious implementation workflows must use a soft-gate, fix, hard-gate loop. The fix loop must include a post-fix re-review on the fixed state before final signoff. Passing compile or typecheck alone is not enough.
- **Commit boundaries:** Do not run `git commit` or `git push` from agent steps unless the workflow explicitly owns that boundary and documents the expected files. Each workflow must state the expected branch naming pattern and whether PR creation is in or out of scope. Default branch names should follow `ricky/<wave-or-meta>-<workflow-slug>` unless a nearby spec declares a narrower pattern.
- **PR creation primitive:** When PR creation is in scope, workflows MUST use the agent-relay GitHub primitive (`@agent-relay/github-primitive`) rather than shelling out to `gh pr create`. Use `createGitHubStep` from `@agent-relay/github-primitive/workflow-step` with `action: 'createPR'` for declarative workflow steps, or `GitHubClient.create({ runtime: 'auto' })` with `client.createPR(...)` for imperative use. The primitive handles runtime selection (local `gh` CLI vs Nango cloud vs relay-cloud proxy) and produces structured outputs the orchestrator can chain on. Master/orchestration workflows that complete an end-to-end deliverable SHOULD include a `final-pr` step using this primitive; specs must explicitly opt out if PR creation is not desired.
- **Reviewable wording:** Workflow requirements must be specific enough for grep checks, structural checks, dry-run output, review artifacts, or scoped diff review. Avoid broad prose that cannot be verified by deterministic gates or reviewer inspection.
- **Env loading:** Load `.env.local` and `.env` before `.run(...)` without overwriting exported values. Fail fast with `MISSING_ENV_VAR: <NAME>` before expensive agent steps.
- **Scoped change detection:** After implementation steps, verify the repo changed in the expected scope using `git diff --name-only` plus `git ls-files --others --exclude-standard`, scoped to declared file targets. Do not use repo-wide `git diff --quiet` when unrelated work may be present.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ npm scripts (canonical ordering matches `package.json`):
- `npm test` — bundle the CLI, then run the full test suite and proof tests
- `npm start` — launch the interactive CLI from `src/surfaces/cli/commands/cli-main.ts`
- `npm run dev` — alias for `npm start`
- `npm run evals` — compile and run the Ricky eval suite
- `npm run evals:compile` — compile Ricky eval definitions
- `npm run evals:opencode` — run Ricky evals through the OpenCode executor path
- `npm run evals:list` — list available Ricky evals
- `npm run evals:summary` — summarize the latest Ricky eval results
- `npm run evals:compare` — compare Ricky eval result sets
- `npm run batch` — run workflow batches via `scripts/run-ricky-batch.sh`
- `npm run overnight` — run the overnight workflow queue via `scripts/run-ricky-overnight.sh`
- default queue mode is now `flight-safe`, which only runs the workflows currently classified as unattended-safe
Expand Down
Loading