diff --git a/USAGE_GUIDE.md b/USAGE_GUIDE.md index c854f9312..fa9f4eb48 100644 --- a/USAGE_GUIDE.md +++ b/USAGE_GUIDE.md @@ -583,6 +583,19 @@ What happens: 6. Delivers to docs/REQUIREMENTS/ with traceability matrix ``` +### Managed Tasks Across Chats + +Use `/task-define [description]` to create a task and agree its requirements, then +`/task-spec TASK-0001` for architecture/specifications and `/task-implement TASK-0001` for delivery. +Use the ID returned by creation; `/tasks-list` shows registered tasks and their next step. +`/task-define TASK-0001 additional requirements` revises an existing task; its folder is also accepted. +Each command stops at its stage boundary and preserves human approval gates. + +The task passport lives at `plans//TASK.md`; requirements live under +`docs/REQUIREMENTS//`. Separate spec/plan files follow existing sizing rules. +Ordinary `/coding-flow` behavior, including small tasks without separate documents, is unchanged. +See [the full task walkthrough](user-guide/scenarios/coding.md#manage-a-task-across-chats). + ### Project Initialization **Greenfield (new repository):** diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 600f29f51..b919db0b9 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -238,6 +238,18 @@ Rosetta initializes and maintains a standard file structure in **target reposito - `/-SPECS.md` — tech specs - `/*` — supporting implementation files +**Explicitly managed tasks:** `task-define`, `task-spec`, `task-implement`, and `tasks-list` +share the `task-management` skill. A task passport at `plans//TASK.md` owns identity, +content-bound approvals, progress, and durable results; requirements use +`docs/REQUIREMENTS//`. Listing derives the four stages from current approvals/evidence +without a separate central index. The commands bind stage boundaries of the existing authoring +and coding workflows. The three modifying commands bind a separate read-only architect consultant +and decision-bound continuation to their invocation. Consultation evidence is durable task execution +state, never an approval; routine work and diagnosed recovery continue inside approved boundaries. +Each command ends at its stage boundary through the `handoff` operation: outcome persisted, next action +handed to the user as one command line rendered in that host's own invocation syntax, for a new chat. +Ordinary workflow calls do not register tasks; small-work sizing remains unchanged. Temporary workflow state is recoverable from the passport and its linked evidence. + **Other:** - `gain.json` — general SDLC setup and Rosetta file locations (wins in conflicts) diff --git a/docs/definitions/skills.md b/docs/definitions/skills.md index e7b5a1eb2..05274eb26 100644 --- a/docs/definitions/skills.md +++ b/docs/definitions/skills.md @@ -4,6 +4,7 @@ - research - context-engineering (TBD) - planning +- task-management - backlog - reasoning - questioning diff --git a/docs/definitions/workflows.md b/docs/definitions/workflows.md index fff04283d..626f2c793 100644 --- a/docs/definitions/workflows.md +++ b/docs/definitions/workflows.md @@ -13,6 +13,10 @@ - coding-agents-prompting-flow - help-flow - coding-flow +- task-define +- task-spec +- task-implement +- tasks-list - security-flow - requirements-authoring-flow - testgen-flow diff --git a/docs/web/user-guide/index.md b/docs/web/user-guide/index.md index 6fd9caed5..0e06a4d3f 100644 --- a/docs/web/user-guide/index.md +++ b/docs/web/user-guide/index.md @@ -57,6 +57,7 @@ Each task has its own page. Jump straight in. | I want to… | Scenario | Command | | -------------------------------------- | --------------------------------------------------------- | ------------------------------ | | Write a feature, fix a bug, add tests | [Write or change code](/rosetta/user-guide/scenarios/coding/) | `/coding-flow` | +| Carry a task from requirements to verified delivery across chats | [Manage a task](/rosetta/user-guide/scenarios/coding/#manage-a-task-across-chats) | `/task-define`, `/task-spec`, `/task-implement`, `/tasks-list` | | Define what to build first | [Author requirements](/rosetta/user-guide/scenarios/requirements/) | `/requirements-authoring-flow` | | Handle a small or unusual task | [Ad-hoc task](/rosetta/user-guide/scenarios/adhoc-task/) | `/adhoc-flow` | diff --git a/docs/web/user-guide/scenarios/coding.md b/docs/web/user-guide/scenarios/coding.md index 7532b9e93..4cad72c23 100644 --- a/docs/web/user-guide/scenarios/coding.md +++ b/docs/web/user-guide/scenarios/coding.md @@ -82,6 +82,102 @@ The agent won't slide past these gates on a vague reply; give a clear confirmati - Planning artifacts: `plans//discovery-notes.md`, `plans//architecture-notes.md`, and `plans//-SPECS.md` + `-PLAN.md`. - The code changes and passing tests, plus brief updates to your `docs/CONTEXT.md` / `docs/ARCHITECTURE.md` when relevant. +## Manage a task across chats + +Use these four commands when you want a named task whose requirements, approvals and results +survive a new chat. Run them in the target repository with the Rosetta plugin installed. +Type them the way your host expects. In Claude Code that is `/rosetta:task-define`; other hosts use +`$rosetta:task-define` or a bare `/task-define`. Rosetta always shows you the form your own host uses. + +```text +/task-define +/task-define Let customers cancel an upcoming booking +``` + +Both create a task. The first starts with questions; the second uses your description as input. +The agent returns a stable ID and folder, clarifies scope and acceptance criteria, authors and +reviews requirements, and asks for approval. It stops before architecture or coding. + +**Each command ends at its own boundary.** It will not ask whether to continue into the next stage, +and it will not start it. Instead it saves everything to the task files, tells you what is done and +what is still open, and gives you one line to paste into a **new chat** — already written the way +your host expects. A fresh chat reads the files rather than a long conversation, so the next stage +starts from the agreed record instead of a summary of it. + +Use the returned ID in subsequent commands. `TASK-0001` below is an example: + +```text +/task-spec TASK-0001 +/task-implement TASK-0001 +/tasks-list +``` + +| Command | Result | Where it stops | +|---|---|---| +| `task-define` | Requirements and their approval | Before solution design | +| `task-spec` | Approved architecture, specification and plan | Before implementation | +| `task-implement` | Implementation, independent review, tests and verification evidence | Final acceptance with you | +| `tasks-list` | ID, title, stage, blockers, folder and next command | Read-only listing | + +When a stage cannot finish, the same stop applies: the work is saved and you get the command that +resumes that stage, together with the decisions it still needs from you. + +The specification step runs the preparation part of `coding-flow`; implementation resumes its +remaining work. Each command retains the workflow's review and approval checkpoints. Starting a +new chat does not mean repeating an unchanged, recorded approval. + +Each modifying task command starts or reuses a task-scoped background architect consultant, +including small tasks. The consultant checks requirements gaps, solution choices, and implementation +risks before dependent decisions. Its advice is saved for the next chat; it remains separate from +the specification author, independent reviewer, and your approvals. If the host supports subagents +but not background continuation, Rosetta discloses that limitation and consults synchronously. +Without subagent support, it reports a blocker before dependent decisions. + +Routine task-file work continues without repeated permission. When a technical error has a known +cause and the architect's proposed fix stays within the approved scope, the agent repairs it, +reruns checks, and continues. It asks you when a decision or missing input is needed, and still +requests requirements/design/plan approvals and final acceptance. This does not bypass failed +checks or authorize changes to agreed behavior. + +To revise or resume a task: + +```text +/task-define TASK-0001 Customers may cancel only before the booking starts +/task-define plans/TASK-0001 +/task-spec plans/TASK-0001 +``` + +The ID or task folder comes first; the remaining text changes requirements. With only a task +reference, `task-define` resumes the existing discussion. Quote a folder containing spaces. +An explicit unknown ID or path reports a lookup problem rather than silently creating a task. + +```text +plans/TASK-0001/ + TASK.md identity, approvals, current work and durable results + ... specifications/plans/reports as the task size requires +docs/REQUIREMENTS/TASK-0001/ + ... requirement documents when produced +``` + +For a small managed task, a concise approved solution and plan can live in `TASK.md`; separate +specification and plan files are not mandatory. Ordinary `/coding-flow` keeps its existing +size rules and does not automatically register tasks or acquire new documentation obligations. + +The list derives four stages from current approved content and evidence: + +```text +Requirements needed → Specification needed → Implementation needed → Done +``` + +Work in progress, blockers and pending approval appear separately. Files existing is not proof +of approval. Changed requirements make dependent approvals stale while preserving earlier work. +`Done` requires verification and your recorded acceptance of the current result. Malformed or +duplicate passports are shown as diagnostics; listing does not repair them. + +To continue after interruption, run the same command with the same ID in a new chat. The passport +and linked evidence survive loss of temporary workflow state. Missing evidence is rechecked; +the agent does not invent completion. + ## Tips - **Read the plan before approving.** The gate only protects you if you use it. diff --git a/instructions/r3/core/agents/architect.md b/instructions/r3/core/agents/architect.md index e71f2d9d9..24a5b6ddb 100644 --- a/instructions/r3/core/agents/architect.md +++ b/instructions/r3/core/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/instructions/r3/core/agents/architect~profile-lightweight-only~overwrite~.md b/instructions/r3/core/agents/architect~profile-lightweight-only~overwrite~.md index e944aa946..9a08b4bf1 100644 --- a/instructions/r3/core/agents/architect~profile-lightweight-only~overwrite~.md +++ b/instructions/r3/core/agents/architect~profile-lightweight-only~overwrite~.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/instructions/r3/core/skills/deviation/README.md b/instructions/r3/core/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/instructions/r3/core/skills/deviation/README.md +++ b/instructions/r3/core/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/instructions/r3/core/skills/deviation/SKILL.md b/instructions/r3/core/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/instructions/r3/core/skills/deviation/SKILL.md +++ b/instructions/r3/core/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/instructions/r3/core/skills/hitl/README.md b/instructions/r3/core/skills/hitl/README.md index fa8ecf13d..8f92e9deb 100644 --- a/instructions/r3/core/skills/hitl/README.md +++ b/instructions/r3/core/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `workflows/init-workspace-flow-questions.md`, `workflows/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/instructions/r3/core/skills/hitl/SKILL.md b/instructions/r3/core/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/instructions/r3/core/skills/hitl/SKILL.md +++ b/instructions/r3/core/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/instructions/r3/core/skills/hitl/references/decision-bound-continuation.md b/instructions/r3/core/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/instructions/r3/core/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/instructions/r3/core/skills/load-project-context/README.md b/instructions/r3/core/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/instructions/r3/core/skills/load-project-context/README.md +++ b/instructions/r3/core/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/instructions/r3/core/skills/load-project-context/SKILL.md b/instructions/r3/core/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/instructions/r3/core/skills/load-project-context/SKILL.md +++ b/instructions/r3/core/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/instructions/r3/core/skills/orchestration/README.md b/instructions/r3/core/skills/orchestration/README.md index 6a56fa00d..48a6ff14a 100644 --- a/instructions/r3/core/skills/orchestration/README.md +++ b/instructions/r3/core/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/instructions/r3/core/skills/orchestration/SKILL.md b/instructions/r3/core/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/instructions/r3/core/skills/orchestration/SKILL.md +++ b/instructions/r3/core/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/instructions/r3/core/skills/rosetta/README.md b/instructions/r3/core/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/instructions/r3/core/skills/rosetta/README.md +++ b/instructions/r3/core/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/instructions/r3/core/skills/rosetta/SKILL.md b/instructions/r3/core/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/instructions/r3/core/skills/rosetta/SKILL.md +++ b/instructions/r3/core/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/instructions/r3/core/skills/self-learning/README.md b/instructions/r3/core/skills/self-learning/README.md index 56a0bbfa8..ccc82f119 100644 --- a/instructions/r3/core/skills/self-learning/README.md +++ b/instructions/r3/core/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/instructions/r3/core/skills/self-learning/SKILL.md b/instructions/r3/core/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/instructions/r3/core/skills/self-learning/SKILL.md +++ b/instructions/r3/core/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/instructions/r3/core/skills/task-management/README.md b/instructions/r3/core/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/instructions/r3/core/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/instructions/r3/core/skills/task-management/SKILL.md b/instructions/r3/core/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/instructions/r3/core/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/instructions/r3/core/skills/task-management/references/command-rendering.md b/instructions/r3/core/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/instructions/r3/core/skills/task-management/references/consultation.md b/instructions/r3/core/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/instructions/r3/core/skills/task-management/references/fingerprints.md b/instructions/r3/core/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/instructions/r3/core/skills/task-management/references/handoff.md b/instructions/r3/core/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/instructions/r3/core/skills/task-management/references/inspect.md b/instructions/r3/core/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/instructions/r3/core/skills/task-management/references/invalidate.md b/instructions/r3/core/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/instructions/r3/core/skills/task-management/references/list.md b/instructions/r3/core/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/instructions/r3/core/skills/task-management/references/passport.md b/instructions/r3/core/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/instructions/r3/core/skills/task-management/references/record.md b/instructions/r3/core/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/instructions/r3/core/skills/task-management/references/resolve-create.md b/instructions/r3/core/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/instructions/r3/core/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/instructions/r3/core/workflows/coding-flow.md b/instructions/r3/core/workflows/coding-flow.md index 46b5590bd..36dfd83c6 100644 --- a/instructions/r3/core/workflows/coding-flow.md +++ b/instructions/r3/core/workflows/coding-flow.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/instructions/r3/core/workflows/coding-flow~profile-lightweight-only~overwrite~.md b/instructions/r3/core/workflows/coding-flow~profile-lightweight-only~overwrite~.md index af976e271..13ae391e8 100644 --- a/instructions/r3/core/workflows/coding-flow~profile-lightweight-only~overwrite~.md +++ b/instructions/r3/core/workflows/coding-flow~profile-lightweight-only~overwrite~.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/instructions/r3/core/workflows/task-define.md b/instructions/r3/core/workflows/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/instructions/r3/core/workflows/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/instructions/r3/core/workflows/task-implement.md b/instructions/r3/core/workflows/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/instructions/r3/core/workflows/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/instructions/r3/core/workflows/task-spec.md b/instructions/r3/core/workflows/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/instructions/r3/core/workflows/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/instructions/r3/core/workflows/tasks-list.md b/instructions/r3/core/workflows/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/instructions/r3/core/workflows/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-antigravity-light/agents/architect.md b/plugins/core-antigravity-light/agents/architect.md index c36b90de8..3946e1eb9 100644 --- a/plugins/core-antigravity-light/agents/architect.md +++ b/plugins/core-antigravity-light/agents/architect.md @@ -24,7 +24,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -32,6 +32,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-antigravity-light/skills/INDEX.md b/plugins/core-antigravity-light/skills/INDEX.md index a9498bec6..162eedc60 100644 --- a/plugins/core-antigravity-light/skills/INDEX.md +++ b/plugins/core-antigravity-light/skills/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `skills/research-flow/SKILL.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `skills/security-flow/SKILL.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `skills/self-help-flow/SKILL.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `skills/task-define/SKILL.md`: "Create or revise a managed task and approve its requirements." +- `skills/task-implement/SKILL.md`: "Implement, review, test, and accept a managed task's approved plan." +- `skills/task-spec/SKILL.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `skills/tasks-list/SKILL.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `skills/testgen-flow/SKILL.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `skills/ui-aqa-flow/SKILL.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-antigravity-light/skills/coding-flow/SKILL.md b/plugins/core-antigravity-light/skills/coding-flow/SKILL.md index c4947df66..f893f49a6 100644 --- a/plugins/core-antigravity-light/skills/coding-flow/SKILL.md +++ b/plugins/core-antigravity-light/skills/coding-flow/SKILL.md @@ -14,6 +14,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -21,14 +39,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-antigravity-light/skills/deviation/README.md b/plugins/core-antigravity-light/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-antigravity-light/skills/deviation/README.md +++ b/plugins/core-antigravity-light/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-antigravity-light/skills/deviation/SKILL.md b/plugins/core-antigravity-light/skills/deviation/SKILL.md index 36f14ef9d..938c84f4d 100644 --- a/plugins/core-antigravity-light/skills/deviation/SKILL.md +++ b/plugins/core-antigravity-light/skills/deviation/SKILL.md @@ -10,9 +10,9 @@ description: "MUST activate when intent is unclear, or cannot follow or deviate 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-antigravity-light/skills/hitl/README.md b/plugins/core-antigravity-light/skills/hitl/README.md index d894c7b3a..ecd0b6e33 100644 --- a/plugins/core-antigravity-light/skills/hitl/README.md +++ b/plugins/core-antigravity-light/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `skills/init-workspace-flow/phases/init-workspace-flow-questions.md`, `skills/adhoc-flow/SKILL.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-antigravity-light/skills/hitl/SKILL.md b/plugins/core-antigravity-light/skills/hitl/SKILL.md index b44003afc..9d49ff961 100644 --- a/plugins/core-antigravity-light/skills/hitl/SKILL.md +++ b/plugins/core-antigravity-light/skills/hitl/SKILL.md @@ -14,6 +14,8 @@ description: "MUST activate for ALL tasks — planning, execution, validation, r +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -25,7 +27,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-antigravity-light/skills/hitl/references/decision-bound-continuation.md b/plugins/core-antigravity-light/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-antigravity-light/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-antigravity-light/skills/load-project-context/README.md b/plugins/core-antigravity-light/skills/load-project-context/README.md index cd759eade..0334c0e5b 100644 --- a/plugins/core-antigravity-light/skills/load-project-context/README.md +++ b/plugins/core-antigravity-light/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-antigravity-light/skills/load-project-context/SKILL.md b/plugins/core-antigravity-light/skills/load-project-context/SKILL.md index 3bb8efc12..b3346397d 100644 --- a/plugins/core-antigravity-light/skills/load-project-context/SKILL.md +++ b/plugins/core-antigravity-light/skills/load-project-context/SKILL.md @@ -31,6 +31,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-antigravity-light/skills/orchestration/README.md b/plugins/core-antigravity-light/skills/orchestration/README.md index cf3e85bac..8e194045c 100644 --- a/plugins/core-antigravity-light/skills/orchestration/README.md +++ b/plugins/core-antigravity-light/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-antigravity-light/skills/orchestration/SKILL.md b/plugins/core-antigravity-light/skills/orchestration/SKILL.md index 62736ed9d..8de0ce832 100644 --- a/plugins/core-antigravity-light/skills/orchestration/SKILL.md +++ b/plugins/core-antigravity-light/skills/orchestration/SKILL.md @@ -16,6 +16,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-antigravity-light/skills/rosetta/README.md b/plugins/core-antigravity-light/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/plugins/core-antigravity-light/skills/rosetta/README.md +++ b/plugins/core-antigravity-light/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-antigravity-light/skills/rosetta/SKILL.md b/plugins/core-antigravity-light/skills/rosetta/SKILL.md index e6cf5ea36..8d09b8c59 100644 --- a/plugins/core-antigravity-light/skills/rosetta/SKILL.md +++ b/plugins/core-antigravity-light/skills/rosetta/SKILL.md @@ -18,7 +18,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-antigravity-light/skills/self-learning/README.md b/plugins/core-antigravity-light/skills/self-learning/README.md index a7f4ca94a..0566509c6 100644 --- a/plugins/core-antigravity-light/skills/self-learning/README.md +++ b/plugins/core-antigravity-light/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-antigravity-light/skills/self-learning/SKILL.md b/plugins/core-antigravity-light/skills/self-learning/SKILL.md index 9ad04877a..06625d063 100644 --- a/plugins/core-antigravity-light/skills/self-learning/SKILL.md +++ b/plugins/core-antigravity-light/skills/self-learning/SKILL.md @@ -13,7 +13,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-antigravity-light/skills/task-define/SKILL.md b/plugins/core-antigravity-light/skills/task-define/SKILL.md new file mode 100644 index 000000000..6fdb3d8e4 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-define/SKILL.md @@ -0,0 +1,54 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-antigravity-light/skills/task-implement/SKILL.md b/plugins/core-antigravity-light/skills/task-implement/SKILL.md new file mode 100644 index 000000000..43c8eeb0b --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-implement/SKILL.md @@ -0,0 +1,55 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-antigravity-light/skills/task-management/README.md b/plugins/core-antigravity-light/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-antigravity-light/skills/task-management/SKILL.md b/plugins/core-antigravity-light/skills/task-management/SKILL.md new file mode 100644 index 000000000..25606b130 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/SKILL.md @@ -0,0 +1,66 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/command-rendering.md b/plugins/core-antigravity-light/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/consultation.md b/plugins/core-antigravity-light/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/fingerprints.md b/plugins/core-antigravity-light/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/handoff.md b/plugins/core-antigravity-light/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/inspect.md b/plugins/core-antigravity-light/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/invalidate.md b/plugins/core-antigravity-light/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/list.md b/plugins/core-antigravity-light/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/passport.md b/plugins/core-antigravity-light/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/record.md b/plugins/core-antigravity-light/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-antigravity-light/skills/task-management/references/resolve-create.md b/plugins/core-antigravity-light/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-antigravity-light/skills/task-spec/SKILL.md b/plugins/core-antigravity-light/skills/task-spec/SKILL.md new file mode 100644 index 000000000..30bebab89 --- /dev/null +++ b/plugins/core-antigravity-light/skills/task-spec/SKILL.md @@ -0,0 +1,52 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-antigravity-light/skills/tasks-list/SKILL.md b/plugins/core-antigravity-light/skills/tasks-list/SKILL.md new file mode 100644 index 000000000..219b3c782 --- /dev/null +++ b/plugins/core-antigravity-light/skills/tasks-list/SKILL.md @@ -0,0 +1,33 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-antigravity/agents/architect.md b/plugins/core-antigravity/agents/architect.md index c36b90de8..3946e1eb9 100644 --- a/plugins/core-antigravity/agents/architect.md +++ b/plugins/core-antigravity/agents/architect.md @@ -24,7 +24,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -32,6 +32,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-antigravity/skills/INDEX.md b/plugins/core-antigravity/skills/INDEX.md index ad20ef6a0..cd6c4380d 100644 --- a/plugins/core-antigravity/skills/INDEX.md +++ b/plugins/core-antigravity/skills/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `skills/research-flow/SKILL.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `skills/security-flow/SKILL.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `skills/self-help-flow/SKILL.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `skills/task-define/SKILL.md`: "Create or revise a managed task and approve its requirements." +- `skills/task-implement/SKILL.md`: "Implement, review, test, and accept a managed task's approved plan." +- `skills/task-spec/SKILL.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `skills/tasks-list/SKILL.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `skills/testgen-flow/SKILL.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `skills/ui-aqa-flow/SKILL.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-antigravity/skills/coding-flow/SKILL.md b/plugins/core-antigravity/skills/coding-flow/SKILL.md index 1a288e46b..ebbde6a45 100644 --- a/plugins/core-antigravity/skills/coding-flow/SKILL.md +++ b/plugins/core-antigravity/skills/coding-flow/SKILL.md @@ -13,6 +13,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -20,14 +38,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-antigravity/skills/deviation/README.md b/plugins/core-antigravity/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-antigravity/skills/deviation/README.md +++ b/plugins/core-antigravity/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-antigravity/skills/deviation/SKILL.md b/plugins/core-antigravity/skills/deviation/SKILL.md index 36f14ef9d..938c84f4d 100644 --- a/plugins/core-antigravity/skills/deviation/SKILL.md +++ b/plugins/core-antigravity/skills/deviation/SKILL.md @@ -10,9 +10,9 @@ description: "MUST activate when intent is unclear, or cannot follow or deviate 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-antigravity/skills/hitl/README.md b/plugins/core-antigravity/skills/hitl/README.md index d894c7b3a..ecd0b6e33 100644 --- a/plugins/core-antigravity/skills/hitl/README.md +++ b/plugins/core-antigravity/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `skills/init-workspace-flow/phases/init-workspace-flow-questions.md`, `skills/adhoc-flow/SKILL.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-antigravity/skills/hitl/SKILL.md b/plugins/core-antigravity/skills/hitl/SKILL.md index b44003afc..9d49ff961 100644 --- a/plugins/core-antigravity/skills/hitl/SKILL.md +++ b/plugins/core-antigravity/skills/hitl/SKILL.md @@ -14,6 +14,8 @@ description: "MUST activate for ALL tasks — planning, execution, validation, r +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -25,7 +27,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-antigravity/skills/hitl/references/decision-bound-continuation.md b/plugins/core-antigravity/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-antigravity/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-antigravity/skills/load-project-context/README.md b/plugins/core-antigravity/skills/load-project-context/README.md index cd759eade..0334c0e5b 100644 --- a/plugins/core-antigravity/skills/load-project-context/README.md +++ b/plugins/core-antigravity/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-antigravity/skills/load-project-context/SKILL.md b/plugins/core-antigravity/skills/load-project-context/SKILL.md index 3bb8efc12..b3346397d 100644 --- a/plugins/core-antigravity/skills/load-project-context/SKILL.md +++ b/plugins/core-antigravity/skills/load-project-context/SKILL.md @@ -31,6 +31,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-antigravity/skills/orchestration/README.md b/plugins/core-antigravity/skills/orchestration/README.md index cf3e85bac..8e194045c 100644 --- a/plugins/core-antigravity/skills/orchestration/README.md +++ b/plugins/core-antigravity/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-antigravity/skills/orchestration/SKILL.md b/plugins/core-antigravity/skills/orchestration/SKILL.md index 62736ed9d..8de0ce832 100644 --- a/plugins/core-antigravity/skills/orchestration/SKILL.md +++ b/plugins/core-antigravity/skills/orchestration/SKILL.md @@ -16,6 +16,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-antigravity/skills/rosetta/README.md b/plugins/core-antigravity/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/plugins/core-antigravity/skills/rosetta/README.md +++ b/plugins/core-antigravity/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-antigravity/skills/rosetta/SKILL.md b/plugins/core-antigravity/skills/rosetta/SKILL.md index e6cf5ea36..8d09b8c59 100644 --- a/plugins/core-antigravity/skills/rosetta/SKILL.md +++ b/plugins/core-antigravity/skills/rosetta/SKILL.md @@ -18,7 +18,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-antigravity/skills/self-learning/README.md b/plugins/core-antigravity/skills/self-learning/README.md index a7f4ca94a..0566509c6 100644 --- a/plugins/core-antigravity/skills/self-learning/README.md +++ b/plugins/core-antigravity/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-antigravity/skills/self-learning/SKILL.md b/plugins/core-antigravity/skills/self-learning/SKILL.md index 9ad04877a..06625d063 100644 --- a/plugins/core-antigravity/skills/self-learning/SKILL.md +++ b/plugins/core-antigravity/skills/self-learning/SKILL.md @@ -13,7 +13,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-antigravity/skills/task-define/SKILL.md b/plugins/core-antigravity/skills/task-define/SKILL.md new file mode 100644 index 000000000..6fdb3d8e4 --- /dev/null +++ b/plugins/core-antigravity/skills/task-define/SKILL.md @@ -0,0 +1,54 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-antigravity/skills/task-implement/SKILL.md b/plugins/core-antigravity/skills/task-implement/SKILL.md new file mode 100644 index 000000000..43c8eeb0b --- /dev/null +++ b/plugins/core-antigravity/skills/task-implement/SKILL.md @@ -0,0 +1,55 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-antigravity/skills/task-management/README.md b/plugins/core-antigravity/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-antigravity/skills/task-management/SKILL.md b/plugins/core-antigravity/skills/task-management/SKILL.md new file mode 100644 index 000000000..25606b130 --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/SKILL.md @@ -0,0 +1,66 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-antigravity/skills/task-management/references/command-rendering.md b/plugins/core-antigravity/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-antigravity/skills/task-management/references/consultation.md b/plugins/core-antigravity/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-antigravity/skills/task-management/references/fingerprints.md b/plugins/core-antigravity/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-antigravity/skills/task-management/references/handoff.md b/plugins/core-antigravity/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-antigravity/skills/task-management/references/inspect.md b/plugins/core-antigravity/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-antigravity/skills/task-management/references/invalidate.md b/plugins/core-antigravity/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-antigravity/skills/task-management/references/list.md b/plugins/core-antigravity/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-antigravity/skills/task-management/references/passport.md b/plugins/core-antigravity/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-antigravity/skills/task-management/references/record.md b/plugins/core-antigravity/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-antigravity/skills/task-management/references/resolve-create.md b/plugins/core-antigravity/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-antigravity/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-antigravity/skills/task-spec/SKILL.md b/plugins/core-antigravity/skills/task-spec/SKILL.md new file mode 100644 index 000000000..30bebab89 --- /dev/null +++ b/plugins/core-antigravity/skills/task-spec/SKILL.md @@ -0,0 +1,52 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-antigravity/skills/tasks-list/SKILL.md b/plugins/core-antigravity/skills/tasks-list/SKILL.md new file mode 100644 index 000000000..219b3c782 --- /dev/null +++ b/plugins/core-antigravity/skills/tasks-list/SKILL.md @@ -0,0 +1,33 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-claude-light/agents/architect.md b/plugins/core-claude-light/agents/architect.md index 24963f35a..f1a8b289a 100644 --- a/plugins/core-claude-light/agents/architect.md +++ b/plugins/core-claude-light/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-claude-light/hooks/hooks.json b/plugins/core-claude-light/hooks/hooks.json index d49036ce0..e242a8698 100644 --- a/plugins/core-claude-light/hooks/hooks.json +++ b/plugins/core-claude-light/hooks/hooks.json @@ -3,7 +3,7 @@ "SessionStart": [ { "matcher": "startup", - "hooks": [{"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `workflows/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `workflows/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `workflows/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `workflows/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `workflows/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `workflows/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `workflows/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `workflows/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `workflows/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `workflows/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `workflows/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `workflows/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `workflows/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `workflows/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `workflows/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `workflows/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `workflows/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: ${CLAUDE_PLUGIN_ROOT}\\\"}}\"", "once": true}] + "hooks": [{"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `workflows/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `workflows/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `workflows/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `workflows/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `workflows/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `workflows/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `workflows/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `workflows/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `workflows/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `workflows/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `workflows/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `workflows/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `workflows/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `workflows/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `workflows/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `workflows/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `workflows/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `workflows/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `workflows/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `workflows/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `workflows/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: ${CLAUDE_PLUGIN_ROOT}\\\"}}\"", "once": true}] } ] } diff --git a/plugins/core-claude-light/skills/deviation/README.md b/plugins/core-claude-light/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-claude-light/skills/deviation/README.md +++ b/plugins/core-claude-light/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-claude-light/skills/deviation/SKILL.md b/plugins/core-claude-light/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-claude-light/skills/deviation/SKILL.md +++ b/plugins/core-claude-light/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-claude-light/skills/hitl/README.md b/plugins/core-claude-light/skills/hitl/README.md index fa8ecf13d..8f92e9deb 100644 --- a/plugins/core-claude-light/skills/hitl/README.md +++ b/plugins/core-claude-light/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `workflows/init-workspace-flow-questions.md`, `workflows/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-claude-light/skills/hitl/SKILL.md b/plugins/core-claude-light/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-claude-light/skills/hitl/SKILL.md +++ b/plugins/core-claude-light/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-claude-light/skills/hitl/references/decision-bound-continuation.md b/plugins/core-claude-light/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-claude-light/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-claude-light/skills/load-project-context/README.md b/plugins/core-claude-light/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-claude-light/skills/load-project-context/README.md +++ b/plugins/core-claude-light/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-claude-light/skills/load-project-context/SKILL.md b/plugins/core-claude-light/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-claude-light/skills/load-project-context/SKILL.md +++ b/plugins/core-claude-light/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-claude-light/skills/orchestration/README.md b/plugins/core-claude-light/skills/orchestration/README.md index 6a56fa00d..48a6ff14a 100644 --- a/plugins/core-claude-light/skills/orchestration/README.md +++ b/plugins/core-claude-light/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-claude-light/skills/orchestration/SKILL.md b/plugins/core-claude-light/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-claude-light/skills/orchestration/SKILL.md +++ b/plugins/core-claude-light/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-claude-light/skills/rosetta/README.md b/plugins/core-claude-light/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/plugins/core-claude-light/skills/rosetta/README.md +++ b/plugins/core-claude-light/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-claude-light/skills/rosetta/SKILL.md b/plugins/core-claude-light/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-claude-light/skills/rosetta/SKILL.md +++ b/plugins/core-claude-light/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-claude-light/skills/self-learning/README.md b/plugins/core-claude-light/skills/self-learning/README.md index 56a0bbfa8..ccc82f119 100644 --- a/plugins/core-claude-light/skills/self-learning/README.md +++ b/plugins/core-claude-light/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-claude-light/skills/self-learning/SKILL.md b/plugins/core-claude-light/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-claude-light/skills/self-learning/SKILL.md +++ b/plugins/core-claude-light/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-claude-light/skills/task-management/README.md b/plugins/core-claude-light/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-claude-light/skills/task-management/SKILL.md b/plugins/core-claude-light/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-claude-light/skills/task-management/references/command-rendering.md b/plugins/core-claude-light/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-claude-light/skills/task-management/references/consultation.md b/plugins/core-claude-light/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-claude-light/skills/task-management/references/fingerprints.md b/plugins/core-claude-light/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-claude-light/skills/task-management/references/handoff.md b/plugins/core-claude-light/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-claude-light/skills/task-management/references/inspect.md b/plugins/core-claude-light/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-claude-light/skills/task-management/references/invalidate.md b/plugins/core-claude-light/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-claude-light/skills/task-management/references/list.md b/plugins/core-claude-light/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-claude-light/skills/task-management/references/passport.md b/plugins/core-claude-light/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-claude-light/skills/task-management/references/record.md b/plugins/core-claude-light/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-claude-light/skills/task-management/references/resolve-create.md b/plugins/core-claude-light/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-claude-light/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-claude-light/workflows/INDEX.md b/plugins/core-claude-light/workflows/INDEX.md index ea660403d..739a00fa3 100644 --- a/plugins/core-claude-light/workflows/INDEX.md +++ b/plugins/core-claude-light/workflows/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `workflows/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `workflows/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `workflows/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `workflows/task-define.md`: "Create or revise a managed task and approve its requirements." +- `workflows/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `workflows/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `workflows/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `workflows/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `workflows/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-claude-light/workflows/coding-flow.md b/plugins/core-claude-light/workflows/coding-flow.md index 1e1df5a44..a76894c61 100644 --- a/plugins/core-claude-light/workflows/coding-flow.md +++ b/plugins/core-claude-light/workflows/coding-flow.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-claude-light/workflows/task-define.md b/plugins/core-claude-light/workflows/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-claude-light/workflows/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-claude-light/workflows/task-implement.md b/plugins/core-claude-light/workflows/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-claude-light/workflows/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-claude-light/workflows/task-spec.md b/plugins/core-claude-light/workflows/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-claude-light/workflows/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-claude-light/workflows/tasks-list.md b/plugins/core-claude-light/workflows/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-claude-light/workflows/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-claude/agents/architect.md b/plugins/core-claude/agents/architect.md index 24963f35a..f1a8b289a 100644 --- a/plugins/core-claude/agents/architect.md +++ b/plugins/core-claude/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-claude/hooks/hooks.json b/plugins/core-claude/hooks/hooks.json index f85c279ec..fec07fd80 100644 --- a/plugins/core-claude/hooks/hooks.json +++ b/plugins/core-claude/hooks/hooks.json @@ -3,7 +3,7 @@ "SessionStart": [ { "matcher": "startup", - "hooks": [{"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `workflows/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `workflows/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `workflows/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `workflows/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `workflows/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `workflows/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `workflows/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `workflows/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `workflows/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `workflows/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `workflows/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `workflows/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `workflows/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `workflows/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `workflows/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `workflows/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `workflows/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: ${CLAUDE_PLUGIN_ROOT}\\\"}}\"", "once": true}] + "hooks": [{"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `workflows/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `workflows/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `workflows/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `workflows/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `workflows/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `workflows/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `workflows/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `workflows/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `workflows/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `workflows/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `workflows/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `workflows/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `workflows/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `workflows/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `workflows/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `workflows/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `workflows/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `workflows/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `workflows/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `workflows/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `workflows/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `workflows/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "once": true}, {"type": "command", "command": "printf '%s' \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: ${CLAUDE_PLUGIN_ROOT}\\\"}}\"", "once": true}] } ] } diff --git a/plugins/core-claude/skills/deviation/README.md b/plugins/core-claude/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-claude/skills/deviation/README.md +++ b/plugins/core-claude/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-claude/skills/deviation/SKILL.md b/plugins/core-claude/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-claude/skills/deviation/SKILL.md +++ b/plugins/core-claude/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-claude/skills/hitl/README.md b/plugins/core-claude/skills/hitl/README.md index fa8ecf13d..8f92e9deb 100644 --- a/plugins/core-claude/skills/hitl/README.md +++ b/plugins/core-claude/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `workflows/init-workspace-flow-questions.md`, `workflows/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-claude/skills/hitl/SKILL.md b/plugins/core-claude/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-claude/skills/hitl/SKILL.md +++ b/plugins/core-claude/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-claude/skills/hitl/references/decision-bound-continuation.md b/plugins/core-claude/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-claude/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-claude/skills/load-project-context/README.md b/plugins/core-claude/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-claude/skills/load-project-context/README.md +++ b/plugins/core-claude/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-claude/skills/load-project-context/SKILL.md b/plugins/core-claude/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-claude/skills/load-project-context/SKILL.md +++ b/plugins/core-claude/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-claude/skills/orchestration/README.md b/plugins/core-claude/skills/orchestration/README.md index 6a56fa00d..48a6ff14a 100644 --- a/plugins/core-claude/skills/orchestration/README.md +++ b/plugins/core-claude/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-claude/skills/orchestration/SKILL.md b/plugins/core-claude/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-claude/skills/orchestration/SKILL.md +++ b/plugins/core-claude/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-claude/skills/rosetta/README.md b/plugins/core-claude/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/plugins/core-claude/skills/rosetta/README.md +++ b/plugins/core-claude/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-claude/skills/rosetta/SKILL.md b/plugins/core-claude/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-claude/skills/rosetta/SKILL.md +++ b/plugins/core-claude/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-claude/skills/self-learning/README.md b/plugins/core-claude/skills/self-learning/README.md index 56a0bbfa8..ccc82f119 100644 --- a/plugins/core-claude/skills/self-learning/README.md +++ b/plugins/core-claude/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-claude/skills/self-learning/SKILL.md b/plugins/core-claude/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-claude/skills/self-learning/SKILL.md +++ b/plugins/core-claude/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-claude/skills/task-management/README.md b/plugins/core-claude/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-claude/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-claude/skills/task-management/SKILL.md b/plugins/core-claude/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-claude/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-claude/skills/task-management/references/command-rendering.md b/plugins/core-claude/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-claude/skills/task-management/references/consultation.md b/plugins/core-claude/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-claude/skills/task-management/references/fingerprints.md b/plugins/core-claude/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-claude/skills/task-management/references/handoff.md b/plugins/core-claude/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-claude/skills/task-management/references/inspect.md b/plugins/core-claude/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-claude/skills/task-management/references/invalidate.md b/plugins/core-claude/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-claude/skills/task-management/references/list.md b/plugins/core-claude/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-claude/skills/task-management/references/passport.md b/plugins/core-claude/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-claude/skills/task-management/references/record.md b/plugins/core-claude/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-claude/skills/task-management/references/resolve-create.md b/plugins/core-claude/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-claude/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-claude/workflows/INDEX.md b/plugins/core-claude/workflows/INDEX.md index 1dac7d06d..d4eee03c5 100644 --- a/plugins/core-claude/workflows/INDEX.md +++ b/plugins/core-claude/workflows/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `workflows/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `workflows/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `workflows/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `workflows/task-define.md`: "Create or revise a managed task and approve its requirements." +- `workflows/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `workflows/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `workflows/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `workflows/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `workflows/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-claude/workflows/coding-flow.md b/plugins/core-claude/workflows/coding-flow.md index b83897911..3b7568fa8 100644 --- a/plugins/core-claude/workflows/coding-flow.md +++ b/plugins/core-claude/workflows/coding-flow.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-claude/workflows/task-define.md b/plugins/core-claude/workflows/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-claude/workflows/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-claude/workflows/task-implement.md b/plugins/core-claude/workflows/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-claude/workflows/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-claude/workflows/task-spec.md b/plugins/core-claude/workflows/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-claude/workflows/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-claude/workflows/tasks-list.md b/plugins/core-claude/workflows/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-claude/workflows/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-codex-light/.agents/skills/coding-flow/SKILL.md b/plugins/core-codex-light/.agents/skills/coding-flow/SKILL.md index dac591eae..ccb2aae21 100644 --- a/plugins/core-codex-light/.agents/skills/coding-flow/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/coding-flow/SKILL.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-codex-light/.agents/skills/deviation/README.md b/plugins/core-codex-light/.agents/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-codex-light/.agents/skills/deviation/README.md +++ b/plugins/core-codex-light/.agents/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-codex-light/.agents/skills/deviation/SKILL.md b/plugins/core-codex-light/.agents/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-codex-light/.agents/skills/deviation/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-codex-light/.agents/skills/hitl/README.md b/plugins/core-codex-light/.agents/skills/hitl/README.md index d894c7b3a..ecd0b6e33 100644 --- a/plugins/core-codex-light/.agents/skills/hitl/README.md +++ b/plugins/core-codex-light/.agents/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `skills/init-workspace-flow/phases/init-workspace-flow-questions.md`, `skills/adhoc-flow/SKILL.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-codex-light/.agents/skills/hitl/SKILL.md b/plugins/core-codex-light/.agents/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-codex-light/.agents/skills/hitl/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-codex-light/.agents/skills/hitl/references/decision-bound-continuation.md b/plugins/core-codex-light/.agents/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-codex-light/.agents/skills/load-project-context/README.md b/plugins/core-codex-light/.agents/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-codex-light/.agents/skills/load-project-context/README.md +++ b/plugins/core-codex-light/.agents/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-codex-light/.agents/skills/load-project-context/SKILL.md b/plugins/core-codex-light/.agents/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-codex-light/.agents/skills/load-project-context/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-codex-light/.agents/skills/orchestration/README.md b/plugins/core-codex-light/.agents/skills/orchestration/README.md index cf3e85bac..8e194045c 100644 --- a/plugins/core-codex-light/.agents/skills/orchestration/README.md +++ b/plugins/core-codex-light/.agents/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-codex-light/.agents/skills/orchestration/SKILL.md b/plugins/core-codex-light/.agents/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-codex-light/.agents/skills/orchestration/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-codex-light/.agents/skills/rosetta/README.md b/plugins/core-codex-light/.agents/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/plugins/core-codex-light/.agents/skills/rosetta/README.md +++ b/plugins/core-codex-light/.agents/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-codex-light/.agents/skills/rosetta/SKILL.md b/plugins/core-codex-light/.agents/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-codex-light/.agents/skills/rosetta/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-codex-light/.agents/skills/self-learning/README.md b/plugins/core-codex-light/.agents/skills/self-learning/README.md index a7f4ca94a..0566509c6 100644 --- a/plugins/core-codex-light/.agents/skills/self-learning/README.md +++ b/plugins/core-codex-light/.agents/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-codex-light/.agents/skills/self-learning/SKILL.md b/plugins/core-codex-light/.agents/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-codex-light/.agents/skills/self-learning/SKILL.md +++ b/plugins/core-codex-light/.agents/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-codex-light/.agents/skills/task-define/SKILL.md b/plugins/core-codex-light/.agents/skills/task-define/SKILL.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-define/SKILL.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-codex-light/.agents/skills/task-implement/SKILL.md b/plugins/core-codex-light/.agents/skills/task-implement/SKILL.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-implement/SKILL.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/README.md b/plugins/core-codex-light/.agents/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-codex-light/.agents/skills/task-management/SKILL.md b/plugins/core-codex-light/.agents/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/command-rendering.md b/plugins/core-codex-light/.agents/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/consultation.md b/plugins/core-codex-light/.agents/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/fingerprints.md b/plugins/core-codex-light/.agents/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/handoff.md b/plugins/core-codex-light/.agents/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/inspect.md b/plugins/core-codex-light/.agents/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/invalidate.md b/plugins/core-codex-light/.agents/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/list.md b/plugins/core-codex-light/.agents/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/passport.md b/plugins/core-codex-light/.agents/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/record.md b/plugins/core-codex-light/.agents/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-codex-light/.agents/skills/task-management/references/resolve-create.md b/plugins/core-codex-light/.agents/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-codex-light/.agents/skills/task-spec/SKILL.md b/plugins/core-codex-light/.agents/skills/task-spec/SKILL.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/task-spec/SKILL.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-codex-light/.agents/skills/tasks-list/SKILL.md b/plugins/core-codex-light/.agents/skills/tasks-list/SKILL.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-codex-light/.agents/skills/tasks-list/SKILL.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-codex-light/.codex/agents/architect.toml b/plugins/core-codex-light/.codex/agents/architect.toml index e1a5847ef..cce502924 100644 --- a/plugins/core-codex-light/.codex/agents/architect.toml +++ b/plugins/core-codex-light/.codex/agents/architect.toml @@ -22,7 +22,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -30,6 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-codex/.agents/skills/coding-flow/SKILL.md b/plugins/core-codex/.agents/skills/coding-flow/SKILL.md index cc6e82b7c..6fd1de5ca 100644 --- a/plugins/core-codex/.agents/skills/coding-flow/SKILL.md +++ b/plugins/core-codex/.agents/skills/coding-flow/SKILL.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-codex/.agents/skills/deviation/README.md b/plugins/core-codex/.agents/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-codex/.agents/skills/deviation/README.md +++ b/plugins/core-codex/.agents/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-codex/.agents/skills/deviation/SKILL.md b/plugins/core-codex/.agents/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-codex/.agents/skills/deviation/SKILL.md +++ b/plugins/core-codex/.agents/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-codex/.agents/skills/hitl/README.md b/plugins/core-codex/.agents/skills/hitl/README.md index d894c7b3a..ecd0b6e33 100644 --- a/plugins/core-codex/.agents/skills/hitl/README.md +++ b/plugins/core-codex/.agents/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `skills/init-workspace-flow/phases/init-workspace-flow-questions.md`, `skills/adhoc-flow/SKILL.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-codex/.agents/skills/hitl/SKILL.md b/plugins/core-codex/.agents/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-codex/.agents/skills/hitl/SKILL.md +++ b/plugins/core-codex/.agents/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-codex/.agents/skills/hitl/references/decision-bound-continuation.md b/plugins/core-codex/.agents/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-codex/.agents/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-codex/.agents/skills/load-project-context/README.md b/plugins/core-codex/.agents/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-codex/.agents/skills/load-project-context/README.md +++ b/plugins/core-codex/.agents/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-codex/.agents/skills/load-project-context/SKILL.md b/plugins/core-codex/.agents/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-codex/.agents/skills/load-project-context/SKILL.md +++ b/plugins/core-codex/.agents/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-codex/.agents/skills/orchestration/README.md b/plugins/core-codex/.agents/skills/orchestration/README.md index cf3e85bac..8e194045c 100644 --- a/plugins/core-codex/.agents/skills/orchestration/README.md +++ b/plugins/core-codex/.agents/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-codex/.agents/skills/orchestration/SKILL.md b/plugins/core-codex/.agents/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-codex/.agents/skills/orchestration/SKILL.md +++ b/plugins/core-codex/.agents/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-codex/.agents/skills/rosetta/README.md b/plugins/core-codex/.agents/skills/rosetta/README.md index a2fac6de1..f9ade26b2 100644 --- a/plugins/core-codex/.agents/skills/rosetta/README.md +++ b/plugins/core-codex/.agents/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `workflows/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `workflows/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-codex/.agents/skills/rosetta/SKILL.md b/plugins/core-codex/.agents/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-codex/.agents/skills/rosetta/SKILL.md +++ b/plugins/core-codex/.agents/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-codex/.agents/skills/self-learning/README.md b/plugins/core-codex/.agents/skills/self-learning/README.md index a7f4ca94a..0566509c6 100644 --- a/plugins/core-codex/.agents/skills/self-learning/README.md +++ b/plugins/core-codex/.agents/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-codex/.agents/skills/self-learning/SKILL.md b/plugins/core-codex/.agents/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-codex/.agents/skills/self-learning/SKILL.md +++ b/plugins/core-codex/.agents/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-codex/.agents/skills/task-define/SKILL.md b/plugins/core-codex/.agents/skills/task-define/SKILL.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-define/SKILL.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-codex/.agents/skills/task-implement/SKILL.md b/plugins/core-codex/.agents/skills/task-implement/SKILL.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-implement/SKILL.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-codex/.agents/skills/task-management/README.md b/plugins/core-codex/.agents/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-codex/.agents/skills/task-management/SKILL.md b/plugins/core-codex/.agents/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/command-rendering.md b/plugins/core-codex/.agents/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/consultation.md b/plugins/core-codex/.agents/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/fingerprints.md b/plugins/core-codex/.agents/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/handoff.md b/plugins/core-codex/.agents/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/inspect.md b/plugins/core-codex/.agents/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/invalidate.md b/plugins/core-codex/.agents/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/list.md b/plugins/core-codex/.agents/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/passport.md b/plugins/core-codex/.agents/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/record.md b/plugins/core-codex/.agents/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-codex/.agents/skills/task-management/references/resolve-create.md b/plugins/core-codex/.agents/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-codex/.agents/skills/task-spec/SKILL.md b/plugins/core-codex/.agents/skills/task-spec/SKILL.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-codex/.agents/skills/task-spec/SKILL.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-codex/.agents/skills/tasks-list/SKILL.md b/plugins/core-codex/.agents/skills/tasks-list/SKILL.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-codex/.agents/skills/tasks-list/SKILL.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-codex/.codex/agents/architect.toml b/plugins/core-codex/.codex/agents/architect.toml index e1a5847ef..cce502924 100644 --- a/plugins/core-codex/.codex/agents/architect.toml +++ b/plugins/core-codex/.codex/agents/architect.toml @@ -22,7 +22,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -30,6 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-copilot-light/.github/plugin/hooks.json b/plugins/core-copilot-light/.github/plugin/hooks.json index 1b58b1f88..e4ef4cc63 100644 --- a/plugins/core-copilot-light/.github/plugin/hooks.json +++ b/plugins/core-copilot-light/.github/plugin/hooks.json @@ -1,6 +1,6 @@ { "version": 1, "hooks": { - "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] + "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] } } diff --git a/plugins/core-copilot-light/agents/architect.agent.md b/plugins/core-copilot-light/agents/architect.agent.md index 578b027c5..7c3f226aa 100644 --- a/plugins/core-copilot-light/agents/architect.agent.md +++ b/plugins/core-copilot-light/agents/architect.agent.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-copilot-light/commands/INDEX.md b/plugins/core-copilot-light/commands/INDEX.md index 3ec5d48d6..01c69c46e 100644 --- a/plugins/core-copilot-light/commands/INDEX.md +++ b/plugins/core-copilot-light/commands/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `commands/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `commands/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `commands/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `commands/task-define.md`: "Create or revise a managed task and approve its requirements." +- `commands/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `commands/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `commands/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `commands/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `commands/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-copilot-light/commands/coding-flow.md b/plugins/core-copilot-light/commands/coding-flow.md index 5963e545e..e1d3904be 100644 --- a/plugins/core-copilot-light/commands/coding-flow.md +++ b/plugins/core-copilot-light/commands/coding-flow.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-copilot-light/commands/task-define.md b/plugins/core-copilot-light/commands/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-copilot-light/commands/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot-light/commands/task-implement.md b/plugins/core-copilot-light/commands/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-copilot-light/commands/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-copilot-light/commands/task-spec.md b/plugins/core-copilot-light/commands/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-copilot-light/commands/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot-light/commands/tasks-list.md b/plugins/core-copilot-light/commands/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-copilot-light/commands/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-copilot-light/hooks.json b/plugins/core-copilot-light/hooks.json index 1b58b1f88..e4ef4cc63 100644 --- a/plugins/core-copilot-light/hooks.json +++ b/plugins/core-copilot-light/hooks.json @@ -1,6 +1,6 @@ { "version": 1, "hooks": { - "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] + "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] } } diff --git a/plugins/core-copilot-light/skills/deviation/README.md b/plugins/core-copilot-light/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-copilot-light/skills/deviation/README.md +++ b/plugins/core-copilot-light/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-light/skills/deviation/SKILL.md b/plugins/core-copilot-light/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-copilot-light/skills/deviation/SKILL.md +++ b/plugins/core-copilot-light/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-copilot-light/skills/hitl/README.md b/plugins/core-copilot-light/skills/hitl/README.md index bc366a799..3c42edf67 100644 --- a/plugins/core-copilot-light/skills/hitl/README.md +++ b/plugins/core-copilot-light/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `commands/init-workspace-flow-questions.md`, `commands/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-copilot-light/skills/hitl/SKILL.md b/plugins/core-copilot-light/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-copilot-light/skills/hitl/SKILL.md +++ b/plugins/core-copilot-light/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-copilot-light/skills/hitl/references/decision-bound-continuation.md b/plugins/core-copilot-light/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-copilot-light/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-copilot-light/skills/load-project-context/README.md b/plugins/core-copilot-light/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-copilot-light/skills/load-project-context/README.md +++ b/plugins/core-copilot-light/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-copilot-light/skills/load-project-context/SKILL.md b/plugins/core-copilot-light/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-copilot-light/skills/load-project-context/SKILL.md +++ b/plugins/core-copilot-light/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-copilot-light/skills/orchestration/README.md b/plugins/core-copilot-light/skills/orchestration/README.md index 034b0b202..999f7002c 100644 --- a/plugins/core-copilot-light/skills/orchestration/README.md +++ b/plugins/core-copilot-light/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-light/skills/orchestration/SKILL.md b/plugins/core-copilot-light/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-copilot-light/skills/orchestration/SKILL.md +++ b/plugins/core-copilot-light/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-copilot-light/skills/rosetta/README.md b/plugins/core-copilot-light/skills/rosetta/README.md index 15d183cc2..f9ade26b2 100644 --- a/plugins/core-copilot-light/skills/rosetta/README.md +++ b/plugins/core-copilot-light/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `commands/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `commands/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-copilot-light/skills/rosetta/SKILL.md b/plugins/core-copilot-light/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-copilot-light/skills/rosetta/SKILL.md +++ b/plugins/core-copilot-light/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-copilot-light/skills/self-learning/README.md b/plugins/core-copilot-light/skills/self-learning/README.md index 5a34656b7..52521bac7 100644 --- a/plugins/core-copilot-light/skills/self-learning/README.md +++ b/plugins/core-copilot-light/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-light/skills/self-learning/SKILL.md b/plugins/core-copilot-light/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-copilot-light/skills/self-learning/SKILL.md +++ b/plugins/core-copilot-light/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-copilot-light/skills/task-management/README.md b/plugins/core-copilot-light/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-copilot-light/skills/task-management/SKILL.md b/plugins/core-copilot-light/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-copilot-light/skills/task-management/references/command-rendering.md b/plugins/core-copilot-light/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/consultation.md b/plugins/core-copilot-light/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/fingerprints.md b/plugins/core-copilot-light/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-copilot-light/skills/task-management/references/handoff.md b/plugins/core-copilot-light/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/inspect.md b/plugins/core-copilot-light/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/invalidate.md b/plugins/core-copilot-light/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/list.md b/plugins/core-copilot-light/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/passport.md b/plugins/core-copilot-light/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-copilot-light/skills/task-management/references/record.md b/plugins/core-copilot-light/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-copilot-light/skills/task-management/references/resolve-create.md b/plugins/core-copilot-light/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-copilot-light/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-copilot-standalone-light/.github/agents/architect.agent.md b/plugins/core-copilot-standalone-light/.github/agents/architect.agent.md index 578b027c5..7c3f226aa 100644 --- a/plugins/core-copilot-standalone-light/.github/agents/architect.agent.md +++ b/plugins/core-copilot-standalone-light/.github/agents/architect.agent.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-copilot-standalone-light/.github/prompts/INDEX.md b/plugins/core-copilot-standalone-light/.github/prompts/INDEX.md index 8c5f0b3a9..a6f7b0c4a 100644 --- a/plugins/core-copilot-standalone-light/.github/prompts/INDEX.md +++ b/plugins/core-copilot-standalone-light/.github/prompts/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `prompts/research-flow.prompt.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `prompts/security-flow.prompt.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `prompts/self-help-flow.prompt.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `prompts/task-define.prompt.md`: "Create or revise a managed task and approve its requirements." +- `prompts/task-implement.prompt.md`: "Implement, review, test, and accept a managed task's approved plan." +- `prompts/task-spec.prompt.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `prompts/tasks-list.prompt.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `prompts/testgen-flow.prompt.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `prompts/ui-aqa-flow.prompt.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-copilot-standalone-light/.github/prompts/coding-flow.prompt.md b/plugins/core-copilot-standalone-light/.github/prompts/coding-flow.prompt.md index 5963e545e..e1d3904be 100644 --- a/plugins/core-copilot-standalone-light/.github/prompts/coding-flow.prompt.md +++ b/plugins/core-copilot-standalone-light/.github/prompts/coding-flow.prompt.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-copilot-standalone-light/.github/prompts/task-define.prompt.md b/plugins/core-copilot-standalone-light/.github/prompts/task-define.prompt.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/prompts/task-define.prompt.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot-standalone-light/.github/prompts/task-implement.prompt.md b/plugins/core-copilot-standalone-light/.github/prompts/task-implement.prompt.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/prompts/task-implement.prompt.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-copilot-standalone-light/.github/prompts/task-spec.prompt.md b/plugins/core-copilot-standalone-light/.github/prompts/task-spec.prompt.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/prompts/task-spec.prompt.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot-standalone-light/.github/prompts/tasks-list.prompt.md b/plugins/core-copilot-standalone-light/.github/prompts/tasks-list.prompt.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/prompts/tasks-list.prompt.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/deviation/README.md b/plugins/core-copilot-standalone-light/.github/skills/deviation/README.md index 6253f7aaf..23457e9dc 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/deviation/README.md +++ b/plugins/core-copilot-standalone-light/.github/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-standalone-light/.github/skills/deviation/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/deviation/SKILL.md +++ b/plugins/core-copilot-standalone-light/.github/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-copilot-standalone-light/.github/skills/hitl/README.md b/plugins/core-copilot-standalone-light/.github/skills/hitl/README.md index 99fb15ab7..ec9ecc4d1 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/hitl/README.md +++ b/plugins/core-copilot-standalone-light/.github/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `instructions/bootstrap-alwayson.instructions.md`, `rules/local-files-mode.md`, `instructions/plugin-files-mode.instructions.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `prompts/init-workspace-flow-questions.prompt.md`, `prompts/adhoc-flow.prompt.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-copilot-standalone-light/.github/skills/hitl/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/hitl/SKILL.md +++ b/plugins/core-copilot-standalone-light/.github/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-copilot-standalone-light/.github/skills/hitl/references/decision-bound-continuation.md b/plugins/core-copilot-standalone-light/.github/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/load-project-context/README.md b/plugins/core-copilot-standalone-light/.github/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/load-project-context/README.md +++ b/plugins/core-copilot-standalone-light/.github/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-copilot-standalone-light/.github/skills/load-project-context/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/load-project-context/SKILL.md +++ b/plugins/core-copilot-standalone-light/.github/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-copilot-standalone-light/.github/skills/orchestration/README.md b/plugins/core-copilot-standalone-light/.github/skills/orchestration/README.md index 09864cc8c..2f755b8f6 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/orchestration/README.md +++ b/plugins/core-copilot-standalone-light/.github/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `instructions/bootstrap-alwayson.instructions.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-standalone-light/.github/skills/orchestration/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/orchestration/SKILL.md +++ b/plugins/core-copilot-standalone-light/.github/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-copilot-standalone-light/.github/skills/rosetta/README.md b/plugins/core-copilot-standalone-light/.github/skills/rosetta/README.md index b4b2ee0ec..f9ade26b2 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/rosetta/README.md +++ b/plugins/core-copilot-standalone-light/.github/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `prompts/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `prompts/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-copilot-standalone-light/.github/skills/rosetta/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/rosetta/SKILL.md +++ b/plugins/core-copilot-standalone-light/.github/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-copilot-standalone-light/.github/skills/self-learning/README.md b/plugins/core-copilot-standalone-light/.github/skills/self-learning/README.md index fdd1d6218..bafb890a9 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/self-learning/README.md +++ b/plugins/core-copilot-standalone-light/.github/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-standalone-light/.github/skills/self-learning/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-copilot-standalone-light/.github/skills/self-learning/SKILL.md +++ b/plugins/core-copilot-standalone-light/.github/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/README.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/SKILL.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/command-rendering.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/consultation.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/fingerprints.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/handoff.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/inspect.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/invalidate.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/list.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/passport.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/record.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-copilot-standalone-light/.github/skills/task-management/references/resolve-create.md b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-copilot-standalone-light/.github/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-copilot-standalone/.github/agents/architect.agent.md b/plugins/core-copilot-standalone/.github/agents/architect.agent.md index 578b027c5..7c3f226aa 100644 --- a/plugins/core-copilot-standalone/.github/agents/architect.agent.md +++ b/plugins/core-copilot-standalone/.github/agents/architect.agent.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-copilot-standalone/.github/prompts/INDEX.md b/plugins/core-copilot-standalone/.github/prompts/INDEX.md index 58a0dbe62..5a1c5760a 100644 --- a/plugins/core-copilot-standalone/.github/prompts/INDEX.md +++ b/plugins/core-copilot-standalone/.github/prompts/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `prompts/research-flow.prompt.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `prompts/security-flow.prompt.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `prompts/self-help-flow.prompt.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `prompts/task-define.prompt.md`: "Create or revise a managed task and approve its requirements." +- `prompts/task-implement.prompt.md`: "Implement, review, test, and accept a managed task's approved plan." +- `prompts/task-spec.prompt.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `prompts/tasks-list.prompt.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `prompts/testgen-flow.prompt.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `prompts/ui-aqa-flow.prompt.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-copilot-standalone/.github/prompts/coding-flow.prompt.md b/plugins/core-copilot-standalone/.github/prompts/coding-flow.prompt.md index ca4652468..6575a93c9 100644 --- a/plugins/core-copilot-standalone/.github/prompts/coding-flow.prompt.md +++ b/plugins/core-copilot-standalone/.github/prompts/coding-flow.prompt.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-copilot-standalone/.github/prompts/task-define.prompt.md b/plugins/core-copilot-standalone/.github/prompts/task-define.prompt.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-copilot-standalone/.github/prompts/task-define.prompt.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot-standalone/.github/prompts/task-implement.prompt.md b/plugins/core-copilot-standalone/.github/prompts/task-implement.prompt.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/prompts/task-implement.prompt.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-copilot-standalone/.github/prompts/task-spec.prompt.md b/plugins/core-copilot-standalone/.github/prompts/task-spec.prompt.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/prompts/task-spec.prompt.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot-standalone/.github/prompts/tasks-list.prompt.md b/plugins/core-copilot-standalone/.github/prompts/tasks-list.prompt.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-copilot-standalone/.github/prompts/tasks-list.prompt.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-copilot-standalone/.github/skills/deviation/README.md b/plugins/core-copilot-standalone/.github/skills/deviation/README.md index 6253f7aaf..23457e9dc 100644 --- a/plugins/core-copilot-standalone/.github/skills/deviation/README.md +++ b/plugins/core-copilot-standalone/.github/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-standalone/.github/skills/deviation/SKILL.md b/plugins/core-copilot-standalone/.github/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-copilot-standalone/.github/skills/deviation/SKILL.md +++ b/plugins/core-copilot-standalone/.github/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-copilot-standalone/.github/skills/hitl/README.md b/plugins/core-copilot-standalone/.github/skills/hitl/README.md index 99fb15ab7..ec9ecc4d1 100644 --- a/plugins/core-copilot-standalone/.github/skills/hitl/README.md +++ b/plugins/core-copilot-standalone/.github/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `instructions/bootstrap-alwayson.instructions.md`, `rules/local-files-mode.md`, `instructions/plugin-files-mode.instructions.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `prompts/init-workspace-flow-questions.prompt.md`, `prompts/adhoc-flow.prompt.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-copilot-standalone/.github/skills/hitl/SKILL.md b/plugins/core-copilot-standalone/.github/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-copilot-standalone/.github/skills/hitl/SKILL.md +++ b/plugins/core-copilot-standalone/.github/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-copilot-standalone/.github/skills/hitl/references/decision-bound-continuation.md b/plugins/core-copilot-standalone/.github/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-copilot-standalone/.github/skills/load-project-context/README.md b/plugins/core-copilot-standalone/.github/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-copilot-standalone/.github/skills/load-project-context/README.md +++ b/plugins/core-copilot-standalone/.github/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-copilot-standalone/.github/skills/load-project-context/SKILL.md b/plugins/core-copilot-standalone/.github/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-copilot-standalone/.github/skills/load-project-context/SKILL.md +++ b/plugins/core-copilot-standalone/.github/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-copilot-standalone/.github/skills/orchestration/README.md b/plugins/core-copilot-standalone/.github/skills/orchestration/README.md index 09864cc8c..2f755b8f6 100644 --- a/plugins/core-copilot-standalone/.github/skills/orchestration/README.md +++ b/plugins/core-copilot-standalone/.github/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `instructions/bootstrap-alwayson.instructions.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-standalone/.github/skills/orchestration/SKILL.md b/plugins/core-copilot-standalone/.github/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-copilot-standalone/.github/skills/orchestration/SKILL.md +++ b/plugins/core-copilot-standalone/.github/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-copilot-standalone/.github/skills/rosetta/README.md b/plugins/core-copilot-standalone/.github/skills/rosetta/README.md index b4b2ee0ec..f9ade26b2 100644 --- a/plugins/core-copilot-standalone/.github/skills/rosetta/README.md +++ b/plugins/core-copilot-standalone/.github/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `prompts/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `prompts/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-copilot-standalone/.github/skills/rosetta/SKILL.md b/plugins/core-copilot-standalone/.github/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-copilot-standalone/.github/skills/rosetta/SKILL.md +++ b/plugins/core-copilot-standalone/.github/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-copilot-standalone/.github/skills/self-learning/README.md b/plugins/core-copilot-standalone/.github/skills/self-learning/README.md index fdd1d6218..bafb890a9 100644 --- a/plugins/core-copilot-standalone/.github/skills/self-learning/README.md +++ b/plugins/core-copilot-standalone/.github/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot-standalone/.github/skills/self-learning/SKILL.md b/plugins/core-copilot-standalone/.github/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-copilot-standalone/.github/skills/self-learning/SKILL.md +++ b/plugins/core-copilot-standalone/.github/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/README.md b/plugins/core-copilot-standalone/.github/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/SKILL.md b/plugins/core-copilot-standalone/.github/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/command-rendering.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/consultation.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/fingerprints.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/handoff.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/inspect.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/invalidate.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/list.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/passport.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/record.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-copilot-standalone/.github/skills/task-management/references/resolve-create.md b/plugins/core-copilot-standalone/.github/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-copilot-standalone/.github/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-copilot/.github/plugin/hooks.json b/plugins/core-copilot/.github/plugin/hooks.json index 71717043f..bb92e7aa7 100644 --- a/plugins/core-copilot/.github/plugin/hooks.json +++ b/plugins/core-copilot/.github/plugin/hooks.json @@ -1,6 +1,6 @@ { "version": 1, "hooks": { - "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] + "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] } } diff --git a/plugins/core-copilot/agents/architect.agent.md b/plugins/core-copilot/agents/architect.agent.md index 578b027c5..7c3f226aa 100644 --- a/plugins/core-copilot/agents/architect.agent.md +++ b/plugins/core-copilot/agents/architect.agent.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-copilot/commands/INDEX.md b/plugins/core-copilot/commands/INDEX.md index 31423641c..060f17f1d 100644 --- a/plugins/core-copilot/commands/INDEX.md +++ b/plugins/core-copilot/commands/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `commands/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `commands/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `commands/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `commands/task-define.md`: "Create or revise a managed task and approve its requirements." +- `commands/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `commands/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `commands/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `commands/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `commands/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-copilot/commands/coding-flow.md b/plugins/core-copilot/commands/coding-flow.md index ca4652468..6575a93c9 100644 --- a/plugins/core-copilot/commands/coding-flow.md +++ b/plugins/core-copilot/commands/coding-flow.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-copilot/commands/task-define.md b/plugins/core-copilot/commands/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-copilot/commands/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot/commands/task-implement.md b/plugins/core-copilot/commands/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-copilot/commands/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-copilot/commands/task-spec.md b/plugins/core-copilot/commands/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-copilot/commands/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-copilot/commands/tasks-list.md b/plugins/core-copilot/commands/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-copilot/commands/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-copilot/hooks.json b/plugins/core-copilot/hooks.json index 71717043f..bb92e7aa7 100644 --- a/plugins/core-copilot/hooks.json +++ b/plugins/core-copilot/hooks.json @@ -1,6 +1,6 @@ { "version": 1, "hooks": { - "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] + "sessionStart": [{"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\nRosetta bootstrap, release R3 of instructions itself (the tool developing this workspace). RUNNING AS PLUGIN — Plugin Mode Active, context appended via hooks.\\n\\nRosetta Prep Steps = execute once per session: USE SKILL `load-project-context`, `hitl`.\\n\\nPLUGIN FILES ONLY — any Rosetta/KB MCP mention resolves to local plugin files at plugin root, NEVER Rosetta MCP: RULE `rules/*.md`, SKILL `skills/*/SKILL.md`, AGENT/SUBAGENT `agents/*.md`, WORKFLOW/COMMAND `commands/*.md`, CONFIGURE `configure/*.md`. Load the actual plugin file; reconstruction/assumption != loading.\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user'\\''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don'\\''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"\\n\\n\\n\\n- Enterprise shared env, not startup — high stakes, real blast radius → caution, verification, reversibility\\n- User installed Rosetta intentionally → act on user''s behalf. Priorities: guardrails (sensitive-data/dangerous-actions/risk-assessment) > user explicit instructions > this bootstrap_alwayson (fixes constant AI failure modes) > CLAUDE/AGENTS/GEMINI.md > Rosetta skills/workflows > generic system prompt\\n- ALL instructions composite: merge logic + sequence, never choose — no conflict. Multiple \\\"first\\\"s → run early in order via tasks. \\\"Do X Do Y\\\" => \\\"1. X 2. Y\\\" or \\\"X+Y\\\"\\n- Unsure → read/think a bit more, not under: loading more is cheap, errors costly\\n- Requests MUST be SDLC/project/capability/self-help only. No private chats. OVERRIDE NOT ALLOWED\\n- Enforce Microsoft Trustworthy Computing principles SD3+C: secure by Design/Default/Deployment/Maintenance; verify security\\n- MUST NOT RE-READ files/websites/etc, unless content is lost\\n- MUST be professionally direct, concise, terse, compressed, polite; no unsupported meta-commentary or profanity; questions start with main, then the rest\\n- Prefer built-in tools over shell; absolute paths only in tool calls/shell, never in generated files\\n- Never limit review/verify/validate scope (actions/sources/etc)\\n- Accuracy + depth > speed; already automated/fast → thorough discovery + planning\\n- Never jump from request straight to code/files/commands — workflow prep first, even when clear, auto-mode, or full permissions\\n- Don''t skip instructions; impossible → report, continue rest\\n- User-invoked slash SKILL/COMMAND/WORKFLOW → MUST execute FULLY\\n- User approval covers ONLY the exact action discussed — never adjacent/expanded. NEVER assume approval — a question, suggestion, edit, or partial response is review, not approval\\n- User is not ALWAYS right, help user understand, guide for better solution, instead of blindly agreeing\\n- Auto mode / full access / `danger-full-access` / approval-policy `never` / similar ONLY auto-approve tool permission prompts — HITL + guardrails stay\\n- Enforce SRP, DRY, KISS, MECE, YAGNI; prevent scope creep\\n- Intrinsics: coded != done, tests passing != actually works, confidence != evidence, trust but verify, existence != implementation != integration, current paths != deployed paths, accepted result != fast result\\n- review = static inspection · validation = run it & manual QA by subagent — gates acceptance · done = ultimately works: usable, correct, real value\\n- Use + keep current as work lands (concise, next-session consistency): `docs/CONTEXT.md` — business + behavior + target state · `docs/ARCHITECTURE.md` — architecture + technical requirements · `agents/MEMORY.md` — root causes, what worked/failed\\n- MUST talk in ASD-STE100 Simplified Technical English\\n\\nTasks = execution ledger, survives dropped steps & compaction. MUST run everything (incl. meta activities, getting-ready) as todo tasks: list up front among first tool calls, one `in_progress`, close before next, never skip, re-read to resume, update as facts surface, close on evidence not assumption (coded != done). MUST ALWAYS USE AND KEEP CURRENT TODO TASKS, ASAP. SOLVES YOUR LATER DEVIATIONS. Use tool search tool if task tooling is not available.\\n\\n\\n\\n\\n\\nReasonable = apply in chain-of-thought a one-line justification a senior reviewer (architect/security/owner) would accept, naming:\\n- warrant — explicit basis→action link, case-specific, retrievable (Toulmin)\\n- stakes — bar scales with consequence; enterprise = high default (ALARP)\\n- undo — reversible; rollback path identified pre-action (Bayesian)\\n- limits — uncertainty named, not glossed (Simon)\\n- default unreasonable — earn it, else ASK\\nTest: sound reasoning survives audit despite bad outcome\\n\\n\\n\\n\\n\\nSkill descriptions say when; engage BEFORE any response/action — even 1% chance; guardrail blocks an action → suggest compliant solutions.\\nAll agents: USE SKILL `sensitive-data`, `dangerous-actions`, `deviation`, `self-learning`, `self-organization` WHEN NEEDED.\\nOrchestrator/top-agent (not subagents): USE SKILL `hitl`, `orchestration` (unless trivial), `questioning`, `risk-assessment`, `load-project-context` WHEN NEEDED.\\nSubagents: MUST USE SKILL `subagent-directives`\\n\\n\\n\\n\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Rules Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `rules/bootstrap-alwayson.md`: Minimal always-required LLM fixes.\\n- `rules/plugin-files-mode.md`: Rosetta Plugin Mode Bootstrap\\n- `rules/speckit-integration-policy.md`: Invoke if directly requested and speckit is already in context\\n\"}}'"}, {"type": "command", "bash": "printf '%s' '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task'\\''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task'\\''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'", "powershell": "Write-Output '{\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# Rosetta Workflows Index\\n\\nAll paths are relative to Rosetta Plugin Path.\\n\\n- `commands/adhoc-flow.md`: \\\"Workflow for the rest of tasks: lightweight documentation, build, track, synchronize, etc.\\\"\\n- `commands/api-aqa-flow.md`: \\\"Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.\\\"\\n- `commands/aqa-flow.md`: \\\"Router workflow for test automation: routes to ui-aqa-flow, api-aqa-flow, or testgen-flow. Kept for backward compatibility.\\\"\\n- `commands/arrange-workspace-flow.md`: \\\"Workflow for arranging a workspace: layout, reference source code, business/technical context, ecosystem setup.\\\"\\n- `commands/code-analysis-flow.md`: \\\"Workflow for reverse-engineering a codebase into grounded architecture docs, requirements capture, etc.\\\"\\n- `commands/coding-agents-prompting-flow.md`: \\\"Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc.\\\"\\n- `commands/coding-flow.md`: \\\"Workflow for all coding: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/coding-light-flow.md`: \\\"Light coding workflow: features, fixes, refactors, unit tests, etc.; scales small to large.\\\"\\n- `commands/external-lib-flow.md`: \\\"Workflow for onboarding an external private library so AI can use it without source access.\\\"\\n- `commands/help-flow.md`: \\\"Help about Rosetta: explains capabilities and usage.\\\"\\n- `commands/init-workspace-flow.md`: \\\"Workflow for initializing or upgrading a workspace: context, discovery, documentation, etc.\\\"\\n- `commands/modernization-flow.md`: \\\"Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.\\\"\\n- `commands/requirements-authoring-flow.md`: \\\"Workflow for authoring requirements and specifications: drafting, review, validation, etc.\\\"\\n- `commands/research-flow.md`: \\\"Workflow for deep project research with grounded references, parallel exploration, etc.\\\"\\n- `commands/security-flow.md`: \\\"Workflow for authorized, evidence-preserving security review and remediation-task preparation.\\\"\\n- `commands/self-help-flow.md`: \\\"Rosetta self-help: explains capabilities and usage. DEPRECATED.\\\"\\n- `commands/task-define.md`: \\\"Create or revise a managed task and approve its requirements.\\\"\\n- `commands/task-implement.md`: \\\"Implement, review, test, and accept a managed task''s approved plan.\\\"\\n- `commands/task-spec.md`: \\\"Approve a managed task''s architecture, specification, and implementation plan.\\\"\\n- `commands/tasks-list.md`: \\\"List managed tasks, current stages, blockers, and next commands without changes.\\\"\\n- `commands/testgen-flow.md`: \\\"Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc.\\\"\\n- `commands/ui-aqa-flow.md`: \\\"Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc.\\\"\\n\"}}'"}, {"type": "command", "bash": "for base in \"$HOME/.vscode/agent-plugins\" \"$HOME/.local/share/Code/agentPlugins\"; do root=\"$base/github.com/griddynamics/rosetta/plugins/core-copilot\"; if [ -f \"$root/commands/coding-flow.md\" ]; then printf '%s' \"{\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\",\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"SessionStart\\\",\\\"additionalContext\\\":\\\"Rosetta Plugin Path: $root\\\"}}\"; break; fi; done", "powershell": "$root = \"$env:LOCALAPPDATA\\Code\\agentPlugins\\github.com\\griddynamics\\rosetta\\plugins\\core-copilot\"; if (Test-Path \"$root\\commands\\coding-flow.md\") { Write-Output ('{\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\",\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"Rosetta Plugin Path: ' + $root + '\"}}') }"}] } } diff --git a/plugins/core-copilot/skills/deviation/README.md b/plugins/core-copilot/skills/deviation/README.md index 43af45267..701863f1a 100644 --- a/plugins/core-copilot/skills/deviation/README.md +++ b/plugins/core-copilot/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot/skills/deviation/SKILL.md b/plugins/core-copilot/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-copilot/skills/deviation/SKILL.md +++ b/plugins/core-copilot/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-copilot/skills/hitl/README.md b/plugins/core-copilot/skills/hitl/README.md index bc366a799..3c42edf67 100644 --- a/plugins/core-copilot/skills/hitl/README.md +++ b/plugins/core-copilot/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.md`, `rules/bootstrap-alwayson.md`, `rules/local-files-mode.md`, `rules/plugin-files-mode.md` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `commands/init-workspace-flow-questions.md`, `commands/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-copilot/skills/hitl/SKILL.md b/plugins/core-copilot/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-copilot/skills/hitl/SKILL.md +++ b/plugins/core-copilot/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-copilot/skills/hitl/references/decision-bound-continuation.md b/plugins/core-copilot/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-copilot/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-copilot/skills/load-project-context/README.md b/plugins/core-copilot/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-copilot/skills/load-project-context/README.md +++ b/plugins/core-copilot/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-copilot/skills/load-project-context/SKILL.md b/plugins/core-copilot/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-copilot/skills/load-project-context/SKILL.md +++ b/plugins/core-copilot/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-copilot/skills/orchestration/README.md b/plugins/core-copilot/skills/orchestration/README.md index 034b0b202..999f7002c 100644 --- a/plugins/core-copilot/skills/orchestration/README.md +++ b/plugins/core-copilot/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.md`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot/skills/orchestration/SKILL.md b/plugins/core-copilot/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-copilot/skills/orchestration/SKILL.md +++ b/plugins/core-copilot/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-copilot/skills/rosetta/README.md b/plugins/core-copilot/skills/rosetta/README.md index 15d183cc2..f9ade26b2 100644 --- a/plugins/core-copilot/skills/rosetta/README.md +++ b/plugins/core-copilot/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `commands/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `commands/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-copilot/skills/rosetta/SKILL.md b/plugins/core-copilot/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-copilot/skills/rosetta/SKILL.md +++ b/plugins/core-copilot/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-copilot/skills/self-learning/README.md b/plugins/core-copilot/skills/self-learning/README.md index 5a34656b7..52521bac7 100644 --- a/plugins/core-copilot/skills/self-learning/README.md +++ b/plugins/core-copilot/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-copilot/skills/self-learning/SKILL.md b/plugins/core-copilot/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-copilot/skills/self-learning/SKILL.md +++ b/plugins/core-copilot/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-copilot/skills/task-management/README.md b/plugins/core-copilot/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-copilot/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-copilot/skills/task-management/SKILL.md b/plugins/core-copilot/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-copilot/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-copilot/skills/task-management/references/command-rendering.md b/plugins/core-copilot/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-copilot/skills/task-management/references/consultation.md b/plugins/core-copilot/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-copilot/skills/task-management/references/fingerprints.md b/plugins/core-copilot/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-copilot/skills/task-management/references/handoff.md b/plugins/core-copilot/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-copilot/skills/task-management/references/inspect.md b/plugins/core-copilot/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-copilot/skills/task-management/references/invalidate.md b/plugins/core-copilot/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-copilot/skills/task-management/references/list.md b/plugins/core-copilot/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-copilot/skills/task-management/references/passport.md b/plugins/core-copilot/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-copilot/skills/task-management/references/record.md b/plugins/core-copilot/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-copilot/skills/task-management/references/resolve-create.md b/plugins/core-copilot/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-copilot/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-cursor-light/agents/architect.md b/plugins/core-cursor-light/agents/architect.md index 24963f35a..f1a8b289a 100644 --- a/plugins/core-cursor-light/agents/architect.md +++ b/plugins/core-cursor-light/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-cursor-light/commands/INDEX.md b/plugins/core-cursor-light/commands/INDEX.md index 3ec5d48d6..01c69c46e 100644 --- a/plugins/core-cursor-light/commands/INDEX.md +++ b/plugins/core-cursor-light/commands/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `commands/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `commands/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `commands/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `commands/task-define.md`: "Create or revise a managed task and approve its requirements." +- `commands/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `commands/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `commands/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `commands/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `commands/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-cursor-light/commands/coding-flow.md b/plugins/core-cursor-light/commands/coding-flow.md index d0aae2488..bcbdfa784 100644 --- a/plugins/core-cursor-light/commands/coding-flow.md +++ b/plugins/core-cursor-light/commands/coding-flow.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-cursor-light/commands/task-define.md b/plugins/core-cursor-light/commands/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-cursor-light/commands/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor-light/commands/task-implement.md b/plugins/core-cursor-light/commands/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-cursor-light/commands/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-cursor-light/commands/task-spec.md b/plugins/core-cursor-light/commands/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-cursor-light/commands/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor-light/commands/tasks-list.md b/plugins/core-cursor-light/commands/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-cursor-light/commands/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-cursor-light/skills/deviation/README.md b/plugins/core-cursor-light/skills/deviation/README.md index 6544c80dc..19350aa18 100644 --- a/plugins/core-cursor-light/skills/deviation/README.md +++ b/plugins/core-cursor-light/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-light/skills/deviation/SKILL.md b/plugins/core-cursor-light/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-cursor-light/skills/deviation/SKILL.md +++ b/plugins/core-cursor-light/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-cursor-light/skills/hitl/README.md b/plugins/core-cursor-light/skills/hitl/README.md index d2639139b..40cfe7842 100644 --- a/plugins/core-cursor-light/skills/hitl/README.md +++ b/plugins/core-cursor-light/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.mdc`, `rules/bootstrap-alwayson.mdc`, `rules/local-files-mode.mdc`, `rules/plugin-files-mode.mdc` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `commands/init-workspace-flow-questions.md`, `commands/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-cursor-light/skills/hitl/SKILL.md b/plugins/core-cursor-light/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-cursor-light/skills/hitl/SKILL.md +++ b/plugins/core-cursor-light/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-cursor-light/skills/hitl/references/decision-bound-continuation.md b/plugins/core-cursor-light/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-cursor-light/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-cursor-light/skills/load-project-context/README.md b/plugins/core-cursor-light/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-cursor-light/skills/load-project-context/README.md +++ b/plugins/core-cursor-light/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-cursor-light/skills/load-project-context/SKILL.md b/plugins/core-cursor-light/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-cursor-light/skills/load-project-context/SKILL.md +++ b/plugins/core-cursor-light/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-cursor-light/skills/orchestration/README.md b/plugins/core-cursor-light/skills/orchestration/README.md index 02409fe46..bc095beec 100644 --- a/plugins/core-cursor-light/skills/orchestration/README.md +++ b/plugins/core-cursor-light/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.mdc`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-light/skills/orchestration/SKILL.md b/plugins/core-cursor-light/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-cursor-light/skills/orchestration/SKILL.md +++ b/plugins/core-cursor-light/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-cursor-light/skills/rosetta/README.md b/plugins/core-cursor-light/skills/rosetta/README.md index 15d183cc2..f9ade26b2 100644 --- a/plugins/core-cursor-light/skills/rosetta/README.md +++ b/plugins/core-cursor-light/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `commands/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `commands/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-cursor-light/skills/rosetta/SKILL.md b/plugins/core-cursor-light/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-cursor-light/skills/rosetta/SKILL.md +++ b/plugins/core-cursor-light/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-cursor-light/skills/self-learning/README.md b/plugins/core-cursor-light/skills/self-learning/README.md index d02625a31..df1c14fca 100644 --- a/plugins/core-cursor-light/skills/self-learning/README.md +++ b/plugins/core-cursor-light/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-light/skills/self-learning/SKILL.md b/plugins/core-cursor-light/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-cursor-light/skills/self-learning/SKILL.md +++ b/plugins/core-cursor-light/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-cursor-light/skills/task-management/README.md b/plugins/core-cursor-light/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-cursor-light/skills/task-management/SKILL.md b/plugins/core-cursor-light/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-cursor-light/skills/task-management/references/command-rendering.md b/plugins/core-cursor-light/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/consultation.md b/plugins/core-cursor-light/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/fingerprints.md b/plugins/core-cursor-light/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-cursor-light/skills/task-management/references/handoff.md b/plugins/core-cursor-light/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/inspect.md b/plugins/core-cursor-light/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/invalidate.md b/plugins/core-cursor-light/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/list.md b/plugins/core-cursor-light/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/passport.md b/plugins/core-cursor-light/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-cursor-light/skills/task-management/references/record.md b/plugins/core-cursor-light/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-cursor-light/skills/task-management/references/resolve-create.md b/plugins/core-cursor-light/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-cursor-light/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/agents/architect.md b/plugins/core-cursor-standalone-light/.cursor/agents/architect.md index 24963f35a..f1a8b289a 100644 --- a/plugins/core-cursor-standalone-light/.cursor/agents/architect.md +++ b/plugins/core-cursor-standalone-light/.cursor/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-cursor-standalone-light/.cursor/commands/INDEX.md b/plugins/core-cursor-standalone-light/.cursor/commands/INDEX.md index 3ec5d48d6..01c69c46e 100644 --- a/plugins/core-cursor-standalone-light/.cursor/commands/INDEX.md +++ b/plugins/core-cursor-standalone-light/.cursor/commands/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `commands/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `commands/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `commands/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `commands/task-define.md`: "Create or revise a managed task and approve its requirements." +- `commands/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `commands/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `commands/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `commands/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `commands/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-cursor-standalone-light/.cursor/commands/coding-flow.md b/plugins/core-cursor-standalone-light/.cursor/commands/coding-flow.md index d0aae2488..bcbdfa784 100644 --- a/plugins/core-cursor-standalone-light/.cursor/commands/coding-flow.md +++ b/plugins/core-cursor-standalone-light/.cursor/commands/coding-flow.md @@ -16,6 +16,24 @@ Lightweight variant: a single architect pass produces discovery, design, specs, + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_design` only. In `solution_design`, obtain architecture approval after Step 3 before specs/plan; the normal single-gate rule is overridden only for this explicit stage. Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -23,14 +41,14 @@ Lightweight variant: a single architect pass produces discovery, design, specs, 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 4-7 postponing final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_design` and before `implementation`. diff --git a/plugins/core-cursor-standalone-light/.cursor/commands/task-define.md b/plugins/core-cursor-standalone-light/.cursor/commands/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/commands/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/commands/task-implement.md b/plugins/core-cursor-standalone-light/.cursor/commands/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/commands/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/commands/task-spec.md b/plugins/core-cursor-standalone-light/.cursor/commands/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/commands/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/commands/tasks-list.md b/plugins/core-cursor-standalone-light/.cursor/commands/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/commands/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/deviation/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/deviation/README.md index 6544c80dc..19350aa18 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/deviation/README.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/deviation/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/deviation/SKILL.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/hitl/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/hitl/README.md index d2639139b..40cfe7842 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/hitl/README.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.mdc`, `rules/bootstrap-alwayson.mdc`, `rules/local-files-mode.mdc`, `rules/plugin-files-mode.mdc` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `commands/init-workspace-flow-questions.md`, `commands/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/hitl/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/hitl/SKILL.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/hitl/references/decision-bound-continuation.md b/plugins/core-cursor-standalone-light/.cursor/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/README.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/SKILL.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/README.md index 02409fe46..bc095beec 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/README.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.mdc`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/SKILL.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/README.md index 15d183cc2..f9ade26b2 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/README.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `commands/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `commands/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/SKILL.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/README.md index d02625a31..df1c14fca 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/README.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/SKILL.md +++ b/plugins/core-cursor-standalone-light/.cursor/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/README.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/SKILL.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/command-rendering.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/consultation.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/fingerprints.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/handoff.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/inspect.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/invalidate.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/list.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/passport.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/record.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/resolve-create.md b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-cursor-standalone-light/.cursor/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-cursor-standalone/.cursor/agents/architect.md b/plugins/core-cursor-standalone/.cursor/agents/architect.md index 24963f35a..f1a8b289a 100644 --- a/plugins/core-cursor-standalone/.cursor/agents/architect.md +++ b/plugins/core-cursor-standalone/.cursor/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-cursor-standalone/.cursor/commands/INDEX.md b/plugins/core-cursor-standalone/.cursor/commands/INDEX.md index 31423641c..060f17f1d 100644 --- a/plugins/core-cursor-standalone/.cursor/commands/INDEX.md +++ b/plugins/core-cursor-standalone/.cursor/commands/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `commands/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `commands/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `commands/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `commands/task-define.md`: "Create or revise a managed task and approve its requirements." +- `commands/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `commands/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `commands/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `commands/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `commands/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-cursor-standalone/.cursor/commands/coding-flow.md b/plugins/core-cursor-standalone/.cursor/commands/coding-flow.md index c00ba7c39..48e5b5028 100644 --- a/plugins/core-cursor-standalone/.cursor/commands/coding-flow.md +++ b/plugins/core-cursor-standalone/.cursor/commands/coding-flow.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-cursor-standalone/.cursor/commands/task-define.md b/plugins/core-cursor-standalone/.cursor/commands/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/commands/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor-standalone/.cursor/commands/task-implement.md b/plugins/core-cursor-standalone/.cursor/commands/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/commands/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-cursor-standalone/.cursor/commands/task-spec.md b/plugins/core-cursor-standalone/.cursor/commands/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/commands/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor-standalone/.cursor/commands/tasks-list.md b/plugins/core-cursor-standalone/.cursor/commands/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/commands/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/deviation/README.md b/plugins/core-cursor-standalone/.cursor/skills/deviation/README.md index 6544c80dc..19350aa18 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/deviation/README.md +++ b/plugins/core-cursor-standalone/.cursor/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-standalone/.cursor/skills/deviation/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/deviation/SKILL.md +++ b/plugins/core-cursor-standalone/.cursor/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-cursor-standalone/.cursor/skills/hitl/README.md b/plugins/core-cursor-standalone/.cursor/skills/hitl/README.md index d2639139b..40cfe7842 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/hitl/README.md +++ b/plugins/core-cursor-standalone/.cursor/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.mdc`, `rules/bootstrap-alwayson.mdc`, `rules/local-files-mode.mdc`, `rules/plugin-files-mode.mdc` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `commands/init-workspace-flow-questions.md`, `commands/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-cursor-standalone/.cursor/skills/hitl/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/hitl/SKILL.md +++ b/plugins/core-cursor-standalone/.cursor/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-cursor-standalone/.cursor/skills/hitl/references/decision-bound-continuation.md b/plugins/core-cursor-standalone/.cursor/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/load-project-context/README.md b/plugins/core-cursor-standalone/.cursor/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/load-project-context/README.md +++ b/plugins/core-cursor-standalone/.cursor/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-cursor-standalone/.cursor/skills/load-project-context/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/load-project-context/SKILL.md +++ b/plugins/core-cursor-standalone/.cursor/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-cursor-standalone/.cursor/skills/orchestration/README.md b/plugins/core-cursor-standalone/.cursor/skills/orchestration/README.md index 02409fe46..bc095beec 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/orchestration/README.md +++ b/plugins/core-cursor-standalone/.cursor/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.mdc`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-standalone/.cursor/skills/orchestration/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/orchestration/SKILL.md +++ b/plugins/core-cursor-standalone/.cursor/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-cursor-standalone/.cursor/skills/rosetta/README.md b/plugins/core-cursor-standalone/.cursor/skills/rosetta/README.md index 15d183cc2..f9ade26b2 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/rosetta/README.md +++ b/plugins/core-cursor-standalone/.cursor/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `commands/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `commands/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-cursor-standalone/.cursor/skills/rosetta/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/rosetta/SKILL.md +++ b/plugins/core-cursor-standalone/.cursor/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-cursor-standalone/.cursor/skills/self-learning/README.md b/plugins/core-cursor-standalone/.cursor/skills/self-learning/README.md index d02625a31..df1c14fca 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/self-learning/README.md +++ b/plugins/core-cursor-standalone/.cursor/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor-standalone/.cursor/skills/self-learning/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-cursor-standalone/.cursor/skills/self-learning/SKILL.md +++ b/plugins/core-cursor-standalone/.cursor/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/README.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/SKILL.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/command-rendering.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/consultation.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/fingerprints.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/handoff.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/inspect.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/invalidate.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/list.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/passport.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/record.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-cursor-standalone/.cursor/skills/task-management/references/resolve-create.md b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-cursor-standalone/.cursor/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/plugins/core-cursor/agents/architect.md b/plugins/core-cursor/agents/architect.md index 24963f35a..f1a8b289a 100644 --- a/plugins/core-cursor/agents/architect.md +++ b/plugins/core-cursor/agents/architect.md @@ -30,7 +30,7 @@ Validation: Specifications are testable, architecture is explicit, and every req - All Rosetta prep steps MUST be FULLY completed, load-project-context skill loaded and fully executed -- Discovery phase complete with context and affected areas identified +- Authoring: discovery complete with context and affected areas identified. Explicit read-only consultation may start from partial discovery; return gaps and constraints without inventing requirements or producing a solution prematurely. - Requirements and constraints provided by orchestrator @@ -38,6 +38,7 @@ Validation: Specifications are testable, architecture is explicit, and every req 1. Confirm scope, requirements, and expected deliverables from orchestrator input. + Read-only consultation: return grounded advice, risks, tradeoffs, and decision needs to parent; do not edit artifacts, approve decisions, or claim independent review. Resume authoring steps only when separately assigned an authoring contract. 2. Validate request and specs against REQUIREMENTS for gaps and conflicts; USE SKILL `requirements-use` if present. 3. USE SKILL `tech-specs` to produce tech specifications when needed. 4. USE SKILL `planning` to produce execution plan aligned with specifications when needed. diff --git a/plugins/core-cursor/commands/INDEX.md b/plugins/core-cursor/commands/INDEX.md index 31423641c..060f17f1d 100644 --- a/plugins/core-cursor/commands/INDEX.md +++ b/plugins/core-cursor/commands/INDEX.md @@ -18,5 +18,9 @@ All paths are relative to Rosetta Plugin Path. - `commands/research-flow.md`: "Workflow for deep project research with grounded references, parallel exploration, etc." - `commands/security-flow.md`: "Workflow for authorized, evidence-preserving security review and remediation-task preparation." - `commands/self-help-flow.md`: "Rosetta self-help: explains capabilities and usage. DEPRECATED." +- `commands/task-define.md`: "Create or revise a managed task and approve its requirements." +- `commands/task-implement.md`: "Implement, review, test, and accept a managed task's approved plan." +- `commands/task-spec.md`: "Approve a managed task's architecture, specification, and implementation plan." +- `commands/tasks-list.md`: "List managed tasks, current stages, blockers, and next commands without changes." - `commands/testgen-flow.md`: "Workflow for generating test cases from requirements (Issue Tracker / Wiki sources), exporting to a Test Management System, etc." - `commands/ui-aqa-flow.md`: "Workflow for automated QA: integration and end-to-end UI test automation, page objects, etc." diff --git a/plugins/core-cursor/commands/coding-flow.md b/plugins/core-cursor/commands/coding-flow.md index c00ba7c39..48e5b5028 100644 --- a/plugins/core-cursor/commands/coding-flow.md +++ b/plugins/core-cursor/commands/coding-flow.md @@ -15,6 +15,24 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo + + +1. Default is the full workflow, unchanged. Only an explicit `task_stage=spec|implement` invocation with resolved task context activates this contract; never infer it from existing task files, TEMP state, or request size. +2. USE SKILL `task-management` to inspect current approvals and bind FEATURE/task folders. No-skipping means every applicable phase inside the selected stage; prior phases require verified approval evidence, not replay. +3. `task_stage=spec`: run through `user_review_plan` only. Obtain architecture approval at `user_review_design` before specs/plan, including SMALL (do not merge that gate). Final gate approves specification and plan. Stop even when `/goal` remains unmet. +4. `task_stage=implement`: require current requirements, architecture, and specification/plan approvals; revalidate their source context. Resume the earliest incomplete or freshness-unproven delivery phase. Missing/stale approval or material source drift: report affected work and return the task's define/spec command before implementation; do not redesign silently. +5. TEMP state and continuation phase labels are checkpoints, not approval or freshness evidence. Recover approved decisions from the durable passport using `task-management`. After any interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves their exact input/delivery snapshot and upstream approvals are unchanged. Old reports, phase labels, or missing TEMP never justify skipping unproven checks. +6. After each applicable phase and before interruption, USE SKILL `task-management` to record current progress, artifacts, actual approvals, verification evidence, blockers, and next phase. Record architecture and specification/plan approvals separately. Retain earlier evidence; invalidate affected approvals on revision. +7. SMALL managed tasks may persist concise architecture, specification, and plan in passport sections instead of separate files. Ordinary invocations retain existing message-only/skip rules and never register tasks automatically. +8. For test-first work, `spec` records intent and test plan only; no test authoring/execution. In `implement`, the pre-implementation tests pass permits expected targeted red failures proving the missing behavior; this overrides the tests phase all-success requirement for that pass only. Unexpected failures block. After code changes, require green execution of all planned checks and re-review affected code/tests before verification. Never reuse pre-implementation results as final verification. +9. Implementation includes every size-applicable review/test gate and final validation (SMALL: inline build/test confirmation). A SMALL combined implementation/final gate remains after tests, not a prerequisite blocking tests. Before any final acceptance prompt, USE SKILL `task-management` to record passed verification after all criteria/checks pass, then inspect its current receipt. Failed/stale/incomplete verification blocks acceptance. Present that exact snapshot; bind acceptance to its verification receipt. The outer task command presents any still-pending acceptance. +10. `/goal` loops stay inside the selected stage; they cannot reopen approved design or cross the specification stop boundary. Return the selected stage's result to the invoking task command. + +11. Reuse the supplied task-scoped read-only architect consultant; do not substitute native advisor or the design/plan author. Consult before architecture approval and specification/plan approval, before material implementation decisions or recovery, and on outstanding architectural risks before final acceptance. Await relevant advice before dependent action; record its disposition through `task-management`. Advice never satisfies independent review or human approval. +12. Inherit decision-bound continuation only from the invoking task command. Apply it to routine work and diagnosed recovery inside this stage; preserve approval gates, freshness checks, and stage boundaries. + + + @@ -22,14 +40,14 @@ Validation: Each phase produces verifiable outputs; reviewer catches issues befo 1. All Rosetta prep steps MUST be FULLY completed 2. MUST USE SKILL `load-project-context` (required: all), `orchestration` (all except trivial), `hitl` (all, unless `No HITL` or `Fully Autonomous`) 3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. -4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed +4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY within an explicitly selected task stage (otherwise all phases), no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed 5. When debugging is needed, INVOKE SUBAGENT `engineer` with `debugging` skill to save LLM context 6. INVOKE SUBAGENT `executor` for building, running tests, installing packages, and similar mechanical actions. 7. MUST just-in-time load each phase's skills 8. If workflow is for REQUIREMENTS, MUST USE SKILL `requirements-use` and LOAD all affected requirements. Use refs to requirements for subagents. 9. If `/goal` is set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. 10. If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE; -11. Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available +11. Explicit task stage: reuse its consultant binding. Otherwise run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available 12. Coding workflow state MUST be saved to `agents/TEMP//coding-flow-state.md` file. 13. If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases `tests` and `review_tests` to be after `user_review_plan` and before `implementation`. diff --git a/plugins/core-cursor/commands/task-define.md b/plugins/core-cursor/commands/task-define.md new file mode 100644 index 000000000..f2a3c066f --- /dev/null +++ b/plugins/core-cursor/commands/task-define.md @@ -0,0 +1,56 @@ +--- +name: task-define +description: "Create or revise a managed task and approve its requirements." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: no arguments, initial requirements text, or task ID/folder followed by changes. +Output: registered task, reviewed requirements, durable approval state, next command. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve/create from the original arguments; ask on ambiguity before writing. +2. Show identity, folder, current stage. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to the task requirements folder; FEATURE TEMP remains task-scoped. +3. Existing task: inspect current sources and approvals; preserve history. Before changing requirements, record the proposed revision and invalidate affected downstream approvals using `task-management`. +4. No arguments: create the task identity, then elicit the initial need; never invent requirements. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `requirements-authoring-flow.md` with original input, resolved task, current requirements, scoped output root, consultant binding, and decision-bound continuation. Consult before its intent/outline/requirement approval gates on gaps, feasibility, constraints, dependencies, and conflicts; await advice before presenting affected decisions. Do not require solution design to approve requirements unless observable behavior or a mandatory constraint depends on it. +2. Preserve its discovery, questioning, independent review, and requirement approval gates. Persist task progress via USE SKILL `task-management` after each phase or interruption. +3. Record the reviewed requirements and actual user approvals using `task-management`; unapproved work stays pending. +4. Stop at requirements finalization. Its coding handoff is a recommendation only for this invocation; neither `/goal` nor nested instructions may start specification or implementation here. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect and report stage, blockers, artifacts, and next action. +2. Requirements approved: hand off the `task-spec` command for this task, rendered per `command-rendering`. Otherwise hand back `task-define` the same way, with the unresolved decisions. +3. End the invocation at this boundary. Never offer, ask about, or start specification here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor/commands/task-implement.md b/plugins/core-cursor/commands/task-implement.md new file mode 100644 index 000000000..3f99f7686 --- /dev/null +++ b/plugins/core-cursor/commands/task-implement.md @@ -0,0 +1,57 @@ +--- +name: task-implement +description: "Implement, review, test, and accept a managed task's approved plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: verified delivery and explicit final acceptance. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements, architecture, and specification/plan approvals. +2. Missing target: request ID/folder. Missing or stale prerequisite: report blockers and the exact `rosetta:task-define ` or `rosetta:task-spec ` action; do not implement. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. +4. Already accepted and current: report completion without replaying implementation. + +5. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=implement`, resolved task context, consultant binding, and decision-bound continuation. +2. Resume the earliest incomplete or freshness-unproven delivery phase. After interruption, repeat reviews, validation, and tests unless a current passed verification receipt proves unchanged exact inputs/delivery and upstream approvals; a continuation label or old report is insufficient. Retain every applicable independent review and validation phase. +3. Preserve all applicable approval gates. Never treat plan approval or code completion as final delivery acceptance. +4. USE SKILL `task-management` to record progress and evidence after each phase and before interruption; record failures as incomplete checks; diagnose and recover under decision-bound continuation. Escalate unresolved blockers; do not end the invocation for a recoverable failure alone. + + + + + +1. USE SKILL `task-management` to record a passed verification receipt after every criterion and required check passes, unless that exact current receipt already exists; then inspect it. Failed, stale, or incomplete verification blocks acceptance; return remaining work instead. +2. Present that exact verified delivery snapshot: requirement coverage, verification results, outstanding limitations, and exact user verification steps. +3. Obtain explicit final user acceptance if not already recorded for this snapshot; no duplicate approval request for unchanged accepted evidence. +4. Re-inspect before recording acceptance; changes require renewed verification and presentation. USE SKILL `task-management` to bind acceptance to the current passed verification receipt and inspect derived stage. Report done only when its completion contract holds. +5. USE SKILL `task-management` with operation `handoff`; render every command per `command-rendering`. Accepted and complete: report acceptance and offer the `tasks-list` command; no new chat is required. Unfinished: persist the outcome, hand back the continuation command with the remaining work, and end the invocation at that boundary. + + + + + + diff --git a/plugins/core-cursor/commands/task-spec.md b/plugins/core-cursor/commands/task-spec.md new file mode 100644 index 000000000..a0a757529 --- /dev/null +++ b/plugins/core-cursor/commands/task-spec.md @@ -0,0 +1,54 @@ +--- +name: task-spec +description: "Approve a managed task's architecture, specification, and implementation plan." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Input: existing task ID or folder. Output: approved solution and plan; no implementation. + + + + + + +1. All Rosetta prep steps MUST be FULLY completed. +2. USE SKILL `load-project-context`, `orchestration`, `hitl`; activate decision-bound continuation for this invocation and its delegated work only. +3. Use todo tasks ledger; execute sequentially; load instructions just in time. +4. Nested workflow owns phase delegation. Dispatched subagents MUST USE SKILL `subagent-directives` and assigned skills. + + + + + +1. USE SKILL `task-management` to resolve an existing task and inspect current requirements approval; no implicit creation. +2. Missing target: request ID/folder. Missing or stale requirements approval: report blockers and return `rosetta:task-define `. +3. Bind FEATURE to task ID, FEATURE PLAN to task folder, REQUIREMENTS to task requirements folder; provide resolved task context to the nested workflow. + +4. USE SKILL `task-management` for consultation context. Through `orchestration`, INVOKE SUBAGENT `architect` as a separate read-only background consultant, all sizes; reuse only the same task/conversation instance. Pass its brief and decision-bound continuation to nested work. Persist material advice through `task-management`; advice never replaces human approval or independent review. + + + + + +1. USE FLOW `coding-flow.md` with explicit invocation binding `task_stage=spec`, resolved task context, consultant binding, and decision-bound continuation. +2. Use its supported stage boundary: architecture and user approval, specifications/plan, independent review where applicable, final plan approval. Reuse valid approved work; drift requires review of affected decisions. +3. Persist resumable outcomes and approvals through USE SKILL `task-management`; SMALL may store concise architecture, specification, and plan in the passport without separate documents. +4. Stop after the applicable plan approval gate. No implementation, test authoring/execution, or goal iteration past this boundary. + + + + + +1. USE SKILL `task-management` with operation `handoff`: persist the stage outcome, then inspect stage, blockers, approval evidence, and next action. +2. Ready: hand off the `task-implement` command for this task, rendered per `command-rendering`. Pending: hand back `task-spec` the same way, with the decisions still required. +3. End the invocation at this boundary. Never offer, ask about, or start implementation here; direct the user to a new chat with the rendered command line. + + + + + + diff --git a/plugins/core-cursor/commands/tasks-list.md b/plugins/core-cursor/commands/tasks-list.md new file mode 100644 index 000000000..32848bbfb --- /dev/null +++ b/plugins/core-cursor/commands/tasks-list.md @@ -0,0 +1,35 @@ +--- +name: tasks-list +description: "List managed tasks, current stages, blockers, and next commands without changes." +tags: ["workflow"] +baseSchema: docs/schemas/workflow.md +--- + + + + +Read registered tasks in the current repository; never create, repair, or advance them. + + + + + + +1. Complete Rosetta prep steps in read-only mode. USE SKILL `load-project-context`, `hitl` for available context only. +2. This command is a read-only exception to repository persistence: no bootstrap/scaffold, index, state, todo, memory, migration, or repair writes. Keep any execution ledger in memory. +3. Load instructions just in time; no task mutation or automatic import of existing plans. + + + + + +1. USE SKILL `task-management` with operation list, strictly read-only. +2. Show ID, title, derived stage, folder, progress/blockers, and exact next command. Translate stage labels for the user; keep IDs exact and render every command per `command-rendering`. +3. Empty registry: say no managed tasks and show the `task-define` command to create one, rendered the same way. +4. Report unreadable, malformed, duplicate, or stale entries explicitly; never omit them or silently repair state. Approval must be verifiable, not inferred from file existence. + + + + + + diff --git a/plugins/core-cursor/skills/deviation/README.md b/plugins/core-cursor/skills/deviation/README.md index 6544c80dc..19350aa18 100644 --- a/plugins/core-cursor/skills/deviation/README.md +++ b/plugins/core-cursor/skills/deviation/README.md @@ -14,6 +14,8 @@ No `` block; engagement is driven by the frontmatter `descrip ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification. Actual drift, uncertain recovery, and unresolved decisions still escalate; ordinary invocations retain the existing stop-and-wait behavior. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders, no ``, ``, or ``. Root `` wraps two sections: `` (8 numbered steps — stop, double-check against intent, "think the opposite," escalate subagents → orchestrator → user, state briefly, wait for explicit decision, update memory, recommend `post-mortem`) and `` (2 anti-patterns). No prep-steps gate — unlike most skills there is no "Rosetta prep steps MUST be FULLY completed" line, consistent with a skill meant to fire mid-task on panic/surprise rather than at a clean starting point (intent not documented). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor/skills/deviation/SKILL.md b/plugins/core-cursor/skills/deviation/SKILL.md index 69def940a..7fa9f29e4 100644 --- a/plugins/core-cursor/skills/deviation/SKILL.md +++ b/plugins/core-cursor/skills/deviation/SKILL.md @@ -13,9 +13,9 @@ baseSchema: docs/schemas/skill.md 1. STOP all changes immediately. Undoing is also the change. 2. DOUBLE CHECK against original intent. 3. "THINK THE OPPOSITE" — challenge current direction. -4. Escalate: subagents → orchestrator → user. +4. Escalate: subagents → orchestrator → user. With active decision-bound continuation, escalate only as far as needed to resolve the situation; reach the user for a missing decision, actual intent/scope drift, or uncertain recovery. 5. State briefly: understood, conflicted, unresolvable. -6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. +6. Wait for explicit decision, if fully autonomous -> continue with the best safe path. Active decision-bound continuation also permits diagnosed technical recovery after architect consultation and orchestrator verification, only within its authorization. Actual intent/scope drift, unresolved decisions, and uncertain recovery still require escalation. 7. Update AGENT MEMORY.md with root cause. 8. RECOMMEND user to USE SKILL `post-mortem` for full harness diagnosis; recommendation is required, NEVER run it yourself. diff --git a/plugins/core-cursor/skills/hitl/README.md b/plugins/core-cursor/skills/hitl/README.md index d2639139b..40cfe7842 100644 --- a/plugins/core-cursor/skills/hitl/README.md +++ b/plugins/core-cursor/skills/hitl/README.md @@ -10,7 +10,9 @@ Failure mode this fixes: a capable model left to its own judgment treats a neutr Loaded as the final Rosetta prep step in every mode file (`mcp-files-mode.md`, `plugin-files-mode.md`, `local-files-mode.md`). `bootstrap-alwayson.md` scopes it to **Orchestrator/top-agent only** ("Orchestrator/top-agent (not subagents): USE SKILL `hitl`…"); subagents instead load `subagent-directives`. Also declared as a prerequisite by `orchestration`, `rosetta`, and `load-project-context` (prose `USE SKILL \`hitl\`` lines). It both auto-engages and is directly callable. Only documented opt-out: user says exactly `fully autonomous` or `No HITL`; otherwise mandatory. The auto-mode/approval-policy/full-access override and the never-assume-approval invariant are single-sourced in `bootstrap-alwayson.md`'s floor (moved 2026-07-11); hitl carries the protocol on top of that floor. ## How it works -Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. + +An explicit decision-bound continuation scope routes to `references/decision-bound-continuation.md`. Routine authorized file work and diagnosed architect-assisted recovery continue without confirmation-only pauses. Artifact approvals, unresolved decisions, safety restrictions, and final acceptance remain gates; the scope ends with its invocation. +Main `SKILL.md` plus the scoped continuation reference described above. Root tag carries activation attrs restored from the ancestor `bootstrap-hitl-questioning.md` rule: ``. Contains: `` (3 non-negotiables — assumption cost, `reviewer != implementer · reading != using` intrinsics, and — deliberately LAST, so it never reads as softening the description's MANDATORY — the operationalized opt-out: session-scoped, HITL only, guardrail skills stay), `` (41 numbered rules, continuously numbered across six groups: Questioning 1–10 → Approval 11–19 → HITL gates 20–31, one trigger per line, + in-gate line → Workflows and plans 32–33 → Working with user 34–38 → Mismatch 39–41). No ``, ``, or `` (pitfalls deleted 2026-07-11 as pure duplication of core_concepts + the alwayson floor; the permission-mode-override bullet moved to `bootstrap-alwayson.md`). Primary actor: orchestrator/top-agent. Other skills (`dangerous-actions`, `planning`, `requirements-authoring`, `coding-agents-prompt-authoring`) delegate to `hitl` rather than restating HITL logic. The pre-compression body is archived verbatim in `docs/stories/bootstrap-removed.md`. Two usage contexts, one text: standalone sessions read the groups directly (question → get approval → respect gates); workflows (`coding-flow`, `research-flow`, `adhoc-flow`) additionally lean on rules 32–33 (mandatory HITL checkpoints/phases) and reference rule 11's `Strict approval` term (defined there) in their HITL-typed phases. @@ -44,5 +46,5 @@ Hardened across two rounds of a clean Sonnet-5 probe/compare experiment (blind u - Safe to change: prose/wording inside ``, `` subgroup text, reordering rules (no other file references a rule by number; workflows reference the `Strict approval` term, not numbers). - Handle with care: `Strict approval` definition + rejected-ack phrasing (rules 11–12), the opt-out phrases in the frontmatter description + their body operationalization, rule 14's plain dangerous-actions approval wording, the size-tier ladder (rule 17), and the user-authors batch rule (38) — these are read as literal behavioral triggers, not documentation. - Compression precedent: token-compressed with zero semantic loss, then probe-hardened (2026-07-10). Keep gates ONE trigger per line (merged gate bullets measurably raise first-clause-only skim risk — probe finding); keep MUST on tool-facing imperatives; densify, don't delete. Anything removed must be archived to `docs/stories/bootstrap-removed.md`. -- New content belongs in `SKILL.md` itself; there is no `assets/`/`references/` split yet. If the rule list keeps growing, a natural split is separating the gate list (rules 20–31) and the questioning/approval process (rules 1–19) into `references/`, mirroring how other skills in this repo factor out sub-topics. +- Keep general approval gates and the activation route in `SKILL.md`; scoped routine-execution/recovery details belong in `references/decision-bound-continuation.md`. Callers request that intent through the skill, never by linking its private file. - Referenced by (do not break without checking): `rules/mcp-files-mode.mdc`, `rules/bootstrap-alwayson.mdc`, `rules/local-files-mode.mdc`, `rules/plugin-files-mode.mdc` (prep-step loaders); `skills/orchestration/SKILL.md`, `skills/rosetta/SKILL.md`, `skills/load-project-context/SKILL.md` (prerequisites); `skills/dangerous-actions/SKILL.md` (plain approval coupling via rule 14 — no shared marker); `skills/backlog/assets/work-breakdown-templates.md`, `skills/requirements-authoring/assets/*`, `skills/requirements-use/assets/ru-change-log.md`, `skills/coding-agents-prompt-authoring/{assets,references}/*`, `commands/init-workspace-flow-questions.md`, `commands/adhoc-flow.md`, `skills/orchestration/assets/o-team-manager.md` — all treat `hitl` as the single canonical source for HITL behavior. diff --git a/plugins/core-cursor/skills/hitl/SKILL.md b/plugins/core-cursor/skills/hitl/SKILL.md index d545fe3ea..106469385 100644 --- a/plugins/core-cursor/skills/hitl/SKILL.md +++ b/plugins/core-cursor/skills/hitl/SKILL.md @@ -16,6 +16,8 @@ baseSchema: docs/schemas/skill.md +When explicitly supplied decision-bound continuation for a bounded invocation, APPLY SKILL FILE `references/decision-bound-continuation.md`. This scopes routine execution and recovery permission; it does not disable HITL or approve artifacts. + Questioning: 1. Post-discovery pre-implementation, and again whenever anything new comes up or ambiguity returns. @@ -27,7 +29,7 @@ Questioning: 6. Open questions → todo tasks. Persist Q&A (incl. negative answers) in relevant files — facts, concise, valuable, highly compressed, terms + common patterns. 7. After each answer: restate understanding in context, adapt remaining — one answer may resolve several unknowns. Unanswered → mark assumption, continue. 8. Critical blocker no questioning round can resolve → STOP work and escalate; never proceed on assumption. -9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm, never guess. +9. MUST NOT assume — even reasonably. Task crystal clear: suggest + confirm unless the exact action already has scoped authorization; never guess. 10. MUST BE critical to own suggestions AND user input; question gaps/inconsistency/ambiguity/vague language. Approval: diff --git a/plugins/core-cursor/skills/hitl/references/decision-bound-continuation.md b/plugins/core-cursor/skills/hitl/references/decision-bound-continuation.md new file mode 100644 index 000000000..5b7e42252 --- /dev/null +++ b/plugins/core-cursor/skills/hitl/references/decision-bound-continuation.md @@ -0,0 +1,16 @@ +--- +name: decision-bound-continuation +description: "Continue authorized routine work; pause only for unresolved human decisions." +baseSchema: docs/schemas/generic.md +--- + + + +Activate only for the scope explicitly supplied by the user or invoked workflow. Carry that scope into delegated work; clear it when the invocation ends. Never infer it from files, runtime permissions, or an unrelated task. + +1. Continue routine file creation/edits, progress recording, analysis, reviews, and checks within the authorized stage and scope. Do not ask permission for each file, phase transition, or already authorized action. Existing content approvals remain valid only for their exact scope and inputs. +2. On a technical failure, pause affected mutations and diagnose first. Obtain the architect consultant's grounded recovery recommendation; the orchestrator checks it against approved intent, current requirements/plan, and permissions. No unresolved decision, new scope, changed behavior/interface/architecture, or increased risk: record the cause and recovery, repair, rerun affected checks, and continue automatically. Diagnosis and learning duties still apply; failed checks remain failed until verified. +3. Confirmation-only recovery pauses are satisfied by this scoped authorization, not by an invented approval. Repeated failure without progress, uncertain cause, conflicting advice, stale approvals, changed requirements/design, missing user inputs, or user dissatisfaction require a real decision. Present the blocker and concrete options; do not retry blindly. +4. Preserve artifact approval and final acceptance gates, security/access restrictions, and authorization for dangerous or irreversible actions. Advice does not approve scope changes, bypass a failing gate, waive checks, or authorize publication. Continue independent authorized work while a decision is pending; never cross its dependency boundary. Never cross a stage boundary: this authorization covers the invoked stage only, and that stage ends in a recorded handoff, not in the next stage. + + diff --git a/plugins/core-cursor/skills/load-project-context/README.md b/plugins/core-cursor/skills/load-project-context/README.md index abcdd711d..c947b99c4 100644 --- a/plugins/core-cursor/skills/load-project-context/README.md +++ b/plugins/core-cursor/skills/load-project-context/README.md @@ -13,6 +13,7 @@ Named in every mode file's `Rosetta Prep Steps`: `mcp-files-mode.md` step 2, `pl Root `` wraps two sections plus a lead line, no `assets/`/`references/`: a prerequisite + ledger line (`Prerequisite: USE SKILL \`hitl\`. MUST run as todo tasks, getting-ready included; ledger rules per always-on \`\``) → `` (full read of `docs/CONTEXT.md` + `docs/ARCHITECTURE.md`, grep headers of the remaining 5 core docs, then line-range read incl. relevant area-scoped `docs/*-CONTEXT.md` / `docs/*-ARCHITECTURE.md`; file-not-found → continue, suggest `init-workspace-flow.md`) → ``, the canonical roster: 15 bulleted entries, each a workspace path (or shared-prefix group) with a one-line purpose — `gain.json`, `docs/[-]CONTEXT.md`, `docs/[-]ARCHITECTURE.md`, `docs/TODO.md`, `docs/ASSUMPTIONS.md`, `docs/TECHSTACK.md`, `docs/DEPENDENCIES.md`, `docs/CODEMAP.md`, one `docs/REQUIREMENTS/*` + `docs/PATTERNS/*` row (each: `INDEX.md` index, `CHANGES.md` log), `agents/IMPLEMENTATION.md`, `agents/MEMORY.md`, one `plans//` row (`-PLAN.md`, `-SPECS.md`, `plan.json` EXECUTION_CONTROLLER tracking, supporting files), `refsrc/*`, `agents/TEMP/`, `docs/raw`. (The former ``/``/`` sections dissolved into these lines in the 2026-07-11 compression pass.) `init-workspace-flow-shells.md` step 2 installs this skill verbatim as the workspace's own shell copy ("READ SKILL `load-project-context` — install as SKILL"). ## Mental hooks & unexpected rules +- Explicit task commands add an optional `plans//TASK.md` passport and task-scoped requirements under `docs/REQUIREMENTS//`; `task-management` owns their contract. This roster entry does not register ordinary work or require extra documents. - `compact="NEVER" summarize="AS-IS"` on the root tag — this skill's own content may never be runtime-compacted or summarized, even though its job is telling other files how to load selectively. - "MUST run as todo tasks, getting-ready included; ledger rules per always-on ``" — even this skill's own loading work is ledger-tracked; the full ledger rules (incl. "close on evidence, not assumption") are single-sourced in `bootstrap-alwayson.md`, which co-loads in every configuration. - "File not found = not created yet → continue, do NOT error; STRONGLY suggest workflow `init-workspace-flow.md`." — converts what looks like a hard failure into a soft redirect. diff --git a/plugins/core-cursor/skills/load-project-context/SKILL.md b/plugins/core-cursor/skills/load-project-context/SKILL.md index 7b68bb291..d9a3b5551 100644 --- a/plugins/core-cursor/skills/load-project-context/SKILL.md +++ b/plugins/core-cursor/skills/load-project-context/SKILL.md @@ -34,6 +34,7 @@ Rosetta files: terse, SRP/DRY/MECE. Markdown headers = Auto-TOC (grep + line-ran - `agents/IMPLEMENTATION.md` — implementation state; the only changelog - `agents/MEMORY.md` — root causes, what worked and failed - `plans//` — contains `-PLAN.md` execution plan, `-SPECS.md` tech specs, `plan.json` EXECUTION_CONTROLLER tracking, plus supporting files +- `plans//TASK.md` — optional managed-task passport; explicit task commands only, contract in SKILL `task-management`; requirements at `docs/REQUIREMENTS//`. Ordinary workflows need no task registration. - `refsrc/*` — knowledge-only source; SCM-excluded except `refsrc/INDEX.md` - `agents/TEMP/` — temp; SCM-excluded - `docs/raw` — raw requirement inputs diff --git a/plugins/core-cursor/skills/orchestration/README.md b/plugins/core-cursor/skills/orchestration/README.md index 02409fe46..bc095beec 100644 --- a/plugins/core-cursor/skills/orchestration/README.md +++ b/plugins/core-cursor/skills/orchestration/README.md @@ -10,6 +10,8 @@ Without this skill a strong model left alone tends to: do the work itself instea Listed in `rules/bootstrap-alwayson.mdc`'s always-on engagement list for "Orchestrator/top-agent (not subagents)" — i.e. this is orchestrator-only; subagents instead engage `subagent-directives`. `rosetta/SKILL.md` makes it a hard prerequisite (`USE SKILL orchestration` before `hitl` before any workflow) and forbids doing anything else first. `adhoc-flow.md` requires it "FULLY — including BOTH assets." Frontmatter: `user-invocable: false` — auto-activates on any subagent-spawning need, not user-callable. ## How it works + +Explicit background-consultant assignments apply at every size. The supplied specialist remains separate from authors and fresh reviewers. Unsupported background/resume uses a disclosed synchronous specialist consultation; missing subagent capability blocks dependent decisions. SKILL.md body: `` (opens with `Prerequisites: USE SKILL \`hitl\`, \`load-project-context\``, then senior-team-lead framing, trust-but-verify; the former `` section dissolved into that line 2026-07-11) → `` (SMALL/MEDIUM/LARGE bands, each routing to a different mode) → `` (dispatch/routing/quality/plan-mode rules) → `` (the mandatory prompt skeleton every subagent dispatch must fill in). Two asset files are pulled in only at the higher bands: `assets/o-team-manager.md` (MEDIUM+) walks a 6-step playbook — Think, Actors, Mini-loops, Tactics, Workflow, Execute; `assets/o-session-execution-controller.md` (LARGE) is the orchestrator-side driver of the `rosettify` plan CLI (phases/steps/status, with a todo-task fallback if the CLI is unavailable). Actors: the orchestrator/top-agent only authors and owns these; subagents receive scoped prompts and never see this skill's content directly (they get `subagent-directives` instead). ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor/skills/orchestration/SKILL.md b/plugins/core-cursor/skills/orchestration/SKILL.md index bd6a30c93..f56363e85 100644 --- a/plugins/core-cursor/skills/orchestration/SKILL.md +++ b/plugins/core-cursor/skills/orchestration/SKILL.md @@ -18,6 +18,7 @@ Prerequisites: USE SKILL `hitl`, `load-project-context` 5. Proactively use available skills, tools, MCPs — incorporate in plan. 6. Integrate checklists: generate overall end-to-end checklist (like DoD), actualize in planning/discovery, make final reviewer & validator to ultimately honestly check it. 7. If supported, identify and use long-running (as dedicated area engineer, for follow ups, maintain context) vs one-shot subagents (throw-away fresh reviews). +8. Explicit background-consultant assignment: start/reuse the assigned specialist, with required model and supplied isolation/read-only contract, even for SMALL. Keep independent work moving; await advice before dependent decisions. Without resumable/background support, re-brief an actual specialist subagent synchronously at each consultation and disclose the limitation once. Without subagents, report the capability blocker before dependent decisions; never simulate an independent consultant. The consultant is separate from phase authors and fresh reviewers. diff --git a/plugins/core-cursor/skills/rosetta/README.md b/plugins/core-cursor/skills/rosetta/README.md index 15d183cc2..f9ade26b2 100644 --- a/plugins/core-cursor/skills/rosetta/README.md +++ b/plugins/core-cursor/skills/rosetta/README.md @@ -10,12 +10,12 @@ Per `docs/stories/reduce-bootstrap.md` (the design record for this skill): "A us USER-ONLY: invoked exclusively via `/rosetta`. Standing ruling (`reduce-bootstrap.md`): the skill "MUST NEVER be mentioned, requested, or recommended by any instruction, template, workflow, prep step, or prompt — invoking it is exclusively the user's act." `/` and `/` entries bypass it entirely (`docs/ARCHITECTURE.md`: "`/` → that workflow directly (bypasses rosetta)"). Frontmatter encodes this: `disable-model-invocation: true` (the model can never invoke it) + `user-invocable: true` (only reachable as a direct command). ## How it works -Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (note: "`*-flow` skills are additional workflows," i.e. the alias's targets aren't limited to `commands/*.md`); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. +Root `` wraps: `` (`USE SKILL orchestration`, `USE SKILL hitl`) → `` gate → ``, 5 steps — (1) `USE FLOW .md` fully executed regardless of request size (workflows may be exposed as skills, discovered by purpose/index without requiring a `-flow` suffix; managed-task routing requires explicit lifecycle intent); (2) on resume, load the workflow's state file and continue from completed steps/phase/pending work; (3) map workflow phases to todo tasks, one open at a time; (4) in the harness's read-only planning mode, store `planning`/`tech-specs` outputs "per system prompt," never to `plans/` (that folder is unwritable in that mode — see `configure/claude-code.md`'s "Plan mode (read-only exploration)"; the exact storage target is not spelled out beyond "per system prompt" — intent not documented further); (5) announce `Context loaded using Rosetta: [workflow selected + brief summary]`, then let the workflow drive questioning/planning/execution/review with no phase skipping. ## Mental hooks & unexpected rules - `"No code, files, scripts, or commands before workflow handoff."` — the FORBIDDEN gate; nothing happens before a workflow is selected, not even exploratory reads implied by the request. - `required-sequence-instead="USE SKILL orchestration → USE SKILL hitl → USE FLOW ..."` — the forbidden-action gate carries the mandatory order as an attribute, not just prose; `` with this shape appears nowhere else in the repo (repo-wide grep confirms it's unique to this file). -- `"*-flow" skills are additional workflows` — easy to misread as a stylistic aside; it actually widens what `USE FLOW .md` may resolve to beyond the `commands/` folder. +- Workflows may be exposed as skills without a `-flow` suffix; use their declared purpose/index. Managed-task routing is explicit, so ordinary work is never registered automatically. - The plan-mode storage line reads as a contradiction with `load-project-context/SKILL.md`'s normal `plans//...` output paths — it isn't: that skill describes normal execution, this line scopes only to the harness's read-only plan mode. ## Invariants — do not change diff --git a/plugins/core-cursor/skills/rosetta/SKILL.md b/plugins/core-cursor/skills/rosetta/SKILL.md index 3052ff55a..b6332cbec 100644 --- a/plugins/core-cursor/skills/rosetta/SKILL.md +++ b/plugins/core-cursor/skills/rosetta/SKILL.md @@ -21,7 +21,8 @@ Routing user request to proper workflow and high process adherence. -1. MUST USE FLOW `.md` (note: "*-flow" skills are additional workflows) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request +1. MUST USE FLOW `.md` (note: workflows may be exposed as skills; discover them by their declared purpose/index, not a required `-flow` suffix) — YOU MUST FULLY ALWAYS execute loaded workflow following its entire definition for all request sizes, workflow WAS created to fix your failure modes (deviations, and weak process adherence, and shallow analysis), workflow is PRIMARY deterministic process to resolve the original user request + Managed task workflows require explicit task-lifecycle intent; never register ordinary work automatically. 2. On resume/continue: load workflow state file; extract completed steps, current phase, and pending work; resume from there 3. Once flow is loaded you MUST use workflow phases to immediately create/update todo tasks (LEDGER); open one per phase, work sequentially, close on completion immediately; 4. In planning mode: `planning` + `tech-specs` outputs → store per system prompt, never `plans/` (read-only) diff --git a/plugins/core-cursor/skills/self-learning/README.md b/plugins/core-cursor/skills/self-learning/README.md index d02625a31..df1c14fca 100644 --- a/plugins/core-cursor/skills/self-learning/README.md +++ b/plugins/core-cursor/skills/self-learning/README.md @@ -14,6 +14,8 @@ Trigger set (frontmatter `description`, since no `` block exi ## How it works +Active decision-bound continuation permits diagnosed technical recovery after architect consultation and orchestrator verification, without a confirmation-only pause. Root-cause analysis, learning, and escalation for unresolved decisions or user dissatisfaction remain mandatory; ordinary invocations retain their confirmation step. + Single flat `SKILL.md`, no `assets/` or `references/` subfolders. Root `` wraps two sections: `` — 11 numbered steps, first half (1-5) stop/root-cause/ask/state/wait, second half (6-11, headed "Memory:") consult `AGENT MEMORY.md` → init if missing → convert root cause into a generalized reusable rule → store → record what worked/failed → recommend `post-mortem` — and `` (6 anti-patterns). Actor: whichever agent hits the failure; escalates to the user for confirmation, and to the user-invoked `post-mortem` skill for full harness diagnosis if the user chooses to run it. ## Mental hooks & unexpected rules diff --git a/plugins/core-cursor/skills/self-learning/SKILL.md b/plugins/core-cursor/skills/self-learning/SKILL.md index 76e0ee5eb..9790f0c31 100644 --- a/plugins/core-cursor/skills/self-learning/SKILL.md +++ b/plugins/core-cursor/skills/self-learning/SKILL.md @@ -16,7 +16,7 @@ On failure or mismatch — also: user asks why something didn't work · 3+ error 2. Identify root cause — not symptoms. Understand BEFORE replanning. 3. Ask 1-3 clarifying questions if ambiguous. 4. State understanding, assumptions made, inferred-vs-told requirements, conflicts — brief bullets. -5. Wait for explicit user confirmation; let the user redirect. +5. Wait for explicit user confirmation; let the user redirect. With active decision-bound continuation, diagnosed technical recovery within its authorization proceeds after architect consultation and orchestrator verification; no confirmation-only pause. Unresolved decisions, changed intent, user dissatisfaction, and repeated failure without progress still require escalation. Memory: diff --git a/plugins/core-cursor/skills/task-management/README.md b/plugins/core-cursor/skills/task-management/README.md new file mode 100644 index 000000000..fa135798f --- /dev/null +++ b/plugins/core-cursor/skills/task-management/README.md @@ -0,0 +1,64 @@ +# task-management + +Persists explicitly managed tasks and derives their next stage from current approved evidence. + +## Why it exists + +A folder or old approval does not prove current requirements are ready. This skill separates +task identity, supplementary progress, current approval receipts, and immutable prior evidence. +It makes task resumption and listing use the same passport contract. + +## When to engage + +- An orchestrator creates, resolves, inspects, updates, or lists explicitly managed tasks. +- Rosetta preparation must be complete; the caller supplies operation, target, and available input. +- Ordinary work stays unregistered. Existing plan folders are not automatically imported. + +## How it works + +`consultation` routes to `references/consultation.md`: prepare a task/conversation-scoped brief, restore it from current durable evidence, and preserve advice as execution notes. The workflow dispatches the consultant; this skill does not spawn agents or grant approvals. SMALL can keep notes in `## History`; detailed reports belong to `artifacts.execution` with a handoff reference. + +`handoff` routes to `references/handoff.md`: end the stage in files, report what was produced and where, and give the user one command line for a new chat. A stage boundary is a hard stop, never a question about continuing. `references/command-rendering.md` holds the one rule for showing a command to a user — the host's own invocation syntax — so the read-only listing path can apply it without loading a write procedure. + +`SKILL.md` routes the caller's intent through resolution/creation, inspection, recording, +invalidation, or read-only listing, loading only the matching private operation reference and its listed prerequisites. +`references/passport.md` defines the YAML frontmatter, +Markdown sections, receipts, and recovery; `references/fingerprints.md` defines content selectors. + +The passport lives at `plans//TASK.md`; separate requirement artifacts live under +`docs/REQUIREMENTS//`. Approved requirements remain there; inline Requirements is intake/links. +Small managed tasks may keep concise architecture, specification, and plan inline. +Separate specifications and plans follow existing sizing rules. + +Inspection derives requirements-needed, spec-needed, implementation-needed, or done; +corrupt records remain unknown. Progress and blockers supplement the result. + +## Mental hooks & unexpected rules + +- "File existence, timestamps, workflow completion, and model assertions are not human approval." + Stage advancement needs content-bound evidence, not a plausible status label. +- "Do not hash `TASK.md` as a whole" keeps progress updates from invalidating stage content. +- "Never restore invalidated pointers automatically" prevents an old approval reviving after a revert. +- "Existing directory without passport -> unregistered" prevents accidental task creation/import. +- "Read-only operations leave the repository unchanged" keeps inspection separate from repairs. +- "The bare `rosetta:` form is reference notation, never something a user types" keeps a foreign host's prefix out of a handoff. +- Normative selectors exclude only defined execution metadata; completing work does not revoke its requirements. +- Receipt inventories are stage-owned; creating a specification cannot invalidate requirements. +- Interrupted review/testing/validation repeats unless complete current verification proves freshness. + +## Invariants — do not change + +- Skill name and folder: `task-management`; `user-invocable: false` keeps it an internal method. +- Operations: resolve/create, inspect, record, invalidate, list, consultation, handoff; callers address these through the skill. +- Output fields: task_id, task_folder, requirements_folder, current_stage, next_action. +- Identity is immutable; folders use `plans/` and `docs/REQUIREMENTS/`. +- Schema version 1 and current receipt kinds have one definition in `references/passport.md`. +- Existing plain workflows gain no registration or document obligation. + +## Editing guide + +Keep routing and externally consumed output in `SKILL.md`; put passport representation and +binding semantics in the reference. Treat identity, stage derivation, approval invalidation, +and read-only listing as compatibility-sensitive. Consumers are the task command workflows; +they invoke this skill without linking its private reference. This is an instruction contract, +not an executable task database or a new public command. diff --git a/plugins/core-cursor/skills/task-management/SKILL.md b/plugins/core-cursor/skills/task-management/SKILL.md new file mode 100644 index 000000000..30788859d --- /dev/null +++ b/plugins/core-cursor/skills/task-management/SKILL.md @@ -0,0 +1,69 @@ +--- +name: task-management +description: "To resolve, persist, inspect, and list explicitly managed tasks with content-bound approvals and resumable state." +license: Apache-2.0 +user-invocable: false +baseSchema: docs/schemas/skill.md +--- + + + + + +Manage explicitly registered repository tasks; preserve identity, approvals, progress, and next action across chats. +Inputs: operation (`resolve/create`, `inspect`, `record`, `invalidate`, `list`, `consultation`, `handoff`), target?, initial text?, stage result?. + + + + + +- Complete Rosetta prep steps; `inspect`/`list` use read-only preparation and defer any scaffold/state writes. +- Register only on an explicit managed-task creation request; never import ordinary plans automatically. +- Keep `plans//TASK.md` authoritative for identity and stage evidence, not duplicated requirements. +- Keep separate requirements under `docs/REQUIREMENTS//`; preserve existing artifact sizing. +- Keep approved requirements in scoped requirement files; inline Requirements holds intake and references only. +- Small managed tasks may hold concise architecture, specification, and plan inline in the passport. +- Ordinary work gains no registration or documentation obligation. +- File existence, timestamps, workflow completion, and model assertions are not human approval. +- READ SKILL FILE `references/passport.md` before reading or writing passports. +- READ SKILL FILE `references/command-rendering.md` before showing any command to a user. + + + + + +Load and apply only the requested operation and its listed prerequisites: + +| Input operation | Instruction | Prerequisites | +|---|---|---| +| `resolve/create` | READ SKILL FILE `references/resolve-create.md` | `inspect` for an existing task | +| `inspect` | READ SKILL FILE `references/inspect.md` | None | +| `record` | READ SKILL FILE `references/record.md` | `inspect`; `invalidate` if scope changed | +| `invalidate` | READ SKILL FILE `references/invalidate.md` | `inspect` | +| `list` | READ SKILL FILE `references/list.md` | `inspect` | +| `consultation` | READ SKILL FILE `references/consultation.md` | `inspect`; `record` for advice persistence | +| `handoff` | READ SKILL FILE `references/handoff.md` | `inspect`; `record` before reporting, except read-only rendering | + +Load prerequisites through this table; apply with the passport contract and return the output below. + + + + + +Return `task_id`, `task_folder`, `requirements_folder`, `current_stage`, `next_action`, plus blockers, drift, and evidence references. +Render `next_action` commands per `references/command-rendering.md`; stage boundaries end the invocation instead of continuing. +For unresolved/invalid targets, return the diagnostic and unset identity/stage fields; never invent a task. +For listing, return one result per valid task plus inventory diagnostics. This skill adds no public command or execution engine. + + + + + +- New task has one reserved identity; updates resolve the same passport. +- Each claimed stage is reproducible from current content and genuine approvals. +- Read-only operations leave the repository unchanged. +- Small tasks resume from concise persisted outcomes without mandatory separate specification/plan files. + + + + diff --git a/plugins/core-cursor/skills/task-management/references/command-rendering.md b/plugins/core-cursor/skills/task-management/references/command-rendering.md new file mode 100644 index 000000000..0702d9c2e --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/command-rendering.md @@ -0,0 +1,16 @@ +--- +name: command-rendering +description: "Render a user-facing command in the host's own invocation syntax." +baseSchema: docs/schemas/generic.md +--- + + + +Applies wherever a command is shown to a user, read-only callers included. Rendering only; this reference authorizes no write. + +1. Use this host's own invocation syntax: the exact prefix and namespace the user typed to start the current command, substituting only the command name and target. +2. Unavailable: take the form from the host's own command listing. Never carry a form over from another host — a `$`-prefixed line inside Claude Code is wrong, and so is a `/`-prefixed one where the host uses `$`. +3. The bare `rosetta:` form used inside Rosetta instructions is reference notation, never something a user types. +4. Place the line alone, ready to copy, without surrounding punctuation. Example, Claude Code: `/rosetta:task-spec TASK-0001`. + + diff --git a/plugins/core-cursor/skills/task-management/references/consultation.md b/plugins/core-cursor/skills/task-management/references/consultation.md new file mode 100644 index 000000000..47876db39 --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/consultation.md @@ -0,0 +1,15 @@ +--- +name: consultation +description: "Prepare task-scoped architect context and durable consultation evidence." +baseSchema: docs/schemas/generic.md +--- + + + +1. Inspect the resolved task. Return a consultation brief: repository and task identity, current stage, original intent, current artifacts/approvals, affected context, known gaps, pending decision, and prior advice. Draft requirements are valid consultation inputs; label unknowns, never invent them. +2. Bind a consultant to this repository, task, and conversation only. Reuse that live instance across stages; never reuse another task's context. After interruption or a new chat, rebuild the brief from current sources and durable evidence, not a stored agent ID or stale TEMP files. +3. Consultant output: examined inputs, findings with evidence, alternatives/tradeoffs, recommendation, unresolved questions, and whether a human decision is needed. Advice is execution evidence, never an approval or independent review. +4. Persist each material consultation and its disposition through the record operation: SMALL may append concise notes to `## History`; classify detailed reports in `artifacts.execution` before creation and link them through `continuation.handoff_ref`. Include current input references, unresolved risks, and next consultation; TEMP and live agent IDs are optional accelerators. +5. Reconsult when relevant inputs change. Present unresolved decision-bearing findings at the applicable human gate. Reject unsupported advice; do not change approved content or create approval receipts from recommendations. + + diff --git a/plugins/core-cursor/skills/task-management/references/fingerprints.md b/plugins/core-cursor/skills/task-management/references/fingerprints.md new file mode 100644 index 000000000..b0f6af1fa --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/fingerprints.md @@ -0,0 +1,92 @@ +--- +name: fingerprints +description: "Compute normative-content fingerprints without treating execution metadata as requirement changes." +baseSchema: docs/schemas/generic.md +--- + + + + + +Compute SHA-256 over the selected UTF-8 bytes using local tools; persist selector name and digest. +Never change selector semantics in place; a new algorithm needs a new selector name and new approval. +Unreadable, malformed, duplicate, unsupported, or ambiguously selected content -> invalid binding, not an empty digest. +Do not silently fall back to another selector or refresh an old receipt when content changes. +`file`: exact bytes; use for architecture/specification text, source, tests, configuration, and delivered evidence. +`absent`: delivery deletion only; digest null and path must remain absent. + + + + + +For inline architecture/specification, selector is the exact unique level-two heading, including `## `. +Select bytes after its heading line through before the next level-two heading (or end-of-file), excluding the heading line. +Preserve newlines and all whitespace; parse Markdown headings outside code fences. Duplicate heading -> invalid. +Never hash passport frontmatter or history as a normative section. Inline Requirements is intake/links, never an approved requirement source. +For inline Plan use selector `plan-normative-v1:## Plan`: select that unique section, then apply plan normalization below. + + + + + +`requirements-normative-v2` handles XML-like `` records in Markdown; never parse their prose as XML. +Canonical metadata is the opener's `implementation` attribute plus direct `implementationNotes` content. + +Algorithm (all offsets and replacements refer to original bytes): +1. Validate UTF-8; preserve original bytes. A record opener is `` in prose. +2. Scan its opener quote-aware: attribute names match `[A-Za-z_][A-Za-z0-9_.:-]*`, separated by ASCII whitespace; + each has `=` and a single/double-quoted value. Terminate at the first unquoted `>`. + Reject duplicate attributes, missing/duplicate IDs, or incomplete quotes; do not decode entities or rewrite spacing. +3. The record terminator is exact ``, preceded on its line only by spaces/tabs and followed only by spaces/tabs then newline/EOF. + Require one matching terminator before another record opener; nested/overlapping or missing record boundaries are ambiguous -> invalid. +4. Read direct fields sequentially between those boundaries, skipping only ASCII whitespace between fields. + Parse each field opener with the same quote-aware attribute grammar. A field may self-close as `/>`. + Otherwise locate its exact ``; require exactly one such closing delimiter in the remaining record. + Treat the entire enclosed content as opaque bytes: do not tokenize paths, angle-bracket placeholders, Markdown, or nested children. + Reject non-whitespace between fields, repeated direct field names, or ambiguous/missing closing delimiters. +5. Schedule replacement of ONLY the `implementation` attribute value bytes in the record opener (excluding its quotes) + and ONLY content between a direct, attribute-free `` and its `` with empty bytes. + Reject attributed/self-closing implementationNotes forms as unsupported; absent metadata requires no replacement. + A literal implementationNotes example inside statement/acceptance/another field is opaque normative content, never selected. +6. Apply these nonoverlapping replacements from highest offset to lowest and hash the resulting file bytes. + Keep delimiters, attribute names/quotes, field ordering, whitespace/newlines, outer Markdown, and every other byte unchanged. + Require at least one record; never use a broad regex over the body or normalize/repair the source to make it parse. + +Only current-format implementation values and implementationNotes contents can change without revoking approval. +Statements, criteria, dependencies, status/approval/date fields, and surrounding prose remain bound. +A reserved delimiter used literally where it makes field boundaries ambiguous requires clarification, not guessed exclusion. +A normative change hidden inside implementationNotes is still a scope violation; continue normal in-place metadata updates. +Legacy `...` is deliberately bound: changing it is drift, not a silently supported exclusion. +Before delivery using legacy metadata, resolve its update/approval handling explicitly; do not rewrite legacy requirements automatically. +For artifacts without these records, use `file`; do not invent YAML exclusions. Index/rationale prose stays normative unless +explicitly classified as execution-only history before approval. + + + + + +`plan-normative-v1` selects an entire Markdown plan. `plan-normative-v1:## Plan` selects the inline section above. +1. Decode UTF-8 strictly; parse Markdown with GitHub-style task-list recognition and original source positions. +2. Identify only actual task-list checkboxes at list-item starts, outside fenced or indented code and raw HTML blocks. +3. In the original selected bytes, replace exactly the single character inside each `[ ]`, `[x]`, or `[X]` marker with a space. +4. Preserve every other byte, including item wording, dependencies, order, indentation, headings, and code examples; hash the result. + +Checkbox completion alone preserves plan approval; changing/deleting/adding a step or criterion changes its digest. +Keep prose progress, reviewer outcomes, phase status, and next-session pointers in execution-only handoff/state documents. +If a normative plan also tracks prose progress, separate it before approval; never erase arbitrary status lines during hashing. +`plan.json` execution state is not an alternative authority for approved normative plan content. + + + + + +- Requirement implementation state/notes only change -> same normative digest. +- Requirement statement, acceptance condition, approval state, dependency, or outside prose changes -> different digest. +- Task-list checkbox toggles -> same plan digest; its text/order changes -> different digest. +- Checkbox-looking code sample changes -> different digest. +- Fingerprint matching establishes content equality only; genuine approval and current upstream receipts remain mandatory. + + + + diff --git a/plugins/core-cursor/skills/task-management/references/handoff.md b/plugins/core-cursor/skills/task-management/references/handoff.md new file mode 100644 index 000000000..3e8942679 --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/handoff.md @@ -0,0 +1,18 @@ +--- +name: handoff +description: "End a stage in files; hand the user one next command." +baseSchema: docs/schemas/generic.md +--- + + + +1. A stage boundary is a hard stop. Do not ask whether to continue, do not offer the next stage as an option, and do not begin it in this conversation. An original request naming the whole path, an earlier approval, and decision-bound continuation authorize work inside the invoked stage only, never across its boundary. +2. Stop at a real boundary: the stage's own approval gate passed, or the stage cannot finish. Mid-stage work continues normally; a pending user decision is raised in place, never deferred to a new chat. +3. Before reporting, `record` everything the next chat needs from files alone: approved artifacts with their evidence, decisions and rationale, consultation advice, residual risks, unresolved questions, and the derived next action. Context that exists only in this conversation does not survive it; leaving it unsaved is a defect, not a handoff. +4. Report what the stage produced, the task folder and requirements folder as paths, what is approved, and what remains open. +5. Then tell the user to open a new chat, and give exactly one command line to type there. Say why plainly: the next stage resumes from the recorded files, and a fresh context keeps it accurate. +6. READ SKILL FILE `references/command-rendering.md` and render that line, and every other command shown here, by it. +7. Stage blocked or incomplete: same stop and same rendering, but hand back the continuation command for the current stage together with the decisions or inputs still required. +8. Accepted and complete task: report acceptance and offer the listing command; a finished task needs no new chat. + + diff --git a/plugins/core-cursor/skills/task-management/references/inspect.md b/plugins/core-cursor/skills/task-management/references/inspect.md new file mode 100644 index 000000000..92040a92c --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/inspect.md @@ -0,0 +1,25 @@ +--- +name: inspect +description: "Apply the inspect operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Validate passport schema, identity, canonical paths, unique ID, and all referenced evidence before deriving status. +2. Recompute content fingerprints and upstream bindings; do not trust cached stage/progress or historical receipts. +3. Derive exactly one stage from current evidence: + +| Condition, evaluated in order | Stage | Next action | +|---|---|---| +| No current approved requirements | `requirements-needed` | Define or revise requirements | +| Requirements current; architecture or specification/plan approval missing/stale | `spec-needed` | Prepare/approve architecture, specification, plan | +| Design current; verified, accepted delivery missing/stale | `implementation-needed` | Implement, verify, or obtain final acceptance | +| Current verified delivery explicitly accepted | `done` | None; revise only on request | + +4. Show progress, blockers, and stale evidence separately. Corruption/unreadable content -> `unknown`, never a fabricated stage. + Missing/changed bound evidence is stale; malformed receipt semantics are invalid. Neither authorizes downstream work. +5. Inspection is read-only. On the next authorized mutation, record detected invalidation before continuing. + Return missing prerequisites to the caller; do not execute a later stage to manufacture them. + + diff --git a/plugins/core-cursor/skills/task-management/references/invalidate.md b/plugins/core-cursor/skills/task-management/references/invalidate.md new file mode 100644 index 000000000..d09290134 --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/invalidate.md @@ -0,0 +1,18 @@ +--- +name: invalidate +description: "Apply the invalidate operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +- Requirements revision -> clear current requirements, architecture, specification/plan, verification, acceptance pointers. +- Architecture revision -> clear architecture and every downstream pointer. +- Specification/plan revision -> clear specification/plan, verification, acceptance pointers. +- Delivery/evidence revision -> clear verification and acceptance pointers. +- Retain old receipts, artifacts, implementation, and history. Record cause and affected scope; never delete prior work. +- New revision input starts as pending requirements work; do not keep an old approval current while its scope is unsettled. +- Unchanged clarification needs no invalidation only after explicit comparison establishes no authoritative content change. +- Execution-only requirement metadata and plan checkbox updates preserve approvals under the normative selectors; never refresh approved hashes silently. + + diff --git a/plugins/core-cursor/skills/task-management/references/list.md b/plugins/core-cursor/skills/task-management/references/list.md new file mode 100644 index 000000000..a5740f80a --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/list.md @@ -0,0 +1,16 @@ +--- +name: list +description: "Apply the list operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Enumerate immediate `plans/*/TASK.md` passports and reserved `plans/TASK-/` folders lacking a passport. + Inspect each read-only; no repairs, migrations, folder creation, fingerprint updates, or workflow execution. +2. Return ID | title | derived stage | progress/blockers | folder | next action. + Sort valid IDs numerically; list duplicate, corrupt, misplaced, unreadable, or incomplete reservations separately with their paths. +3. Distinguish no registered tasks from unavailable/unreadable inventory. Ordinary plan folders remain unregistered. +4. READ SKILL FILE `references/command-rendering.md` and render next actions by it; use exact ID/folder, quote folders containing spaces. + + diff --git a/plugins/core-cursor/skills/task-management/references/passport.md b/plugins/core-cursor/skills/task-management/references/passport.md new file mode 100644 index 000000000..34c6c8dc8 --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/passport.md @@ -0,0 +1,136 @@ +--- +name: passport +description: "Define task identity, content bindings, approval receipts, and durable progress." +baseSchema: docs/schemas/generic.md +--- + + + + + +Use UTF-8 Markdown with YAML frontmatter. Unknown schema version -> report unsupported; never silently migrate. +Store paths repository-relative, normalized, within the repository; reject external/symlink-escaping references. +Use this minimum initial passport; substitute allocated identity and known title, leaving unknown content explicitly open: + +```yaml +--- +schema_version: 1 +task_id: TASK-0001 +title: Untitled task +task_folder: plans/TASK-0001 +requirements_folder: docs/REQUIREMENTS/TASK-0001 +progress: idle +blockers: [] +next_action: Clarify the need and acceptance criteria +continuation: null +artifacts: {requirements: [], architecture: [], specification: [], execution: []} +current: + requirements: null + architecture: null + specification: null + verification: null + acceptance: null +receipts: [] +--- +``` + +Body sections: `## Requirements`, `## Architecture`, `## Specification`, `## Plan`, `## Verification`, `## History`. +- Requirements: initial request, unresolved intake questions, and links to authoritative requirement files; never approved requirement units inline. +- Architecture: agreed decision or explicit reason no separate architecture is needed; or document links. +- Specification and Plan: concise solution, ordered work, criterion links, verification scope; or authoritative document links. +- Verification: criterion -> actual check/result/evidence, unresolved findings, delivery scope, handoff/state references. +- History: append-only dated events, decisions, receipt IDs, invalidations, and resumable next actions. + Preserve verbatim human approval statements here when their original conversation lacks a durable reference. +- Each concept has one authoritative location. Specification/architecture moved into a file replaces inline content with a link and requires rebinding approval. +- `artifacts`: repository-relative paths owned by each normative stage, or execution-only records; one role per artifact. + Classify before creation; changes to a role's path set invalidate only that role and its downstream stages. +- `progress`: `idle | in-progress | awaiting-approval | blocked`; supplementary, never an authority for stage. +- `continuation`: null or `{phase, state_ref, handoff_ref}`; phase is the first incomplete workflow phase. + Keep only resumable outcomes/evidence in the passport; the referenced workflow state owns its detailed phase ledger. + Phase labels, old reports, and completed checkboxes never prove freshness after interruption, even when TEMP still exists. + Reinspect and repeat review/testing/validation after interruption unless a complete current verification receipt binds all their inputs/results. + Preserve implemented work; reassess it against the current approved inputs instead of treating repeated verification as reimplementation. +- Keep stage derived; do not add a separately editable status field that competes with receipts. + + + + + +Bind approval to actual content using locally computed SHA-256, never a model-invented hash or timestamp. +Each binding is `{path, selector, sha256}`. READ SKILL FILE `references/fingerprints.md` for deterministic selector algorithms. +Use normative requirements selectors and plan checkbox normalization; execution metadata must not revoke normative approval. + +Bind the complete authoritative scope: required inline sections, referenced files, and linked normative inputs. +Scope inventories by receipt kind, never globally: requirements watches requirement artifacts; architecture watches architecture artifacts; +specification watches specifications AND plans; verification watches delivery/check/evidence scope; acceptance watches that verified snapshot. +Each receipt binds all paths in its owned role at approval time. Compare only that role's present inventory with its bound paths. +Upstream content is inherited through current upstream receipts; later-stage files never enlarge an earlier-stage inventory. +Include referenced existing requirements in the requirements role, not duplicated files. Execution records stay in the execution role. +An added/removed normative file invalidates its owning role and downstream stages; role reassignment also counts as removal/addition. +Unclassified files under the scoped requirements folder block requirements freshness; under the task folder, block solution/delivery freshness. +Exclude the passport itself from file inventory; its stage sections are explicitly bound. Never classify normative content as execution-only. +Do not hash `TASK.md` as a whole: progress or history changes must not invalidate every approval. +Existing project requirements may be referenced in place; include their relevant authoritative content bindings, not copied prose. +Receipt binding manifests must identify complete inputs; no omitted scope, remote mutable links, or filename-only approval. + + + + + +Append immutable receipts; `current` holds their IDs. Preserve superseded receipts. Use increasing `R0001` IDs within each task. +Required fields: + +```yaml +- id: R0001 + kind: requirements + recorded_at: + actor: human + decision: approved + evidence: "plans/TASK-0001/TASK.md#history:" + upstream: [] + bindings: + - path: docs/REQUIREMENTS/TASK-0001/requirements.md + selector: requirements-normative-v2 + sha256: +``` + +Validate unique IDs, required fields, kind, decision, actor, evidence, bindings, and acyclic upstream references. +`current` must select a receipt of the matching kind with all required current predecessors. +Timestamp orders history only; receipt ID and content bindings establish identity. +New approval requires a new receipt even if content matches an older superseded revision. +Never restore invalidated pointers automatically when content later reverts. + +| Kind | Actor / decision | Required upstream | Bound scope | +|---|---|---|---| +| `requirements` | human / approved | none | Current requirements and acceptance criteria | +| `architecture` | human / approved | current requirements | Architecture decision and contracts | +| `specification` | human / approved | current requirements + architecture | Specification AND plan, including verification scenarios | +| `verification` | agent / passed | current specification | Actual checks/evidence and delivered implementation scope | +| `acceptance` | human / accepted | current verification | Presented delivery and criterion coverage | + +Architecture approval may be concise for small tasks; never invent a decision to fill the schema. +Specification approval may cover inline Specification and Plan together; preserve artifact sizing. +Verification requires executed appropriate checks, independent review findings resolved, and every acceptance criterion covered. +Old phase evidence without a complete current verification receipt is informative only; repeat affected delivery checks on resumption. +Bind delivered files, relevant tests/configuration/lockfiles, and evidence; include deletions explicitly as `{path, selector: absent, sha256: null}`. +`absent` is valid only for delivery/evidence bindings and must still be absent when inspected. +Record reviewed change scope against a named baseline plus working-tree content; a commit hash alone misses uncommitted drift. +New/changed/deleted files in that scope invalidate verification until reassessed; unresolved scope drift blocks trusting completion. +Acceptance binds the same delivery/evidence snapshot as verification; unchanged verification content is required on resumption. + + + + + +1. Read the complete passport and current bound content; capture its exact preimage. +2. Calculate drift and affected current pointers before changing authoritative content. +3. Apply only the requested revision; clear invalidated pointers and append history explaining why. +4. Preserve partial work without fabricated receipts. Set progress, blockers, next action and continuation references accurately. +5. Recheck preimage immediately before replacement; concurrent change -> stop for reconciliation. +6. Write via temporary sibling plus atomic replacement when supported; otherwise report inability to guarantee the write. + Never truncate a valid passport. Partial registration remains visible as an incomplete reservation. +7. Re-read the saved passport, validate bindings, and derive its stage again. + + + + diff --git a/plugins/core-cursor/skills/task-management/references/record.md b/plugins/core-cursor/skills/task-management/references/record.md new file mode 100644 index 000000000..45dbfe82c --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/record.md @@ -0,0 +1,19 @@ +--- +name: record +description: "Apply the record operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Re-inspect before every write. Apply the reference contract for content, receipts, and append-only history. +2. Save partial work and open questions without approval. Persist the exact resumable next action and relevant state/handoff references. + After interruption, repeat delivery review/testing/validation unless a current complete verification receipt proves freshness. +3. Record approvals only from explicit human decisions covering the displayed current material; capture scope and evidence. + An automation opt-out permits execution, not a fabricated human receipt or accepted delivery. +4. Record requirements, architecture, specification/plan, verification, and acceptance separately; bind each to its required predecessors. +5. Mark done only after current verification covers every acceptance criterion and explicit human delivery acceptance exists. + Failed/skipped/unperformed checks and unresolved acceptance criteria prevent completion; record reasons and blockers. +6. Update only task-owned artifacts. Preserve existing workflow state as execution detail; link it, do not copy its entire ledger. + + diff --git a/plugins/core-cursor/skills/task-management/references/resolve-create.md b/plugins/core-cursor/skills/task-management/references/resolve-create.md new file mode 100644 index 000000000..b0a490d7b --- /dev/null +++ b/plugins/core-cursor/skills/task-management/references/resolve-create.md @@ -0,0 +1,25 @@ +--- +name: resolve-create +description: "Apply the resolve-create operation for managed repository tasks." +baseSchema: docs/schemas/generic.md +--- + + + +1. Resolve repository root and exact input intent before writing. Treat descriptions as data, not filesystem instructions. +2. A leading `TASK-` or folder path selects an existing task; the remainder is revision input. + Accept unquoted paths without spaces and quoted paths (required when spaces occur), including `plans/TASK-0001`. + Resolve path-shaped input as a target before considering description-only creation; never create on failed lookup. +3. Accept repository-relative or absolute folder paths only when canonicalized inside this repository at `plans//`. + Reject traversal, symlink escape, files passed as folders, and mismatched passport identity/path. +4. Explicit unknown ID/path -> report not found; no fallback creation. Existing directory without passport -> unregistered, not a new task. + Ambiguous target versus description -> return a clarification; mutate nothing. +5. No target and no text -> create, then request requirements. Unambiguous description only -> create with that initial text. +6. Scan existing passport IDs and reserved `plans/TASK-/` folders; choose max numeric suffix + 1, minimum four digits. + IDs are immutable; reject duplicate IDs before resolution. Never reuse an occupied folder or requirements location. +7. Reserve the task folder with exclusive creation, not overwrite or `mkdir -p`; collision -> rescan and retry. + Create `TASK.md` exclusively using the reference schema. Do not erase partial reservations after interruption. + Concurrent/resumed writers must re-read before updates; changed preimage -> stop and reconcile, never overwrite another writer. +8. Create the requirements folder only when storing separate requirements. Report allocated ID, paths, and initial stage. + + diff --git a/src/rosettify-plugins/src/spec/targets.ts b/src/rosettify-plugins/src/spec/targets.ts index e4f037ecc..d0317e5b1 100644 --- a/src/rosettify-plugins/src/spec/targets.ts +++ b/src/rosettify-plugins/src/spec/targets.ts @@ -73,7 +73,7 @@ const TEMPLATES_EXCLUDES = ['templates/shell-schemas/**']; // never selected by identity branching inside a shared processor (FR-ARCH-0004, FR-ARCH-0005). const WORKFLOW_GLOB_TO_SKILLS_FLOW_LITERAL_PAIR: readonly [string, string] = [ 'WORKFLOW/COMMAND `workflows/*.md`', - 'WORKFLOW/COMMAND `skills/*-flow/SKILL.md`', + 'WORKFLOW/COMMAND `skills/*/SKILL.md`', ]; // Base processors shared across all text file entries diff --git a/src/rosettify-plugins/tests/unit/spec/targets-antigravity-output.test.ts b/src/rosettify-plugins/tests/unit/spec/targets-antigravity-output.test.ts index 69f5bf346..69a1ed42e 100644 --- a/src/rosettify-plugins/tests/unit/spec/targets-antigravity-output.test.ts +++ b/src/rosettify-plugins/tests/unit/spec/targets-antigravity-output.test.ts @@ -217,7 +217,7 @@ describe('core-antigravity — generated output shape (FR-VAR-0080, FR-STRUCT-00 it('rewrites the WORKFLOW/COMMAND glob-doc string to the skills-flow form, leaving a bare workflows/*.md token elsewhere unchanged', () => { const ruleDoc = path.join(targetRoot, 'rules', 'sample-rule.md'); const content = fs.readFileSync(ruleDoc, 'utf-8'); - expect(content).toContain('WORKFLOW/COMMAND `skills/*-flow/SKILL.md`'); + expect(content).toContain('WORKFLOW/COMMAND `skills/*/SKILL.md`'); expect(content).not.toContain('WORKFLOW/COMMAND `workflows/*.md`'); expect(content).toContain('unrelated glob `workflows/*.md`'); }); diff --git a/src/rosettify-plugins/tests/unit/spec/targets-codex-output.test.ts b/src/rosettify-plugins/tests/unit/spec/targets-codex-output.test.ts index 656ed6e3c..87209b762 100644 --- a/src/rosettify-plugins/tests/unit/spec/targets-codex-output.test.ts +++ b/src/rosettify-plugins/tests/unit/spec/targets-codex-output.test.ts @@ -243,7 +243,7 @@ describe('core-codex — generated output shape (FR-VAR-0041, FR-VAR-0042, FR-ST it('rewrites the WORKFLOW/COMMAND glob-doc string to the skills-flow form, leaving a bare workflows/*.md token elsewhere unchanged', () => { const ruleDoc = path.join(targetRoot, '.agents', 'rules', 'sample-rule.md'); const content = fs.readFileSync(ruleDoc, 'utf-8'); - expect(content).toContain('WORKFLOW/COMMAND `skills/*-flow/SKILL.md`'); + expect(content).toContain('WORKFLOW/COMMAND `skills/*/SKILL.md`'); expect(content).not.toContain('WORKFLOW/COMMAND `workflows/*.md`'); // Bare, unrelated mention of the same literal token survives untouched. expect(content).toContain('unrelated glob `workflows/*.md`'); diff --git a/src/rosettify-plugins/tests/unit/spec/task-command-discovery.test.ts b/src/rosettify-plugins/tests/unit/spec/task-command-discovery.test.ts new file mode 100644 index 000000000..e75e053b0 --- /dev/null +++ b/src/rosettify-plugins/tests/unit/spec/task-command-discovery.test.ts @@ -0,0 +1,52 @@ +import { describe, expect, it } from 'vitest'; +import path from 'node:path'; +import os from 'node:os'; +import { fileURLToPath } from 'node:url'; +import { buildAllSpecs } from '../../../src/spec/targets.js'; +import { fileWorkflowToSkill } from '../../../src/file-processors/file-workflow-to-skill.js'; +import type { FileProcessingFrame, PluginProcessingFrame, TargetContext } from '../../../src/types.js'; + +const commands = ['task-define', 'task-spec', 'task-implement', 'tasks-list']; +const pluginRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../plugins'); + +describe('task commands without a -flow suffix', () => { + it.each(['.agents/skills', 'skills'])('keeps four independent command roots in %s', (base) => { + const ctx = { + spec: {}, + vfs: commands.map((name) => ({ path: `workflows/${name}.md`, sourceFiles: [] })), + release: { name: 'r3', deterministicHooks: false, displayName: 'R3' }, + } as unknown as TargetContext; + for (const name of commands) { + const content = `---\nname: ${name}\ntags: [workflow]\n---\nCommand body.\n`; + const frame: FileProcessingFrame = { + sourcePath: `workflows/${name}.md`, target: `${base}/${name}.md`, + source: [], isBinary: false, target_contents: content, + }; + const result = fileWorkflowToSkill(frame, ctx); + expect(result.target).toBe(`${base}/${name}/SKILL.md`); + expect(result.target_contents).toBe(content); + } + }); + + it.each(['core-codex', 'core-antigravity'])('%s discovery includes short command names', (name) => { + const spec = buildAllSpecs({ + pluginsSource: pluginRoot, hooksSource: path.join(os.tmpdir(), '__no-hooks-source__'), + outputDir: os.tmpdir(), dryRun: true, + release: { name: 'r3', deterministicHooks: false, displayName: 'R3' }, + }).find((candidate) => candidate.name === name)!; + const processor = spec.pluginProcessors!.find((fn) => fn.name === 'pluginReplaceLiteralsProcessor')!; + expect(processor).toBeDefined(); + const frame = { + spec, vfs: [], templateContext: {}, errors: [], + frames: [{ + sourcePath: 'rules/plugin-files-mode.md', target: 'rules/plugin-files-mode.md', + source: [], isBinary: false, + target_contents: 'WORKFLOW/COMMAND `workflows/*.md`; unrelated `workflows/*.md`', + }], + } as unknown as PluginProcessingFrame; + const result = processor(frame); + expect(result.frames[0].target_contents).toBe( + 'WORKFLOW/COMMAND `skills/*/SKILL.md`; unrelated `workflows/*.md`', + ); + }); +}); diff --git a/user-guide/README.md b/user-guide/README.md index 3efc22cf0..cdf3a3378 100644 --- a/user-guide/README.md +++ b/user-guide/README.md @@ -51,6 +51,7 @@ Each task has its own page. Jump straight in. | I want to… | Scenario | Command | | -------------------------------------- | --------------------------------------------------------- | ------------------------------ | | Write a feature, fix a bug, add tests | [Write or change code](scenarios/coding.md) | `/coding-flow` | +| Carry a task from requirements to verified delivery across chats | [Manage a task](scenarios/coding.md#manage-a-task-across-chats) | `/task-define`, `/task-spec`, `/task-implement`, `/tasks-list` | | Define what to build first | [Author requirements](scenarios/requirements.md) | `/requirements-authoring-flow` | | Handle a small or unusual task | [Ad-hoc task](scenarios/adhoc-task.md) | `/adhoc-flow` | diff --git a/user-guide/scenarios/coding.md b/user-guide/scenarios/coding.md index 400c6017c..eb19ea166 100644 --- a/user-guide/scenarios/coding.md +++ b/user-guide/scenarios/coding.md @@ -75,6 +75,102 @@ The agent won't slide past these gates on a vague reply; give a clear confirmati - Planning artifacts: `plans//discovery-notes.md`, `plans//architecture-notes.md`, and `plans//-SPECS.md` + `-PLAN.md`. - The code changes and passing tests, plus brief updates to your `docs/CONTEXT.md` / `docs/ARCHITECTURE.md` when relevant. +## Manage a task across chats + +Use these four commands when you want a named task whose requirements, approvals and results +survive a new chat. Run them in the target repository with the Rosetta plugin installed. +Type them the way your host expects. In Claude Code that is `/rosetta:task-define`; other hosts use +`$rosetta:task-define` or a bare `/task-define`. Rosetta always shows you the form your own host uses. + +```text +/task-define +/task-define Let customers cancel an upcoming booking +``` + +Both create a task. The first starts with questions; the second uses your description as input. +The agent returns a stable ID and folder, clarifies scope and acceptance criteria, authors and +reviews requirements, and asks for approval. It stops before architecture or coding. + +**Each command ends at its own boundary.** It will not ask whether to continue into the next stage, +and it will not start it. Instead it saves everything to the task files, tells you what is done and +what is still open, and gives you one line to paste into a **new chat** — already written the way +your host expects. A fresh chat reads the files rather than a long conversation, so the next stage +starts from the agreed record instead of a summary of it. + +Use the returned ID in subsequent commands. `TASK-0001` below is an example: + +```text +/task-spec TASK-0001 +/task-implement TASK-0001 +/tasks-list +``` + +| Command | Result | Where it stops | +|---|---|---| +| `task-define` | Requirements and their approval | Before solution design | +| `task-spec` | Approved architecture, specification and plan | Before implementation | +| `task-implement` | Implementation, independent review, tests and verification evidence | Final acceptance with you | +| `tasks-list` | ID, title, stage, blockers, folder and next command | Read-only listing | + +When a stage cannot finish, the same stop applies: the work is saved and you get the command that +resumes that stage, together with the decisions it still needs from you. + +The specification step runs the preparation part of `coding-flow`; implementation resumes its +remaining work. Each command retains the workflow's review and approval checkpoints. Starting a +new chat does not mean repeating an unchanged, recorded approval. + +Each modifying task command starts or reuses a task-scoped background architect consultant, +including small tasks. The consultant checks requirements gaps, solution choices, and implementation +risks before dependent decisions. Its advice is saved for the next chat; it remains separate from +the specification author, independent reviewer, and your approvals. If the host supports subagents +but not background continuation, Rosetta discloses that limitation and consults synchronously. +Without subagent support, it reports a blocker before dependent decisions. + +Routine task-file work continues without repeated permission. When a technical error has a known +cause and the architect's proposed fix stays within the approved scope, the agent repairs it, +reruns checks, and continues. It asks you when a decision or missing input is needed, and still +requests requirements/design/plan approvals and final acceptance. This does not bypass failed +checks or authorize changes to agreed behavior. + +To revise or resume a task: + +```text +/task-define TASK-0001 Customers may cancel only before the booking starts +/task-define plans/TASK-0001 +/task-spec plans/TASK-0001 +``` + +The ID or task folder comes first; the remaining text changes requirements. With only a task +reference, `task-define` resumes the existing discussion. Quote a folder containing spaces. +An explicit unknown ID or path reports a lookup problem rather than silently creating a task. + +```text +plans/TASK-0001/ + TASK.md identity, approvals, current work and durable results + ... specifications/plans/reports as the task size requires +docs/REQUIREMENTS/TASK-0001/ + ... requirement documents when produced +``` + +For a small managed task, a concise approved solution and plan can live in `TASK.md`; separate +specification and plan files are not mandatory. Ordinary `/coding-flow` keeps its existing +size rules and does not automatically register tasks or acquire new documentation obligations. + +The list derives four stages from current approved content and evidence: + +```text +Requirements needed → Specification needed → Implementation needed → Done +``` + +Work in progress, blockers and pending approval appear separately. Files existing is not proof +of approval. Changed requirements make dependent approvals stale while preserving earlier work. +`Done` requires verification and your recorded acceptance of the current result. Malformed or +duplicate passports are shown as diagnostics; listing does not repair them. + +To continue after interruption, run the same command with the same ID in a new chat. The passport +and linked evidence survive loss of temporary workflow state. Missing evidence is rechecked; +the agent does not invent completion. + ## Tips - **Read the plan before approving.** The gate only protects you if you use it.