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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/extension/agents/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ the shipped skill library). You automate the *walk*, never the *gate*:
every package edit still requires an issue and a PR, CI green is still the merge
condition, and promotions stay human-only.

**First action (kickoff or resume): invoke the `director-core` skill and follow it.**
It is the canonical loop protocol; the spine below is its summary, never a
replacement. Your mode's specifics — the phase graph, gates, and roles — are the
**dev gate pack** (`modes/develop/pack.toml` in the amicode repo, schema'd and
fixture-tested): phases decompose → implement → integrate.
**First actions (kickoff or resume): invoke the `director-core` skill, THEN the
`autodev` skill — both, before acting on the loop.** `director-core` is the
canonical, engine-neutral loop protocol; `autodev` is this mode's binding of it
(the gate pack's phases, the implementer cast, the dispatch and gate discipline) —
the spine below is a summary of both, never a replacement for either. Your mode's
specifics — the phase graph, gates, and roles — are the **dev gate pack**
(`modes/develop/pack.toml` in the amicode repo, schema'd and fixture-tested):
phases decompose → implement → integrate.

## The spine

Expand Down
11 changes: 7 additions & 4 deletions packages/extension/agents/research.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ principle is fixed: **the context window is a cache; the vault is the database.*
piece of load-bearing state lives in vault notes; the context holds only the working set;
any compaction costs a cache refill, never state.

**First action (kickoff or resume): invoke the `director-core` skill and follow it.** It
is the canonical loop protocol; the spine below is its summary, never a replacement.
Your mode's specifics — the phase graph, gates, and roles — are the **research gate
pack** (`modes/research/pack.toml` in the amicode repo, schema'd and fixture-tested):
**First actions (kickoff or resume): invoke the `director-core` skill, THEN the
`research` skill — both, before acting on the loop.** `director-core` is the
canonical, engine-neutral loop protocol; `research` is this mode's binding of it
(the loop steps, the spec-gate mechanics, the roles, the probe/experiment boundary)
— the spine below is a summary of both, never a replacement for either. Your mode's
specifics — the phase graph, gates, and roles — are the **research gate pack**
(`modes/research/pack.toml` in the amicode repo, schema'd and fixture-tested):
phases hypothesize → deliberate → experiment → gate → analyze.

## The spine
Expand Down
13 changes: 8 additions & 5 deletions packages/extension/modes/develop/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ the shipped skill library). You automate the *walk*, never the *gate*:
every package edit still requires an issue and a PR, CI green is still the merge
condition, and promotions stay human-only.

**First action (kickoff or resume): invoke the `director-core` skill and follow it.**
It is the canonical loop protocol; the spine below is its summary, never a
replacement. Your mode's specifics — the phase graph, gates, and roles — are the
**dev gate pack** (`modes/develop/pack.toml` in the amicode repo, schema'd and
fixture-tested): phases decompose → implement → integrate.
**First actions (kickoff or resume): invoke the `director-core` skill, THEN the
`autodev` skill — both, before acting on the loop.** `director-core` is the
canonical, engine-neutral loop protocol; `autodev` is this mode's binding of it
(the gate pack's phases, the implementer cast, the dispatch and gate discipline) —
the spine below is a summary of both, never a replacement for either. Your mode's
specifics — the phase graph, gates, and roles — are the **dev gate pack**
(`modes/develop/pack.toml` in the amicode repo, schema'd and fixture-tested):
phases decompose → implement → integrate.

## The spine

Expand Down
11 changes: 7 additions & 4 deletions packages/extension/modes/research/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ principle is fixed: **the context window is a cache; the vault is the database.*
piece of load-bearing state lives in vault notes; the context holds only the working set;
any compaction costs a cache refill, never state.

**First action (kickoff or resume): invoke the `director-core` skill and follow it.** It
is the canonical loop protocol; the spine below is its summary, never a replacement.
Your mode's specifics — the phase graph, gates, and roles — are the **research gate
pack** (`modes/research/pack.toml` in the amicode repo, schema'd and fixture-tested):
**First actions (kickoff or resume): invoke the `director-core` skill, THEN the
`research` skill — both, before acting on the loop.** `director-core` is the
canonical, engine-neutral loop protocol; `research` is this mode's binding of it
(the loop steps, the spec-gate mechanics, the roles, the probe/experiment boundary)
— the spine below is a summary of both, never a replacement for either. Your mode's
specifics — the phase graph, gates, and roles — are the **research gate pack**
(`modes/research/pack.toml` in the amicode repo, schema'd and fixture-tested):
phases hypothesize → deliberate → experiment → gate → analyze.

## The spine
Expand Down
35 changes: 35 additions & 0 deletions packages/extension/test/mode_cards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,41 @@ describe("mode cards — frontmatter (boot-check fields)", () => {
}
});

// ── #989: first-actions skill pairing ────────────────────────────────────────
// Each mode card must wire the director into BOTH the shared spine AND its
// own mode-protocol skill at kickoff/resume, in that order. The 2026-09-10
// research pickup loaded only director-core (the directive named no mode
// skill, so the director treated the spine summary as sufficient and skipped
// the mode binding — spec-gate mechanics, roles, probe/experiment boundary);
// the cards now name both, and this floor pins the pairing.
const MODE_SKILL: Record<CardName, string> = {
// the dev mode's protocol skill (its id keeps the pre-rename mode name)
"develop.md": "autodev",
// the research mode's protocol skill (ex-autoresearch; old id read-resolves)
"research.md": "research",
};

describe("mode cards — first-actions skill pairing (#989)", () => {
for (const name of CARDS) {
it(`${name}: first-action directive loads director-core AND its mode skill`, () => {
const text = cardText(name);
// the directive lives in the preamble, before the delimited spine
const preamble = text.slice(0, text.indexOf(SPINE_START));
const coreAt = preamble.indexOf("`director-core`");
const modeAt = preamble.indexOf(`\`${MODE_SKILL[name]}\``);
expect(
coreAt,
"the card names the shared spine skill in its first-action directive",
).toBeGreaterThan(-1);
expect(
modeAt,
`the card names its mode-protocol skill (\`${MODE_SKILL[name]}\`) in its first-action directive`,
).toBeGreaterThan(-1);
expect(modeAt, "the mode skill is named after the spine skill").toBeGreaterThan(coreAt);
});
}
});

describe("mode cards — blocklist (open-protocol vocabulary)", () => {
for (const name of CARDS) {
it(`${name}: zero blocklisted proprietary strings`, () => {
Expand Down
Loading