pattyeng 1.0.4 → 1.0.7
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/README.md +103 -43
- package/bin/pattyeng.js +25 -14
- package/lib/skills.js +198 -0
- package/lib/upgrade.js +46 -0
- package/package.json +5 -3
- package/skills/.system/.codex-system-skills.marker +1 -0
- package/skills/.system/imagegen/LICENSE.txt +201 -0
- package/skills/.system/imagegen/SKILL.md +356 -0
- package/skills/.system/imagegen/agents/openai.yaml +6 -0
- package/skills/.system/imagegen/assets/imagegen-small.svg +5 -0
- package/skills/.system/imagegen/assets/imagegen.png +0 -0
- package/skills/.system/imagegen/references/cli.md +242 -0
- package/skills/.system/imagegen/references/codex-network.md +33 -0
- package/skills/.system/imagegen/references/image-api.md +90 -0
- package/skills/.system/imagegen/references/prompting.md +118 -0
- package/skills/.system/imagegen/references/sample-prompts.md +433 -0
- package/skills/.system/imagegen/scripts/image_gen.py +995 -0
- package/skills/.system/imagegen/scripts/remove_chroma_key.py +440 -0
- package/skills/.system/openai-docs/LICENSE.txt +201 -0
- package/skills/.system/openai-docs/SKILL.md +167 -0
- package/skills/.system/openai-docs/agents/openai.yaml +14 -0
- package/skills/.system/openai-docs/assets/openai-small.svg +3 -0
- package/skills/.system/openai-docs/assets/openai.png +0 -0
- package/skills/.system/openai-docs/references/latest-model.md +37 -0
- package/skills/.system/openai-docs/references/prompting-guide.md +244 -0
- package/skills/.system/openai-docs/references/upgrade-guide.md +181 -0
- package/skills/.system/openai-docs/scripts/fetch-codex-manual.mjs +598 -0
- package/skills/.system/openai-docs/scripts/resolve-latest-model-info.js +147 -0
- package/skills/.system/plugin-creator/SKILL.md +243 -0
- package/skills/.system/plugin-creator/agents/openai.yaml +6 -0
- package/skills/.system/plugin-creator/assets/plugin-creator-small.svg +3 -0
- package/skills/.system/plugin-creator/assets/plugin-creator.png +0 -0
- package/skills/.system/plugin-creator/references/installing-and-updating.md +143 -0
- package/skills/.system/plugin-creator/references/plugin-json-spec.md +194 -0
- package/skills/.system/plugin-creator/scripts/create_basic_plugin.py +324 -0
- package/skills/.system/plugin-creator/scripts/read_marketplace_name.py +48 -0
- package/skills/.system/plugin-creator/scripts/update_plugin_cachebuster.py +78 -0
- package/skills/.system/plugin-creator/scripts/validate_plugin.py +586 -0
- package/skills/.system/skill-creator/SKILL.md +416 -0
- package/skills/.system/skill-creator/agents/openai.yaml +5 -0
- package/skills/.system/skill-creator/assets/skill-creator-small.svg +3 -0
- package/skills/.system/skill-creator/assets/skill-creator.png +0 -0
- package/skills/.system/skill-creator/license.txt +202 -0
- package/skills/.system/skill-creator/references/openai_yaml.md +49 -0
- package/skills/.system/skill-creator/scripts/generate_openai_yaml.py +226 -0
- package/skills/.system/skill-creator/scripts/init_skill.py +400 -0
- package/skills/.system/skill-creator/scripts/quick_validate.py +101 -0
- package/skills/.system/skill-installer/LICENSE.txt +202 -0
- package/skills/.system/skill-installer/SKILL.md +58 -0
- package/skills/.system/skill-installer/agents/openai.yaml +5 -0
- package/skills/.system/skill-installer/assets/skill-installer-small.svg +3 -0
- package/skills/.system/skill-installer/assets/skill-installer.png +0 -0
- package/skills/.system/skill-installer/scripts/github_utils.py +21 -0
- package/skills/.system/skill-installer/scripts/install-skill-from-github.py +308 -0
- package/skills/.system/skill-installer/scripts/list-skills.py +107 -0
- package/skills/cap/SKILL.md +77 -0
- package/skills/caveman/SKILL.md +49 -0
- package/skills/code-review/SKILL.md +46 -0
- package/skills/codebook/SKILL.md +184 -0
- package/skills/doc-review/SKILL.md +147 -0
- package/skills/feature-research/SKILL.md +34 -0
- package/skills/file-op/SKILL.md +116 -0
- package/skills/grill-me/SKILL.md +10 -0
- package/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
- package/skills/grill-with-docs/SKILL.md +88 -0
- package/skills/handoff/SKILL.md +17 -0
- package/skills/improve-codebase/SKILL.md +79 -0
- package/skills/linear/SKILL.md +107 -0
- package/skills/next-step/SKILL.md +61 -0
- package/skills/no-reinvent/SKILL.md +131 -0
- package/skills/no-wall/SKILL.md +146 -0
- package/skills/online/SKILL.md +54 -0
- package/skills/plan-review/SKILL.md +55 -0
- package/skills/professional/SKILL.md +111 -0
- package/skills/promise-tracking/SKILL.md +131 -0
- package/skills/prove/SKILL.md +135 -0
- package/skills/read-before-write/SKILL.md +123 -0
- package/skills/review/SKILL.md +78 -0
- package/skills/review-mp/SKILL.md +78 -0
- package/skills/scope-boundary/SKILL.md +121 -0
- package/skills/semble-search/SKILL.md +40 -0
- package/skills/sitrep/SKILL.md +126 -0
- package/skills/structure-code/SKILL.md +116 -0
- package/skills/surface-assumptions/SKILL.md +139 -0
- package/skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/skills/teach/MISSION-FORMAT.md +31 -0
- package/skills/teach/RESOURCES-FORMAT.md +32 -0
- package/skills/teach/SKILL.md +131 -0
- package/skills/team-protocol/SKILL.md +172 -0
- package/skills/tech-lead/SKILL.md +332 -0
- package/skills/to-issues/SKILL.md +83 -0
- package/skills/to-prd/SKILL.md +74 -0
- package/skills/vectorbt-expert/SKILL.md +253 -0
- package/skills/verify-done/SKILL.md +128 -0
- package/skills/work-log/SKILL.md +141 -0
- package/skills/work-log/template.html +496 -0
- package/skills/zoom-out/SKILL.md +7 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review
|
|
7
|
+
|
|
8
|
+
Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
|
|
9
|
+
|
|
10
|
+
- **Standards** — does the code conform to this repo's documented coding standards?
|
|
11
|
+
- **Spec** — does the code faithfully implement the originating issue / PRD / spec?
|
|
12
|
+
|
|
13
|
+
Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings.
|
|
14
|
+
|
|
15
|
+
The issue tracker should have been provided to you — run `/setup-matt-pocock-skills` if `docs/agents/issue-tracker.md` is missing.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### 1. Pin the fixed point
|
|
20
|
+
|
|
21
|
+
Whatever the user said is the fixed point — a commit SHA, branch name, tag, `main`, `HEAD~5`, etc. Don't be opinionated; pass it through. If they didn't specify one, ask: "Review against what — a branch, a commit, or `main`?" Don't proceed until you have it.
|
|
22
|
+
|
|
23
|
+
Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`.
|
|
24
|
+
|
|
25
|
+
### 2. Identify the spec source
|
|
26
|
+
|
|
27
|
+
Look for the originating spec, in this order:
|
|
28
|
+
|
|
29
|
+
1. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.) — fetch via the workflow in `docs/agents/issue-tracker.md`.
|
|
30
|
+
2. A path the user passed as an argument.
|
|
31
|
+
3. A PRD/spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature.
|
|
32
|
+
4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
|
|
33
|
+
|
|
34
|
+
### 3. Identify the standards sources
|
|
35
|
+
|
|
36
|
+
Anything in the repo that documents how code should be written. Common locations:
|
|
37
|
+
|
|
38
|
+
- `CLAUDE.md`, `AGENTS.md`
|
|
39
|
+
- `CONTRIBUTING.md`
|
|
40
|
+
- `CONTEXT.md`, `CONTEXT-MAP.md`, per-context `CONTEXT.md` files
|
|
41
|
+
- `docs/adr/` (architectural decisions are standards)
|
|
42
|
+
- `.editorconfig`, `eslint.config.*`, `biome.json`, `prettier.config.*`, `tsconfig.json` (machine-enforced standards — note them but don't re-check what tooling already checks)
|
|
43
|
+
- Any `STYLE.md`, `STANDARDS.md`, `STYLEGUIDE.md`, or similar at the repo root or under `docs/`
|
|
44
|
+
|
|
45
|
+
Collect the list of files. The **Standards** sub-agent will read them.
|
|
46
|
+
|
|
47
|
+
### 4. Spawn both sub-agents in parallel
|
|
48
|
+
|
|
49
|
+
Send a single message with two `Agent` tool calls. Use the `general-purpose` subagent for both.
|
|
50
|
+
|
|
51
|
+
**Standards sub-agent prompt** — include:
|
|
52
|
+
|
|
53
|
+
- The full diff command and commit list.
|
|
54
|
+
- The list of standards-source files you found in step 3.
|
|
55
|
+
- The brief: "Read the standards docs. Then read the diff. Report — per file/hunk where relevant — every place the diff violates a documented standard. Cite the standard (file + the rule). Distinguish hard violations from judgement calls. Skip anything tooling enforces. Under 400 words."
|
|
56
|
+
|
|
57
|
+
**Spec sub-agent prompt** — include:
|
|
58
|
+
|
|
59
|
+
- The diff command and commit list.
|
|
60
|
+
- The path or fetched contents of the spec.
|
|
61
|
+
- The brief: "Read the spec. Then read the diff. Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."
|
|
62
|
+
|
|
63
|
+
If the spec is missing, skip the Spec sub-agent and note this in the final report.
|
|
64
|
+
|
|
65
|
+
### 5. Aggregate
|
|
66
|
+
|
|
67
|
+
Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings — the two axes are deliberately separate so the user can see them independently.
|
|
68
|
+
|
|
69
|
+
End with a one-line summary: total findings per axis, and the worst single issue (if any) flagged.
|
|
70
|
+
|
|
71
|
+
## Why two axes
|
|
72
|
+
|
|
73
|
+
A change can pass one axis and fail the other:
|
|
74
|
+
|
|
75
|
+
- Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
|
|
76
|
+
- Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
|
|
77
|
+
|
|
78
|
+
Reporting them separately stops one axis from masking the other.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-mp
|
|
3
|
+
description: Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review
|
|
7
|
+
|
|
8
|
+
Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
|
|
9
|
+
|
|
10
|
+
- **Standards** — does the code conform to this repo's documented coding standards?
|
|
11
|
+
- **Spec** — does the code faithfully implement the originating issue / PRD / spec?
|
|
12
|
+
|
|
13
|
+
Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings.
|
|
14
|
+
|
|
15
|
+
The issue tracker should have been provided to you — run `/setup-matt-pocock-skills` if `docs/agents/issue-tracker.md` is missing.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### 1. Pin the fixed point
|
|
20
|
+
|
|
21
|
+
Whatever the user said is the fixed point — a commit SHA, branch name, tag, `main`, `HEAD~5`, etc. Don't be opinionated; pass it through. If they didn't specify one, ask: "Review against what — a branch, a commit, or `main`?" Don't proceed until you have it.
|
|
22
|
+
|
|
23
|
+
Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`.
|
|
24
|
+
|
|
25
|
+
### 2. Identify the spec source
|
|
26
|
+
|
|
27
|
+
Look for the originating spec, in this order:
|
|
28
|
+
|
|
29
|
+
1. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.) — fetch via the workflow in `docs/agents/issue-tracker.md`.
|
|
30
|
+
2. A path the user passed as an argument.
|
|
31
|
+
3. A PRD/spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature.
|
|
32
|
+
4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
|
|
33
|
+
|
|
34
|
+
### 3. Identify the standards sources
|
|
35
|
+
|
|
36
|
+
Anything in the repo that documents how code should be written. Common locations:
|
|
37
|
+
|
|
38
|
+
- `CLAUDE.md`, `AGENTS.md`
|
|
39
|
+
- `CONTRIBUTING.md`
|
|
40
|
+
- `CONTEXT.md`, `CONTEXT-MAP.md`, per-context `CONTEXT.md` files
|
|
41
|
+
- `docs/adr/` (architectural decisions are standards)
|
|
42
|
+
- `.editorconfig`, `eslint.config.*`, `biome.json`, `prettier.config.*`, `tsconfig.json` (machine-enforced standards — note them but don't re-check what tooling already checks)
|
|
43
|
+
- Any `STYLE.md`, `STANDARDS.md`, `STYLEGUIDE.md`, or similar at the repo root or under `docs/`
|
|
44
|
+
|
|
45
|
+
Collect the list of files. The **Standards** sub-agent will read them.
|
|
46
|
+
|
|
47
|
+
### 4. Spawn both sub-agents in parallel
|
|
48
|
+
|
|
49
|
+
Send a single message with two `Agent` tool calls. Use the `general-purpose` subagent for both.
|
|
50
|
+
|
|
51
|
+
**Standards sub-agent prompt** — include:
|
|
52
|
+
|
|
53
|
+
- The full diff command and commit list.
|
|
54
|
+
- The list of standards-source files you found in step 3.
|
|
55
|
+
- The brief: "Read the standards docs. Then read the diff. Report — per file/hunk where relevant — every place the diff violates a documented standard. Cite the standard (file + the rule). Distinguish hard violations from judgement calls. Skip anything tooling enforces. Under 400 words."
|
|
56
|
+
|
|
57
|
+
**Spec sub-agent prompt** — include:
|
|
58
|
+
|
|
59
|
+
- The diff command and commit list.
|
|
60
|
+
- The path or fetched contents of the spec.
|
|
61
|
+
- The brief: "Read the spec. Then read the diff. Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."
|
|
62
|
+
|
|
63
|
+
If the spec is missing, skip the Spec sub-agent and note this in the final report.
|
|
64
|
+
|
|
65
|
+
### 5. Aggregate
|
|
66
|
+
|
|
67
|
+
Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings — the two axes are deliberately separate so the user can see them independently.
|
|
68
|
+
|
|
69
|
+
End with a one-line summary: total findings per axis, and the worst single issue (if any) flagged.
|
|
70
|
+
|
|
71
|
+
## Why two axes
|
|
72
|
+
|
|
73
|
+
A change can pass one axis and fail the other:
|
|
74
|
+
|
|
75
|
+
- Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
|
|
76
|
+
- Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
|
|
77
|
+
|
|
78
|
+
Reporting them separately stops one axis from masking the other.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scope-boundary
|
|
3
|
+
description: 'Use when the agent is mid-conversation, about to declare done, transition, or move on — especially after a long stretch of work. Forces the agent to name the original ask and check whether the work delivered still matches it, surface any drift explicitly, and get user sign-off before continuing with the drifted scope. Catches the failure mode where the agent expands into adjacent work or shifts to a different sub-task without telling the user.'
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Scope Boundary
|
|
8
|
+
|
|
9
|
+
## What this does
|
|
10
|
+
|
|
11
|
+
Before declaring done, transitioning, or moving on, you name the original ask — what the user actually requested — and check whether the work you're about to ship still matches it. If you've drifted (added adjacent work, shifted to a different sub-task, expanded scope), you surface the drift explicitly and get sign-off before continuing.
|
|
12
|
+
|
|
13
|
+
This skill exists because **scope drift is the most natural form of long-task failure.** The agent starts working on X, encounters an interesting Y, follows the thread, ends up delivering Y (or X + Y) when the user asked for X. None of the existing skills catch this: `surface-assumptions` is *before* work, `verify-done` is *at* completion (and only checks the work against the plan, not against the *original ask*).
|
|
14
|
+
|
|
15
|
+
## Authority
|
|
16
|
+
|
|
17
|
+
This skill is authoritative. The agent cannot silently expand or shift scope. Acknowledging the skill and then continuing with drift is the violation, not compliance.
|
|
18
|
+
|
|
19
|
+
If you want to deviate from the original ask, the protocol is: surface the drift explicitly, explain why, get user sign-off. Not to silently expand.
|
|
20
|
+
|
|
21
|
+
**Acknowledging the skill and then doing the drift anyway is the violation, not compliance.** Sentences like *"I understand scope-boundary, but Y was the natural next step"* are the same dismissal pattern as `no-wall`'s *"I understand the skill but I have no other way."* Surface; wait for sign-off; no sign-off → revert to the original ask.
|
|
22
|
+
|
|
23
|
+
## When it applies
|
|
24
|
+
|
|
25
|
+
Triggered by:
|
|
26
|
+
- About to write "done", "complete", "moving on", "next phase", "wrapping this up", "shipping this", or close a goal
|
|
27
|
+
- After a long stretch of work (more than 5–10 exchanges on one task) without re-checking alignment
|
|
28
|
+
- About to start a new sub-task within a larger task
|
|
29
|
+
- The user asks "are you still doing what I asked?" or "did you drift from what I asked?"
|
|
30
|
+
- You feel the urge to say "I also did X while I was at it" or "I added Y because it was related"
|
|
31
|
+
|
|
32
|
+
## The Protocol
|
|
33
|
+
|
|
34
|
+
When triggered, run these steps **in order, in writing, in the conversation**.
|
|
35
|
+
|
|
36
|
+
### 1. Name the original ask
|
|
37
|
+
Quote or paraphrase the user's request. "The user asked for {X}." If you can't recall the original ask clearly, look it up — it's in the conversation, the work-log, or the plan. Don't drift from something you can't even name.
|
|
38
|
+
|
|
39
|
+
### 2. Check the current work against it
|
|
40
|
+
List what you've actually done (or are about to do). For each item, classify:
|
|
41
|
+
- **In scope** — directly requested, or a clearly implied sub-task
|
|
42
|
+
- **Adjacent** — related but not requested; you decided to do it
|
|
43
|
+
- **Drift** — unrelated to the original ask; you shifted focus
|
|
44
|
+
|
|
45
|
+
If everything is "in scope" → proceed. If any item is "adjacent" or "drift" → continue to step 3.
|
|
46
|
+
|
|
47
|
+
### 3. Surface the drift
|
|
48
|
+
For each adjacent or drift item, ask the user explicitly. The format:
|
|
49
|
+
|
|
50
|
+
> "You asked for {X}. I did {X, Y, Z}. Y was related but not requested; Z was unrelated drift. Should I:
|
|
51
|
+
> - Keep Y, drop Z?
|
|
52
|
+
> - Keep both, get sign-off now?
|
|
53
|
+
> - Drop both, revert to just X?"
|
|
54
|
+
|
|
55
|
+
Don't ask "is this okay?" rhetorically. Ask the specific scope question.
|
|
56
|
+
|
|
57
|
+
### 4. Get sign-off
|
|
58
|
+
Wait for the user's response. If they confirm → proceed. If they correct → revert or adjust, re-run step 2.
|
|
59
|
+
|
|
60
|
+
Implicit silence is not sign-off. Wait.
|
|
61
|
+
|
|
62
|
+
### 5. Log (if armed)
|
|
63
|
+
If `work-log` is armed, append a checkpoint: *"## {HH:MM KST} — Scope check: {state, in-scope, dropped Y, kept Z}"*. This makes the scope decision auditable.
|
|
64
|
+
|
|
65
|
+
## Behavior in edge cases
|
|
66
|
+
|
|
67
|
+
- **The user explicitly invited the expansion:** "while you're at it, also fix X" — that's sign-off for X. Note it in the log; proceed.
|
|
68
|
+
- **The sub-task is genuinely implicit:** the user said "implement auth" and you had to add a session table; the session table is in-scope as a sub-task of "implement auth". The implicit-test is **strict**: "implicit" means the user used words that, taken literally, require X as a sub-step, OR X is in a written-down spec/plan/PRD the user references. A session table is implicit in "implement auth" because auth has sessions by definition. A `format_phone_number()` helper is NOT implicit in "implement auth" — that's adjacent, surface it. If unsure → surface.
|
|
69
|
+
- **The drift is small (a one-line bonus fix):** if it's <5 lines and purely mechanical, log it and proceed without asking. If it has any logic or behavior implications, surface it.
|
|
70
|
+
- **The user said "do whatever you think is right":** that's wide sign-off. Use judgment, but log what you did and why so the user can correct after the fact.
|
|
71
|
+
- **You caught yourself mid-drift:** surface the drift retroactively. *"I was doing X, but I noticed Y and started working on it — should I continue, drop it, or split the work?"* Don't continue the drift while you ask.
|
|
72
|
+
|
|
73
|
+
## Write-Time Self-Check
|
|
74
|
+
|
|
75
|
+
Before sending any message that says "done", "complete", "moving on", "next phase", "wrapping this up", "shipping this", or closes a goal, scan it for these patterns:
|
|
76
|
+
|
|
77
|
+
- "I also did X" / "while I was at it, I also..." / "I added Y because it was related" (silent scope expansion — surface Y before sending)
|
|
78
|
+
- "I fixed the bug I noticed" (drift from the task to a different bug — surface it)
|
|
79
|
+
- "I noticed X and decided to address it" (drift framed as helpful — surface it)
|
|
80
|
+
- "Done — that included X, Y, Z" (delivered Y or Z without asking — check whether Y/Z were in scope)
|
|
81
|
+
- "I went ahead and refactored X" (silent architectural change — surface it)
|
|
82
|
+
|
|
83
|
+
If any pattern is present, the scope may have drifted. **Do not send.** Re-run the protocol — name the ask, classify the work, surface the drift — then send.
|
|
84
|
+
|
|
85
|
+
## Override Protocol — what you may NOT do unilaterally
|
|
86
|
+
|
|
87
|
+
You may not expand or shift scope based on agent judgment. Specifically:
|
|
88
|
+
|
|
89
|
+
- You may not add "related" or "while I was at it" work without surfacing it first.
|
|
90
|
+
- You may not follow a thread that surfaced during the task without asking whether the user wants it.
|
|
91
|
+
- You may not deliver a different sub-task than what was requested without surfacing the swap.
|
|
92
|
+
- You may not dismiss the skill ("I understand scope-boundary, but Y was the natural next step") and proceed. That's the violation, not the protocol.
|
|
93
|
+
|
|
94
|
+
If you want to deviate, the protocol is: surface the drift, explain why, get sign-off. Without sign-off, revert to the original ask.
|
|
95
|
+
|
|
96
|
+
## Red Flags
|
|
97
|
+
|
|
98
|
+
| Thought | What it really means |
|
|
99
|
+
|---------|----------------------|
|
|
100
|
+
| "While I was at it, I also..." | Silent scope expansion — surface Y first |
|
|
101
|
+
| "This was the natural next step" | I'm justifying drift with momentum |
|
|
102
|
+
| "I noticed a related issue and fixed it" | Drift framed as helpfulness — surface it |
|
|
103
|
+
| "Done — that included X, Y, Z" | I delivered Y or Z without asking; the user may not want them |
|
|
104
|
+
| "I'll address that in a follow-up" | I noticed drift but won't fix it now — that's promise-tracking, not scope |
|
|
105
|
+
| "I went ahead and refactored" | Silent architectural change — surface it |
|
|
106
|
+
| Continuing the drifted work while "asking" | I'm not actually asking, I'm reporting after the fact |
|
|
107
|
+
| "I understand scope-boundary, but..." | Dismissing the skill mid-piece (same as `no-wall` / `professional`) |
|
|
108
|
+
|
|
109
|
+
## The deeper point
|
|
110
|
+
|
|
111
|
+
Drift feels productive. The agent is doing work, the work is good, why interrupt to ask? Because the user is the only one who can decide whether Y was wanted. The agent's judgment that Y is "related" or "the natural next step" is a guess — and the same guess that produced the drift in the first place. The check is cheap (one sentence, one question); the cost of unwinding drift is hours.
|
|
112
|
+
|
|
113
|
+
`surface-assumptions` governs hidden assumptions at the start. `scope-boundary` governs hidden expansions during the work. Same discipline at different moments: name what's unstated, surface it, get sign-off.
|
|
114
|
+
|
|
115
|
+
## Related
|
|
116
|
+
|
|
117
|
+
- **`surface-assumptions`** — runs *before* work; scope-boundary runs *during* work. surface-assumptions enumerates; scope-boundary detects drift.
|
|
118
|
+
- **`verify-done`** — runs *at* completion; scope-boundary is a pre-completion check. verify-done checks the checklist; scope-boundary checks the original ask.
|
|
119
|
+
- **`work-log`** — open promises and dropped scope are checkpoint entries; promise-tracking is the dedicated skill.
|
|
120
|
+
- **`team-protocol`** — one loop per piece; scope-boundary keeps each piece scoped to the original ask.
|
|
121
|
+
- **`no-wall`** / **`professional`** — same dismissal pattern; scope-boundary is one more place the "I understand but..." pattern bites.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: semble-search
|
|
3
|
+
description: Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Bash/Read for any semantic or exploratory question.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use `semble search` to find code by describing what it does or naming a symbol/identifier, instead of grep:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
semble search "authentication flow" ./my-project --max-snippet-lines 10 # first 10 lines only, concise
|
|
10
|
+
semble search "save_pretrained" ./my-project # full chunk content
|
|
11
|
+
semble search "save model to disk" ./my-project --top-k 10 # more results
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Results are cached automatically on first run and invalidated when files change.
|
|
15
|
+
|
|
16
|
+
Use `--content docs` to search documentation and prose, `--content config` for config files (yaml, toml, etc.), or `--content all` to search code, docs, and config:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
semble search "deployment guide" ./my-project --content docs
|
|
20
|
+
semble search "database host port" ./my-project --content config
|
|
21
|
+
semble search "authentication" ./my-project --content all
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use `semble find-related` to discover code similar to a known location (pass `file_path` and `line` from a prior search result):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
semble find-related src/auth.py 42 ./my-project
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`path` defaults to the current directory when omitted; git URLs are accepted.
|
|
31
|
+
|
|
32
|
+
If `semble` is not on `$PATH`, use `uvx --from "semble[mcp]" semble` in its place.
|
|
33
|
+
|
|
34
|
+
### Workflow
|
|
35
|
+
|
|
36
|
+
1. Start with `semble search` to find relevant chunks. The index is built and cached automatically.
|
|
37
|
+
2. Use `--content docs` for documentation, `--content config` for config files, or `--content all` for everything.
|
|
38
|
+
3. Navigate directly to the returned file and line. Do not re-search or grep for the same content.
|
|
39
|
+
4. Optionally use `semble find-related` with a promising result's `file_path` and `line` to discover related implementations.
|
|
40
|
+
5. Use grep only when you need every occurrence of a literal string across the whole repo (e.g., all callers of a renamed function).
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sitrep
|
|
3
|
+
description: Use when the user asks "do you understand?", "what's going on?", "what's the situation?", "catch me up", "are you with me?", "give me the situation and next actions", or runs /sitrep — first grounds itself in real project state (latest worklogs, commits, handoffs, recently-touched docs), then produces a situation report (current state, goal, assumptions, open questions, next actions) and PAUSES for confirmation before doing anything.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sitrep (situation report)
|
|
7
|
+
|
|
8
|
+
## What this does
|
|
9
|
+
|
|
10
|
+
Stop. Re-read the conversation. **Then ground yourself in the real project state** — the latest worklogs, recent commits, the latest handoff, and recently-touched docs — not just what's in the conversation window. Confirm you actually understand what's going on, in your own words, not by echoing the user's phrasing back. Then surface your assumptions, your open questions, and the next actions you propose — and **wait**.
|
|
11
|
+
|
|
12
|
+
This is a checkpoint, not an action. The whole point is to catch silent misunderstandings before they cost you. Do not produce the report and then immediately charge off and do things. Produce the report, then stop.
|
|
13
|
+
|
|
14
|
+
The conversation window is one source of truth, but not the only one. Worklogs, commits, and handoffs often carry state the window has dropped (especially after compaction, across sessions, or when picking up cold). A sitrep built only on the conversation is a sitrep that may have already drifted from reality.
|
|
15
|
+
|
|
16
|
+
## The two levels of understanding
|
|
17
|
+
|
|
18
|
+
"I read it" is not the same as "I understand it."
|
|
19
|
+
|
|
20
|
+
- **Shallow:** restating the user's words. "You want a function." Worthless.
|
|
21
|
+
- **Deep:** stating the goal, the constraint, and the why in your own words. "You want a function that handles null inputs because the upstream source sometimes returns null and the current code crashes on it — and it needs to land before tomorrow's deploy."
|
|
22
|
+
|
|
23
|
+
Produce the deep version. If you can only produce the shallow version, you don't understand it yet — say so out loud.
|
|
24
|
+
|
|
25
|
+
## Grounding — consult before writing the report
|
|
26
|
+
|
|
27
|
+
Before you write a single line of the report, consult the real project state. The conversation is one source; these are the others. **Read the *latest* of each — not everything.** This is a checkpoint, not an audit.
|
|
28
|
+
|
|
29
|
+
All "today" / "latest" determinations use **KST (Asia/Seoul)** — prefix every `date` call with `TZ='Asia/Seoul'`. Never trust the system default. (This project operates in KST; see AGENTS.md.)
|
|
30
|
+
|
|
31
|
+
### 1. Latest worklogs
|
|
32
|
+
- **Find:** a `work-log/` directory under `docs/`, sometimes nested (e.g. `docs/{project}/active/work-log/`). In this project: `docs/korean-equity-scalper/active/work-log/YYYY-MM-DD/`.
|
|
33
|
+
- **Read:** today's folder first (KST). If empty or missing, the most recent prior date. Read the newest 1–2 files. Files are `HHMM-topic.md` (new format); older ones may be `.html`.
|
|
34
|
+
- **What you're looking for:** what was just worked on, what was found, what's blocked, what was decided — the agent's own running notes beat memory.
|
|
35
|
+
|
|
36
|
+
### 2. Latest commits
|
|
37
|
+
- **Run:** `git log --oneline -20` (recent momentum) and `git status` + `git diff --stat` (current WIP state).
|
|
38
|
+
- **What you're looking for:** what just landed, what's uncommitted/in-flight, whether the tree is clean. If the user is mid-task, the uncommitted diff is often the most important signal of all.
|
|
39
|
+
|
|
40
|
+
### 3. Latest handoff(s)
|
|
41
|
+
- **Find:** `handoffs/` under docs, typically `docs/{project}/active/handoffs/YYYY-MM-DD/HANDOFF-*.md`. In this project: `docs/korean-equity-scalper/active/handoffs/YYYY-MM-DD/HANDOFF-*.md`.
|
|
42
|
+
- **Read:** the most recent 1–2 handoff files.
|
|
43
|
+
- **What you're looking for:** the explicit "here's where we are / here's what's next" from the last person (or agent) who stopped. Handoffs are designed to be read cold — trust them.
|
|
44
|
+
|
|
45
|
+
### 4. Recently-touched docs
|
|
46
|
+
- **Find:** recently-modified `.md` files under `docs/` — `find docs -name "*.md" -mtime -7` (last ~7 days) is a good starting lens. Also check `docs/adr/` (decisions), `docs/plans/` (active plans), and any `CONTEXT.md` at the repo root or under `docs/`.
|
|
47
|
+
- **Read:** only what's recent AND relevant to the current conversation. Don't read all docs — read the few that intersect with what we're doing.
|
|
48
|
+
- **What you're looking for:** decisions that constrain us (ADRs), plans that define "done," domain vocabulary that disambiguates terms.
|
|
49
|
+
|
|
50
|
+
### Grounding rules
|
|
51
|
+
- **Missing source = skip, don't fail.** No `work-log/` dir? Skip it. No handoffs? Skip it. Never error out because a source doesn't exist.
|
|
52
|
+
- **Latest, not exhaustive.** You're calibrating, not writing a history. If a source has 200 files, read the 1–2 most recent that matter.
|
|
53
|
+
- **Cite what you consulted.** The report opens with a one-line "Sources consulted" list (see report section 0) so the user can see what you grounded in — and tell you if you missed something.
|
|
54
|
+
- **Flag conflicts.** If a worklog says X but the latest commit did Y, surface that. Conflicts between sources are exactly the kind of drift this checkpoint exists to catch.
|
|
55
|
+
- **Don't pad with sources.** If the conversation alone is enough and the sources add nothing, say so: "Sources consulted: git log (no recent relevant commits); no worklogs/handoffs found." Brief is fine.
|
|
56
|
+
|
|
57
|
+
## The report
|
|
58
|
+
|
|
59
|
+
Output this structure, in this order:
|
|
60
|
+
|
|
61
|
+
### 0. Sources consulted
|
|
62
|
+
One line. What you grounded in. e.g. "Conversation + worklog `2026-06-20/0915-...md` + `git log -20` (last commit: `<sha> <subject>`) + handoff `2026-06-19/HANDOFF-*.md`." This makes your grounding visible and lets the user say "you missed X."
|
|
63
|
+
|
|
64
|
+
### 1. Situation
|
|
65
|
+
Current state, in your own words. What exists now, what's broken, what's working, what's in flight. Two or three sentences. If you can't state it crisply, you don't have it yet.
|
|
66
|
+
|
|
67
|
+
### 2. Goal
|
|
68
|
+
What we're driving toward. Not "the task" — the outcome. Why does this matter? What does success look like?
|
|
69
|
+
|
|
70
|
+
### 3. Assumptions
|
|
71
|
+
Explicit list. Things you're taking as given but haven't verified. The user can correct each one in a single line. This is where most silent misalignment lives — surface them, don't act on them silently.
|
|
72
|
+
|
|
73
|
+
### 4. Open questions
|
|
74
|
+
Things you don't know. Do not hide confusion. "I'm not sure whether X or Y" is a valid and valuable output. Listing unknowns is not weakness — it's the whole point of this checkpoint.
|
|
75
|
+
|
|
76
|
+
### 5. Next actions
|
|
77
|
+
Ordered, concrete, owner-tagged:
|
|
78
|
+
- **"I will do X"** — agent-owned
|
|
79
|
+
- **"You should do Y"** — user-owned
|
|
80
|
+
- **"We need to decide Z before proceeding"** — blocking
|
|
81
|
+
|
|
82
|
+
Vague actions like "improve testing" are banned. Specific only: "add a test for null-input in `parse_orders`."
|
|
83
|
+
|
|
84
|
+
### 6. Awaiting your go-ahead
|
|
85
|
+
Say it explicitly: "I'll wait for your confirmation before acting." Then wait.
|
|
86
|
+
|
|
87
|
+
## Critical behaviors
|
|
88
|
+
|
|
89
|
+
- **Re-read the whole conversation.** Not skim. Not the last few messages. The full context — especially if it's long or has been compacted.
|
|
90
|
+
- **Ground in real project state.** Worklogs, commits, handoffs, recent docs — consult them before writing the report. The conversation window alone is not enough, especially after compaction or when picking up cold.
|
|
91
|
+
- **Don't fake understanding.** If you don't get something, say so. "I don't fully understand X" is a better output than a confident wrong summary.
|
|
92
|
+
- **State assumptions out loud.** Don't act on them silently. The user correcting one assumption now saves an hour of wrong work later.
|
|
93
|
+
- **Don't charge off.** The report ends with a pause. The user confirming is what unlocks action.
|
|
94
|
+
- **Don't pad.** If the situation is one sentence, write one sentence. Depth ≠ length. Depth = correctness and completeness of what matters.
|
|
95
|
+
|
|
96
|
+
## When to use
|
|
97
|
+
|
|
98
|
+
Triggered by:
|
|
99
|
+
- "do you understand?"
|
|
100
|
+
- "what's going on?"
|
|
101
|
+
- "what's the situation?"
|
|
102
|
+
- "catch me up"
|
|
103
|
+
- "are you with me?"
|
|
104
|
+
- "give me the situation and the next actions"
|
|
105
|
+
- `/sitrep`
|
|
106
|
+
|
|
107
|
+
Also appropriate to self-invoke when:
|
|
108
|
+
- The conversation is long or has been compacted
|
|
109
|
+
- Multiple topics have been juggled
|
|
110
|
+
- You're starting fresh after a break
|
|
111
|
+
- The user just gave you a wall of context
|
|
112
|
+
- You're about to do something expensive or irreversible and want to verify alignment first
|
|
113
|
+
|
|
114
|
+
## Failure modes this prevents
|
|
115
|
+
|
|
116
|
+
- Charging off and doing the wrong thing because you skimmed
|
|
117
|
+
- Faking "got it!" when you actually missed something
|
|
118
|
+
- Agent and user carrying different mental models for 30 minutes before the divergence surfaces
|
|
119
|
+
- Acting on an assumption the user would have corrected in one word if you'd said it out loud
|
|
120
|
+
- Forgetting an earlier constraint or decision
|
|
121
|
+
|
|
122
|
+
## Related
|
|
123
|
+
|
|
124
|
+
- **`professional`** — don't fake understanding to seem fast; real professionals surface what they don't know.
|
|
125
|
+
- **`no-wall`** — if "I don't understand" comes up, that's an unfinished search, not a wall. Re-read, ask, search.
|
|
126
|
+
- **`next-step`** — similar output shape but narrower: answers "what's next?" only, not the full situation. Use `sitrep` for the full alignment checkpoint; use `next-step` when you just want the next move.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: structure-code
|
|
3
|
+
description: Use when multiple workflows duplicate the same operational logic, when deciding what belongs in actions vs shared services, or when refactoring repeated operational blocks across domain flows. Use when adding new features that share mechanics with existing ones.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Service Layer Architecture
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
**Two-layer separation:** Actions orchestrate domain rules (the "why/when"), while a service layer centralizes reusable operational mechanics (the "how").
|
|
11
|
+
|
|
12
|
+
This prevents duplicated code, inconsistent behavior, and bugs fixed in one path but not others.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- Multiple callers need the same low-level operation (sandbox creation, email sending, payment processing)
|
|
17
|
+
- You're copy-pasting operational logic between action files
|
|
18
|
+
- A bug fix in one workflow doesn't propagate to others doing the same thing
|
|
19
|
+
- Adding a new feature that shares mechanics with existing flows
|
|
20
|
+
|
|
21
|
+
**Don't use when:** Logic is truly domain-specific and used by only one caller.
|
|
22
|
+
|
|
23
|
+
## Core Pattern
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Orchestration Layer (Actions) Service Layer (Shared Mechanics)
|
|
27
|
+
├── owns business rules ├── owns reusable operations
|
|
28
|
+
├── owns state transitions ├── owns provider/SDK interactions
|
|
29
|
+
├── owns auth/ownership checks ├── owns command execution details
|
|
30
|
+
├── owns failure classification ├── owns health checks / readiness
|
|
31
|
+
├── owns retries / user-facing errors └── returns structured results
|
|
32
|
+
└── calls service functions
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Rule of thumb:**
|
|
36
|
+
- "What this product flow means" → keep in actions
|
|
37
|
+
- "How to do this operation reliably" → move to service layer
|
|
38
|
+
|
|
39
|
+
## Quick Reference
|
|
40
|
+
|
|
41
|
+
| Design Principle | Do | Don't |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| API shape | Composable capability blocks | One giant "do everything" method |
|
|
44
|
+
| Inputs/outputs | Explicit params, structured returns | Hidden global state, reaching into DB |
|
|
45
|
+
| Migration | Extract one block, replace one caller, verify, then migrate rest | Refactor everything at once |
|
|
46
|
+
| Domain logic | Keep auth, policy, error classification in actions | Let service mutate domain state directly |
|
|
47
|
+
| Extraction trigger | Logic repeated across 2+ callers | Logic used once (over-abstraction) |
|
|
48
|
+
|
|
49
|
+
## Designing Service Functions
|
|
50
|
+
|
|
51
|
+
Design as **capability blocks**, not monoliths:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// Good: composable, each caller chooses what to use
|
|
55
|
+
createManagedSandbox(...)
|
|
56
|
+
prepareRepo(...)
|
|
57
|
+
detectPackageManager(...)
|
|
58
|
+
installDependencies(...)
|
|
59
|
+
runBuildCommand(...)
|
|
60
|
+
startSandboxRuntime(...)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Each function should:
|
|
64
|
+
- Accept all required data as **explicit parameters**
|
|
65
|
+
- Return **structured outputs** (e.g., `{ ready, previewUrl, proxyPort }`)
|
|
66
|
+
- Never reach into database/state directly
|
|
67
|
+
- Make failure explicit (structured results, not swallowed errors)
|
|
68
|
+
|
|
69
|
+
This lets callers choose strict vs relaxed behavior per flow.
|
|
70
|
+
|
|
71
|
+
## Migration Checklist
|
|
72
|
+
|
|
73
|
+
When extracting shared logic:
|
|
74
|
+
|
|
75
|
+
1. Write the flow in action code first (clear behavior)
|
|
76
|
+
2. Mark repeated operational chunks across callers
|
|
77
|
+
3. Extract **only** repeated, non-domain chunks to service
|
|
78
|
+
4. Replace one caller → verify → replace remaining callers
|
|
79
|
+
5. Keep domain policy in actions (auth, status transitions, error classification)
|
|
80
|
+
6. Run verification: typecheck, lint, confirm all flows still work
|
|
81
|
+
|
|
82
|
+
## Anti-Patterns
|
|
83
|
+
|
|
84
|
+
| Anti-Pattern | Problem |
|
|
85
|
+
|---|---|
|
|
86
|
+
| **God service** | One huge function hides all control flow |
|
|
87
|
+
| **Leaky service** | Service mutates database tables directly |
|
|
88
|
+
| **Inconsistent API** | Each function uses different argument styles and error semantics |
|
|
89
|
+
| **Over-abstraction** | Extracting logic used by only one caller |
|
|
90
|
+
|
|
91
|
+
## Example: Email Service (Simple)
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
// emailService.ts — shared mechanics
|
|
95
|
+
export async function sendWelcomeEmail(params: { to: string; name: string }) {
|
|
96
|
+
const html = `<h1>Welcome ${params.name}</h1>`;
|
|
97
|
+
await emailProvider.send(params.to, "Welcome", html);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// userSignup.ts — orchestration (owns WHEN to send)
|
|
101
|
+
if (user.marketingOptIn) {
|
|
102
|
+
await sendWelcomeEmail({ to: user.email, name: user.name });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// adminInvite.ts — orchestration (different business rule, same mechanic)
|
|
106
|
+
await sendWelcomeEmail({ to: invitee.email, name: invitee.name });
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Mental Model
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
New feature? → Write in action first → See repeated ops? → Extract to service
|
|
113
|
+
→ No repetition? → Keep in action
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Your architecture in one sentence: **Actions orchestrate domain rules, while the service layer centralizes reusable operational mechanics with a composable, explicit-input API.**
|