@soleur/opencode 3.354.20 → 3.354.22
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/agents/product/competitive-intelligence.md +18 -8
- package/package.json +1 -1
- package/skills/brainstorm/SKILL.md +1 -1
- package/skills/competitive-analysis/SKILL.md +3 -3
- package/skills/competitive-analysis/references/living-kb-doc-sharding.md +70 -0
- package/skills/competitive-analysis/references/peer-plugin-audit.md +12 -8
- package/skills/deepen-plan/SKILL.md +12 -12
- package/skills/deepen-plan/workflows/deepen-plan.workflow.js +16 -3
- package/skills/plan/SKILL.md +5 -1
- package/skills/plan/references/plan-issue-templates.md +60 -0
- package/skills/plan/references/task-design-gate.md +75 -0
- package/skills/schedule/SKILL.md +39 -1
|
@@ -4,7 +4,7 @@ description: "Use this agent when you need recurring competitive landscape monit
|
|
|
4
4
|
model: inherit
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Competitive intelligence agent. Researches competitors via WebSearch and WebFetch, reads positioning context from brand-guide.md and business-validation.md, and writes
|
|
7
|
+
Competitive intelligence agent. Researches competitors via WebSearch and WebFetch, reads positioning context from brand-guide.md and business-validation.md, and writes the index report at knowledge-base/product/competitive-intelligence.md plus dated-record shards under knowledge-base/product/competitive-intelligence/.
|
|
8
8
|
|
|
9
9
|
## Pre-Research Context Loading
|
|
10
10
|
|
|
@@ -25,21 +25,31 @@ For each competitor in scope:
|
|
|
25
25
|
|
|
26
26
|
## Output Contract
|
|
27
27
|
|
|
28
|
-
Write
|
|
28
|
+
Write the report as the index at knowledge-base/product/competitive-intelligence.md PLUS dated-record and per-competitor shards under knowledge-base/product/competitive-intelligence/. The index keeps this structure:
|
|
29
29
|
|
|
30
|
-
- YAML frontmatter: last_reviewed, tiers_scanned
|
|
31
|
-
- Executive Summary (2-3 sentences of material changes)
|
|
30
|
+
- YAML frontmatter: last_updated, last_reviewed (scanner-owned -- never bump), tiers_scanned
|
|
31
|
+
- Executive Summary (2-3 sentences of material changes + one-line links to new shards)
|
|
32
32
|
- Per-tier sections with overlap matrix tables
|
|
33
33
|
- New Entrants section (best-effort -- competitors found in research that are not in business-validation.md; omit section if business-validation.md is unavailable)
|
|
34
34
|
- Recommendations (prioritized strategic actions)
|
|
35
|
+
- Detail files map of the shard directory
|
|
35
36
|
|
|
36
37
|
Overlap matrix columns: Competitor | Our Equivalent | Overlap | Differentiation | Convergence Risk
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
Shard rules (the full convention lives in plugins/soleur/skills/competitive-analysis/references/living-kb-doc-sharding.md):
|
|
40
|
+
|
|
41
|
+
- Shards live under knowledge-base/product/competitive-intelligence/: audits/<owner>-<repo>.md for peer-plugin audits, tier-<N>-<slug>.md for per-competitor detail, audit-log.md for non-audit outcomes. Never create INDEX.md.
|
|
42
|
+
- A competitor gets a tier-* shard iff it has a dated record (intake block, audit, or detail exceeding a slim cell). Slim that row's Differentiation cell to the key differentiator + a `→ detail` link; keep fuller cells where no shard exists.
|
|
43
|
+
- Shard frontmatter is minimal: title, last_updated, publishable: internal|external, plus `competitor` on `tier-*` and `target` on `audits/*`. Never review_cadence/owner/depends_on on a shard -- review machinery stays on the index.
|
|
44
|
+
- Qualifier severance is forbidden: every unverified/marketing flag and source URL moves WITH the claim it qualifies.
|
|
45
|
+
- Orphan policy: index links are the live set; shards are append-only dated records, never deleted by a run.
|
|
46
|
+
- This layout is the mandated output shape for ALL installs: on a repo whose CI doc was never split, the run migrates it (writes the index + creates the needed shards) -- never produce write-only orphan shards.
|
|
47
|
+
|
|
48
|
+
If the index cannot be written (CI environment, read-only permissions), output the full report as a code block instead. The schedule skill template captures this as a GitHub Issue.
|
|
39
49
|
|
|
40
50
|
## Phase 2: Cascade Updates
|
|
41
51
|
|
|
42
|
-
Before entering this phase, confirm: did Phase 1 write
|
|
52
|
+
Before entering this phase, confirm: did Phase 1 write the CI report (the index at knowledge-base/product/competitive-intelligence.md and any shards under knowledge-base/product/competitive-intelligence/), or did it fall back to code block output? If no files were written to disk, skip this phase entirely and note: "Cascade skipped: CI report not written to disk."
|
|
43
53
|
|
|
44
54
|
After writing the base CI report, spawn downstream specialist agents to refresh their artifacts with the latest competitive data.
|
|
45
55
|
|
|
@@ -61,11 +71,11 @@ Spawn all 4 in parallel using a single message with multiple Task tool calls.
|
|
|
61
71
|
|
|
62
72
|
Each Task prompt must include:
|
|
63
73
|
|
|
64
|
-
- Path to the CI report: knowledge-base/product/competitive-intelligence.md
|
|
74
|
+
- Path to the CI report: knowledge-base/product/competitive-intelligence.md (read it first, then follow its `→ detail` links into knowledge-base/product/competitive-intelligence/ shards for per-competitor depth)
|
|
65
75
|
- Scoped task description and write target from the delegation table above
|
|
66
76
|
- Instruction to extract the full competitor list from the overlap matrix tables before beginning analysis
|
|
67
77
|
- Instruction to run autonomously (no AskUserQuestion)
|
|
68
|
-
- Instruction not to commit and not to write to knowledge-base/product/competitive-intelligence.md (
|
|
78
|
+
- Instruction not to commit and not to write to knowledge-base/product/competitive-intelligence.md or anything under knowledge-base/product/competitive-intelligence/ (the index and its shards are managed exclusively by this agent)
|
|
69
79
|
- Tool restriction: only use Read, Write, Edit, Glob, Grep tools
|
|
70
80
|
- Return contract: respond using `## Session Summary` with `Files modified:` (comma-separated paths, or "None") and `Summary:` (one sentence) lines, followed by `### Errors` (details, or "None")
|
|
71
81
|
|
package/package.json
CHANGED
|
@@ -218,7 +218,7 @@ If the feature description references named external systems, prior issues, prio
|
|
|
218
218
|
|
|
219
219
|
**When a governing ADR already contains the design, re-verify each *deferral trigger* against LIVE state — the "deferred/blocked" label is the most perishable part of an ADR.** A same-day ADR may record the full design AND label items deferred/blocked; trusting the label re-derives decided work or re-confirms a status that has since cleared. Read the deferral *rationale* and re-run the exact check it implies: `gh run list --workflow=<apply>.yml` if the reason is "pipeline RED"; `gh pr list --state all -L 200 --search "<N> in:body,title"` for a sibling that shipped an item ("Ref #N" merges leave the issue OPEN with the box unchecked); `gh issue view <blocker> --json state,title` to confirm the cited blocker is real and open; grep the IaC/source for the true cross-ref (a mis-cited blocker in prose is corrected by the code). Then the brainstorm's job is certify-and-scope, not explore-and-derive. **Why:** 2026-07-03 #5933 — ADR-082 (same-day) deferred Item 1 "blocked on #5887 (pipeline RED)", but #5887 was fixed, the apply was green, and Item 3 had already shipped via PR #5945; the blocker was mis-cited (#5887 is a closed CI fix; the real cutover is #5274). See `knowledge-base/project/learnings/2026-07-03-brainstorm-re-verify-adr-deferral-triggers-against-live-state.md`. **And re-derive the deferred option's stated BENEFIT, not only its blockers — a deferral record has two halves and only one gets re-checked.** A blocker is written as a risk and reads as something to verify; the benefit is written as fact and is inherited as the whole reason to ship. Name the command that would falsify the benefit and run it. **Why:** 2026-08-12 #7493 — ADR-182 justified `github_repository_file` with "drift would be auto-reconciled by the next apply"; both its blockers cleared against the live API, but `apply-github-infra.yml` has no `schedule:` (it fires only on `push: main` touching `infra/github/*.tf`), so the option would have shipped ownership without timeliness while the ADR and issue both asserted timeliness. See `knowledge-base/project/learnings/2026-08-12-certifying-a-deferral-means-re-deriving-its-benefit-not-just-its-blockers.md`.
|
|
220
220
|
|
|
221
|
-
**Grading a competitor/vendor claim VERIFIED vs UNSUBSTANTIATED means reading every source the artifact already cites — a landing page is one source, not the source of truth.** When a leader/CMO reports "X is not stated on vendor.com," check whether the artifact you're annotating already links subpages (a `/pricing`, a docs/blog post) for that exact claim, and read those before grading. Asserting "unsubstantiated" from an incomplete source check is the same defect class as asserting an unverified figure as fact — just reversed. **Why:** #6827 — Cofounder pricing/memory/ownership were graded "not stated on cofounder.co" from a landing-page-only fetch; the existing `
|
|
221
|
+
**Grading a competitor/vendor claim VERIFIED vs UNSUBSTANTIATED means reading every source the artifact already cites — a landing page is one source, not the source of truth.** When a leader/CMO reports "X is not stated on vendor.com," check whether the artifact you're annotating already links subpages (a `/pricing`, a docs/blog post) for that exact claim, and read those before grading. Asserting "unsubstantiated" from an incomplete source check is the same defect class as asserting an unverified figure as fact — just reversed. **Why:** #6827 — Cofounder pricing/memory/ownership were graded "not stated on cofounder.co" from a landing-page-only fetch; the existing `knowledge-base/product/competitive-intelligence.md` table row already linked `cofounder.co/pricing` + a memory post that stated them verbatim. See `knowledge-base/project/learnings/2026-07-22-verify-every-cited-source-and-corrections-must-not-half-sweep.md`.
|
|
222
222
|
|
|
223
223
|
**Credential/auth/ToS features — probe the customer-facing-vs-operator-self-use framing split before accepting a blanket "prohibited."** A domain-leader (esp. CLO) PROHIBITED verdict is a verdict on ONE framing under ONE snapshot of vendor terms. Two cheap probes can invert it: (1) is there a narrower *actor/scope* (operator self-use, single-tenant, BYO-own-credential) that dissolves the fatal clause (credential *sharing*/*pooling*/*reselling* apply to customer-facing, not operator-self-use)? (2) are the cited terms *current*? Verify external-vendor commercial/ToS terms via live WebFetch of the official source dated to the present — terms drift and can flip within days. **Why:** 2026-06-02 #4825 — a triad PROHIBITED for customer-facing Claude-subscription login flipped to permitted-with-guardrails for operator self-use once the actor narrowed AND Anthropic's June-15-2026 Agent-SDK-credit policy was read live. See `knowledge-base/project/learnings/2026-06-02-brainstorm-framing-split-flips-tos-verdict-and-verify-vendor-terms-live.md`.
|
|
224
224
|
|
|
@@ -13,7 +13,7 @@ description: "This skill should be used when running competitive intelligence sc
|
|
|
13
13
|
|
|
14
14
|
# Competitive Analysis
|
|
15
15
|
|
|
16
|
-
Run a competitive intelligence scan (monthly tiered report) or a targeted peer-plugin audit. Both modes produce structured output in `knowledge-base/product/competitive-intelligence.md
|
|
16
|
+
Run a competitive intelligence scan (monthly tiered report) or a targeted peer-plugin audit. Both modes produce structured output in the `knowledge-base/product/competitive-intelligence.md` index plus dated-record shards under `knowledge-base/product/competitive-intelligence/` (see references/living-kb-doc-sharding.md).
|
|
17
17
|
|
|
18
18
|
## Sub-Modes
|
|
19
19
|
|
|
@@ -55,7 +55,7 @@ Use AskUserQuestion to select tiers:
|
|
|
55
55
|
|
|
56
56
|
Spawn the soleur:product:competitive-intelligence agent via Task tool:
|
|
57
57
|
|
|
58
|
-
Task soleur:product:competitive-intelligence: "Run a competitive intelligence scan for tiers <TIERS>. Research each competitor in the specified tiers, read brand-guide.md and business-validation.md for positioning context, and write the report
|
|
58
|
+
Task soleur:product:competitive-intelligence: "Run a competitive intelligence scan for tiers <TIERS>. Research each competitor in the specified tiers, read brand-guide.md and business-validation.md for positioning context, and write the report as the index at knowledge-base/product/competitive-intelligence.md with dated/detail shards under knowledge-base/product/competitive-intelligence/."
|
|
59
59
|
|
|
60
60
|
### 4. Report Results
|
|
61
61
|
|
|
@@ -66,4 +66,4 @@ After the agent completes:
|
|
|
66
66
|
|
|
67
67
|
## Scheduled Execution
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
This skill runs monthly via the Inngest cron `cron-competitive-analysis` (apps/web-platform/server/inngest/functions/cron-competitive-analysis.ts; `0 9 1 * *`). The agent does NOT commit or push: the platform persists allowlisted changes and opens a PR handler-side via `safeCommitAndPr` after the run, gated on the audit-trail issue ("[Scheduled] Competitive Analysis - <date>") being created first.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Living KB doc sharding convention
|
|
2
|
+
|
|
3
|
+
Operational convention for splitting a growing curated knowledge-base doc into
|
|
4
|
+
a stable-path index + a sibling shard directory. Decision record: ADR-297
|
|
5
|
+
(`knowledge-base/engineering/architecture/decisions/ADR-297-living-kb-doc-sharding.md`).
|
|
6
|
+
Canonical instance: `knowledge-base/product/competitive-intelligence.md` +
|
|
7
|
+
`knowledge-base/product/competitive-intelligence/`.
|
|
8
|
+
|
|
9
|
+
## When to apply
|
|
10
|
+
|
|
11
|
+
Trigger: the doc reaches ~500 lines OR embeds ≥2 point-in-time records (audits,
|
|
12
|
+
intake blocks, incident annexes) OR accumulates an append-log inside a
|
|
13
|
+
synthesis section.
|
|
14
|
+
|
|
15
|
+
Do NOT apply to append-only registers whose correction discipline is
|
|
16
|
+
single-file `> **Superseded …**` cells (legal/compliance registers — ADR-297).
|
|
17
|
+
|
|
18
|
+
## Layout
|
|
19
|
+
|
|
20
|
+
- **Index** — the doc's *unchanged* path (`foo.md`). Living synthesis only:
|
|
21
|
+
frontmatter, narrative summary, comparison matrices, takeaways,
|
|
22
|
+
recommendations, and a `## Detail files` map.
|
|
23
|
+
- **Shard dir** — sibling `foo/` directory:
|
|
24
|
+
- `audits/<owner>-<repo>.md` — dated audit records
|
|
25
|
+
- `<axis>-<slug>.md` — per-subject detail (e.g. `tier-3-cofounder.md`)
|
|
26
|
+
- `audit-log.md` — append-only log for outcomes that produced no shard
|
|
27
|
+
- **Never `INDEX.md`** — `generate-kb-index.sh` excludes that name; every
|
|
28
|
+
other shard auto-appears in generated indexes.
|
|
29
|
+
|
|
30
|
+
## Shard frontmatter schema
|
|
31
|
+
|
|
32
|
+
Minimal: `title`, `last_updated`, `publishable: internal|external`, plus a
|
|
33
|
+
subject key (`competitor` on `tier-*`, `target` (`owner/repo`) on `audits/*`).
|
|
34
|
+
|
|
35
|
+
**Never** `review_cadence`, `owner`, or `depends_on` on a shard —
|
|
36
|
+
`review-reminder.yml` scans all depths and would mint a monthly issue per
|
|
37
|
+
shard; review machinery stays on the index only.
|
|
38
|
+
|
|
39
|
+
`publishable:` semantics: `internal` = do-not-republish/do-not-cite in public
|
|
40
|
+
or marketing content (it is a guidance flag, not access control — the repo is
|
|
41
|
+
public; shards are published artifacts).
|
|
42
|
+
|
|
43
|
+
## Write-boundary rule
|
|
44
|
+
|
|
45
|
+
Producers writing under the shard dir must have BOTH allowlist entries when
|
|
46
|
+
matching is bare `startsWith`: `foo.md` AND `foo/` (trailing slash — a bare
|
|
47
|
+
`foo` stem would also match `foo-evil/`). Update the producer (allowlist,
|
|
48
|
+
prompt path list, output contract) in the SAME commit as the restructure —
|
|
49
|
+
otherwise shard writes are silently discarded while runs report green.
|
|
50
|
+
|
|
51
|
+
## Content rules
|
|
52
|
+
|
|
53
|
+
- **Slim cells:** index matrix/detail cells slim to the key differentiator +
|
|
54
|
+
a `→ detail` link where a shard exists; keep fuller cells where none does.
|
|
55
|
+
- **Qualifier severance forbidden:** every `unverified`/`marketing`/
|
|
56
|
+
`contradiction` flag and source URL moves WITH the claim it qualifies.
|
|
57
|
+
- **Depth-corrected links:** index→shard is `foo/<file>.md`; depth-1 shards
|
|
58
|
+
back-link `../foo.md`; depth-2 shards (`audits/*`) back-link `../../foo.md`.
|
|
59
|
+
Relocated `](../project/`-style links gain one `../` per level moved.
|
|
60
|
+
- **Orphan policy:** index links are the live set; shards are append-only
|
|
61
|
+
dated records, never deleted by a run. A subject dropped from the index
|
|
62
|
+
keeps its shard (dated record) and loses its index row.
|
|
63
|
+
- **Re-tier / rename:** if a subject's axis value changes (e.g. a competitor
|
|
64
|
+
moves tier), `git mv` the shard to the new name and update the index link;
|
|
65
|
+
do not leave a redirect stub.
|
|
66
|
+
- **Dual-shard interlinking:** when two shards cover the same subject (a
|
|
67
|
+
`tier-*` detail file and an `audits/*` audit), link them to each other.
|
|
68
|
+
- **Migration rule:** the sharded layout is the mandated shape for ALL
|
|
69
|
+
installs — on a repo whose doc was never split, the run writes the index
|
|
70
|
+
and creates the needed shards; never produce write-only orphan shards.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Peer Plugin Audit — Sub-Mode Procedure
|
|
4
4
|
|
|
5
|
-
Sub-mode of `soleur:competitive-analysis`. Given a GitHub repository URL, produce a 4-section markdown audit (inventory / high-value gaps / overlap / architectural patterns + recommendations) and
|
|
5
|
+
Sub-mode of `soleur:competitive-analysis`. Given a GitHub repository URL, produce a 4-section markdown audit (inventory / high-value gaps / overlap / architectural patterns + recommendations) and upsert it into `audits/<owner>-<repo>.md` under `knowledge-base/product/competitive-intelligence/` and add/update the matching Overlap Matrix row (with a `→ audit` link) in the `knowledge-base/product/competitive-intelligence.md` index.
|
|
6
6
|
|
|
7
7
|
**Invocation:** `skill: soleur:competitive-analysis peer-plugin-audit <repo-url>` (routed from `SKILL.md` Step 1).
|
|
8
8
|
|
|
@@ -124,12 +124,16 @@ of report body. Wrap every #NNNN GitHub reference in backticks so CommonMark
|
|
|
124
124
|
does not parse it as a heading.
|
|
125
125
|
|
|
126
126
|
# Output destination
|
|
127
|
-
Write the
|
|
128
|
-
|
|
127
|
+
Write the audit body to knowledge-base/product/competitive-intelligence/audits/<owner>-<repo>.md
|
|
128
|
+
(minimal shard frontmatter: title, target, last_updated, publishable) AND upsert
|
|
129
|
+
a new or updated Overlap Matrix row in the appropriate existing tier of the
|
|
130
|
+
index knowledge-base/product/competitive-intelligence.md with a
|
|
131
|
+
`→ audit` link to the shard — usually
|
|
129
132
|
Tier 3 (CaaS / Agent-Plugin Competitors) for plugin-layer or skill-library
|
|
130
133
|
peers. If the audited repo does not fit any current tier, flag this in the
|
|
131
134
|
report and request taxonomy guidance from the CI team — do not invent a new
|
|
132
|
-
tier in this sub-mode.
|
|
135
|
+
tier in this sub-mode. Exactly ONE audit file per repo: audits/<owner>-<repo>.md;
|
|
136
|
+
never write research/ or a second shard copy.
|
|
133
137
|
```
|
|
134
138
|
|
|
135
139
|
### Output-size guard
|
|
@@ -200,16 +204,16 @@ When porting concrete SKILL.md text, the Soleur target file MUST include:
|
|
|
200
204
|
|
|
201
205
|
## Output routing
|
|
202
206
|
|
|
203
|
-
- Write the
|
|
207
|
+
- Write the audit body to `knowledge-base/product/competitive-intelligence/audits/<owner>-<repo>.md` (minimal shard frontmatter: `title`, `target`, `last_updated`, `publishable`), AND upsert **a new or updated Overlap Matrix entry** in the appropriate existing tier of the index `knowledge-base/product/competitive-intelligence.md` with a `→ audit` link to the shard. Usually **Tier 3** (CaaS / Agent-Plugin Competitors) for plugin-layer or skill-library peers. Use Tier 0 only for platform-native peers (model/IDE-level).
|
|
204
208
|
- If an entry for the same repo already exists in any tier, **update it in place** — do not duplicate.
|
|
205
209
|
- If the audited repo does not fit any existing tier, **flag this in the report** and request taxonomy guidance from the CI team. Do not invent new tiers in this sub-mode — tier taxonomy is a CI-team decision, not a per-audit one.
|
|
206
|
-
- Update the
|
|
207
|
-
- Do NOT write a parallel file under `knowledge-base/product/research/peer-plugin-audits
|
|
210
|
+
- Update only the index's `last_updated: <today>` — its `last_reviewed` is scanner-owned and must NOT be bumped by an audit write (ADR-094); the shard carries its own `last_updated`.
|
|
211
|
+
- **Superseded 2026-10-24 (#11032):** the old "Do NOT write a parallel file under `knowledge-base/product/research/peer-plugin-audits/`" rule is replaced by the sharded layout — the audit body now lives in exactly ONE file, `audits/<owner>-<repo>.md`; the index keeps only the matrix row + link. Never write `research/peer-plugin-audits/` or a second shard copy.
|
|
208
212
|
- When a later founder decision disposes of an audit item (declined, bundled, superseded), write the disposition against the audit's OWN statement of the item, not the decision's shorthand: re-read the audit row the item came from before claiming it "already shipped". Record declines in the audit record, not in `knowledge-base/project/rejected/` (ADR-234 holds refused product concepts). **Why:** #8648 — a decline said the writing trio's one idea (leading words) had shipped, while the audit's §2 names leading words AND grounding; only the first shipped.
|
|
209
213
|
|
|
210
214
|
## Non-audit outcome
|
|
211
215
|
|
|
212
|
-
If Step 2 returns **zero SKILL.md files**, the repo is not a skill library.
|
|
216
|
+
If Step 2 returns **zero SKILL.md files**, the repo is not a skill library. Append a dated advisory entry to `knowledge-base/product/competitive-intelligence/audit-log.md` recording "category mismatch; no audit produced", and do not add an Overlap Matrix row. This prevents the tier from collecting non-skill-library repos.
|
|
213
217
|
|
|
214
218
|
## Error branches (reference)
|
|
215
219
|
|
|
@@ -11,7 +11,7 @@ description: "This skill should be used when enhancing an existing plan with par
|
|
|
11
11
|
**Grok Build (`plugins/soleur/lib/harness.ts` `invokeSkill()`):** Read this SKILL.md in this process and run it to completion. A one-segment `soleur:<name>` in this document names a SKILL — on Grok Build, Read `plugins/soleur/skills/<name>/SKILL.md` in this process; it is not a nested tool_use. A multi-segment id such as `soleur:<domain>:<name>` names an AGENT: spawn it, never Read it, and on Grok Build spawn_subagent takes the id with its colons replaced by hyphens (`agentIdToGrokSubagentType`). **Claude Code:** Skill tool for a skill (`soleur:<name>`), Task tool with `subagent_type` for an agent. Forbidden is executing a subset, not the Read.
|
|
12
12
|
<!-- grok-harness-invoke:end -->
|
|
13
13
|
|
|
14
|
-
> **Dynamic-workflow alternative (opt-in).** A [`Workflow`-tool](https://claude.com/blog/introducing-dynamic-workflows-in-claude-code) port of this skill lives at [`workflows/deepen-plan.workflow.js`](./workflows/deepen-plan.workflow.js) — deterministic fan-out, journaled resume, schema-validated output. Run it with `Workflow({ scriptPath: "plugins/soleur/skills/deepen-plan/workflows/deepen-plan.workflow.js", args: ... })`. The prose skill below stays the default; the two coexist during calibration. **Known divergence:** the port's `GATES` covers §§4.6–4.9
|
|
14
|
+
> **Dynamic-workflow alternative (opt-in).** A [`Workflow`-tool](https://claude.com/blog/introducing-dynamic-workflows-in-claude-code) port of this skill lives at [`workflows/deepen-plan.workflow.js`](./workflows/deepen-plan.workflow.js) — deterministic fan-out, journaled resume, schema-validated output. Run it with `Workflow({ scriptPath: "plugins/soleur/skills/deepen-plan/workflows/deepen-plan.workflow.js", args: ... })`. The prose skill below stays the default; the two coexist during calibration. **Known divergence:** the port's `GATES` covers §§4.6–4.9 + the §4.13 mirror; §4.10–4.12 are prose-only — a workflow run never enforces them. See [`knowledge-base/project/specs/archive/20261013-032858-feat-review-workflow-prototype/spec.md`](../../../../knowledge-base/project/specs/archive/20261013-032858-feat-review-workflow-prototype/spec.md).
|
|
15
15
|
|
|
16
16
|
# Deepen Plan - Power Enhancement Mode
|
|
17
17
|
|
|
@@ -329,7 +329,7 @@ Tier advisory (ADR-053 / ADR-110): spawn both passes with semantic tier `standar
|
|
|
329
329
|
|
|
330
330
|
If the plan's Overview, Problem Statement, or Hypotheses contain any of the trigger patterns `SSH`, `connection reset`, `kex`, `firewall`, `unreachable`, `timeout`, `502`, `503`, `504`, `handshake`, `EHOSTUNREACH`, `ECONNRESET` (case-insensitive), read `plugins/soleur/skills/plan/references/plan-network-outage-checklist.md` and spawn a dedicated "Network-Outage Deep-Dive" research agent in parallel with the other deepen agents.
|
|
331
331
|
|
|
332
|
-
**Resource-shape trigger (implicit SSH dependency).** Also fire this gate when the plan drives `terraform apply` (with or without `-target=`) on any resource whose definition contains `provisioner "file"`, `provisioner "remote-exec"`, or a `connection { type = "ssh" ... }` block. The provisioner block makes SSH a hard apply-time dependency
|
|
332
|
+
**Resource-shape trigger (implicit SSH dependency).** Also fire this gate when the plan drives `terraform apply` (with or without `-target=`) on any resource whose definition contains `provisioner "file"`, `provisioner "remote-exec"`, or a `connection { type = "ssh" ... }` block. The provisioner block makes SSH a hard apply-time dependency the prose-only keyword scan won't detect — the plan body need not mention SSH for apply to hit `connection reset by peer` on a drifted egress IP. **Why:** #3061 — plan body had zero SSH keywords; apply on `terraform_data.deploy_pipeline_fix` (file+remote-exec provisioners) still hit a handshake reset because Phase 4.5 didn't fire.
|
|
333
333
|
|
|
334
334
|
The deep-dive agent's task:
|
|
335
335
|
|
|
@@ -534,11 +534,13 @@ Halt deepen-plan; do NOT proceed to Phase 5.
|
|
|
534
534
|
echo 'SOLEUR_RULE_APPLIED rule=wg-ui-feature-requires-pen-wireframe note=UI feature must ship a committed .pen wireframe, never skipped'
|
|
535
535
|
```
|
|
536
536
|
|
|
537
|
+
**Step 5 — Pass-through.** Non-UI plan, or `.pen` committed → proceed. No telemetry on pass. **Why:** #4819.
|
|
538
|
+
|
|
537
539
|
### 4.10. Encryption Posture Halt (Conditional)
|
|
538
540
|
|
|
539
541
|
Symmetric to Phase 4.7 above; this gate is what makes plan Phase 2.11 load-bearing. Fires only when the plan introduces a persistent data store or a new cross-component/network connection.
|
|
540
542
|
|
|
541
|
-
**Step 1 — Trigger.** Fires when the plan's `## Files to Edit` / `## Files to Create` match one of `\.tf$`, `supabase/migrations/.*\.sql$`, `cloud-init.*\.ya?ml$`, `docker-compose.*\.ya?ml$`, OR the plan prose names a store class (volume, database, bucket, queue, cache, backup target, log sink) or a new cross-component connection. No match
|
|
543
|
+
**Step 1 — Trigger.** Fires when the plan's `## Files to Edit` / `## Files to Create` match one of `\.tf$`, `supabase/migrations/.*\.sql$`, `cloud-init.*\.ya?ml$`, `docker-compose.*\.ya?ml$`, OR the plan prose names a store class (volume, database, bucket, queue, cache, backup target, log sink) or a new cross-component connection. No match → skip silently.
|
|
542
544
|
|
|
543
545
|
**Step 2 — Locate the section.** Grep the target plan file:
|
|
544
546
|
|
|
@@ -571,10 +573,6 @@ echo 'SOLEUR_RULE_APPLIED rule=encryption-posture-design-time-default note=Every
|
|
|
571
573
|
|
|
572
574
|
**Why:** ADR-140 and `knowledge-base/project/plans/archive/20261013-041741-2026-07-23-feat-encryption-posture-design-time-default-plan.md` (Plan Review Revisions R1-R11). A declaration-only gate without Layer A (`lint-encryption-posture.py`, repo-root `scripts/`, resolving every citation against real code) and Layer B (live provider/host reconciliation) reproduces #6588 exactly — legal docs declared LUKS while the volume was plaintext ext4. This deepen-plan halt is the design-time half; it stops an underspecified or boilerplate posture from ever reaching `soleur:work`.
|
|
573
575
|
|
|
574
|
-
**Step 5 — Pass-through.** Non-UI plan, or a committed `.pen` present → proceed normally. No telemetry on pass.
|
|
575
|
-
|
|
576
|
-
**Why:** #4819 — the one-shot path skips brainstorm, so plan Phase 2.5 is the sole producer; this halt is the independent verifier that a UI feature did not reach implementation with zero wireframes (the silent-skip class the feature kills).
|
|
577
|
-
|
|
578
576
|
### 4.11. Guard Contract Halt (Conditional)
|
|
579
577
|
|
|
580
578
|
Fires when the plan's deliverable includes a **guard, gate, lint, drift-check or anti-vacuity control** (plan Phase 2.12). This is the design-time verifier that a guard-shaped plan carries a usable Guard Contract before `soleur:work` writes any guard code.
|
|
@@ -624,10 +622,8 @@ awk 'BEGIN{f=0} /^[[:space:]]*```/{f=!f; next} !f' "$PLAN_FILE" | grep -c '^## S
|
|
|
624
622
|
Read the printed COUNT, not the exit code — `grep -c` exits 1 on `0`, which is a verdict, not a command failure. `0` → absent → HALT; `>1` → malformed → HALT ("plan carries N duplicate live `## Scope Check` sections — keep one"). On `0`, halt with:
|
|
625
623
|
|
|
626
624
|
> Error: Plan has no compliant `## Scope Check` section. Per plan Phase 2.4 every plan emits
|
|
627
|
-
> one (see `plugins/soleur/skills/plan/references/plan-scope-check.md`;
|
|
628
|
-
> `plan-issue-templates.md`). Re-run
|
|
629
|
-
> `soleur:plan`, or add the section by hand — it maps asks the plan already
|
|
630
|
-
> contains — then re-run deepen-plan.
|
|
625
|
+
> one (see `plugins/soleur/skills/plan/references/plan-scope-check.md`; schema in
|
|
626
|
+
> `plan-issue-templates.md`). Re-run `soleur:plan` or add the section by hand, then re-run.
|
|
631
627
|
|
|
632
628
|
**Step 3 — Verify it mechanically.** Reject and HALT (same message shape; first line names the failing row; recovery: fix it in the plan file, then re-run) when ANY of:
|
|
633
629
|
|
|
@@ -647,10 +643,14 @@ echo 'SOLEUR_RULE_APPLIED rule=plan-scope-check-blocks-unmapped-asks note=deepen
|
|
|
647
643
|
|
|
648
644
|
No telemetry on pass — the gate only records when it activates.
|
|
649
645
|
|
|
650
|
-
**Step 6 — Pass-through.**
|
|
646
|
+
**Step 6 — Pass-through.** Compliant → proceed.
|
|
651
647
|
|
|
652
648
|
**Why:** #9398 — on PR #9339 a brief listing tasks a–f grew a destructive `--attest` rung nobody asked for; the catch cost an 11-seat review and ~8 CI cycles. The deepen halt is what makes "an unmapped item blocks the plan unless justified" load-bearing rather than advisory.
|
|
653
649
|
|
|
650
|
+
### 4.13. Task-Design Halt (Conditional)
|
|
651
|
+
|
|
652
|
+
Trigger + reject contract: [plan/references/task-design-gate.md](../plan/references/task-design-gate.md) (Detection table, UNFENCED count). On trigger HALT `"Phase 4.13 reject: <field/section> — <failure mode>"`; emit `SOLEUR_RULE_APPLIED rule=task-design-design-time-default note=Every new autonomous task MUST answer the six task-design questions at plan time`; else pass silent. **Why:** #11015.
|
|
653
|
+
|
|
654
654
|
### 5. Discover and Run ALL Review Agents
|
|
655
655
|
|
|
656
656
|
<thinking>
|
|
@@ -64,6 +64,7 @@ const outPath = inPlace
|
|
|
64
64
|
// - observability → hr-observability-as-plan-quality-gate (§4.7, code/infra only)
|
|
65
65
|
// - patShape → hr-github-app-auth-not-pat (§4.8, ALWAYS)
|
|
66
66
|
// - uiWireframe → wg-ui-feature-requires-pen-wireframe (§4.9, UI surface only)
|
|
67
|
+
// - taskDesign → plan §2.9.3 / deepen-plan §4.13 (§4.13 mirror, new autonomous-task surfaces only)
|
|
67
68
|
// A gate that is "applicable && !satisfied" blocks the fan-out; the workflow
|
|
68
69
|
// returns the SKILL's halt payload and never spends the research budget.
|
|
69
70
|
// ---------------------------------------------------------------------------
|
|
@@ -103,6 +104,16 @@ const GATES = {
|
|
|
103
104
|
'run the producer (brainstorm Phase 3.55 or plan Phase 2.5; Pencil auto-installs via pencil-setup --auto), commit the ' +
|
|
104
105
|
'.pen under knowledge-base/product/design/{domain}/, and reference it in the plan FRs. No Markdown/ASCII fallback.',
|
|
105
106
|
},
|
|
107
|
+
taskDesign: {
|
|
108
|
+
rule: 'skill-enforced: plan Phase 2.9.3 + deepen-plan Phase 4.13',
|
|
109
|
+
halt:
|
|
110
|
+
'Plan creates a NEW autonomous-task surface (per the Detection table in ' +
|
|
111
|
+
'plugins/soleur/skills/plan/references/task-design-gate.md — new workflow file, Inngest function, ' +
|
|
112
|
+
'registered check/reminder arm, pg_cron, host timer, daemon, TF-emitted workflow) but is missing a `## Task Design` ' +
|
|
113
|
+
'section, or the section lacks a `- task:` item per created task, a required field (trigger, services, next, ' +
|
|
114
|
+
'human_reentry, dedupe, source_dedupe) is absent/empty/placeholder, or `dedupe` names only `concurrency: group:` ' +
|
|
115
|
+
'with no semantic mechanism. See task-design-gate.md for the contract; add the section and re-run.',
|
|
116
|
+
},
|
|
106
117
|
}
|
|
107
118
|
|
|
108
119
|
// ---------------------------------------------------------------------------
|
|
@@ -127,16 +138,17 @@ const PARSE_SCHEMA = {
|
|
|
127
138
|
properties: {
|
|
128
139
|
exists: { type: 'boolean', description: 'true if the plan file was readable' },
|
|
129
140
|
planTitle: { type: 'string', description: 'the plan H1 / feature name, or the basename if no H1' },
|
|
130
|
-
// The
|
|
141
|
+
// The pre-fan-out hard gates (SKILL §§4.6–4.9 + the §4.13 taskDesign mirror).
|
|
131
142
|
gates: {
|
|
132
143
|
type: 'object',
|
|
133
|
-
required: ['userBrandImpact', 'observability', 'patShape', 'uiWireframe'],
|
|
144
|
+
required: ['userBrandImpact', 'observability', 'patShape', 'uiWireframe', 'taskDesign'],
|
|
134
145
|
additionalProperties: false,
|
|
135
146
|
properties: {
|
|
136
147
|
userBrandImpact: GATE_VERDICT,
|
|
137
148
|
observability: GATE_VERDICT,
|
|
138
149
|
patShape: GATE_VERDICT,
|
|
139
150
|
uiWireframe: GATE_VERDICT,
|
|
151
|
+
taskDesign: GATE_VERDICT,
|
|
140
152
|
},
|
|
141
153
|
},
|
|
142
154
|
technologies: {
|
|
@@ -237,11 +249,12 @@ ${planPath}
|
|
|
237
249
|
|
|
238
250
|
If the file is unreadable, return exists=false with an empty sections array.
|
|
239
251
|
|
|
240
|
-
STEP 1 — Run the
|
|
252
|
+
STEP 1 — Run the pre-fan-out hard gates. For each, set { applicable, satisfied, detail }:
|
|
241
253
|
- userBrandImpact (ALWAYS applicable): the plan MUST contain a non-empty \`## User-Brand Impact\` section whose threshold line is one of none / "single-user incident" / "aggregate pattern", with no placeholder-only bullets, and (when threshold=none AND the diff/Files-to-Edit touch a sensitive path) a "threshold: none, reason: <one sentence>" scope-out bullet. applicable=true always; satisfied=false if the section is missing, empty, placeholder-only, has an invalid threshold, or is none-without-scope-out.
|
|
242
254
|
- observability (applicable ONLY when the plan's Files-to-Edit touch production code/infra — i.e. NOT pure-docs: not all paths under knowledge-base/, docs/, README.md, CHANGELOG.md, or *.md outside plugins/*/skills and apps/*): a \`## Observability\` section with all 5 fields (liveness_signal, error_reporting, failure_modes, logs, discoverability_test), no placeholder values (TODO/TBD/N/A/placeholder/"manual operator check"), no empty field, and discoverability_test.command must NOT require ssh. It must also be executable by preflight Check 10, which runs it in a sandbox behind a deny-by-default allowlist: the first whitespace-delimited token of its dequoted, normalized value is one of curl bash grep rg jq python3 node bun printf git, with no path-shaped exemption. The OPTIONAL discoverability_test.credentials_required sub-field declares a probe whose property has no unauthenticated substitute ("<scope> — <justification>"), making Check 10 skip without executing; it is checked only when present, must not be placeholder text, and does NOT override the ssh reject. Two further rejects (#8412) bind ONLY a discoverability_test this run authors or amends — against a pre-existing block, report them as findings and leave satisfied unchanged: (a) command must be able to finish inside Check 10's 15-second `timeout 15s` cap, so a whole test suite or full build is rejected (wrapping a suite in a script satisfies the verb allowlist, not the cap); (b) expected_output must be the LITERAL string(s) the command prints, not prose describing them, because Check 10 asks whether any token of expected_output is a substring of stdout and a sentence can never match. If pure-docs, applicable=false, satisfied=true.
|
|
243
255
|
- patShape (ALWAYS applicable): grep the plan for PAT-shaped TF vars / env vars / literal tokens — \`var.*_(token|pat)\`, \`TF_VAR_(GITHUB|GH)_(TOKEN|PAT|AUTH)\`, literal \`ghp_<40>\` or \`github_pat_<82+>\` (placeholder forms like ghp_XXX are allowed). satisfied=false if any real PAT-shape matches.
|
|
244
256
|
- uiWireframe (applicable ONLY when the plan's Files-to-Edit/Create touch a UI surface — tsx/jsx/css under app/components, or UI-surface terms): the plan must reference a committed \`knowledge-base/product/design/**.pen\` wireframe (confirm committed via \`git ls-files --error-unmatch <path>\`). If no UI surface, applicable=false, satisfied=true.
|
|
257
|
+
- taskDesign (applicable ONLY when the plan creates a NEW autonomous-task surface per the Detection table in plugins/soleur/skills/plan/references/task-design-gate.md — any new .github/workflows/*.yml, a new Inngest function file or registration, a CHECK_REGISTRY/reminder arm, pg_cron, host cron.d/.timer, a setInterval daemon, or a TF-emitted workflow): the plan must contain an UNFENCED \`## Task Design\` section (outside ALL fence forms) with a \`tasks:\` list of one \`- task:\` item per created task, all of trigger/services/next/human_reentry/dedupe/source_dedupe present and non-placeholder (case-insensitive incl. WIP/FIXME/none/see above), and \`dedupe\` naming a semantic mechanism beyond \`concurrency: group:\`. Create-time only — no retrofit. If no new surface, applicable=false, satisfied=true.
|
|
245
258
|
|
|
246
259
|
STEP 2 — Extract the technologies/frameworks named in the plan (Rails, React, Next.js, TypeScript, Python, Postgres, Terraform, Supabase, etc.).
|
|
247
260
|
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -152,7 +152,7 @@ Runs after premise validation and before the Phase 1 fan-out, for the same reaso
|
|
|
152
152
|
|
|
153
153
|
**3. Cut before researching.** Any mechanism that buys no property in the list, or buys one an existing mechanism already covers, is removed here — not researched, not designed, not reviewed. Record each cut in one line (mechanism → property → what already covers it) as the **Cut List**. Emit both lists into the research-insights scratch, exactly as Phase 0.6 emits its Premise Validation note; Phase 1.7 persists them into `## Research Insights`, which is where `plan-review` reads them. A mechanism the ask did not name but the plan later invents is caught by Step 2's re-read of this list, not here.
|
|
154
154
|
|
|
155
|
-
**Why:** #7418 / ADR-176 — the plan
|
|
155
|
+
**Why:** #7418 / ADR-176 — the plan never compared its new mechanism against the one already in the codebase; a twelve-agent review then found twelve blocking defects behind a 285/285 green suite, and **nine of them dissolved with the machinery** when the redesign landed. See `knowledge-base/project/learnings/2026-08-10-i-fixed-the-guard-twice-and-my-test-could-not-see-either-fix.md`.
|
|
156
156
|
|
|
157
157
|
### 0.6c. Value-Proposition Measurement (Conditional)
|
|
158
158
|
|
|
@@ -709,6 +709,10 @@ If the plan's Files-to-Edit touch a surface the operator/agent CANNOT directly i
|
|
|
709
709
|
|
|
710
710
|
This is the affected-surface extension of `hr-observability-as-plan-quality-gate` — the diagnosis-first discipline for blind surfaces, enforced at review by `soleur:engineering:review:observability-coverage-reviewer` §Step 4.6. **Why:** #5733 — 6 blind server-side fixes over ~2 weeks because the failing agent-sandbox surface emitted no discriminating telemetry; one in-sandbox event decided the root cause the moment it shipped. See `knowledge-base/project/learnings/best-practices/2026-07-01-blind-surface-needs-structured-probe-before-nth-fix.md`.
|
|
711
711
|
|
|
712
|
+
#### 2.9.3. Task-Design Gate (Conditional)
|
|
713
|
+
|
|
714
|
+
[skill-enforced: plan Phase 2.9.3 + deepen-plan Phase 4.13] A `## Files to Create`/`## Files to Edit` entry creating a NEW autonomous-task surface (any new `.github/workflows/*.yml`, Inngest function, registered check, pg_cron, host timer, daemon) emits `## Task Design`: [references/task-design-gate.md](./references/task-design-gate.md).
|
|
715
|
+
|
|
712
716
|
### 2.10. Architecture Decision (ADR / C4) Gate
|
|
713
717
|
|
|
714
718
|
> **Rule `wg-architecture-decision-is-a-plan-deliverable` — migrated out of `AGENTS.rules.md` on 2026-09-10 (PR #8034).**
|
|
@@ -143,6 +143,26 @@ exception: # present ONLY when mechanism is plaintext-exception OR ce
|
|
|
143
143
|
expires_on: # YYYY-MM-DD — <=90 days out; Layer A FAILs an expired exception
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
+
## Task Design
|
|
147
|
+
|
|
148
|
+
```yaml
|
|
149
|
+
# Required when the plan creates a NEW autonomous-task surface — see the Detection table
|
|
150
|
+
# in plugins/soleur/skills/plan/references/task-design-gate.md (any new
|
|
151
|
+
# .github/workflows/*.yml, new Inngest function file/registration, CHECK_REGISTRY or
|
|
152
|
+
# reminder arm, pg_cron, host cron.d/.timer, setInterval daemon, TF-emitted workflow).
|
|
153
|
+
# Create-time only — no retrofit onto existing tasks.
|
|
154
|
+
tasks:
|
|
155
|
+
- task: # name/slug of the autonomous task being created
|
|
156
|
+
trigger: # what fires it — cron / event / label / dispatch / upstream run
|
|
157
|
+
services: # services or data surfaces it reads from and writes to
|
|
158
|
+
next: # what it triggers next ("nothing" is a valid answer)
|
|
159
|
+
human_reentry: # how a human resumes, redirects or stops it mid-run
|
|
160
|
+
dedupe: # mechanism preventing semantic double-work — MUST name something beyond
|
|
161
|
+
# `concurrency: group:` (it serializes overlapping RUNS, not the work itself)
|
|
162
|
+
source_dedupe: # how the ticket source dedupes this task, or the literal "not a ticket source"
|
|
163
|
+
# one `- task:` list item per created task
|
|
164
|
+
```
|
|
165
|
+
|
|
146
166
|
## Guard Contract
|
|
147
167
|
|
|
148
168
|
Required when the deliverable includes a guard, gate, lint, drift-check or
|
|
@@ -378,6 +398,26 @@ exception: # present ONLY when mechanism is plaintext-exception OR ce
|
|
|
378
398
|
expires_on: # YYYY-MM-DD — <=90 days out; Layer A FAILs an expired exception
|
|
379
399
|
```
|
|
380
400
|
|
|
401
|
+
## Task Design
|
|
402
|
+
|
|
403
|
+
```yaml
|
|
404
|
+
# Required when the plan creates a NEW autonomous-task surface — see the Detection table
|
|
405
|
+
# in plugins/soleur/skills/plan/references/task-design-gate.md (any new
|
|
406
|
+
# .github/workflows/*.yml, new Inngest function file/registration, CHECK_REGISTRY or
|
|
407
|
+
# reminder arm, pg_cron, host cron.d/.timer, setInterval daemon, TF-emitted workflow).
|
|
408
|
+
# Create-time only — no retrofit onto existing tasks.
|
|
409
|
+
tasks:
|
|
410
|
+
- task: # name/slug of the autonomous task being created
|
|
411
|
+
trigger: # what fires it — cron / event / label / dispatch / upstream run
|
|
412
|
+
services: # services or data surfaces it reads from and writes to
|
|
413
|
+
next: # what it triggers next ("nothing" is a valid answer)
|
|
414
|
+
human_reentry: # how a human resumes, redirects or stops it mid-run
|
|
415
|
+
dedupe: # mechanism preventing semantic double-work — MUST name something beyond
|
|
416
|
+
# `concurrency: group:` (it serializes overlapping RUNS, not the work itself)
|
|
417
|
+
source_dedupe: # how the ticket source dedupes this task, or the literal "not a ticket source"
|
|
418
|
+
# one `- task:` list item per created task
|
|
419
|
+
```
|
|
420
|
+
|
|
381
421
|
## Guard Contract
|
|
382
422
|
|
|
383
423
|
Required when the deliverable includes a guard, gate, lint, drift-check or
|
|
@@ -628,6 +668,26 @@ exception: # present ONLY when mechanism is plaintext-exception OR ce
|
|
|
628
668
|
expires_on: # YYYY-MM-DD — <=90 days out; Layer A FAILs an expired exception
|
|
629
669
|
```
|
|
630
670
|
|
|
671
|
+
## Task Design
|
|
672
|
+
|
|
673
|
+
```yaml
|
|
674
|
+
# Required when the plan creates a NEW autonomous-task surface — see the Detection table
|
|
675
|
+
# in plugins/soleur/skills/plan/references/task-design-gate.md (any new
|
|
676
|
+
# .github/workflows/*.yml, new Inngest function file/registration, CHECK_REGISTRY or
|
|
677
|
+
# reminder arm, pg_cron, host cron.d/.timer, setInterval daemon, TF-emitted workflow).
|
|
678
|
+
# Create-time only — no retrofit onto existing tasks.
|
|
679
|
+
tasks:
|
|
680
|
+
- task: # name/slug of the autonomous task being created
|
|
681
|
+
trigger: # what fires it — cron / event / label / dispatch / upstream run
|
|
682
|
+
services: # services or data surfaces it reads from and writes to
|
|
683
|
+
next: # what it triggers next ("nothing" is a valid answer)
|
|
684
|
+
human_reentry: # how a human resumes, redirects or stops it mid-run
|
|
685
|
+
dedupe: # mechanism preventing semantic double-work — MUST name something beyond
|
|
686
|
+
# `concurrency: group:` (it serializes overlapping RUNS, not the work itself)
|
|
687
|
+
source_dedupe: # how the ticket source dedupes this task, or the literal "not a ticket source"
|
|
688
|
+
# one `- task:` list item per created task
|
|
689
|
+
```
|
|
690
|
+
|
|
631
691
|
## Guard Contract
|
|
632
692
|
|
|
633
693
|
Required when the deliverable includes a guard, gate, lint, drift-check or
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Task-Design Gate (Conditional) — canonical contract
|
|
2
|
+
|
|
3
|
+
Loaded by plan §2.9.3 (emit) and deepen-plan §4.13 (halt). This file is the
|
|
4
|
+
CANONICAL copy of the gate contract; the `## Task Design` schema blocks in
|
|
5
|
+
`plan-issue-templates.md` (all three templates, after `## Encryption Posture`)
|
|
6
|
+
are verbatim schema copies (comment prologue aside).
|
|
7
|
+
|
|
8
|
+
Every plan that creates a NEW autonomous-task surface MUST emit a `## Task Design`
|
|
9
|
+
section — one `- task:` list item per created task (one file CAN create several:
|
|
10
|
+
N functions in one file ⇒ N items). **Create-time only**: never a retrofit onto
|
|
11
|
+
existing tasks.
|
|
12
|
+
|
|
13
|
+
## Detection
|
|
14
|
+
|
|
15
|
+
Detection is file-list + diff-scoped — `## Files to Create` / `## Files to Edit`
|
|
16
|
+
are the canonical headings. A plan that merely *mentions* these paths does not
|
|
17
|
+
fire. Trigger surfaces:
|
|
18
|
+
|
|
19
|
+
| Substrate | Signal |
|
|
20
|
+
|---|---|
|
|
21
|
+
| GHA workflow | a `## Files to Create` `.github/workflows/*.yml` (ANY new workflow — `scheduled-*` is convention, not enforcement; 14+ live autonomous workflows carry other names) OR a `## Files to Edit` adding a `schedule:`/`on:` trigger block to an existing workflow |
|
|
22
|
+
| Inngest function | a `## Files to Create` `.ts` under `apps/*/server/inngest/functions/` — `cron-*`/`oneshot-*`/`event-*`/unprefixed all count; a new `_`-prefixed file that adds `createFunction(`, or a function registered via an edit to `app/api/inngest/route.ts` or a `server/index.ts` `inngest.send` arm |
|
|
23
|
+
| Registered check | a `## Files to Edit` adding a `CHECK_REGISTRY` key in `event-scheduled-reminder.ts`, an arming record for a named-check, or a plan step arming a reminder via `scripts/arm-checkpoint.sh` / `POST /api/internal/schedule-reminder` (the API-arm path creates no file — the plan step is the signal) |
|
|
24
|
+
| pg_cron | a `supabase/migrations/*.sql` create/edit adding `cron.schedule(` |
|
|
25
|
+
| Host scheduler | a `cloud-init*`/infra create/edit adding `/etc/cron.d/` or a `.timer` `OnCalendar=` |
|
|
26
|
+
| In-process daemon | a `server/*.ts` create/edit adding a `setInterval(`-driven periodic task |
|
|
27
|
+
| Terraform-emitted | a `.tf` adding `github_repository_file` writing a `.github/workflows/*.yml` |
|
|
28
|
+
|
|
29
|
+
The non-`_` rule for Inngest files: shared code SHOULD be `_`-prefixed
|
|
30
|
+
(`_cron-shared.ts`), so a new non-`_` file is *presumed* a function — four
|
|
31
|
+
existing helpers break the rule today (`github-event-strategies.ts`,
|
|
32
|
+
`oauth-probe-sentinels.ts`, `action-required-sla-policy.ts`,
|
|
33
|
+
`content-promotion.ts`); over-fire on a new helper is the safe direction, and
|
|
34
|
+
new helpers should be named `_<name>.ts`.
|
|
35
|
+
|
|
36
|
+
## Required schema (canonical)
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
tasks:
|
|
40
|
+
- task: # name/slug of the autonomous task being created
|
|
41
|
+
trigger: # what fires it — cron / event / label / dispatch / upstream run
|
|
42
|
+
services: # services or data surfaces it reads from and writes to
|
|
43
|
+
next: # what it triggers next ("nothing" is a valid answer)
|
|
44
|
+
human_reentry: # how a human resumes, redirects or stops it mid-run
|
|
45
|
+
dedupe: # mechanism preventing semantic double-work — MUST name something beyond
|
|
46
|
+
# `concurrency: group:` (it serializes overlapping RUNS, not the work itself)
|
|
47
|
+
source_dedupe: # how the ticket source dedupes this task, or the literal "not a ticket source"
|
|
48
|
+
# one `- task:` list item per created task
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Reject conditions (deepen-plan §4.13)
|
|
52
|
+
|
|
53
|
+
Section missing entirely while detection fires; more than one unfenced
|
|
54
|
+
`## Task Design` section (malformed); a created task with no `- task:` item
|
|
55
|
+
naming it; a field absent, empty, or matching (case-insensitive)
|
|
56
|
+
`^\s*<field>:\s*(TODO|TBD|N/A|placeholder|WIP|FIXME|TBC|\?\?\?|-|none|see above)\s*$`;
|
|
57
|
+
a `dedupe` answer naming ONLY `concurrency: group:` / workflow-level
|
|
58
|
+
concurrency, or asserting idempotency without naming a mechanism (idempotency
|
|
59
|
+
precheck, marker dedupe, immutable ticket key); a `## Task Design` appearing
|
|
60
|
+
inside a code construct does not count — count UNFENCED `## Task Design`
|
|
61
|
+
headings outside ALL fence forms (```` ``` ````, `~~~`, `>` blockquote,
|
|
62
|
+
4-space indent).
|
|
63
|
+
|
|
64
|
+
## Skip silently
|
|
65
|
+
|
|
66
|
+
When the plan creates no new autonomous-task surface per the table above.
|
|
67
|
+
|
|
68
|
+
## Recovery
|
|
69
|
+
|
|
70
|
+
Add the `## Task Design` section per `plan-issue-templates.md` (or fix the
|
|
71
|
+
rejected field), then re-run deepen-plan.
|
|
72
|
+
|
|
73
|
+
**Why:** #11015 — every answer to the six task-design questions exists somewhere in the
|
|
74
|
+
machinery (`concurrency: group:`, idempotency prechecks, `action-required` re-entry,
|
|
75
|
+
dedupe markers), but none was required at design time.
|
package/skills/schedule/SKILL.md
CHANGED
|
@@ -106,7 +106,19 @@ Inspect `$ARGUMENTS`:
|
|
|
106
106
|
|
|
107
107
|
**Step 0b: Check arguments (recurring mode)**
|
|
108
108
|
|
|
109
|
-
If `$ARGUMENTS` contains `--name`, `--skill`, `--cron`, and `--model` flags, extract values directly
|
|
109
|
+
If `$ARGUMENTS` contains `--name`, `--skill`, `--cron`, and `--model` flags, extract values directly, run the task-design check below, then skip to Step 2. Validate each value using the same rules below. If any required flag is missing, proceed to Step 1 for the missing parameters only. Optional flags: `--timeout` (minutes, default 30) and `--max-turns` (default 30).
|
|
110
|
+
|
|
111
|
+
**Task-design flags (recurring mode).** Every generated workflow stamps a `# Task design:` header (Step 3a) carrying answers to the six task-design questions. `trigger` is derived from the collected `--cron` + `workflow_dispatch`; the other five come from Step 1's questions or these flags:
|
|
112
|
+
|
|
113
|
+
- `--design-services <text>` — services the task reads from / writes to
|
|
114
|
+
- `--design-next <text>` — what the task triggers next (`nothing` is a valid answer)
|
|
115
|
+
- `--design-reentry <text>` — how a human resumes, redirects or stops it mid-run
|
|
116
|
+
- `--design-dedupe <text>` — the mechanism preventing semantic double-work. MUST name something beyond `concurrency: group:` (e.g. an idempotency precheck, a marker dedupe, an immutable ticket key) — `concurrency:` only serializes overlapping RUNS, it does not stop the same work being done twice.
|
|
117
|
+
- `--design-source-dedupe <text>` — how the ticket source dedupes the task, or the literal `not a ticket source`.
|
|
118
|
+
|
|
119
|
+
Every `--design-*` value and every Step 1 design answer MUST match `^[\x20-\x7e]{1,400}$` — single printable line, no CR/LF. A newline escapes the `# Task design:` comment into raw workflow YAML; this regex is the same class of load-bearing injection defense as Step 0c's flag regexes.
|
|
120
|
+
|
|
121
|
+
In a non-interactive context (flags supplied, no operator answering Step 1), a **missing, placeholder (`TODO`/`TBD`/`N/A`), or concurrency-only `dedupe` design answer is a hard error** — emit `ERROR: missing or invalid task-design answer for <question> (pass --design-<flag> or run interactively)` and stop. This mirrors `--once`'s no-fallback posture: a task must never be created with unwritten design answers. The requirement applies to **newly created** tasks only — existing `.github/workflows/scheduled-*.yml` files are not retroactively gated.
|
|
110
122
|
|
|
111
123
|
**Step 0c: Check arguments (one-time mode)**
|
|
112
124
|
|
|
@@ -198,6 +210,18 @@ One-time mode does not pass through Step 1 — all flags are mandatory at the co
|
|
|
198
210
|
|
|
199
211
|
6. **Max turns** — Maximum number of agent turns before stopping. Default: 30. Validate: positive integer, minimum 5 turns. Budget formula: plugin overhead (~10 turns) + task tool calls + error buffer (~5). Multi-platform data collection or PR-based persist workflows typically need 40-50 turns.
|
|
200
212
|
|
|
213
|
+
7. **Services read/written** — Which services or data surfaces the task reads from and writes to (e.g. "reads Sentry issues, writes GitHub issue comments"). Stamped into the `# Task design:` header.
|
|
214
|
+
|
|
215
|
+
8. **Triggers next** — What this task triggers next when it finishes (another task, a PR, a notification). `nothing` is a valid, complete answer.
|
|
216
|
+
|
|
217
|
+
9. **Human re-entry** — How a human resumes, redirects or stops the task mid-run (e.g. "comment on the tracking issue", "`gh workflow run` / `soleur:cron-delete`").
|
|
218
|
+
|
|
219
|
+
10. **Dedupe** — The mechanism preventing semantic double-work. The answer MUST name something beyond `concurrency: group:` — that only serializes overlapping runs; it does not stop the same work being done twice (e.g. an idempotency precheck, a marker/dedupe comment, an immutable ticket key).
|
|
220
|
+
|
|
221
|
+
11. **Source dedupe** — How the ticket source dedupes this task if it files tickets, or the literal `not a ticket source` when the task never creates tickets.
|
|
222
|
+
|
|
223
|
+
Validate: items 7-11 each MUST be a single printable line (`^[\x20-\x7e]{1,400}$`) — a newline escapes the `# Task design:` comment into raw workflow YAML. Items 7-11 may be skipped when the corresponding `--design-*` flags (Step 0b) already carry answers.
|
|
224
|
+
|
|
201
225
|
**Step 2: Resolve action SHAs**
|
|
202
226
|
|
|
203
227
|
Pin GitHub Actions to commit SHAs for supply-chain security. For each action (`actions/checkout@v4`, `anthropics/claude-code-action@v1`), resolve the SHA:
|
|
@@ -230,6 +254,13 @@ gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
|
|
|
230
254
|
Create `.github/workflows/scheduled-<NAME>.yml` with this content, replacing all `<PLACEHOLDER>` values:
|
|
231
255
|
|
|
232
256
|
```yaml
|
|
257
|
+
# Task design:
|
|
258
|
+
# trigger: cron '<CRON_EXPRESSION>' + workflow_dispatch
|
|
259
|
+
# services: <DESIGN_SERVICES>
|
|
260
|
+
# next: <DESIGN_NEXT>
|
|
261
|
+
# human_reentry: <DESIGN_REENTRY>
|
|
262
|
+
# dedupe: <DESIGN_DEDUPE>
|
|
263
|
+
# source_dedupe: <DESIGN_SOURCE_DEDUPE>
|
|
233
264
|
name: "Scheduled: <DISPLAY_NAME>"
|
|
234
265
|
|
|
235
266
|
on:
|
|
@@ -332,6 +363,13 @@ Create `.github/workflows/scheduled-<NAME>.yml` with this content, replacing all
|
|
|
332
363
|
<!-- once-template-begin -->
|
|
333
364
|
|
|
334
365
|
```yaml
|
|
366
|
+
# Task design:
|
|
367
|
+
# trigger: one-time cron '<ONE_TIME_CRON>' + workflow_dispatch (D3 date guard pins the year)
|
|
368
|
+
# services: reads the pinned issue comment via gh api (D1); writes issue comments and the D4 neutralization commit (contents/issues/pull-requests: write)
|
|
369
|
+
# next: nothing — self-neutralizes on first successful fire (D4)
|
|
370
|
+
# human_reentry: the pinned issue-comment thread ($ISSUE_NUMBER / $COMMENT_ID, D5-pinned)
|
|
371
|
+
# dedupe: D3 date guard + D4 self-strip of the schedule: trigger + concurrency: group schedule-once-<NAME>
|
|
372
|
+
# source_dedupe: not a ticket source — fires once against a pre-existing comment, never files tickets
|
|
335
373
|
name: "Scheduled (once): <DISPLAY_NAME>"
|
|
336
374
|
|
|
337
375
|
on:
|