Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
212ff7a
feat(meta): operation-focused capability skills + skill_operations on…
m2ux Apr 27, 2026
e1ff963
refactor(meta): consolidate workflow-engine + drop primary-skill acro…
m2ux Apr 27, 2026
e91fdb0
refactor(meta): per-operation resources + id-based refs
m2ux Apr 27, 2026
5a35c62
refactor(meta): clean up activity operation refs and split branching …
m2ux Apr 27, 2026
2c0a3ab
refactor(meta): migrate activity prose logic into operations
m2ux Apr 27, 2026
2632a83
refactor(meta): split discover-session::identify-target into operations
m2ux Apr 27, 2026
a823cdd
refactor(meta): inline operation invocation + when expressions in act…
m2ux Apr 27, 2026
2e00d4f
docs(meta): align prompt resources with operation-focused model
m2ux Apr 27, 2026
f1db201
refactor(meta): scope errors per-operation across all skills
m2ux Apr 27, 2026
67647e3
docs(meta): drop role-side prefixes from workflow-engine op descriptions
m2ux Apr 27, 2026
92167c6
refactor(meta): scope role-specific rules per-operation; audit duplic…
m2ux Apr 27, 2026
3f24749
refactor(meta): align harness-compat layout with other capability skills
m2ux Apr 27, 2026
0e2beb0
refactor(meta): subsume harness mappings into the prose field
m2ux Apr 27, 2026
7969660
refactor(meta): update persist/restore to agent-managed model and rem…
m2ux Apr 27, 2026
e09cb9d
feat(work-package): add reconcile-assumptions and classify-problem sk…
m2ux Apr 27, 2026
7ee62d5
refactor(work-package): move step-level skill refs to activity-level …
m2ux Apr 27, 2026
67dbfa4
fix(meta): thread post-respond session token back to worker on checkp…
m2ux Apr 27, 2026
bbfb7d9
fix(meta): prevent orchestrator from inlining activities on workflow …
m2ux Apr 27, 2026
9184aa0
docs(meta): clarify step_manifest shape in workflow-engine rule
m2ux Apr 28, 2026
d13f122
rules addition
m2ux Apr 28, 2026
3e254d4
fix(meta): require AskQuestion for every checkpoint, no shortcut auto…
m2ux Apr 28, 2026
94e5e9e
fix(meta): slim workflow-state.json — drop token-derivable + derived …
m2ux Apr 28, 2026
024288b
fix(work-package): require GitHub issue reference in changes/ fragment
m2ux Apr 28, 2026
25b80b9
refactor(meta): consolidate post-activity commit invariant in workflo…
m2ux Apr 28, 2026
008d7aa
pr desc update
m2ux Apr 28, 2026
10f62b0
feat(work-package): self-assign PR and link PR to ticket on start
m2ux Apr 28, 2026
bbb4ca7
feat(work-package): add cargo-operations skill enforcing inline resou…
m2ux Apr 28, 2026
8407bd7
fix(work-package): wire cargo-operations into activities and strip ra…
m2ux Apr 28, 2026
c53f28f
fix(meta): disambiguate start_session parameter binding and pin stale…
m2ux Apr 28, 2026
9ba05f3
refactor(work-package): migrate validate to operation-call form; spli…
m2ux Apr 28, 2026
dcaa2f3
fix(work-package): correct TOON list count tags so skills parse again…
m2ux Apr 28, 2026
050baa3
fix(work-package): wire cargo-operations into implement loop's run-te…
m2ux Apr 28, 2026
8fe943a
rules updates
m2ux Apr 28, 2026
758b50e
fix(meta): align operational-discipline rule count with bullets
m2ux Apr 29, 2026
373a4b3
refactor: address eleven workflow-execution friction points
m2ux Apr 29, 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ recognition[4]:
- scan github actions
- cicd security audit
skills:
primary: meta/activity-worker
supporting[1]:
- execute-cicd-audit
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ recognition[3]:
- reconnaissance
- map triggers
skills:
primary: meta/activity-worker
supporting[1]:
- execute-cicd-audit
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ recognition[3]:
- run detection
- primary scan
skills:
primary: meta/activity-worker
supporting[1]:
- execute-cicd-audit
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ recognition[3]:
- consolidate findings
- finalize report
skills:
primary: meta/activity-worker
supporting[1]:
- execute-cicd-audit
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ recognition[2]:
- scan submodule workflows
- run detection patterns
skills:
primary: meta/activity-worker
supporting[1]:
- execute-sub-agent
required: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ recognition[2]:
- verify scan results
- check scan completeness
skills:
primary: meta/activity-worker
supporting[1]:
- execute-sub-agent
required: false
Expand Down
1 change: 0 additions & 1 deletion cicd-pipeline-security-audit/activities/07-sub-merge.toon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ recognition[2]:
- merge findings
- consolidate scan results
skills:
primary: meta/activity-worker
supporting[1]:
- execute-sub-agent
required: false
Expand Down
1 change: 0 additions & 1 deletion cicd-pipeline-security-audit/workflow.toon
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ rules[19]:
- "AGENT OUTPUT PERSISTENCE: Every sub-agent MUST write its own structured output as a JSON file to the planning folder. The orchestrator verifies all expected files exist BEFORE dispatching V or M. If any file is missing, the orchestrator re-dispatches the agent. File naming: s{n}-{submodule}.json for scanners, verification-report.json for V, merged-findings.json and reconciliation-table.json for M."
- "SUB-AGENT BOOTSTRAP: Every sub-agent receives workflow-server bootstrap instructions in its spawn-agent prompt (harness-compat): call start_session(session_token, agent_id) to inherit the dispatched session, then next_activity({ activity_id: <assigned> }), then follow activity steps sequentially. Sub-agents self-load their activity definition — the orchestrator does NOT inline the activity content."
skills:
primary: meta/workflow-orchestrator
variables[14]:
- name: target_submodules
type: string
Expand Down
45 changes: 23 additions & 22 deletions meta/activities/00-discover-session.toon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id: discover-session
version: 3.0.0
version: 7.0.0
name: Discover Session
description: "Identify the user's intended target workflow and search for an existing client session to resume. Calls list_workflows for the catalog, matches the user request against workflow descriptions, scans planning folders for saved client sessions matching the request's identifying context (ticket, branch, PR, work-package name), and presents resume / workflow-selection checkpoints. Always runs first — bootstrap delegates target identification and session matching here."
description: "Identify the user's intended target workflow and search for an existing client session to resume. Always runs first — bootstrap delegates target identification and session matching here."
problem: The meta workflow needs to determine which client workflow to dispatch and whether to resume an existing client session, before initialize-session creates or adopts the client session
recognition[4]:
- start a workflow
Expand All @@ -10,30 +10,31 @@ recognition[4]:
- work on
required: true
estimatedTime: 1-2m
skills:
primary: meta/activity-worker
supporting[1]:
- state-management
rules[2]:
- "Always call list_workflows — never hardcode the workflow catalog"
operations[5]:
- "workflow-engine::list-workflows"
- "workflow-engine::match-target-workflow"
- "workflow-engine::extract-identifying-context"
- "workflow-engine::scan-saved-sessions"
- "workflow-engine::match-saved-session"
rules[1]:
- "Match identifying context against saved sessions even when the user said 'start' — surface saved state via the resume-session checkpoint"
steps[5]:
steps[7]:
- id: list-available-workflows
name: List Available Workflows
description: "Call list_workflows (no session token required) to retrieve the catalog of available workflows with their titles, descriptions, and recognition tags. Cache the catalog for the match step."
- id: identify-target
name: Identify Target Workflow and Context
description: "Compare the user's request against the workflow catalog. Match on title, description keywords, and recognition tags. Set target_workflow_id to the matched workflow. If multiple workflows could match, set workflow_match_ambiguous = true so the workflow-selection checkpoint fires. Also extract identifying context — ticket number (GitHub #N, Jira PROJ-123), branch name, PR number, or work-package description — for the saved-session match step."
description: "workflow-engine::list-workflows()"
- id: match-target
description: "workflow-engine::match-target-workflow(user_request: {user_request}, catalog: {workflow_catalog})"
- id: extract-context
description: "workflow-engine::extract-identifying-context(user_request: {user_request})"
- id: scan-planning-folders
name: Scan Planning Folders for Saved Sessions
description: "List directories under .engineering/artifacts/planning/. For each directory containing a workflow-state.toon file, read it and extract: saved sessionToken, workflowId, planningFolder, and key state variables (issue_number, branch_name, pr_number, work-package description). Collect all candidates whose workflowId matches target_workflow_id."
skill: state-management
description: "workflow-engine::scan-saved-sessions(target_workflow_id: {target_workflow_id})"
- id: match-session
name: Match Saved Session to User Request
description: "Compare the identifying context from identify-target against the candidate saved sessions. Match on issue_number, branch_name, pr_number, or directory name containing the ticket identifier. If multiple matches, prefer the most recently updated by savedAt. If no matches, set has_saved_state = false."
- id: prepare-result
name: Prepare Discovery Result
description: "If a match was found: set has_saved_state = true, saved_session_token = matched session's sessionToken, planning_folder_path = matched session's planningFolder. If no match: set has_saved_state = false. Set is_resuming = false by default; the resume-session checkpoint may flip it to true."
description: "workflow-engine::match-saved-session(context: {identifying_context}, candidates: {saved_session_candidates})"
- id: record-match
description: "Set has_saved_state = true; copy saved_session_token and planning_folder_path from the matched candidate."
when: "has_saved_state == true"
- id: record-no-match
description: "Set has_saved_state = false; the resume-session checkpoint will not fire."
when: "has_saved_state == false"
checkpoints[2]:
- id: workflow-selection
name: Workflow Selection
Expand Down
67 changes: 23 additions & 44 deletions meta/activities/01-initialize-session.toon
Original file line number Diff line number Diff line change
@@ -1,55 +1,34 @@
id: initialize-session
version: 1.0.0
version: 4.0.0
name: Initialize Session
description: "Create or adopt the client workflow's session as a child of the meta session. If discover-session matched a saved client session, adopt it via start_session and restore variables from disk. Otherwise, create a fresh child session via start_session({ workflow_id, parent_session_token }) and initialize the planning folder. Sets client_session_token, planning_folder_path, and the session-recovery flags."
description: "Create or adopt the client workflow's session as a child of the meta session. Restore variables on resume; create the planning folder on fresh starts."
problem: The client workflow needs a valid session token before its orchestrator can be dispatched, and saved state must be restored before activities resume
skills:
primary: meta/activity-worker
supporting[3]:
- session-protocol
- state-management
- version-control
required: true
estimatedTime: 1-2m
rules[3]:
- "When creating a fresh client session, ALWAYS pass parent_session_token so trace correlation links the meta session to the client workflow"
- "When adopting a saved session, treat the saved token as opaque — never decode or modify it"
- "If start_session returns recovered: true, the saved payload was corrupted — variables MUST be reconstructed from the on-disk state file before any activity runs"
steps[5]:
- id: start-or-adopt-session
name: Start or Adopt Client Session
description: "If has_saved_state: call start_session({ session_token: saved_session_token, agent_id: 'orchestrator' }) to adopt the saved client session. Otherwise: call start_session({ workflow_id: target_workflow_id, parent_session_token: session_token, agent_id: 'orchestrator' }) to create a fresh child session. Save the returned token as client_session_token."
skill: session-protocol
operations[5]:
- "workflow-engine::adopt-session"
- "workflow-engine::create-session"
- "workflow-engine::restore"
- "workflow-engine::persist"
- "version-control::initialize-folder"
steps[6]:
- id: adopt-saved-session
description: "workflow-engine::adopt-session(saved_session_token: {saved_session_token})"
when: "has_saved_state == true"
- id: create-fresh-session
description: "workflow-engine::create-session(workflow_id: {target_workflow_id}, parent_session_token: {session_token})"
when: "has_saved_state == false"
- id: detect-recovery
name: Detect Server-Restart Recovery
description: "Inspect the start_session response. If recovered: true, the saved token failed signature verification AND its payload was corrupted — set session_recovered = true so the next step reconstructs variables from disk. If adopted: true, the token was re-signed but its payload was preserved — set session_adopted = true (no reconstruction needed). Otherwise both flags remain false."
description: "Inspect the start_session response. Set session_recovered when it carries recovered: true; set session_adopted when it carries adopted: true."
- id: restore-state
name: Restore Variables from Disk
description: "If is_resuming: call restore_state({ session_token: client_session_token, file_path: '{planning_folder_path}/workflow-state.toon' }) to load the saved variables and apply each to the client session. This step covers both adopted and recovered sessions — for recovered sessions it is the only source of truth for state."
condition:
type: simple
variable: is_resuming
operator: "=="
value: true
skill: state-management
description: "workflow-engine::restore(session_token: {client_session_token}, file_path: {planning_folder_path}/workflow-state.toon)"
when: "is_resuming == true"
- id: derive-planning-folder
name: Derive Planning Folder Path
description: "If fresh session and planning_folder_path is not yet set, derive it from the user's request context: .engineering/artifacts/planning/YYYY-MM-DD-{initiative-name}/ where initiative-name is kebab-cased from issue title, work-package description, or other identifying context. Store as planning_folder_path."
condition:
type: simple
variable: is_resuming
operator: "!="
value: true
skill: version-control
- id: initialize-folder
name: Initialize Planning Folder
description: "If fresh session: create the planning folder at planning_folder_path (mkdir -p), then call save_state({ session_token: client_session_token, planning_folder_path }) to write the initial workflow-state.toon containing the client session token and default variables. This guarantees the token is on disk before any activity is dispatched."
condition:
type: simple
variable: is_resuming
operator: "!="
value: true
skill: state-management
description: "version-control::initialize-folder(initiative_name: <kebab-case from issue title or work-package description>)"
when: "is_resuming == false"
- id: initialize-state
description: "workflow-engine::persist(session_token: {client_session_token}, planning_folder_path: {planning_folder_path})"
when: "is_resuming == false"
transitions[1]:
- to: resolve-target
isDefault: true
Expand Down
30 changes: 12 additions & 18 deletions meta/activities/02-resolve-target.toon
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
id: resolve-target
version: 1.0.0
version: 4.0.0
name: Resolve Target
description: "Detect the target repository structure (regular directory vs. submodule monorepo) and resolve target_path. Skipped when target_path was already restored from saved state. Sets is_monorepo and target_path for downstream activities that perform git operations on the user's codebase."
description: "Detect the target repository structure (regular directory vs. submodule monorepo) and resolve target_path."
problem: Workflows that operate on a target codebase need to know whether the working directory is a regular repo or a submodule monorepo, and which submodule is the target
skills:
primary: meta/activity-worker
required: true
estimatedTime: 1-2m
rules[2]:
- "Skip detection when target_path was already restored from saved state (target_path != '.')"
operations[2]:
- "version-control::detect-repo-type"
- "version-control::list-submodules"
rules[1]:
- "target_path MUST resolve to a directory containing a working git tree"
entryActions[1]:
- action: log
message: "Resolving target repository structure"
steps[3]:
- id: detect-monorepo
name: Detect Repository Type
description: "Check whether the working directory contains a .gitmodules file (test -f .gitmodules). If present, this is a submodule monorepo. If absent, this is a regular repository and target_path defaults to the repository root."
description: "version-control::detect-repo-type()"
- id: list-submodules
name: List Submodules
description: "If is_monorepo is true (set by the repo-type-confirmed checkpoint): parse .gitmodules to extract the submodule paths and present them as a numbered list, including a brief description of each (from the submodule's README first paragraph or its path)."
condition:
type: simple
variable: is_monorepo
operator: "=="
value: true
- id: capture-target-path
name: Capture Target Path
description: "If is_monorepo: ask the user to select a submodule, set target_path to its path, and verify the directory exists. If not is_monorepo: set target_path to '.'."
description: "version-control::list-submodules()"
when: "is_monorepo == true"
- id: capture-submodule-target
description: "Ask the user to select a submodule from the listed entries. Set target_path to the chosen path."
when: "is_monorepo == true"
checkpoints[1]:
- id: repo-type-confirmed
name: Repository Type Confirmation
Expand Down
Loading