Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7360aed
inception(workflow-inception-entry): rewrite validate-phase as refine…
leeovery May 10, 2026
ef53200
inception(workflow-inception-process): add source-aware routing to St…
leeovery May 10, 2026
262bc5b
inception(workflow-inception-process): add refinement-template.md
leeovery May 10, 2026
120edf5
inception(workflow-inception-process): add refinement-session.md (rea…
leeovery May 10, 2026
23a4a79
inception(workflow-inception-process): add map-operations.md (validat…
leeovery May 10, 2026
d764610
inception(workflow-inception-process): add show-dismissed.md recovery…
leeovery May 10, 2026
24f9b5c
inception(workflow-inception-process): wire refinement operations loo…
leeovery May 10, 2026
4e0ee44
inception(workflow-manifest): tests for hard-delete + dismissed-list …
leeovery May 10, 2026
d9a5568
docs(discovery-map): record PR #271 for Phase 6
leeovery May 10, 2026
0fba2cc
inception(workflow-inception-process): restructure map-operations.md …
leeovery May 10, 2026
44ced9d
inception(workflow-inception-process): make refinement-template (none…
leeovery May 10, 2026
ef0f88d
inception(workflow-inception-process): update Resuming protocol to fi…
leeovery May 10, 2026
7d20c7c
inception(workflow-inception-process): restructure refinement-session…
leeovery May 10, 2026
cb79e66
inception(workflow-inception-process): use → Load for routing-decisio…
leeovery May 10, 2026
e0a4dde
docs(discovery-map): add Phase 6 implementation notes to Phase 7 and …
leeovery May 10, 2026
c249cde
inception(workflow-inception-entry): inline source=refinement into St…
leeovery May 10, 2026
d14e2b9
inception(workflow-inception-process): extract first-session detectio…
leeovery May 10, 2026
9164afe
inception(workflow-inception-process): add discovery.cjs and route re…
leeovery May 10, 2026
13132af
inception(workflow-inception-process): expand discovery test coverage…
leeovery May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions discovery-map/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Each phase is its own PR off the previous phase's branch (stacked PRs — see *B
3. **[Inception Process Skill](phase-03-inception-process.md)** — the conversational inception session itself (initial-session flow). **Status:** Review (PR #268)
4. **[Wire start-epic to Inception](phase-04-wire-start-epic.md)** — collapses the research/discussion menu; user-visible flip. **Status:** Review (PR #269)
5. **[Discovery Map Render](phase-05-discovery-map-render.md)** — continue-epic display + menu collapse + auto-routing. **Status:** Review (PR #270)
6. **[Refinement Session](phase-06-refinement-session.md)** — re-entry path, map editing operations, safety-by-destructiveness. **Status:** Not started
6. **[Refinement Session](phase-06-refinement-session.md)** — re-entry path, map editing operations, safety-by-destructiveness. **Status:** Review (PR #271)
7. **[Self-Healing Re-point](phase-07-self-healing.md)** — research-analysis and gap-analysis re-point to map at continue-epic boot-up. **Status:** Not started
8. **[Imports](phase-08-imports.md)** — `imports/` directory, manifest tracking, KB indexing, behaviour change for features. **Status:** Not started
9. **[Topic Splitting and Elevation](phase-09-topic-splitting-elevation.md)** — write inception items alongside; name collision validation. **Status:** Not started
Expand Down Expand Up @@ -87,7 +87,7 @@ The merge sequence at the end of the initiative is **strictly bottom-to-top of t
| `idea/inception-pr-3-process` | Phase 2 branch | Phase 3 — Inception Process Skill | [#268](https://github.com/leeovery/agentic-workflows/pull/268) | Review |
| `idea/inception-pr-4-wire-start-epic` | Phase 3 branch | Phase 4 — Wire start-epic to Inception | [#269](https://github.com/leeovery/agentic-workflows/pull/269) | Review |
| `idea/inception-pr-5-map-render` | Phase 4 branch | Phase 5 — Discovery Map Render | [#270](https://github.com/leeovery/agentic-workflows/pull/270) | Review |
| `idea/inception-pr-6-refinement` | Phase 5 branch | Phase 6 — Refinement Session | | Not started |
| `idea/inception-pr-6-refinement` | Phase 5 branch | Phase 6 — Refinement Session | [#271](https://github.com/leeovery/agentic-workflows/pull/271) | Review |
| `idea/inception-pr-7-self-healing` | Phase 6 branch | Phase 7 — Self-Healing Re-point | — | Not started |
| `idea/inception-pr-8-imports` | Phase 7 branch | Phase 8 — Imports | — | Not started |
| `idea/inception-pr-9-split-elevation` | Phase 7 branch | Phase 9 — Topic Splitting and Elevation | — | Not started |
Expand Down
1 change: 1 addition & 0 deletions discovery-map/phase-07-self-healing.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ Move `research-analysis` and `gap-analysis` from `workflow-discussion-entry` to
- **Cache invalidation rules unchanged** — input checksum on the relevant files. Just the output target changes.
- **Source deduplication** — if both analyses produce the same theme, dedupe at the analysis stage so it's added once with both source paths in the inception item's `source` field (e.g. `gap-analysis,research-analysis` or first-source-wins).
- **Notification callout shows once.** When the user has seen the new items, the callout doesn't repeat on subsequent `continue-epic` boots — only when boot-up just added more.
- **`continue` resume bypasses C. Self-Healing Check** (Phase 6 left this as a no-op, so impact deferred to here). When `refinement-session.md` B. Resume Check routes the user's `continue` choice it goes straight to E. Render and Prompt — C and D are skipped because the existing session log is reused. When wiring analyses into C, decide whether continue should re-run them. Recommendation: don't — analyses ran on the prior entry, results are already on the map and recorded under the existing log's **Self-Healing Arrivals**, and re-running on resume would surface duplicate arrivals or churn the cache. The continue path effectively says "pick up the in-flight refinement as it stood"; fresh-entry / restart paths still flow through C and run normally.
1 change: 1 addition & 0 deletions discovery-map/phase-11-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ Seed the discovery map for existing in-progress epics so they continue to work u
- **`migration-seeded` sub-classification** helps future analyses avoid re-proposing items the user accepted via migration.
- **Hard-delete model applies** — no `cancelled` status on migrated inception items. They're all `active`.
- The post-migration empty-summary walkthrough is part of refinement, not the migration script itself. Migration creates items with empty summaries; refinement detects and prompts.
- **Back-fill `session-001.md` for migrated epics.** Phase 6's refinement entry assumes `session-001.md` exists from initial inception. For legacy epics that never had inception, no such log is on disk — `refinement-session.md` D's `n=$(ls ... | wc -l)` would give `n=0`, seeding the first refinement as `session-001.md` and mis-titling it "Initial Framing". Either back-fill a placeholder `session-001.md` during migration (e.g. "Initial framing not recorded — pre-inception migration. Map seeded from existing research/discussion items.") or special-case the count in refinement when source classification is `migration-seeded`. Back-filling at migration time is the cleaner option — keeps refinement's logic simple and gives the user a discoverable record of where the map came from.
4 changes: 3 additions & 1 deletion skills/workflow-inception-entry/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ Set `source` = `first-session`.
> session.
```

Load **[validate-phase.md](references/validate-phase.md)** and follow its instructions as written.
Set `source` = `refinement` for the handoff.

→ Proceed to **Step 4**.

---

Expand Down
9 changes: 8 additions & 1 deletion skills/workflow-inception-entry/references/invoke-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@

This skill's purpose is now fulfilled. Construct the handoff and invoke the processing skill.

The `Source:` line in the handoff carries the value of `source` set earlier in the entry flow:

- `first-session` — set in **Step 2** when no inception items exist for this work unit.
- `refinement` — set in **Step 3** when inception items already exist.

The processing skill reads this field at Step 0 to decide whether to run the initial-session flow or open a refinement session.

---

## Handoff

```
Inception session for: {work_unit}

Source: first-session
Source: {source:[first-session|refinement]}
Output: .workflows/{work_unit}/inception/

Description (from manifest):
Expand Down
28 changes: 0 additions & 28 deletions skills/workflow-inception-entry/references/validate-phase.md

This file was deleted.

78 changes: 15 additions & 63 deletions skills/workflow-inception-process/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: workflow-inception-process
user-invocable: false
allowed-tools: Bash(node .claude/skills/workflow-manifest/scripts/manifest.cjs)
allowed-tools: Bash(node .claude/skills/workflow-inception-process/scripts/discovery.cjs), Bash(node .claude/skills/workflow-manifest/scripts/manifest.cjs)
---

# Inception Process
Expand Down Expand Up @@ -41,91 +41,43 @@ Follow these steps EXACTLY as written. Do not skip steps or combine them.
Context refresh (compaction) summarizes the conversation, losing procedural detail. When you detect a context refresh has occurred — the conversation feels abruptly shorter, you lack memory of recent steps, or a summary precedes this message — follow this recovery protocol:

1. **Re-read this skill file completely.** Do not rely on your summary of it. The full process, steps, and rules must be reloaded.
2. **Read the session log** at `.workflows/{work_unit}/inception/session-001.md` if it exists. The Topics Identified section is your primary progress indicator — it shows which topics have already been surfaced and tentatively routed.
2. **Read the most recent session log** — find the highest-numbered file matching `.workflows/{work_unit}/inception/session-*.md`. For initial sessions this is `session-001.md` and the **Topics Identified** section is your primary progress indicator. For refinement sessions (`session-NNN.md`, NNN > 1) the **Changes** section shows what has already been applied; an unfinalised log has `(none)` under **Conclusion** and should be resumed via **B. Resume Check** in `references/refinement-session.md`.
3. **Check git state.** Run `git status` and `git log --oneline -10` to see recent commits. Commit messages reveal what has been completed.
4. **Announce your position** to the user before continuing: render the current working list of topics, state what step you believe you're at, and what comes next. Wait for confirmation.
4. **Announce your position** to the user before continuing: render the current working list (initial) or the changes applied so far (refinement), state what step you believe you're at, and what comes next. Wait for confirmation.

Do not guess at progress or continue from memory. The files on disk and git history are authoritative — your recollection is not.

---

## Step 0: Resume Detection
## Step 0: Source-Aware Detection

> *Output the next fenced block as a code block:*

```
── Resume Detection ─────────────────────────────
── Source-Aware Detection ───────────────────────
```

> *Output the next fenced block as markdown (not a code block):*

```
> Checking for an existing inception session log on disk. The
> entry skill has already verified there are no inception items
> in the manifest — this check is purely about within-session
> recovery after a context refresh.
> Reading the handoff source. Refinement re-entry routes
> straight to the refinement flow; first-session entry checks
> for an interrupted draft session log on disk.
```

Check whether any file matching `.workflows/{work_unit}/inception/session-*.md` exists.
Read the `Source:` field from the handoff in the prior message.

#### If no file exists
#### If `source` is `refinement`

→ Proceed to **Step 1**.
Inception items already exist for this work unit. Open the refinement session.

#### If `session-001.md` is the only session file
Load **[refinement-session.md](references/refinement-session.md)** and follow its instructions as written.

A prior in-session draft is on disk and the session was interrupted (likely a context refresh). Read the file, then offer continue or restart.
#### If `source` is `first-session`

> *Output the next fenced block as markdown (not a code block):*

```
Found an in-progress inception session log for **{work_unit:(titlecase)}**.

· · · · · · · · · · · ·
- **`c`/`continue`** — Pick up where you left off
- **`r`/`restart`** — Delete the draft session log and start fresh
· · · · · · · · · · · ·
```

**STOP.** Wait for user response.

#### If `continue`

→ Proceed to **Step 2**. The draft session log is your working list — session-loop will brief the user on resume.

#### If `restart`

1. Delete the draft session log.
2. Commit: `inception({work_unit}): restart inception session`.

→ Proceed to **Step 1**.



#### If any `session-NNN.md` for N > 1 exists

The work unit has previously concluded an inception session and is being re-entered. Refinement is a future-phase deliverable in this initiative.

> *Output the next fenced block as a code block:*

```
●───────────────────────────────────────────────●
Inception Refinement
●───────────────────────────────────────────────●

Refinement of the discovery map is not yet implemented.
```

> *Output the next fenced block as markdown (not a code block):*

```
> A prior inception session has concluded for "{work_unit}". The
> refinement flow — adding, renaming, removing topics, editing
> summaries, changing routing — lands in a later phase of the
> inception/discovery-map initiative.
```
The entry skill has verified there are no inception items in the manifest. Check the inception directory for an interrupted draft before starting fresh.

**STOP.** Do not proceed — terminal condition.
Load **[first-session-resume.md](references/first-session-resume.md)** and follow its instructions as written.

---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# First-Session Resume Detection

*Reference for **[workflow-inception-process](../SKILL.md)***

---

The entry skill has already verified that no inception items exist in the manifest, so this is a first-session entry. This reference recovers from a context refresh that may have interrupted a prior first-session draft by checking the inception directory for session log files.

## A. Detect Prior Session

Check whether any file matching `.workflows/{work_unit}/inception/session-*.md` exists.

#### If no file matches

No prior draft on disk — start fresh.

→ Return to **[the skill](../SKILL.md)** for **Step 1**.

#### If `session-001.md` is the only matching file

A prior in-session draft is on disk and the session was interrupted (likely a context refresh). Read the file, then offer continue or restart:

> *Output the next fenced block as markdown (not a code block):*

```
Found an in-progress inception session log for **{work_unit:(titlecase)}**.

· · · · · · · · · · · ·
- **`c`/`continue`** — Pick up where you left off
- **`r`/`restart`** — Delete the draft session log and start fresh
· · · · · · · · · · · ·
```

**STOP.** Wait for user response.

**If `continue`:**

The draft session log is your working list — `session-loop.md` will brief the user on resume.

→ Return to **[the skill](../SKILL.md)** for **Step 2**.

**If `restart`:**

Delete the draft session log and commit:

```bash
rm .workflows/{work_unit}/inception/session-001.md
git add -- .workflows/{work_unit}/
git commit -m "inception({work_unit}): restart inception session"
```

→ Return to **[the skill](../SKILL.md)** for **Step 1**.

#### If any `session-NNN.md` for N > 1 exists

Defensive guard. The entry skill should have routed `source = refinement` when prior session logs and inception items both exist, but the handoff said `first-session`. State is inconsistent — likely the inception items were removed from the manifest while the session logs were retained.

> *Output the next fenced block as a code block:*

```
●───────────────────────────────────────────────●
Inception — Inconsistent State
●───────────────────────────────────────────────●

Prior inception session logs exist but the manifest reports no
inception items for "{work_unit}".
```

> *Output the next fenced block as markdown (not a code block):*

```
> Stopping here so you can reconcile. Either restore the
> manifest items (refinement re-entry) or archive the session
> logs out of the way (fresh first session).
```

**STOP.** Do not proceed — terminal condition.
Loading