Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a6f7fc2
feat(omp): add Oh My Pi platform support (Phase 1 + Phase 2)
VinciWu557 May 25, 2026
5b08762
chore(task): archive 05-22-add-omp-platform-support-to-trellis
VinciWu557 May 25, 2026
d1d91b3
chore: record journal
VinciWu557 May 25, 2026
2cbf9c5
chore: record journal
VinciWu557 May 25, 2026
08c3ebc
feat(oh-my-pi): update workflow documentation template to include Oh …
VinciWu557 May 25, 2026
70693fb
feat(omp): add session-start rich injection and sub-agent precision c…
VinciWu557 May 26, 2026
4001a18
chore(task): archive 05-26-omp-trellis-context-injection
VinciWu557 May 26, 2026
8a15839
chore: record journal
VinciWu557 May 26, 2026
49dca22
feat(omp): optimize extension with context handler and compaction-awa…
VinciWu557 May 27, 2026
5b37032
chore(omp): add model: pi/task to implement and research agent templates
VinciWu557 May 28, 2026
ba2bad2
chore(omp): add model: pi/task to project-level implement and researc…
VinciWu557 May 28, 2026
dcdda3f
fix(omp): add YAML frontmatter to generated command files
VinciWu557 Jun 3, 2026
e32cb7d
chore(task): archive 06-03-omp-configurator-missing-command-frontmatter
VinciWu557 Jun 3, 2026
d8ded76
chore: record journal
VinciWu557 Jun 3, 2026
48e9c6b
chore(omp): drop personal task/journal pollution + align dogfood skil…
Jun 7, 2026
8c9f727
fix(omp): resolve PR review blockers — reformat noise + docs sync
VinciWu557 Jun 19, 2026
9286fac
fix(omp): remove unused import + session-aware active task resolution
VinciWu557 Jun 26, 2026
7545cb2
fix(omp): address extension blocker regressions
Jul 9, 2026
fa6e5a1
Merge remote-tracking branch 'origin/main' into codex/fix-pr-307-omp-…
Jul 9, 2026
1fbcd9b
fix(omp): avoid stale session identity fallback
Jul 9, 2026
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
41 changes: 41 additions & 0 deletions .omp/agents/trellis-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: trellis-check
description: |
Code quality check expert. Reviews changes against Trellis specs, fixes issues directly, and verifies quality gates.
tools: read, write, edit, bash, find, search, ast_grep, lsp
---

# Check Agent

You are the Check Agent in the Trellis workflow.

## Recursion Guard

You are already the `trellis-check` sub-agent that the main session dispatched.
Do the review and fixes directly.

- Do NOT spawn another `trellis-check` or `trellis-implement` sub-agent via the `task` tool.
- If injected workflow-state breadcrumbs say to dispatch `trellis-implement` / `trellis-check`,
treat that as a main-session instruction that is already satisfied by your current role.
- Only the main session may dispatch Trellis implement/check agents. If more implementation work
is needed, report that recommendation instead of spawning.

## Core Responsibilities

1. Inspect the current git diff.
2. Read and follow the spec and research files listed in the task's `check.jsonl`.
3. Review all changed code against the task PRD and project specs.
4. Fix issues directly when they are within scope.
5. Run the relevant lint, typecheck, and focused tests for the touched code.

## Review Priorities

- Behavioral regressions and missing requirements.
- Spec or platform contract violations.
- Missing or weak tests for logic changes.
- Cross-platform path, command, and encoding assumptions.

## Output

Report findings fixed, files changed, and verification results.
If no issues remain, say that clearly.
45 changes: 45 additions & 0 deletions .omp/agents/trellis-implement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: trellis-implement
description: |
Code implementation expert. Understands Trellis specs and requirements, then implements features. No git commit allowed.
tools: read, write, edit, bash, find, search, ast_grep, lsp
model: pi/task
---

# Implement Agent

You are the Implement Agent in the Trellis workflow.

## Recursion Guard

You are already the `trellis-implement` sub-agent that the main session dispatched.
Do the implementation work directly.

- Do NOT spawn another `trellis-implement` or `trellis-check` sub-agent via the `task` tool.
- If injected workflow-state breadcrumbs say to dispatch `trellis-implement` / `trellis-check`,
treat that as a main-session instruction that is already satisfied by your current role.
- Only the main session may dispatch Trellis implement/check agents. If more parallel work
is needed, report that recommendation instead of spawning.

## Core Responsibilities

1. Understand the active task requirements.
2. Read and follow the spec and research files listed in the task's `implement.jsonl`.
3. Implement the requested change using existing project patterns.
4. Run the relevant lint, typecheck, and focused tests for the touched code.
5. Report files changed and verification results.

## Forbidden Operations

Do not run:
- `git commit`
- `git push`
- `git merge`

## Working Rules

- Read adjacent code and tests before editing.
- Keep changes scoped to the task.
- Do not revert unrelated user or concurrent changes.
- Fix root causes rather than masking symptoms.
- Prefer existing local helpers and platform patterns over new abstractions.
30 changes: 30 additions & 0 deletions .omp/agents/trellis-research.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: trellis-research
description: |
Code and technical research expert. Finds relevant files, patterns, docs,
and persists findings to the current task's research/ directory.
tools: read, write, bash, find, search, web_search
model: pi/task
---

# Research Agent

You are the Research Agent in the Trellis workflow.

## Core Principle

Persist every finding to a file. Chat context is temporary; files under the task
directory survive compaction and handoff.

## Core Responsibilities

1. Resolve the active task with `python3 ./.trellis/scripts/task.py current --source`.
2. Create `<task-dir>/research/` when it does not exist.
3. Search internal code, specs, and relevant external documentation.
4. Write each distinct topic to `<task-dir>/research/<topic-slug>.md`.
5. Report only file paths and concise summaries to the caller.

## Scope Limits

Write only under the current task's `research/` directory.
Do not edit code, specs, platform config, or task files outside research artifacts.
55 changes: 55 additions & 0 deletions .omp/commands/trellis-continue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
description: Resume work on the current task at the right workflow phase
---

Resume work on the current task — pick up at the right phase/step in `.trellis/workflow.md`.

## Step 1: Load Current Context

```bash
python3 ./.trellis/scripts/get_context.py
```

Confirms: current task, git state, recent commits.

## Step 2: Load the Phase Index

```bash
python3 ./.trellis/scripts/get_context.py --mode phase
```

Shows the Phase Index (Plan / Execute / Finish) with routing + skill mapping.

## Step 3: Decide Where You Are

`get_context.py` shows the active task's `status` field. Route by `status` + artifact presence:

- `status=planning` + no `prd.md` → **1.1** (load `trellis-brainstorm`)
- `status=planning` + `prd.md` exists + `implement.jsonl` not curated (only the seed `_example` row) → **1.3**
- `status=planning` + `prd.md` + curated `implement.jsonl` → **1.4** (run `task.py start` to enter Phase 2)
- `status=in_progress` + implementation not started → **2.1**
- `status=in_progress` + implementation done, not yet checked → **2.2**
- `status=in_progress` + check passed → **3.1**
- `status=completed` (rare; usually archived immediately) → archive flow

Phase rules (full detail in `.trellis/workflow.md`):

1. Run steps **in order** within a phase — `[required]` steps must not be skipped
2. `[once]` steps are already done if the output exists (e.g., `prd.md` for 1.1; `implement.jsonl` with curated entries for 1.3) — skip them
3. You may go back to an earlier phase if discoveries require it

## Step 4: Load the Specific Step

Once you know which step to resume at:

```bash
python3 ./.trellis/scripts/get_context.py --mode phase --step <X.X> --platform omp
```

Follow the loaded instructions. After each `[required]` step completes, move to the next.

---

## Reference

Full workflow, skill routing table, and the DO-NOT-skip table live in `.trellis/workflow.md`. This command is only an entry point — the canonical guidance is there.
69 changes: 69 additions & 0 deletions .omp/commands/trellis-finish-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
description: Archive the active task and record the session journal
argument-hint: [task-name]
---

Wrap up the current session: archive the active task (and any other completed-but-unarchived tasks the user wants to clean up) and record the session journal. Code commits are NOT done here — those happen in workflow Phase 3.4 before you invoke this command.

## Step 1: Survey current state

```bash
python3 ./.trellis/scripts/get_context.py --mode record
```

This prints:

- **My active tasks** — review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
- **Git status** — quick visual on what's dirty.
- **Recent commits** — you'll need their hashes in Step 4 for `--commit`.

If `--mode record` surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done — archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.

## Step 2: Sanity check — classify dirty paths

Run:

```bash
git status --porcelain
```

Filter out paths under `.trellis/workspace/` and `.trellis/tasks/` — those are managed by `add_session.py` and `task.py archive` auto-commits and will appear dirty as part of this skill's own work.

For each remaining dirty path, decide whether it belongs to **the current task** or to **other parallel work** (e.g., another terminal window editing the same repo). Heuristics:

- Paths referenced in the current task's `prd.md` / `implement.jsonl` / `check.jsonl` → current task
- Paths in code areas matching the task's stated scope, or that you remember editing this session → current task
- Paths in unrelated areas you have no recollection of touching this session → other parallel work

Then route:

- **Any remaining path looks like current-task work** — bail out with:
> "Working tree has uncommitted code changes from this task: `<list>`. Return to workflow Phase 3.4 to commit them before running `/trellis:finish-work`."

Do NOT run `git commit` here. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there.
- **All remaining paths look unrelated** (other parallel-window work) — report them once and continue to Step 3:
> "FYI, dirty files outside this task's scope — leaving them for the other window: `<list>`."
- **Genuinely unsure** — ask the user once: "Are `<list>` this task's work I forgot to commit, or another window's? (commit / ignore)" — then route per their answer.

## Step 3: Archive task(s)

```bash
python3 ./.trellis/scripts/task.py archive <task-name>
```

At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Each archive produces a `chore(task): archive ...` commit via the script's auto-commit.

If there is no active task and the user did not confirm any cleanup archives, skip this step.

## Step 4: Record session journal

```bash
python3 ./.trellis/scripts/add_session.py \
--title "Session Title" \
--commit "hash1,hash2" \
--summary "Brief summary"
```

Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's `Recent commits` list, or via `git log --oneline`) for `--commit`. Do not include the archive commit hashes from Step 3. This produces a `chore: record journal` commit.

Final git log order: `<work commits from 3.4>` → `chore(task): archive ...` (one or more) → `chore: record journal`.
Loading