agentera 3.0.0-dev.3 → 3.0.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -6
- package/bundle/.agentera-npx-bundle.json +1 -1
- package/bundle/references/cli/agent-ready-state-contract.yaml +20 -17
- package/bundle/references/cli/bundle-skill-vocabulary.yaml +1 -1
- package/bundle/references/cli/capability-instruction-contract.yaml +98 -57
- package/bundle/references/cli/routing-execution-vocabulary.yaml +6 -6
- package/bundle/references/cli/update-channels.yaml +27 -7
- package/bundle/references/cli/vocabulary-index.yaml +3 -3
- package/bundle/references/cli/vocabulary.md +28 -19
- package/bundle/registry.json +1 -1
- package/bundle/skills/agentera/SKILL.md +38 -21
- package/bundle/skills/agentera/agents/dokumentera.toml +1 -1
- package/bundle/skills/agentera/agents/hej.toml +1 -1
- package/bundle/skills/agentera/agents/inspektera.toml +1 -1
- package/bundle/skills/agentera/agents/inspirera.toml +1 -1
- package/bundle/skills/agentera/agents/optimera.toml +1 -1
- package/bundle/skills/agentera/agents/orkestrera.toml +1 -1
- package/bundle/skills/agentera/agents/planera.toml +1 -1
- package/bundle/skills/agentera/agents/profilera.toml +1 -1
- package/bundle/skills/agentera/agents/realisera.toml +1 -1
- package/bundle/skills/agentera/agents/resonera.toml +1 -1
- package/bundle/skills/agentera/agents/visionera.toml +1 -1
- package/bundle/skills/agentera/agents/visualisera.toml +1 -1
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +26 -13
- package/bundle/skills/agentera/capability_schema_contract.yaml +33 -14
- package/bundle/skills/agentera/references/contract.md +2 -2
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +1 -1
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +15 -36
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +14 -0
- package/bundle/skills/hej/SKILL.md +1 -1
- package/dist/analytics/usageStats.js +23 -1
- package/dist/analytics/usageStats.js.map +1 -1
- package/dist/capabilities/dokumentera/instructions.js +6 -0
- package/dist/capabilities/dokumentera/instructions.js.map +1 -0
- package/dist/capabilities/hej/instructions.js +6 -0
- package/dist/capabilities/hej/instructions.js.map +1 -0
- package/dist/capabilities/index.js +38 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/capabilities/inspektera/instructions.js +6 -0
- package/dist/capabilities/inspektera/instructions.js.map +1 -0
- package/dist/capabilities/inspirera/instructions.js +6 -0
- package/dist/capabilities/inspirera/instructions.js.map +1 -0
- package/dist/capabilities/optimera/instructions.js +6 -0
- package/dist/capabilities/optimera/instructions.js.map +1 -0
- package/dist/capabilities/orkestrera/instructions.js +6 -0
- package/dist/capabilities/orkestrera/instructions.js.map +1 -0
- package/dist/capabilities/planera/instructions.js +6 -0
- package/dist/capabilities/planera/instructions.js.map +1 -0
- package/dist/capabilities/profilera/instructions.js +6 -0
- package/dist/capabilities/profilera/instructions.js.map +1 -0
- package/dist/capabilities/realisera/instructions.js +6 -0
- package/dist/capabilities/realisera/instructions.js.map +1 -0
- package/dist/capabilities/resonera/instructions.js +6 -0
- package/dist/capabilities/resonera/instructions.js.map +1 -0
- package/dist/capabilities/visionera/instructions.js +6 -0
- package/dist/capabilities/visionera/instructions.js.map +1 -0
- package/dist/capabilities/visualisera/instructions.js +6 -0
- package/dist/capabilities/visualisera/instructions.js.map +1 -0
- package/dist/cli/capabilityContext.js +92 -26
- package/dist/cli/capabilityContext.js.map +1 -1
- package/dist/cli/commands/capability.js +1 -8
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/doctor.js +42 -3
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/report.js +5 -1
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/state.js +22 -11
- package/dist/cli/commands/state.js.map +1 -1
- package/dist/cli/commands/validate.js +12 -2
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/commands/verify.js +6 -0
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/dispatch.js +508 -172
- package/dist/cli/dispatch.js.map +1 -1
- package/dist/cli/errors.js +53 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/help.js +201 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/orientation.js +9 -6
- package/dist/cli/orientation.js.map +1 -1
- package/dist/cli/stateQuery.js +7 -0
- package/dist/cli/stateQuery.js.map +1 -1
- package/dist/cli/todoMarkdown.js +33 -0
- package/dist/cli/todoMarkdown.js.map +1 -0
- package/dist/hooks/common.js +0 -2
- package/dist/hooks/common.js.map +1 -1
- package/dist/hooks/validateArtifact.js +10 -8
- package/dist/hooks/validateArtifact.js.map +1 -1
- package/dist/registries/capabilityContract.js +12 -11
- package/dist/registries/capabilityContract.js.map +1 -1
- package/dist/registries/evaluatorHandoffContract.js +171 -0
- package/dist/registries/evaluatorHandoffContract.js.map +1 -0
- package/dist/setup/codex.js +146 -5
- package/dist/setup/codex.js.map +1 -1
- package/dist/setup/doctor.js +22 -1
- package/dist/setup/doctor.js.map +1 -1
- package/dist/setup/smokeChecks.js +111 -0
- package/dist/setup/smokeChecks.js.map +1 -0
- package/dist/upgrade/channels.js +9 -3
- package/dist/upgrade/channels.js.map +1 -1
- package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -1
- package/dist/upgrade/migrateArtifactsV1ToV2.js.map +1 -1
- package/dist/upgrade/nextMajorDoctor.js +121 -0
- package/dist/upgrade/nextMajorDoctor.js.map +1 -0
- package/dist/upgrade/runtimeMigration.js +19 -3
- package/dist/upgrade/runtimeMigration.js.map +1 -1
- package/dist/upgrade/versionResolution.js +4 -4
- package/dist/upgrade/versionResolution.js.map +1 -1
- package/dist/validate/appHomeContract.js +1 -1
- package/dist/validate/appHomeContract.js.map +1 -1
- package/dist/validate/capability.js +11 -3
- package/dist/validate/capability.js.map +1 -1
- package/package.json +3 -3
- package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +0 -428
- package/bundle/skills/agentera/capabilities/hej/instructions.md +0 -331
- package/bundle/skills/agentera/capabilities/inspektera/instructions.md +0 -514
- package/bundle/skills/agentera/capabilities/inspirera/instructions.md +0 -280
- package/bundle/skills/agentera/capabilities/optimera/instructions.md +0 -437
- package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +0 -433
- package/bundle/skills/agentera/capabilities/planera/instructions.md +0 -368
- package/bundle/skills/agentera/capabilities/profilera/instructions.md +0 -419
- package/bundle/skills/agentera/capabilities/realisera/instructions.md +0 -403
- package/bundle/skills/agentera/capabilities/resonera/instructions.md +0 -329
- package/bundle/skills/agentera/capabilities/visionera/instructions.md +0 -309
- package/bundle/skills/agentera/capabilities/visualisera/instructions.md +0 -400
- package/dist/cli/commands/backfill.js +0 -84
- package/dist/cli/commands/backfill.js.map +0 -1
- package/dist/core/git.js +0 -43
- package/dist/core/git.js.map +0 -1
- package/dist/state/progressCommit.js +0 -289
- package/dist/state/progressCommit.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usageStats.js","sourceRoot":"","sources":["../../src/analytics/usageStats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAClF,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AAEzC,MAAM,SAAS,GACb,+DAA+D,CAAC;AAwBlE,SAAS,aAAa,CAAC,IAA4D;IACjF,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,eAAe,EAAE,IAAI,CAAC,eAAe,IA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,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,GAAI,UAAmB,CAAC,QAAQ,CAAC;IACzC,MAAM,WAAW,GACf,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,YAAuB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEpG,IAAI,QAAQ,EAAE,CAAC;QACb,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;IACjF,GAAG,CAAC,mBAAmB,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IACtF,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Source: skills/agentera/capabilities/dokumentera/instructions.md (relocated D65)
|
|
2
|
+
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
|
+
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
+
export const instructions = JSON.parse(String.raw `"# DOKUMENTERA\n\n**Documentation Origin: Knowledge Unified, Methodology Enforced, Notation Traced. Encode, Record, Archive**\n\nOwns the docs-first workflow: document intended behavior before tests and code. Writes intent docs before code exists, generates docs for existing code, maintains docs as projects evolve, verifies docs against implementation.\n\nTwo modes: **create** and **update**. Context-detected: no feature yet = intent-first; code exists = explore and generate.\n\n---\n\n## Visual identity\n\nGlyph: **▤** (protocol ref: SG8). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne index file; writes individual doc files across the project.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060DOCS.md\u0060 | Canonical documentation contract, stored as \u0060.agentera/docs.yaml\u0060 unless mapped otherwise. Conventions, artifact mapping, and documentation index. | Created on first dokumentera run. |\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060docs\u0060 to locate the active installed schema; use \u0060artifact_locations\u0060 or \u0060agentera query --list-artifacts --format json\u0060 for mapped artifact paths and raw-access boundaries. Do not search Agentera directories manually. The repository's existing \u0060.agentera/docs.yaml\u0060 shape provides the local structure when editing that artifact. Individual documentation files are written to their mapped locations.\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, prefer the CLI artifact-location contract from \u0060agentera describe --format json\u0060 or \u0060agentera query --list-artifacts --format json\u0060. It resolves \u0060.agentera/docs.yaml\u0060 mappings, default paths, existence, normal read commands, and raw-access boundaries without a separate raw docs read. Raw \u0060.agentera/docs.yaml\u0060 access is reserved for writing or validating the docs artifact itself, corruption diagnostics, or unavailable/incomplete CLI discovery. This applies to all artifact references in this capability, including cross-capability reads (VISION.md, .agentera/progress.yaml, .agentera/decisions.yaml, .agentera/health.yaml).\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: severity arrows VT5-VT8, trend arrows VT12-VT13, progress bar VT18, inline separator VT16 (·), list item VT15 (▸), section divider VT14, flow/target VT17 (→). Skill glyph SG8 for the exit marker. Exit signals EX1-EX4 for the exit marker. Confidence scale CS1-CS5 for decision profile consumption.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference for ambiguous cases or cross-checking.\n\n---\n\n## docs.yaml shape\n\n\u0060\u0060\u0060yaml\nlast_audit: YYYY-MM-DD\nconventions:\n doc_root: .\n style: technical, concise\n auto_gen: []\n version_files: []\n semver_policy:\n feat: minor\n fix: patch\n docs/chore/test: no bump\nmapping:\n - artifact: VISION.md\n path: .agentera/vision.yaml\n producers: [visionera, realisera]\nindex:\n - document: README\n path: README.md\n last_updated: YYYY-MM-DD\n status: current\n\u0060\u0060\u0060\n\n---\n\n## Step 0: Detect context\n\nBefore artifact-backed work, use supported Agentera CLI state first. For final\ndocumentation or metadata synchronization, follow the closeout context startup\ncontract below before reading TODO, docs, changelog, or progress artifacts directly.\n\nDetermine what kind of documentation work is needed:\n\n1. Read DOCS.md (if exists) for current state\n2. Parse user request: specific target or broad \"write/update docs\"?\n3. Check codebase: does the feature exist in code?\n\n| Context | Approach |\n|---------|----------|\n| Feature doesn't exist yet, user wants to document intent | **Intent-first** (conversational) |\n| Code exists, docs don't | **Explore and generate** (autonomous) |\n| Docs exist, may be stale | **Update and verify** (audit-driven) |\n| Broad \"audit the docs\" / \"are docs up to date\" | **Full audit** |\n| No DOCS.md exists | **First-run survey** (convention detection) |\n\n---\n\n## Closeout context startup\n\nCloseout synchronization uses the existing state seam:\n\n\u0060\u0060\u0060bash\nagentera prime --context dokumentera --format json\n\u0060\u0060\u0060\n\nWhen the response includes \u0060closeout_context.source_contract.complete_for_closeout_context: true\u0060, use \u0060closeout_context\u0060 as the normal source for:\n\n- artifact mappings\n- version policy\n- TODO blockers\n- changelog and release boundary state\n- progress evidence\n- benchmark evidence or unavailable caveat\n- fallback commands\n- state caveats\n- raw-read policy\n- completeness and non-empty evidence flags\n\nDo not raw-read \u0060TODO.md\u0060, \u0060.agentera/docs.yaml\u0060, \u0060CHANGELOG.md\u0060, or \u0060.agentera/progress.yaml\u0060 merely to reconstruct those fields when the closeout context is complete. Raw artifacts are write targets or last-resort diagnostics, not normal closeout inputs.\n\nWhen closeout context is incomplete or caveated:\n\n1. Preserve every returned caveat, including stale app/profile state, compacted state, missing benchmark evidence, absent local tag/metadata, and no-publication/no-remote state.\n2. Run the listed \u0060closeout_context.fallback_commands\u0060 before any raw artifact read. Expected existing fallbacks are \u0060agentera todo --format json\u0060, \u0060agentera docs --format json\u0060, \u0060agentera progress --format json\u0060, \u0060agentera query changelog --format json\u0060, \u0060agentera query --list-artifacts --format json\u0060, and \u0060agentera decisions --format json\u0060 when listed.\n3. If fallback CLI state is still incomplete, raw reads may be used only as last-resort diagnostics or as explicit write targets after artifact path resolution.\n4. Never hide or reconstruct caveats while preparing docs, changelog, TODO, or progress closeout. Carry them into the final synchronization note.\n\nCloseout context does not approve publication, remote push, installed app refresh, profile refresh, vision edits, or objective-state edits. Treat those fields as recorded evidence or caveats only.\n\n### Decision satisfaction authority\n\nWhen documentation or closeout work touches decision satisfaction, agents may\nmark provisional satisfaction with evidence only. Dokumentera must not mark or\nimply user-confirmed final satisfaction; only the user confirms final\nsatisfaction. If decisions are compacted, missing satisfaction state, open,\nprovisional, or review-needed, preserve the caveat and review pressure in docs\nor closeout notes instead of reconstructing hidden outcomes or claiming\nautomation proved intent.\n\n---\n\n## First-run survey (convention detection)\n\nWhen DOCS.md doesn't exist, run a survey first. Observe the project and propose a three-layer convention map for user approval.\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: explore, propose, handle, audit, write.\n\n### Step 1: Explore structure\n\nDetect documentation conventions:\n\n1. **Doc root**: check docs/, doc/, documentation/, wiki/, or root. Default to root.\n2. **Existing docs**: README, CLAUDE.md, AGENTS.md, CONTRIBUTING.md, API docs, guides\n3. **Auto-generated docs**: TypeDoc, Storybook, OpenAPI/Swagger, GoDoc, Rustdoc, Javadoc. Record each with output path.\n4. **Style**: infer tone, structure patterns, formatting conventions from existing docs\n5. **Skill artifacts**: check \u0060.agentera/docs.yaml\u0060 mappings, root human artifacts, and \u0060.agentera/*.yaml\u0060 agent artifacts\n6. **Version files**: package.json, Cargo.toml, pyproject.toml, plugin.json, etc. Note files and current values. None found = omit versioning from DOCS.md.\n\n### Step 2: Propose conventions\n\nDraft three-layer \u0060.agentera/docs.yaml\u0060 from the artifact schema and observed repository conventions:\n\n1. **Conventions**: doc_root, style, auto_gen from observations. If version files found, populate \u0060version_files\u0060 and ask about semver policy. No version files = omit block.\n2. **Artifact mapping**: paths consistent with project's doc organization\n3. **Index**: all discovered docs (auto-generated = \u0060generated\u0060, existing = \u0060current\u0060)\n\nPresent for user approval.\n\n### Step 3: Handle existing artifacts\n\nIf artifacts exist at root but mapping places them elsewhere:\n\n1. List artifacts that would move\n2. Offer to relocate via \u0060git mv\u0060\n3. If declined, update mapping to match actual locations\n\n### Step 4: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 5: Write DOCS.md\n\nWrite the approved convention map to \u0060.agentera/docs.yaml\u0060. After writing, proceed to the originally requested mode, or stop if the survey was the entire request.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n---\n\n## Intent-first mode (docs before code)\n\nDocs-first workflow: document what a feature SHOULD do before building. Docs become the spec.\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: understand, write, audit, update, suggest.\n\n### Step 1: Understand the intent\n\nBrief conversation (2-4 questions): what, who reads it, what format, what detail level.\n\nRead VISION.md for direction/audience and decision profile per protocol confidence scale (CS1-CS5) conventions for doc style preferences if they exist.\n\n### Step 2: Write the documentation\n\nWrite docs in the appropriate location: project-level (README, CLAUDE.md) to standard paths, feature docs to the project's docs directory, inline docs to source files.\n\n**Principles**: follow DOCS.md style conventions, infer details from existing docs. Write as intended steady state (evergreen, non-temporal). Primary audience first. Concrete examples. DRY across doc files.\n\nWhen presenting drafts, introduce what you wrote and why: what choices you made, what you left out on purpose, what you'd want feedback on. Don't just dump the doc.\n\nPresent draft for approval before writing.\n\n### Step 3: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 4: Update DOCS.md\n\nAdd or update the relevant entry in DOCS.md:\n\n- Document name and path\n- Date written\n- Status: \u0060current\u0060\n\nOutput constraint: ≤15 words per index entry description.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n### Step 5: Suggest next steps\n\n- Feature docs: suggest ≡ planera to plan implementation\n- Standalone docs: suggest update mode later for verification\n\n---\n\n## Explore-and-generate mode (docs for existing code)\n\nCode exists, docs don't. Read codebase and generate.\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: explore, gaps, generate, audit, update.\n\n### Step 1: Explore\n\n1. Map directory structure, read dependency manifests\n2. Read existing docs to see what's already documented\n3. Read key source files: architecture, public APIs, patterns\n4. Read VISION.md, PROGRESS.md, DECISIONS.md, decision profile if they exist; use \u0060agentera decisions --format json\u0060 for normal decision context and carry returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure into documentation scope instead of raw-reading missing historical decision context.\n5. \u0060git log --oneline -20\u0060 for context\n\n**Exit-early stop condition**: If DOCS.md exists with coverage at 100% and no files have changed since the last dokumentera audit (\u0060git log --since\u0060 the last audit date in DOCS.md shows no changes), report exit signal \u0060complete\u0060 (EX1): documentation current, and stop.\n\n### Step 2: Identify gaps\n\nCompare what exists against what should be documented: README.md accuracy, CLAUDE.md/AGENTS.md presence, API docs, CLI docs with usage, configuration docs, architectural decision docs.\n\n### Step 3: Generate\n\nWrite docs for gaps, prioritized: (1) README, (2) CLAUDE.md, (3) API/CLI docs, (4) architecture docs. Follow DOCS.md style conventions.\n\nWhen presenting drafts, introduce what you wrote and why: what you learned from the code, what design choices the doc reflects, what you're less sure about. Don't just dump the doc.\n\nPresent drafts for approval.\n\n### Step 4: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 5: Update DOCS.md\n\nCreate or update DOCS.md with all items. Edit specific YAML entries when updating status/dates. If DOCS.md doesn't exist, run first-run survey first.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n---\n\n## Update-and-verify mode (audit-driven)\n\nDocs exist but may be out of sync with implementation.\n\nStep markers: display \u0060── step N/6: verb\u0060 before each step.\nSteps: discover, verify, prose-enforce, report, audit, update.\n\n### Step 1: Discover\n\nIdentify all doc files: root (README, CLAUDE.md, etc.), directories (docs/, .github/), config comments. Read DOCS.md for current index. Track auto-generated docs as \u0060generated\u0060. Skip node_modules/, .git/, vendor/.\n\n### Step 2: Verify\n\nCheck each doc file on four dimensions:\n\n- **Gaps**: documented features/APIs/behaviors that don't exist in code\n- **Staleness**: changed signatures, removed features, outdated setup instructions\n- **Redundancies**: duplicated content across doc files\n- **Misalignments**: docs contradict actual code behavior\n\nFor each finding: quote the doc section, reference code location (file:line), explain the discrepancy.\n\n### Step 3: Doc-prose enforcement\n\nCheck all docs indexed in DOCS.md against the 3 self-audit rules:\n\n1. **Read DOCS.md index**: if DOCS.md is absent, run first-run survey to bootstrap it, then continue. Extract tracked docs from the \u0060index\u0060 list. Skip entries with \u0060generated\u0060 or \u0060missing\u0060 status.\n2. **For each doc**, read the file and check against the 3 rules:\n - **Verbosity overrun**: entry word counts exceeding token budgets for the artifact's scope. Flag entries that exceed budget without compaction.\n - **Abstraction creep**: sections lacking ≥1 concrete anchor (file path, line number, commit hash, metric value, identifier, direct quote). Flag entries that narrate concepts without evidence.\n - **Filler accumulation**: scan for banned verbosity patterns: meta-commentary about writing, hedging qualifiers, redundant transitions, self-referential process narration, filler introductions, summary preambles, excessive justification. Flag entries containing banned patterns.\n3. **Surface \u0060[post-audit-flagged]\u0060 entries**: scan each doc for the \u0060[post-audit-flagged]\u0060 marker. Report any flagged entries as warning-level findings.\n4. **Report findings** at standard severity levels:\n - **critical** (SF1): doc section contradicts code, or instructions that would cause user errors\n - **warning** (SF2): verbosity above budgets, abstraction creep, accumulated filler patterns, pre-existing \u0060[post-audit-flagged]\u0060 markers\n - **info** (SF3): minor style issues, single banned pattern in an otherwise clean entry\n\n### Step 4: Report and fix\n\nBy severity: ⇶ critical (VT5, causes user errors), ⇉ warning (VT6, causes confusion), ⇢ info (VT8, cosmetic). For each finding, offer to: fix the doc, file to TODO.md (code is wrong per the docs-first workflow), or skip.\n\n### Step 5: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 6: Update DOCS.md\n\nUpdate the index with:\n\n- ▸ Audit date\n- ▸ Status changes (■ current / ▣ stale / □ missing)\n- ▸ Coverage numbers\n- ▸ Audit log entry\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER modify documentation without explicit user approval. Present drafts and get confirmation.\n- NEVER update docs to match broken code. Per the docs-first workflow, if code diverges from docs, the code is wrong. Document the divergence as an issue in TODO.md.\n- NEVER write temporal documentation (changelogs, \"we recently added...\"). Write as the intended steady state, evergreen and non-temporal.\n- NEVER duplicate information across doc files. Keep it DRY: reference, don't repeat.\n- NEVER write generic filler documentation. Every sentence should be specific to this project. If there's nothing useful to say about a section, omit it.\n- NEVER skip the verification step in update mode. Every doc claim must be checked against code.\n- NEVER auto-generate documentation without reading the code it describes. Understanding precedes documentation.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060▤ dokumentera · <status>\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 (VT15) bullet details below the summary.\n\n- **complete** (EX1): Documentation was written, updated, or audited successfully; DOCS.md is current, and all drafted content received user approval before writing.\n- **flagged** (EX2): Documentation tasks completed but gaps remain (e.g., some doc files could not be verified against code, coverage is partial, or the audit found issues that were logged but not yet fixed).\n- **stuck** (EX3): Cannot proceed because a user approval step was declined, a required artifact (VISION.md, source code) is missing or inaccessible, or a contradicting doc-vs-code situation requires a decision the capability should not make autonomously.\n- **waiting** (EX4): The documentation intent is unclear: the target audience, format, or scope of what to document was not specified and cannot be inferred from the codebase or DOCS.md.\n\n---\n\n## Cross-capability integration\n\nDokumentera is part of a twelve-capability suite. It is the documentation layer and owns the docs-first workflow.\n\n### Dokumentera feeds planera (docs-first workflow)\n\nIn the strict docs-first workflow, dokumentera writes intent docs first, then planera breaks them into implementation tasks. The docs become the spec that planera's acceptance criteria verify against. When the plan includes documentation tasks, dokumentera handles them.\n\n### Dokumentera feeds realisera\n\nWhen dokumentera writes intent-first docs for a feature that doesn't exist yet, realisera implements code to match those docs. The docs are the target state; if code diverges from docs, the code is wrong per the docs-first workflow.\n\n### Dokumentera is informed by inspektera\n\nHEALTH.md findings may include documentation gaps. Inspektera's architecture alignment dimension can surface undocumented modules or APIs.\n\n### Dokumentera is informed by visionera\n\nVISION.md sets the project's direction and audience. Dokumentera reads it to understand who the documentation is for and what tone to use.\n\n### Dokumentera is informed by profilera\n\nThe decision profile calibrates documentation style: the user's preferences for detail level, tone, format, and which docs they consider essential.\n\n### Dokumentera reads visualisera output\n\nDESIGN.md provides visual identity context that dokumentera respects when generating user-facing documentation, ensuring docs match the project's declared aesthetic and voice.\n\n### Dokumentera feeds profilera\n\nDocumentation decisions (what to document, how, at what depth) are signal for profilera's extraction scripts.\n\n---\n\n## Getting started\n\n### Docs-first workflow: document before building\n\n1. ▤ dokumentera: write intent docs for the feature (what it should do, how it should work)\n2. ≡ planera: plan the implementation with acceptance criteria derived from the docs\n3. ⧉ realisera: build to match the docs\n4. ▤ dokumentera: update mode to verify docs still match implementation\n\n### Document existing code\n\n1. ▤ dokumentera: explore-and-generate mode reads the codebase and writes docs for what exists\n2. Review generated docs for accuracy and completeness\n\n### Audit and maintain\n\n1. ▤ dokumentera: update-and-verify mode checks all docs against code\n2. Fix findings or file code issues to TODO.md\n\n### Project bootstrap\n\n1. ⛥ visionera: create VISION.md (strategic direction)\n2. ▤ dokumentera: create README.md, CLAUDE.md, AGENTS.md (project documentation)\n3. ≡ planera: plan first features\n4. ⧉ realisera: start building\n"`);
|
|
5
|
+
export default instructions;
|
|
6
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/dokumentera/instructions.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,qmtBAAqmtB,CAAC,CAAC;AAChqtB,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Source: skills/agentera/capabilities/hej/instructions.md (relocated D65)
|
|
2
|
+
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
|
+
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
+
export const instructions = JSON.parse(String.raw `"# HEJ\n\n**Holistic Entry Junction. Orient, Route, Activate**\n\nSingle entry point to the agentera suite. Detects fresh vs returning, delivers a situational briefing, routes to the right capability. Same on first install and 100th session. A bare user message exactly \u0060hej\u0060 uses this same briefing path, not generic greeting behavior.\n\nEach invocation = one orientation. Uses the CLI composite briefing first,\nwrites nothing.\n\n---\n\n## State artifacts\n\nGlyph: **⌂** (SG1). Hej reads suite state through \u0060agentera hej\u0060 and writes\nnothing. It may fall back to direct reads only when the composite command fails\nor explicitly asks for fallback.\n\n### CLI-first access\n\nFor returning projects, run one composite command before any individual state\naccess:\n\n\u0060\u0060\u0060bash\nnpx -y agentera prime\n\u0060\u0060\u0060\n\nUse that output to render the dashboard and select the concrete next action. Do\nnot relay raw CLI lines as the user-facing briefing. Source labels such as\n\u0060mode:\u0060, \u0060profile:\u0060, \u0060v1_migration:\u0060, \u0060health:\u0060, \u0060issues:\u0060, \u0060plan:\u0060,\n\u0060objective:\u0060, \u0060attention:\u0060, \u0060next_action:\u0060, \u0060source_contract:\u0060, and the\ncompatibility \u0060bundle:\u0060 installed-app status object are parsing aids, not\ndashboard lines. Do not run \u0060agentera plan\u0060, \u0060agentera progress\u0060, \u0060agentera\nhealth\u0060, \u0060agentera todo\u0060, \u0060agentera decisions\u0060, or \u0060agentera objective\u0060 as part\nof normal hej briefing assembly. Do not read raw\n\u0060.agentera/*.yaml\u0060 files for normal hej orientation. If a normal dashboard field\nis missing from \u0060agentera hej\u0060, fix or extend the composite CLI contract instead\nof adding routine fallback reads. Use top-level fallback commands only when\n\u0060agentera hej\u0060 fails or explicitly reports fallback-only recovery.\n\nResolve \u0060RESOLVED_AGENTERA_HOME\u0060 with the app-home precedence \u0060AGENTERA_HOME\u0060\nwhen set, otherwise the platform data home, then run\nthe installed command once. Do not preflight app health with \u0060glob\u0060, \u0060grep\u0060,\n\u0060read\u0060, \u0060ls\u0060, \u0060python\u0060, \u0060doctor\u0060, \u0060--help\u0060,\n\u0060registry.json\u0060, or \u0060.agentera-bundle.json\u0060.\nNever combine the app-home assignment with the same shell command that expands\nthe managed app script path; shell expansion can otherwise turn an unset\n\u0060AGENTERA_HOME\u0060 into \u0060npx -y agentera\u0060 before the assignment takes effect.\n\nRecovery copy must be plain-language and recommendation-first. Never ask users\nto choose between technical install concepts, internal directory states,\ncommand-mode flags, or package-layout terms. Say what happened, what changed,\nwhat the safe fix does, and what it will not touch. The safe fix must say it will\nnot edit project files, shell startup files, or unknown directories. Good recovery labels are \u0060Use the safe fix\n(Recommended)\u0060, \u0060Choose a different directory\u0060, and \u0060Stop\u0060.\n\nIf the command cannot execute because \u0060AGENTERA_HOME\u0060 names the old default\n\u0060$HOME/.agents/agentera\u0060 and \u0060npx -y agentera\u0060 is missing,\ndo not require a successful failed CLI invocation and do not first ask the user to\nunset \u0060AGENTERA_HOME\u0060. Say: \u0060Agentera found an old or broken local copy of\nitself. The safe fix is to install a fresh copy in the normal Agentera directory.\u0060\nThen show this preview command and say it changes nothing:\n\n\u0060\u0060\u0060bash\nnpx -y agentera@latest doctor\n\u0060\u0060\u0060\n\nThat preview writes nothing. Because no explicit \u0060--install-root\u0060 is supplied,\nupgrade can choose the normal platform app directory and preview repair for app\nfiles, managed runtime surfaces, and cleanup of the old directory. Ask for\nexplicit approval before writes, using plain wording such as\n\u0060Approve the safe Agentera repair at <directory>\u0060. Then apply the same safe repair path:\n\n\u0060\u0060\u0060bash\nnpx -y agentera@latest prime\n\u0060\u0060\u0060\n\nAfter apply, retry the installed command from the platform app home reported by\nthe upgrade output, not from the old default directory. If the command exits\nsuccessfully, inspect the CLI-provided \u0060bundle.status\u0060 installed-app status\nobject. Only \u0060up_to_date\u0060 passes the installed Agentera app gate for normal briefing.\nThe object also carries \u0060appHome\u0060, \u0060managedAppRoot\u0060, \u0060userDataRoot\u0060,\n\u0060expectedVersionSource\u0060, \u0060bundle.dryRunCommand\u0060, \u0060bundle.applyCommand\u0060, and\napproval text. If the installed command cannot execute, is out of date, missing\n\u0060hej\u0060, fails before argparse, or reports manual-review-needed/repair-needed status, tell\nthe user \u0060Agentera found an old or broken local copy of itself.\u0060 Then preview the\nrepair with the CLI-provided command when present:\n\n\u0060\u0060\u0060bash\nnpx -y agentera@latest doctor\n\u0060\u0060\u0060\n\nDo not run the matching apply command until the user explicitly approves the\nsame Agentera repair and directory.\nAfter apply, retry \u0060npx -y agentera prime\u0060; do not treat local checkout\nfallback as installed-app success. If \u0060AGENTERA_HOME\u0060 names the old default\n\u0060$HOME/.agents/agentera\u0060, no explicit \u0060--install-root\u0060 was supplied, and\n\u0060npx -y agentera\u0060 is missing or out of date, show the normal\nAgentera directory preview above instead of first asking the user to unset\n\u0060AGENTERA_HOME\u0060; do not claim to prove where the environment value came from. If\n\u0060AGENTERA_HOME\u0060 points at any other missing path, file, or directory with unknown\nfiles, say: \u0060Agentera was told to use a directory it cannot safely use. Choose a\ndifferent Agentera directory, or approve --force only after checking that directory is\nsafe to replace.\u0060\n\nIf doctor reports a leftover 1.x managed marker block in\nshell startup files, say plainly that Agentera will not edit those files.\nCleanup is user-owned manual cleanup, not a repair write.\n\nUse \u0060agentera query <artifact-name> --format json|yaml\u0060 only for advanced or\ncustom artifact inspection when no top-level command serves the needed state.\n\n### Artifact path resolution\n\nOnly if \u0060agentera hej\u0060 fails and fallback raw artifact access is explicitly\nneeded, check \u0060.agentera/docs.yaml\u0060 for path mappings before reading artifacts.\nWithout a mapping, use the default layout:\n\n- Human-facing artifacts at the project root (Markdown): \u0060TODO.md\u0060, \u0060CHANGELOG.md\u0060, \u0060DESIGN.md\u0060\n- Agent-facing artifacts in \u0060.agentera/\u0060 (YAML): \u0060progress.yaml\u0060, \u0060decisions.yaml\u0060, \u0060health.yaml\u0060, \u0060plan.yaml\u0060, \u0060docs.yaml\u0060, \u0060vision.yaml\u0060, and per-objective \u0060objective.yaml\u0060 / \u0060experiments.yaml\u0060\n\nCanonical names are identifiers, not literal paths. PROFILE.md is global:\n\u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060, default \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060.\n\n### Contract values\n\nUse protocol tokens by ID where needed: severity arrows VT5-VT8, trend arrows\nVT12-VT13, progress bar VT18, separator VT16, list item VT15, section divider\nVT14, flow arrow VT17, skill glyphs SG1-SG12, exits EX1-EX4, issues SI1-SI4.\n\n---\n\n## Step 0: Detect mode\n\nRun the resolved installed \u0060agentera hej\u0060 and use its \u0060mode\u0060 field. If the\ninstalled-app status check reports out-of-date or blocked, show the CLI-provided\nrefresh preview before normal mode handling.\n\n- **No artifacts found** → Step 1a (first time on this project)\n- **Artifacts found** → Step 1b (returning to known project)\n\nNarration voice: warm, brief, unscripted.\n\n---\n\n## Step 0.5: CLI-owned checks\n\nDo not run separate v1 artifact or PROFILE.md checks during normal hej\norientation. \u0060agentera hej\u0060 owns those checks and emits the mode, profile status,\n\u0060v1_migration.detected\u0060, \u0060v1_migration.affected_files\u0060,\n\u0060v1_migration.dry_run_command\u0060, \u0060v1_migration.apply_command\u0060, \u0060project_integration.recommendation\u0060, \u0060project_integration.message\u0060, \u0060project_integration.dry_run_command\u0060, \u0060project_integration.apply_command\u0060, attention items,\nand next action. When \u0060project_integration.recommendation\u0060 is \u0060upgrade\u0060, explain the plain-language \u0060project_integration.message\u0060, show the preview command (\u0060project_integration.dry_run_command\u0060; it changes nothing), and ask before \u0060project_integration.apply_command\u0060. When it is \u0060stay\u0060, do not suggest upgrade. User-facing upgrade commands omit \u0060--project\u0060 because the CLI defaults to the current repo. Render those fields; do not spend additional tool calls on\n\u0060.agentera/*.md\u0060, \u0060.agentera/*.yaml\u0060, \u0060VISION.md\u0060, or global profile-path\ndiscovery. Treat \u0060v1_migration.dry_run_command\u0060 as the CLI-supplied preview and\ntell the user it changes nothing. Ask before any upgrade apply command, and only run\n\u0060v1_migration.apply_command\u0060 after confirmation.\nThe artifacts phase migrates supported v1 Markdown files to YAML with backups\nafter preview and confirmation.\n\nIf \u0060v1_migration.detected\u0060 is false, emit no upgrade notice. Profile status is\nalso CLI-owned: render \u0060profile: loaded\u0060 without warning, and render\n\u0060profile.suggested_action\u0060 or a missing-profile attention item only when\n\u0060agentera hej\u0060 supplies one.\n\nIf \u0060npx skills update\u0060 refreshed only the visible skill and \u0060/agentera\u0060 next\nfinds missing or out-of-date app files, explain in plain language that Agentera\nalso needs to repair its local app copy; the visible skill update alone is not\nenough. Package-manager repair commands remain opt-in through\n\u0060--update-packages\u0060.\n\n---\n\n## Step 1a: Welcome\n\nFirst impression: the colleague meets a new project.\n\n1. **Use composite state**: Build the welcome from \u0060agentera hej\u0060 output only.\n Do not scan README files, git history, languages, framework files, or project\n size during bare orientation.\n\n2. **Share what's available**: lead with the suggested capability from\n \u0060next_action\u0060. Do not enumerate the full suite unless asked.\n\n3. **Route**: ask what they'd like to do with a free-form prompt. Do not use a\n native question menu on the initial welcome unless the user explicitly asked\n for bounded choices. Invoke a capability only after the user confirms it.\n\n---\n\n## Step 1b: Briefing\n\nShow where things stand.\n\n1. **Use composite state**: Build the briefing from \u0060agentera hej\u0060 output.\n - Use its mode, profile, health, issue counts, plan progress, objective,\n attention, and next_action fields.\n - Do not issue individual artifact queries during normal returning-project\n orientation.\n - Do not open raw \u0060.agentera/*.yaml\u0060 files unless the composite command fails\n or names a fallback need.\n - If exceptional fallback is required, prefer top-level commands such as\n \u0060agentera plan\u0060, \u0060agentera progress\u0060, \u0060agentera health\u0060, \u0060agentera todo\u0060,\n \u0060agentera decisions\u0060, \u0060agentera objective\u0060, and \u0060agentera experiments\u0060.\n Missing normal dashboard fields should be repaired in \u0060agentera hej\u0060\n instead of weakening the one-command path.\n - Keep \u0060agentera query\u0060 for advanced/custom inspection only.\n\n2. **Brief them**: concise status, only what exists. No empty sections.\n Show the agentera logo.\n\n \u0060\u0060\u0060\n ┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐┬─┐┌─┐\n ├─┤│ ┬├┤ │││ │ ├┤ ├┬┘├─┤\n ┴ ┴└─┘└─┘┘└┘ ┴ └─┘┴└─┴ ┴\n\n ─── status ─────────────────────────────\n\n ⛶ health [⮉|⮋] [grade] ([worst dimension: grade])\n ⇶ issues N critical · M degraded · J annoying\n ≡ plan [██████▓░░░] N/M tasks\n ⎘ optim [metric] [current] → [target]\n ♾ profile [loaded | not found]\n\n [1-2 sentence narrative read: what shipped, what's moving, what needs eyes.\n Interpretation, not metrics. Closes the status section before attention.]\n\n ─── attention ──────────────────────────\n\n ⇶ [critical items, triple arrow for critical]\n ⇉ [degraded items, double arrow for degraded]\n → [normal items, single arrow for normal]\n ⇢ [annoying items, dashed arrow for annoying]\n\n ─── next ───────────────────────────────\n\n suggested → [glyph] [capability] ([reason])\n \u0060\u0060\u0060\n\n Output constraint: ≤120 words total briefing, ≤15 words per routing suggestion.\n\n **Exit marker**: after the closing code fence of the dashboard, emit \u0060⌂ hej · <status>\u0060 on its own line, followed by a one-sentence summary of what you delivered. For \u0060waiting\u0060, \u0060flagged\u0060, or \u0060stuck\u0060, add a \u0060▸\u0060 bullet below the summary identifying what the user needs to decide or act on next. The exit marker is mandatory on every invocation regardless of mode (fresh welcome or returning briefing).\n\n **Formatting rules**:\n - Each status line uses the skill glyph that owns that data\n - Severity arrows (VT5-VT8) mark attention items by urgency\n - Trend arrows (VT12/VT13) show health trajectory\n - Progress bars (VT18) show plan completion visually\n - The inline separator (VT16) joins counts on a single line\n - Lead with status metrics, then the narrative read inside the status section\n - The narrative read is colleague interpretation; metric lines above it are evidence\n - The issues summary line lists critical, degraded, and annoying counts only;\n normal-priority items belong in attention with → (SI3), not on the summary line\n - Omit any line whose source artifact is missing\n - Omit any section that would be empty (e.g., no attention items = no attention section)\n\n3. **Attention items**: priority order with severity arrows (SI1-SI4):\n - ⇶ (SI1) Critical issues, degrading health dimensions\n - ⇉ (SI2) Blocked/overdue plan tasks, stale artifacts (plan-relative per contract staleness detection; fall back to PROGRESS.md recency heuristic when no plan context exists), overdue health audits (hybrid time/cycle staleness via \u0060AGENTERA_INSPEKTERA_MAX_AGE_DAYS\u0060 default 30 and \u0060AGENTERA_INSPEKTERA_MAX_CYCLES\u0060 default 10; stale when either axis exceeds its threshold), loop stop-condition triggers\n - → (SI3) Standard work: features, improvements, routine tasks\n - ⇢ (SI4) Unresolved exploratory decisions\n\n Nothing? Say so. A clean bill of health is useful.\n\n4. **Select the concrete next action before selecting the skill**.\n - The routing suggestion MUST name the artifact item it would act on.\n - Valid objects: \u0060PLAN Task N: <title>\u0060, \u0060TODO: <item>\u0060, \u0060DECISION N follow-up\u0060, \u0060OBJECTIVE: <metric>\u0060, or \u0060VISION refresh\u0060.\n - A skill name without a concrete object is not a valid suggestion.\n\n Priority order. SG codes are internal protocol references; never render them\n in user-facing handoff labels:\n - Active PLAN with pending tasks → suggest ⎈ orkestrera for the first unblocked pending task.\n - Critical or degrading health → suggest ⛶ inspektera or ⧉ realisera for the named finding.\n - Stale health audit (CLI \u0060health.stale=true\u0060) with no higher-priority work → suggest ⛶ inspektera for \u0060HEALTH: Audit N stale\u0060.\n - Active non-closed OBJECTIVE with stalled or missing metric evidence → suggest ⎘ optimera for that metric.\n - TODO.md open items → select the highest-severity open item, then route by shape: narrow one-cycle TODOs suggest ⧉ realisera; contract-shaped, multi-surface, dependency-heavy, migration, schema, metadata, validation, or acceptance-risky TODOs suggest ≡ planera first. Prefer items that unlock product evidence or future plans.\n - Pending DECISIONS.md follow-up → suggest ❈ resonera for the named unresolved decision.\n - Vision exists but no plan, objective, decision follow-up, or TODO work is active → suggest ≡ planera.\n - No vision, no executable follow-ups, and no active plan → suggest ⛥ visionera to choose a direction.\n\n Do not let \u0060healthy + plan complete → ⛥\u0060 override active TODO, OBJECTIVE, DECISIONS, or a newer active PLAN. A completed plan means \"look for the next executable follow-up,\" not automatically \"refresh vision.\"\n\n5. **Route**: present one concrete suggestion and let the user choose. No coercion.\n - Do not list generic skill options unless the user asks for the full menu.\n - The waiting bullet should ask whether to run the named action, not ask the user to pick from skills.\n - On the initial Agentera/hej brief, use a free-form continuation prompt rather than a native question menu unless the user asked for bounded choices or the suggested next step is a state-changing Proceed/Cancel handoff.\n - Mid-conversation, use the native question tool only for at least two meaningful non-terminal next actions or a consequential Proceed/Cancel decision; \u0060Done\u0060 and free-form/custom answer affordances do not count as alternatives.\n - State-changing handoffs are consequential Proceed/Cancel decisions even when there is only one suggested action. State-changing means the proposed next step may write artifacts, edit code, run optimization or orchestration cycles, apply migrations, refresh app/runtime state, or otherwise mutate project/runtime state.\n - Use the behavior rule first, with common examples such as ⧉ realisera, ≡ planera when creating or updating plans, ▤ dokumentera when writing docs, ⎘ optimera when running or applying optimization cycles, and ⎈ orkestrera when dispatching cycles.\n - For one non-mutating suggested action, clear free-form acceptance such as \u0060yes\u0060, \u0060start\u0060, \u0060do it\u0060, or \u0060run <capability>\u0060 confirms that suggestion. Ambiguous replies get one clarifying question.\n\n---\n\n## Step 2: Route\n\nNarration voice: \"Kicking off [skill]...\" or similarly brief.\n\nInvoke the capability. Hej's work is done.\n\nUnclear mapping? Ask **one** clarifying question. No compound questions.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER execute implementation work. Hej orients and routes; it does not build, audit, plan, or decide.\n- NEVER dump full artifact contents verbatim. Summarize concisely; the user can read the files themselves.\n- NEVER skip the briefing in returning mode. The user needs context before choosing a direction.\n- NEVER assume what the user wants without asking. Present the suggestion, then wait for confirmation.\n- NEVER modify any state artifact. Hej is strictly read-only.\n- NEVER route to a capability without the user's consent. Suggest, don't force.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: emit \u0060⌂ hej · <status>\u0060 on its own line below the dashboard's closing code fence, followed by a one-sentence summary of what was delivered. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a \u0060▸\u0060 (VT15) bullet below the summary identifying what the user needs to decide or act on next. The exit marker is mandatory and uses hej's canonical glyph \u0060⌂\u0060 (SG1, U+2302).\n\n- **complete** (EX1): Briefing delivered (or welcome shown) and user successfully routed to a capability.\n- **flagged** (EX2): Briefing delivered but critical attention items were found: critical issues, degrading health, loop stop-condition triggers. Each concern is listed explicitly.\n- **stuck** (EX3): Cannot orient: the working directory is not a code project, no readable files exist, or permissions prevent scanning.\n- **waiting** (EX4): Briefing or welcome delivered, suggestion made, awaiting user input on which direction to take.\n\n---\n\n## Cross-capability integration\n\nHej is the suite entry point. It reads other capabilities' artifacts, produces\nno artifact, and outputs only a briefing plus routing suggestion.\n"`);
|
|
5
|
+
export default instructions;
|
|
6
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/hej/instructions.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,8ioBAA8ioB,CAAC,CAAC;AACzmoB,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Capability instruction barrel (D65).
|
|
2
|
+
// Re-exports each capability's prose constant as a named export plus a
|
|
3
|
+
// CAPABILITY_INSTRUCTIONS lookup keyed by capability name. The CLI loader
|
|
4
|
+
// imports this barrel from `../capabilities/index.js` so source-mode (vitest)
|
|
5
|
+
// and dist-mode (npm install) resolve the same path.
|
|
6
|
+
import { instructions as hejInstructions } from "./hej/instructions.js";
|
|
7
|
+
import { instructions as visioneraInstructions } from "./visionera/instructions.js";
|
|
8
|
+
import { instructions as resoneraInstructions } from "./resonera/instructions.js";
|
|
9
|
+
import { instructions as inspireraInstructions } from "./inspirera/instructions.js";
|
|
10
|
+
import { instructions as planeraInstructions } from "./planera/instructions.js";
|
|
11
|
+
import { instructions as realiseraInstructions } from "./realisera/instructions.js";
|
|
12
|
+
import { instructions as optimeraInstructions } from "./optimera/instructions.js";
|
|
13
|
+
import { instructions as inspekteraInstructions } from "./inspektera/instructions.js";
|
|
14
|
+
import { instructions as dokumenteraInstructions } from "./dokumentera/instructions.js";
|
|
15
|
+
import { instructions as profileraInstructions } from "./profilera/instructions.js";
|
|
16
|
+
import { instructions as visualiseraInstructions } from "./visualisera/instructions.js";
|
|
17
|
+
import { instructions as orkestreraInstructions } from "./orkestrera/instructions.js";
|
|
18
|
+
export const CAPABILITY_INSTRUCTIONS = {
|
|
19
|
+
hej: hejInstructions,
|
|
20
|
+
visionera: visioneraInstructions,
|
|
21
|
+
resonera: resoneraInstructions,
|
|
22
|
+
inspirera: inspireraInstructions,
|
|
23
|
+
planera: planeraInstructions,
|
|
24
|
+
realisera: realiseraInstructions,
|
|
25
|
+
optimera: optimeraInstructions,
|
|
26
|
+
inspektera: inspekteraInstructions,
|
|
27
|
+
dokumentera: dokumenteraInstructions,
|
|
28
|
+
profilera: profileraInstructions,
|
|
29
|
+
visualisera: visualiseraInstructions,
|
|
30
|
+
orkestrera: orkestreraInstructions,
|
|
31
|
+
};
|
|
32
|
+
export function capabilityInstructionModulePath(capability) {
|
|
33
|
+
return `packages/cli/src/capabilities/${capability}/instructions.ts`;
|
|
34
|
+
}
|
|
35
|
+
export function capabilityStartupCommand(capability) {
|
|
36
|
+
return `agentera prime --context ${capability} --format json`;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,uEA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AC,UAAkB;IAChE,OAAO,iCAAiC,UAAU,kBAAkB,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,UAAkB;IACzD,OAAO,4BAA4B,UAAU,gBAAgB,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Source: skills/agentera/capabilities/inspektera/instructions.md (relocated D65)
|
|
2
|
+
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
|
+
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
+
export const instructions = JSON.parse(String.raw `"# INSPEKTERA\n\n**Integrity Navigation: Systematic Pattern Evaluation, Knowledge Tracing. Examine, Report, Advise.**\n\nCodebase health audit: multi-dimensional structural quality evaluation with evidence-based findings, confidence scores, and trajectory tracking. The retrospective counterpart to realisera's forward motion: is the codebase getting better or just bigger?\n\nEach invocation = one audit. Findings feed realisera's work selection via TODO.md. Skill introduction: \u0060─── ⛶ inspektera · audit ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **⛶** (protocol ref: SG3). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne file in \u0060.agentera/\u0060, bootstrapped if absent.\n\n| File | Purpose | Bootstrap |\n|------|---------|-----------|\n| \u0060HEALTH.md\u0060 | Canonical health artifact, stored as \u0060.agentera/health.yaml\u0060 unless mapped otherwise. Findings, dimension grades, trajectory. | First audit entry in YAML form. |\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060health\u0060 to locate the active installed schema; do not search Agentera directories manually. Existing health artifacts provide repository-local examples of the shape.\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, check if \u0060.agentera/docs.yaml\u0060 exists. If it has an Artifact Mapping section, use the path specified for each canonical filename. If \u0060.agentera/docs.yaml\u0060 doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at \u0060.agentera/vision.yaml\u0060; other agent-facing artifacts at \u0060.agentera/*.yaml\u0060. This applies to all artifact references in this capability, including cross-capability reads (VISION.md, \u0060.agentera/decisions.yaml\u0060, TODO.md, \u0060.agentera/progress.yaml\u0060).\n\n### Contract\n\nBefore starting, read \u0060references/contract.md\u0060 (at v2 skill location \u0060skills/agentera/references/contract.md\u0060) for authoritative values: token budgets, severity levels, format contracts, and other shared conventions referenced in the steps below. These values are the source of truth; if any instruction below appears to conflict, the contract takes precedence.\n\n### health.yaml\n\nOpen with your read on the codebase before the structured data: what's improving, what's sliding, what surprised you. 1-2 sentences of interpretation, then the grades and findings back it up. The colleague says what they think, then shows the evidence.\n\n\u0060\u0060\u0060yaml\naudits:\n - number: 1\n date: YYYY-MM-DD\n dimensions: [architecture_alignment, test_health]\n findings_summary: \"X critical, Y warnings, Z info\"\n overall: stable\n dimension_grades:\n - dimension: architecture_alignment\n grade: B\n findings:\n - severity: degraded\n title: Finding title\n confidence: 80\n location: file:line\n evidence: What was observed.\n impact: Why this matters.\n suggested_action: Specific fix or investigation.\n trends: What improved, degraded, or changed.\n patterns_observed: De facto architecture patterns.\n\u0060\u0060\u0060\n\n---\n\nStep markers: display \u0060── step N/7: verb\u0060 before each step.\nSteps: orient, select, assess, distill, audit, report, connect.\n\n### Evidence context startup\n\nBefore Step 1, start evaluation state gathering with:\n\n\u0060\u0060\u0060bash\nagentera prime --context inspektera --format json\n\u0060\u0060\u0060\n\nUse the returned \u0060evidence_context\u0060 before raw plan, progress, docs, health, TODO, or decisions artifacts. If \u0060evidence_context.source_contract.complete_for_evidence_context\u0060 is true, do not read raw PLAN, PROGRESS, DOCS, HEALTH, TODO, or DECISIONS artifacts merely to reconstruct evaluation target, plan criteria, progress verification, docs state, health state, TODO state, protected-state checks, version checks, residual risks, fallback commands, caveats, provenance, or non-empty evidence flags.\n\nIf \u0060evidence_context\u0060 is absent, incomplete, or caveated for a state family you need, run the listed \u0060evidence_context.fallback_commands\u0060 first. If those are unavailable, use \u0060capability_context.state.fallback_commands\u0060 from the same prime response. Raw artifact reads are last-resort diagnostics after listed CLI fallbacks, not normal evaluation startup behavior.\n\nPreserve caveats from \u0060evidence_context.state_family_caveats\u0060, \u0060evidence_context.residual_risks.attributed_items\u0060, \u0060decision_context.caveats\u0060, \u0060protected_state_checks.caveats\u0060, and \u0060version_checks.caveats\u0060 when reporting evaluation results. Do not hide, flatten, or reconstruct stale app/profile state, compacted decisions, protected-state boundaries, unavailable version evidence, absent publication or remote evidence, manual-check states, or residual risks. These caveats calibrate confidence; they are not approval to refresh installed apps, refresh profile state, read or edit \u0060.agentera/vision.yaml\u0060, read or edit objective state, contact remotes or registries, or invent missing history.\n\n### Decision satisfaction authority\n\nWhen an audit touches decision satisfaction, agents may mark provisional\nsatisfaction with evidence only. Inspektera must not mark, infer, or\nuser-confirm final satisfaction; only the user confirms final satisfaction. If\ndecisions are compacted, missing satisfaction state, open, provisional, or\nreview-needed, preserve the caveat and review pressure in findings and residual\nrisks instead of reconstructing hidden outcomes or claiming automation proved\nintent.\n\n## Step 1: Orient\n\nUse complete \u0060evidence_context\u0060 first for the evaluated target, current plan criteria, latest progress verification, docs state, health state, TODO state, decision caveats, protected-state checks, version checks, and residual risks. Only run listed CLI fallbacks before raw artifact reads when the context is incomplete for the state needed.\n\n1. **Health state**: use \u0060evidence_context.health_state\u0060 for prior audit findings, grades, current-state status, and caveats.\n2. **Protected-state boundary**: use \u0060evidence_context.protected_state_checks\u0060 and preserve any not-checked-by-design caveats instead of reading protected state.\n3. **Decision context**: use \u0060evidence_context.decision_context\u0060 for decision caveats. Findings contradicting deliberate decisions are not findings.\n4. **TODO state**: use \u0060evidence_context.todo_state\u0060 for known problems. Don't re-report unless worsened.\n5. **Progress verification**: use \u0060evidence_context.progress_verification\u0060 for recent-cycle verification and caveats.\n5b. **Change magnitude**: run \u0060git log --stat\u0060 on commits since the last health audit timestamp to estimate total change volume. If the audit timestamp is unavailable, skip; default depth applies.\n5c. **Plan context** (for artifact current-state review): use \u0060evidence_context.evaluation_target\u0060 and \u0060evidence_context.plan_criteria\u0060 for the plan-relative baseline. If the evidence context reports no target, missing criteria, or missing current-state baseline, preserve that caveat; do not reconstruct it from raw plan state during normal startup.\n6. **Decision profile**: use profile/app caveats already attributed in \u0060evidence_context.residual_risks\u0060; stale or unavailable profile state calibrates confidence but is not approval to refresh profile state or read profile directly during startup.\n7. **Project discovery**: map directory structure, read dependency manifests, README, CLAUDE.md, AGENTS.md, identify language/stack/build commands, \u0060git log --oneline -20\u0060\n\nBefore proceeding: in your response, list the key structural facts (module boundaries, dependency patterns, test coverage gaps) you observed. These survive context compaction.\n\n**Exit-early stop condition**: If \u0060git diff\u0060 since the last \u0060evidence_context.health_state\u0060 audit timestamp shows no file changes, report exit signal \u0060complete: no changes since last audit\u0060 and stop.\n\n---\n\n## Step 2: Select dimensions\n\nChoose dimensions based on the codebase and user request. Not every dimension applies; a 200-line CLI doesn't need the same audit as a monorepo.\n\n### Available dimensions\n\n| Dimension | What it evaluates | When to include |\n|-----------|-------------------|-----------------|\n| **Architecture alignment** | Does the code match the stated architecture? Pattern mismatches, module boundary violations, layering breaks. | VISION.md or README describes architecture |\n| **Pattern consistency** | Are patterns used consistently? Naming, error handling, structure, abstractions. | Any codebase with 5+ modules or files |\n| **Coupling health** | Hidden dependencies, circular imports, god modules, inappropriate intimacy. | Any codebase with multiple modules |\n| **Complexity hotspots** | Functions too long, deeply nested, high fan-out, accumulated conditionals. | Any codebase |\n| **Test health** | Coverage gaps, test quality, test-to-code ratio, tests testing behavior vs implementation. | Project has tests |\n| **Dependency health** | Outdated deps, security advisories, unused deps, dep sprawl, pinning discipline. | Project has external dependencies |\n| **Version health** | Unreleased significant changes: \u0060feat\u0060/\u0060fix\u0060 commits since the last version bump. | DOCS.md has a \u0060versioning\u0060 convention block |\n| **Artifact freshness** | Are state artifacts current relative to plan activity or recent development? Protected health dimension label; current prose should call the work artifact current-state review. Detects artifacts that should have been updated but weren't. | Plan context available (PLAN.md with \u0060Created\u0060 date) or PROGRESS.md has entries |\n| **Prose health** | Do artifact entries respect the writing rules? Checks verbosity overruns, abstraction creep, and filler accumulation across all project artifacts. | Project has 3+ artifact files |\n| **Security hygiene** | Hardcoded secrets, dangerous function calls, basic injection patterns. Lightweight regex-based scan, not a replacement for dedicated security tooling. | Any codebase |\n\n### Depth guidance\n\nWhen change magnitude was derived in Step 1, apply advisory depth scaling:\n\n- **Light changes** (roughly ≤5 files, ≤200 lines since last audit): prioritize dimensions most relevant to the changed areas. Skip dimensions with no intersection.\n- **Standard changes** (default): assess all applicable dimensions at normal depth.\n- **Heavy changes** (roughly ≥20 files or architectural-scope commits): assess all applicable dimensions and increase evidence collection depth. Read more files per dimension, trace more dependency paths, check more edge cases.\n\nThese thresholds are guidelines, not hard rules. Use judgment: a 6-file change touching a critical security module warrants thorough depth, while a 25-file rename is light.\n\n**User specified dimensions**: audit only those.\n**Full audit or unspecified**: auto-select all applicable. Report selections before proceeding.\n\n---\n\n## Step 3: Assess\n\nLead the assessment with your overall interpretation: what stands out, what's changed, where attention should go. Then the per-dimension breakdown provides the evidence.\n\nLaunch parallel agents, one per dimension. Each receives the dimension definition, language-specific commands from \u0060references/audit-commands.md\u0060 (at v2 skill location \u0060skills/agentera/references/audit-commands.md\u0060), relevant context files, the confidence scoring rubric, and instructions to return structured findings.\n\n**Before deep analysis**: run the quick checklist for a rapid pass/fail sweep. Dimensions passing all items can be audited at lower priority.\n\n\u0060\u0060\u0060\nYou are auditing the [dimension] health of [project].\n\n## What to evaluate\n[Dimension-specific instructions from below]\n\n## Evidence standard\nEvery finding MUST include:\n- Specific file and line references\n- Quoted code showing the issue\n- Explanation of why it matters\n- Confidence score (0-100)\n\n### Citation standard (WARN and FAIL findings)\nEvery warning or critical finding MUST carry a reproducible anchor:\n- **Health audit findings**: \u0060location: <file>:<line>\u0060 in health.yaml (or \u0060not-applicable: <reason>\u0060 when no file anchor exists)\n- **Orkestrera evaluation reports**: \u0060citation: <file>:<line>\u0060 per row (schema: \u0060agentera.inspekteraEvaluationReport.v1\u0060 in \u0060references/cli/capability-instruction-contract.yaml#evaluator_handoff\u0060)\n- **WARN rows with file:line citations**: include \u0060verify_command\u0060 with the exact \u0060grep\u0060 or \u0060git show\u0060 invocation that reproduces the evidence at the cited line when re-run\n\nProse-only evidence for WARN/FAIL findings is incomplete. The orchestrator treats missing or invalid citations as evaluation failures.\n\n## Presenting findings\nIntroduce each finding conversationally before the structured evidence. The colleague\nsays \"hey, I noticed this\" instead of just dumping a finding card. Lead with why it caught your eye and what it means, then back it up with the evidence block.\n\n## Confidence scoring (protocol: CS1-CS5)\n- 90-100 (CS1): Definitely a real issue. Verified by reading the code. Clear impact.\n- 70-89 (CS2): Very likely a real issue. Strong evidence, but some context might justify it.\n- 50-69 (CS3): Possibly an issue. The pattern is suspicious but could be intentional.\n- 30-49 (CS4): Uncertain. Might be an issue, might be a reasonable tradeoff.\n- 0-29 (CS5): Speculative. Flagging it but wouldn't be surprised if it's fine.\n\n## What is NOT a finding\n- Pre-existing patterns that are consistent and deliberate\n- Things a linter or type checker would catch (assume CI handles those)\n- Subjective style preferences not grounded in stated project principles\n- Known issues already tracked in TODO.md\n- Intentional decisions documented in DECISIONS.md\n\u0060\u0060\u0060\n\n### Architecture alignment\n\nCompare codebase to stated architecture:\n\n- Read VISION.md (or README.md architecture section) for intended structure\n- Map actual module boundaries, dependency graph, data flow\n- Identify mismatches from stated architecture\n- Check layering and boundary cleanliness\n- Extract \"Patterns Observed\": de facto architecture independent of documentation\n\nNo documented architecture? Extract and report de facto; note absence as a finding.\n\n### Pattern consistency\n\nCheck consistency across the codebase:\n\n- Error handling (returns vs throws vs error types)\n- Naming (singular vs plural, prefixes, casing)\n- Module structure and layout similarity\n- Competing abstractions for the same concept\n- Duplicated logic that should be shared\n- Config handling (env vars vs files vs flags)\n\nFocus on inconsistencies between similar things, not whether the chosen pattern is \"best.\"\n\n### Coupling health\n\nEvaluate coupling and dependency structure:\n\n- Map import graphs, identify circular dependencies\n- Find god modules (too many dependents or dependencies)\n- Check for inappropriate intimacy (reaching into internals)\n- Evaluate interface width: narrow boundaries or exposing everything?\n- Check hidden coupling via shared mutable state, global config, side effects\n\nUse language tools (\u0060go list\u0060, \u0060madge\u0060, import analysis). If unavailable, trace imports manually on highest-risk modules.\n\n### Complexity hotspots\n\nFind accumulating complexity:\n\n- Long functions (generally 50+ lines), deep nesting (3+ levels)\n- High fan-out, growing switch/match statements, many parameters (5+)\n- Files growing cycle over cycle (check git history)\n\nPrioritize high-change files: frequently modified + complex = high risk.\n\n### Test health\n\nEvaluate test suite quality and coverage:\n\n- Run coverage tools if available, otherwise estimate from file analysis\n- Identify critical paths with no coverage\n- Check: testing behavior or implementation? Excessive mocking? Brittle assertions?\n- Evaluate test naming: can you understand what failed from the name alone?\n- Check test-to-code ratio per major module\n- Check test proportionality against contract: default is one pass + one fail per testable unit. Flag under-testing and over-testing.\n\nDon't just report a number. Identify the *highest-risk* coverage gaps.\n\n### Dependency health\n\nEvaluate dependency management:\n\n- Outdated deps (package manager audit/outdated commands)\n- Known security vulnerabilities (npm audit, safety check, govulncheck)\n- Unused deps (installed but not imported)\n- Dep sprawl relative to project scope\n- Pinning discipline (pinned or floating?)\n- Vendored vs remote consistency\n\n### Version health\n\nOnly run this dimension if DOCS.md exists and contains a \u0060versioning\u0060 convention block. Skip entirely if the convention is absent.\n\n- Read DOCS.md \u0060Conventions.versioning\u0060 to identify the version file(s) and bump trigger rules\n- Run \u0060git log --oneline\u0060 to find \u0060feat\u0060 and \u0060fix\u0060 commits since the last modification date of the version file(s)\n- Count unbumped \u0060feat\u0060/\u0060fix\u0060 commits and note the age of the oldest one\n- Severity: warning (SF2) if 1-4 unbumped commits or age ≤ 7 days; critical (SF1) if 5+ unbumped commits or age > 7 days\n- If no \u0060feat\u0060/\u0060fix\u0060 commits have landed since the last bump, this dimension is healthy with no finding\n\n### Artifact current-state review\n\nEvaluates whether state artifacts are current relative to plan activity or recent development. The persisted health dimension label remains \u0060Artifact freshness\u0060; current prose should call the work artifact current-state review. Uses the staleness convention from contract.\n\n**With plan context** (PLAN.md has a created date and task execution history):\n\n- Read the plan's \u0060Created\u0060 date from its HTML comment metadata\n- Identify which capabilities were dispatched during the plan by scanning task entries and PROGRESS.md cycle logs\n- For each dispatched capability, look up its expected artifacts in the contract staleness detection mapping\n- Check each expected artifact's last modification date: \u0060git log -1 --format=%aI -- <path>\u0060\n- An artifact is **stale** if its last modification predates the plan's creation date AND the capability that owns it was dispatched at least once during the plan\n- Severity: warning (SF2, confidence 70+). Plan-relative staleness carries causal evidence.\n- Artifacts that a capability reads but does not produce are not staleness candidates\n\n**Without plan context** (no PLAN.md, or PLAN.md has no created date):\n\n- Fall back to PROGRESS.md recency: an artifact is potentially stale if it was not modified since the most recent PROGRESS.md cycle entry date\n- If PROGRESS.md has no entries (fresh project), no staleness check applies\n- Severity: info (SF3, confidence 50-60). The fallback is advisory, not authoritative.\n\n**Handling**: stale artifact findings are reported like any other dimension finding but noted as context for the next plan cycle, not as blocking errors.\n\n### Prose health\n\nEvaluate artifact prose quality against the three Self-Audit Protocol rules. Use routine CLI state first for artifact-backed context, including \u0060agentera decisions --format json\u0060 for DECISIONS.md. Preserve returned decision \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure; raw decision artifact reads are for artifact-quality inspection, corruption diagnostics, or CLI defects, not normal post-CLI context recovery. Read all project artifacts (PROGRESS.md, DECISIONS.md, PLAN.md, HEALTH.md, TODO.md, CHANGELOG.md, VISION.md, DESIGN.md, DOCS.md) and check each entry when the prose-health audit explicitly requires raw artifact prose.\n\n**Rule 1: Verbosity overrun**: approximate word count per entry. Compare against per-entry budgets. Entries exceeding their budget by 50%+ are findings.\n\n**Rule 2: Abstraction creep**: scan each entry for ≥1 concrete anchor (file path with extension, line number, commit hash with 7+ hex chars, metric value with unit, identifier such as function/class/variable name, direct quote in quotes attributed to a source). Entries with zero concrete anchors are findings.\n\n**Rule 3: Filler accumulation**: scan each entry against banned verbosity patterns. Flag entries containing: meta-commentary about writing, hedging qualifiers, redundant transitions, self-referential process narration, filler introductions, summary preambles, excessive justification.\n\n### Security hygiene\n\nLightweight regex-based scan for common security anti-patterns. This is a surface-level check, not a replacement for dedicated security analysis. Always recommend specialized tools for comprehensive coverage.\n\n**What to scan**:\n\n- **Hardcoded secrets**: API key patterns, password assignments, token strings in source, private keys in files\n- **Dangerous function calls**: \u0060eval()\u0060 on variables or user input, \u0060exec()\u0060 with string concatenation, subprocess/os.system with unsanitized input\n- **Basic injection patterns**: SQL string concatenation, unsanitized shell command construction\n\n**How to scan**: Use Grep with targeted patterns across the codebase. Focus on source files, not vendored dependencies, build artifacts, or lock files. Exclude \u0060.git/\u0060, \u0060node_modules/\u0060, \u0060vendor/\u0060, \u0060__pycache__/\u0060, and similar directories.\n\n**Severity assignment**:\n\n- Hardcoded secrets: warning (SF2, confidence 75-90)\n- Dangerous function calls: warning (SF2) or critical (SF1) depending on user input flow\n- Injection patterns: warning (SF2, confidence 60-80)\n\n**Scope limitation notice**: every security hygiene finding MUST include a footer recommending dedicated security tools for comprehensive analysis.\n\n---\n\n## Step 4: Distill\n\nAfter all agents complete:\n\n1. **Filter**: discard findings below 50 confidence. Mark 50-69 as \"info\" (SF3) regardless of apparent severity.\n2. **Deduplicate**: merge by preference: (1) fullest context, (2) most evidence-rich dimension, (3) most recent. Preserve complementary evidence from discarded findings.\n3. **Cross-reference** against DECISIONS.md and TODO.md using \u0060agentera decisions --format json\u0060 for normal decision context:\n - Matches known decision → discard or downgrade to info (SF3)\n - Matches known issue → \"already tracked\", skip\n - Genuinely new → include at full severity\n4. **Grade** each dimension:\n - **A**: No critical/warning findings. **B**: No critical, some warnings.\n - **C**: 1-2 critical or many warnings. **D**: Multiple critical.\n - **F**: Pervasive critical findings.\n5. **Trajectory**: compare to prior HEALTH.md: improved (VT12), degraded (VT13), stable dimensions. Calculate overall trajectory.\n\n---\n\n## Step 5: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns table).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n---\n\n## Step 6: Report\n\nAssess each dimension in your response. Write ONLY grade, trajectory marker, and finding summary per dimension to HEALTH.md. No reasoning in the artifact; the conversation preserves analysis, the artifact preserves conclusions.\n\nOutput constraint per contract token budgets. Letter grade + ≤3 sentences justification per dimension.\n\nWhen updating existing HEALTH.md entries (e.g., updating patterns observed), edit the specific YAML entry rather than rewriting unrelated history. Append new audit entries.\n\nWrite the audit results to \u0060HEALTH.md\u0060 using its resolved YAML path (append new audit, keep prior audits for trajectory history) and present to the user.\n\nAfter writing a new audit entry to HEALTH.md, apply the schema COMPACTION rules before writing if thresholds are exceeded: keep 10 full audits, keep up to 40 one-line archive entries, and drop beyond 50 total.\n\nArtifact writing follows contract Artifact Writing Conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n### Report structure\n\n\u0060\u0060\u0060markdown\n## Audit N · YYYY-MM-DD\n\n**Dimensions assessed**: [list]\n**Findings**: X critical, Y warnings, Z info (N filtered by confidence)\n**Overall trajectory**: ⮉ improving | stable | ⮋ degrading vs Audit N-1\n**Grades**: Architecture [B] | Patterns [A] | Coupling [C] | Complexity [B] | Tests [D] | Deps [A] | Security [A]\n\n### [Dimension Name]: [Grade]\n\n#### ⇶ [Finding title], critical (confidence: N/100)\n#### ⇉ [Finding title], warning (confidence: N/100)\n#### ⇢ [Finding title], info (confidence: N/100)\n- **Location**: \u0060file:line\u0060 (or module/package)\n- **Evidence**: [quoted code or structural observation]\n- **Impact**: [what breaks, degrades, or risks]\n- **Suggested action**: [specific fix, investigation, or refactor]\n\n[Repeat for each finding, ordered by severity then confidence]\n\n### Trends vs Audit N-1\n- **Improved**: [what got better and why]\n- **Degraded**: [what got worse and why]\n- **New findings**: [issues not present in prior audit]\n- **Resolved**: [prior findings no longer present]\n\n### Patterns Observed\n[De facto architecture patterns extracted, the \"what IS\" independent of what's stated.]\n- Module structure: [how code is organized]\n- Error handling: [predominant pattern]\n- Testing approach: [how tests are structured]\n- Dependency patterns: [how deps are managed]\n\u0060\u0060\u0060\n\n---\n\n## Step 7: Connect\n\nFeed actionable findings into the suite:\n\n1. **TODO.md**: for each critical finding not already tracked, offer to add under the appropriate severity section.\n Severity mapping (protocol: SM1-SM3): critical (SF1) → \u0060## ⇶ Critical\u0060 (SI1), warning (SF2) → \u0060## ⇉ Degraded\u0060 (SI2), info (SF3) → \u0060## ⇢ Annoying\u0060 (SI4). Each entry is a checkbox line: \u0060- [ ] [finding description]\u0060. Get user confirmation before writing.\n Output constraint per contract token budgets.\n2. **VISION.md**: if architecture has intentionally evolved past stated architecture, suggest updating via ❈ resonera.\n3. **Present findings** and ask if the user wants to: file to TODO.md, deliberate via ❈ resonera, deep-dive on a dimension, or investigate a specific finding.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER modify code. Inspektera audits; other capabilities fix.\n- NEVER file issues to TODO.md without explicit user confirmation.\n- NEVER present speculative findings (confidence < 50) as definitive problems.\n- NEVER ignore DECISIONS.md context. If a finding contradicts a deliberate decision,\n it is not a finding but an implementation of that decision. Discard or downgrade.\n- NEVER report known issues already tracked in TODO.md as new findings.\n- NEVER flag subjective style preferences as findings unless they violate stated principles\n in VISION.md, CLAUDE.md, or the decision profile.\n- NEVER run destructive commands or install packages. Read-only assessment.\n\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060─── ⛶ inspektera · status ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 bullet details below the summary.\n\n- **complete** (EX1): All selected audit dimensions were assessed, findings were synthesized, grades were assigned, HEALTH.md was updated, and the user was presented with actionable results.\n- **flagged** (EX2): The audit completed but with notable caveats: one or more dimensions had to be skipped due to missing tooling, confidence was too low to grade a dimension reliably, or critical findings were discovered that require urgent attention beyond the audit scope.\n- **stuck** (EX3): Cannot complete the audit because the project is inaccessible, required language tooling is unavailable and manual analysis is not feasible, or filing findings to TODO.md was declined by the user and the results cannot be safely surfaced any other way.\n- **waiting** (EX4): The audit target is ambiguous: no project was identified, the codebase is too incomplete to assess meaningfully, or the user's request specifies dimensions that cannot be evaluated without additional information.\n\n---\n\n## Cross-capability integration\n\nInspektera is part of a twelve-capability suite. It is the feedback loop, the capability that tells realisera whether its work is making things better.\n\n### Inspektera feeds ⧉ realisera\n\nCritical and warning findings filed to TODO.md become candidates for realisera's work selection. The severity mapping ensures structural problems compete fairly with feature work. The \"Patterns Observed\" section helps realisera understand the codebase's de facto architecture when planning changes.\n\n### Inspektera feeds ❈ resonera\n\nWhen the audit reveals an architecture mismatch, suggest ❈ resonera before fixes begin.\n\nUse it when code has moved past stated architecture or competing patterns need a decision.\n\n### Inspektera feeds ≡ planera\n\nWhen the audit reveals multiple related structural issues, suggest ≡ planera to create a remediation plan. The plan's acceptance criteria give inspektera concrete targets to verify in the next audit.\n\n### Inspektera feeds ⎘ optimera\n\nWhen a dimension grade is poor and the improvement is measurable (test coverage, dependency count, complexity score), the finding can become an optimization objective. Suggest ⎘ optimera when the metric and direction are clear.\n\n### Inspektera reads ⧉ realisera output\n\nPROGRESS.md tells inspektera what was built recently. Recent changes are higher-priority audit targets because they're the most likely source of regressions or pattern breaks. Cycle count since last audit signals when a health check is overdue.\n\n### Inspektera reads ❈ resonera output\n\nDECISIONS.md explains why things are the way they are. Findings that contradict deliberate decisions are not findings. This prevents inspektera from flagging intentional tradeoffs as problems.\n\n### Inspektera reads ◰ visualisera output\n\nDESIGN.md provides visual identity constraints that inspektera can audit for consistency, checking whether the codebase respects the declared design tokens and patterns.\n\n### Inspektera is informed by ♾ profilera\n\nThe decision profile calibrates what \"healthy\" means for this user. A user who values simplicity over flexibility will have different complexity thresholds than one who values extensibility. High-confidence quality preferences from the profile weight the grading.\n\n---\n\n## Getting started\n\n### First audit\n\n1. \u0060/agentera audit\u0060: runs a full audit across all applicable dimensions, bootstraps HEALTH.md\n2. Review findings, file critical ones to TODO.md\n3. \u0060/agentera build\u0060: next cycle picks up the filed issues and starts fixing\n\n### Periodic health checks\n\nRun ⛶ inspektera every 5-10 realisera cycles, or when:\n\n- A major feature was added\n- Significant refactoring occurred\n- The codebase \"feels\" harder to work in\n- Before a major architectural decision (to understand current state)\n\nHej mirrors this cadence through hybrid audit staleness: \u0060agentera hej\u0060 marks a health audit stale when days since the latest audit date reach \u0060AGENTERA_INSPEKTERA_MAX_AGE_DAYS\u0060 (default 30) or progress cycles after that audit date reach \u0060AGENTERA_INSPEKTERA_MAX_CYCLES\u0060 (default 10). Either axis exceeding its threshold is enough; when progress is absent, time-only evaluation still applies.\n\n### Targeted audits\n\n\u0060\u0060\u0060\n/agentera audit architecture coupling\n\u0060\u0060\u0060\n\nSpecify dimensions to narrow the audit scope. Useful after specific kinds of changes.\n\n### After an audit\n\n- **Good grades (A/B)**: Celebrate. Keep building.\n- **Mixed grades (C)**: File the critical findings, deliberate on the warnings.\n- **Poor grades (D/F)**: Consider pausing feature work. Use ❈ resonera to deliberate on priorities, then ⧉ realisera to fix the structural problems before building more.\n"`);
|
|
5
|
+
export default instructions;
|
|
6
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/inspektera/instructions.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,03gCAA03gC,CAAC,CAAC;AACr7gC,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Source: skills/agentera/capabilities/inspirera/instructions.md (relocated D65)
|
|
2
|
+
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
|
+
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
+
export const instructions = JSON.parse(String.raw `"# INSPIRERA\n\n**Insight Navigation: Source Pattern Identification and Resonance. Evaluate, Reframe, Assimilate**\n\nAnalyze an external resource and map its ideas to a target project. Output a structured markdown analysis the user can navigate and act on.\n\nSkill introduction: \u0060─── ⬚ inspirera · analysis ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **⬚** (protocol ref: SG10). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nNo dedicated state file. Writes to other capabilities' artifacts.\n\n| Artifact | Purpose | Path |\n|----------|---------|------|\n| TODO.md | File actionable findings for realisera (severity per protocol SF1-SF3) | \u0060TODO.md\u0060 (per DOCS.md mapping) |\n| VISION.md | Refine direction when inspiration shifts thinking | \u0060VISION.md\u0060 (per DOCS.md mapping) |\n| PROFILE.md | Decision profile for persona-grounded applicability judgments | \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 (global, not project-scoped) |\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, check if .agentera/docs.yaml exists. If it has an Artifact Mapping section, use the path specified for each canonical filename (TODO.md, VISION.md, etc.). If .agentera/docs.yaml doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at .agentera/vision.yaml; other agent-facing artifacts at .agentera/*.yaml. This applies to all artifact references in this capability, including cross-capability writes (TODO.md, VISION.md).\n\nPROFILE.md is global, not project-scoped. Its path is determined by profilera: \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060). Check the profilera-determined path directly rather than falling back to the project root.\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: confidence tokens VT9-VT11 (━/─/┄), list item VT15 (▸), inline separator VT16 (·), section divider VT14. Skill glyph SG10 for exit markers. Exit signals EX1-EX4 for status reporting. Severity finding levels SF1-SF3 for TODO.md entries.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference for ambiguous cases or cross-checking.\n\n---\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: identify, read, explore, map, deliver.\n\n---\n\n## Step 1: Identify source and target\n\nFrom the user's message, extract:\n\n- **Source**: the external URL (GitHub repo, article, docs, HN thread, etc.)\n- **Target**: the user's project, which could be any of:\n - A **GitHub repo URL** → explore via the optional GitHub MCP integration\n - A **local path** or project name → explore via filesystem tools\n - The **current working directory** → if the user says \"my project\" / \"what I'm building\" without a URL, and they're clearly working in a project, treat cwd as the target\n - **Absent** → if truly no target is implied, skip Steps 3–4 and do source-only analysis\n\n---\n\n## Step 2: Read the source\n\nThis should feel like a colleague diving into something interesting, genuinely curious, reading deeply, forming opinions as you go. Not a report generator collecting data points.\n\n### GitHub repos\n\nUse the optional GitHub MCP integration to explore deeply:\n\n1. List root directory structure\n2. Read README\n3. Read key source directories until you understand: core abstractions, design patterns,\n notable primitives, dependencies, clever approaches worth borrowing\n\nGo deep and don't stop at the README. If the optional GitHub MCP integration\nreturns errors, fall back to public pages or note the limitation.\n\n### Articles, blog posts, docs pages\n\nFetch full content. Extract core thesis, named concepts/patterns, code samples, and referenced tools. If paywalled, try reader-mode variant; if that fails, note the limitation.\n\n### Hacker News threads\n\nRead both the linked article and top comments. HN comments often contain the most useful distillation. Treat as signal.\n\n### Known libraries\n\nFor well-known libraries, also check context7 for up-to-date docs beyond the README.\n\nBefore proceeding to target analysis: in your response, list the 3-5 most transferable concepts from the source. These survive if the source file reads are cleared.\n\n---\n\n## Step 3: Read the target project\n\nChoose the exploration strategy based on the target type identified in Step 1.\n\n### Local projects (current directory or local path)\n\nCommon case. Use filesystem tools (faster, includes uncommitted work):\n\n1. \u0060Glob\u0060 to map the directory structure (e.g. \u0060**/*.{ts,go,py,rs}\u0060)\n2. Read README.md if one exists\n3. Check dependency manifests (\u0060package.json\u0060, \u0060go.mod\u0060, \u0060Cargo.toml\u0060, \u0060pyproject.toml\u0060, etc.)\n4. \u0060Grep\u0060 for patterns, imports, or abstractions relevant to the source's concepts\n5. Read key source files to understand architecture and current patterns\n\n### Remote GitHub repos\n\nUse the optional GitHub MCP integration:\n\n1. List the root directory structure\n2. Read the README\n3. Read dependency manifests and key source files\n\n### Build understanding of\n\nLanguage, stack, dependencies, architecture, patterns, and problems being solved.\n\n### Check for existing usage\n\nDoes the target already use the source (or a fork/alternative)?\n\n- **Already using**: \"Getting the most out of it?\" Focus on underused features and better patterns.\n- **Using alternative**: \"Worth switching?\" Compare approaches and migration cost.\n- **Not using**: \"Should you adopt?\" This is the default framing.\n\n---\n\n## Step 4: Map concepts across\n\nWith both codebases understood, reason about applicability:\n\n- What is the source doing that the target should be?\n- Abstractions that simplify current complexity?\n- Patterns the target implements manually or poorly?\n- Primitives worth borrowing or adapting?\n- Source doing something the target does, but better?\n- Fundamentally incompatible? Say so clearly.\n- Adoption cost: one-file change or multi-sprint refactor?\n\n---\n\n## Step 5: Deliver the analysis\n\nThe sharp colleague, here to share what you dug up, not file a report. Open with your take before the structured sections: what excited you, what surprised you, what the user should care about most. \"Here's what I found and what matters for us.\" The structured analysis follows, but the human read comes first.\n\nWrite a **structured markdown analysis**:\n\n### Output format\n\n\u0060\u0060\u0060\u0060markdown\n# [Source Name] → [Target Name]: Cross-Pollination Analysis\n\n## TL;DR\nOne or two sentences. Is this worth pursuing? What's the strongest single takeaway?\n\n## Source Overview\nBrief summary of what the source does and its core design philosophy.\n\n## Key Concepts\n\n### [Concept Name]\nWhat it is, why it's interesting, and concretely where/how it applies to the target.\n\n### [Concept Name]\n...repeat for each significant concept (typically 2–5)\n\nReason through concept applicability in your response text. The Applicability Matrix below\nshould contain only conclusions, not reasoning chains.\nOutput constraint: ≤15 words per matrix cell.\n\n## Applicability Matrix\n\n| Concept | Relevance | Effort | Where in [Target] | Already Partially Done? |\n|---------|-----------|--------|-------------------|------------------------|\n| ... | High/Med/Low | Low/Med/High | specific module or file | Yes/No |\n\n## What Doesn't Apply\nHonest assessment of concepts/patterns that look interesting but don't fit, and why.\nBeing clear about what *not* to adopt is as valuable as the recommendations.\n\n## Recommended Next Steps\n▸ [action] · [specific file or module]\n▸ [action] · [specific file or module]\nOrdered by value/effort ratio.\n\u0060\u0060\u0060\u0060\n\n**Tone**: direct, technically fluent. Skip empty sections. Lead with highest signal.\n\nOffer to go deeper: prototype a change, explore a concept with code, compare alternatives.\n\n### No target given\n\nSurface transferable concepts in general terms. Skip Applicability Matrix. Ask if the user wants to map to a specific project.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER modify code in the target project. Inspirera analyzes; other capabilities implement.\n- NEVER write to TODO.md or VISION.md without explicit user confirmation. Present findings and get approval before filing.\n- NEVER present shallow analysis as deep insight. If you haven't read the source thoroughly, say so.\n- NEVER recommend adoption without assessing fit. Every recommendation must consider the target project's constraints, stack, and principles.\n- NEVER fabricate source content. Quote actual code and text from the source.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: emit \u0060⬚ inspirera · <status>\u0060 on its own line, followed by a one-sentence summary. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a ▸ (VT15) bullet below the summary identifying what needs attention. The exit marker uses inspirera's canonical glyph ⬚ (SG10, U+2B1A).\n\n- **complete** (EX1): Source was read deeply, target project was explored (if provided), concept mapping was completed, and a structured analysis with applicability matrix and recommended next steps was delivered.\n- **flagged** (EX2): Analysis completed but with limitations worth surfacing: the source was paywalled or truncated, the target project was inaccessible, or key concepts could not be fully assessed for fit (e.g., incompatible language or paradigm).\n- **stuck** (EX3): Cannot proceed because the source URL is inaccessible and no fallback content is available, or the target project specified does not exist and cannot be located.\n- **waiting** (EX4): The source link was not provided or is malformed, or the target project is genuinely ambiguous and neither the current directory nor context resolves it.\n\n---\n\n## Cross-capability integration\n\nInspirera is part of a twelve-capability suite. Its analysis feeds naturally into the other capabilities.\n\n### Feeding into realisera\n\nAdd actionable findings to the project's TODO.md, classifying each by severity per protocol SF1-SF3. Or refine VISION.md's direction if the inspiration shifts thinking. The next realisera cycle picks up the changes automatically.\n\n### Feeding into optimera\n\nWhen the source contains optimization techniques (performance patterns, algorithm improvements, caching strategies), optimera's Hypothesize step can draw on the analysis for its next experiment.\n\n### Informed by profilera\n\nIf a decision profile exists at \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060, read it directly and use effective confidence to weight applicability judgments. If PROFILE.md is missing, proceed without persona grounding.\n\n### Feeding into visionera\n\nWhen the analysis shifts thinking about the project's direction (a new paradigm, a competitor's approach, or a user need not yet captured), the findings can inform vision refinement. Suggest ⛥ visionera to revisit VISION.md with the new context.\n\n### Feeding into planera\n\nWhen the analysis recommends adopting patterns or libraries, planera can incorporate those recommendations into a plan's design section and task decomposition.\n\n### Feeding into resonera\n\nWhen the analysis surfaces recommendations that require deliberation (competing approaches, unclear adoption cost, or tradeoffs the user needs to resolve), suggest ❈ resonera to think it through before acting. Resonera can evaluate which recommendations are actually worth adopting and capture the reasoning in DECISIONS.md.\n\n---\n\n## Getting started\n\n### Analyze a GitHub repo\n\n\u0060\u0060\u0060\n/agentera research https://github.com/org/repo\n\u0060\u0060\u0060\n\nReads the repo, maps its patterns to your current project.\n\n### Analyze an article or docs page\n\n\u0060\u0060\u0060\n/agentera research https://example.com/blog/interesting-approach\n\u0060\u0060\u0060\n\nExtracts transferable concepts and assesses applicability.\n\n### Feed findings into the development loop\n\nAfter analysis, file actionable findings to TODO.md for ⧉ realisera to pick up, or refine VISION.md if the research shifts your project's direction.\n\n---\n\n## Notes on depth vs. speed\n\n- Read more files, not fewer. Shallow reads produce shallow analysis.\n- Large repos: focus on modules most relevant to the concept, not everything.\n- Explore source and target concurrently where possible.\n- Always use the optional GitHub MCP integration for GitHub URLs.\n"`);
|
|
5
|
+
export default instructions;
|
|
6
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/inspirera/instructions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,8kZAA8kZ,CAAC,CAAC;AACzoZ,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Source: skills/agentera/capabilities/optimera/instructions.md (relocated D65)
|
|
2
|
+
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
|
+
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
+
export const instructions = JSON.parse(String.raw `"# OPTIMERA\n\n**Objective Pursuit: Targeted Iterative Measurement. Experiment, Record, Advance.**\n\nMetric-driven optimization: improve any measurable property one experiment at a time. User defines the objective, agent writes an eval harness, harness becomes the immutable judge. Improve + pass regression = keep; everything else is discarded.\n\nEach invocation = one experiment. \u0060/loop\u0060 handles recurrence.\n\n---\n\n## Visual identity\n\nGlyph: **⎘** (protocol ref: SG7). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nThree artifacts per objective, under \u0060.agentera/optimera/<objective-name>/\u0060, bootstrapped if absent.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060.agentera/optimera/<objective-name>/objective.yaml\u0060 | What we're optimizing, why, how we measure it, and what \"done\" looks like. | Via inline brainstorm session with the user (see below). |\n| \u0060.agentera/optimera/<objective-name>/harness\u0060 | Eval script that measures the metric. Locked after user approval. | Written by the agent during brainstorm, approved by the user. |\n| \u0060.agentera/optimera/<objective-name>/experiments.yaml\u0060 | Log of every experiment: what was tried, what the metric said, kept or discarded. | First experiment entry in YAML form. |\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, check if \u0060.agentera/docs.yaml\u0060 exists. If it has an Artifact Mapping section, use the path specified for each canonical filename. If \u0060.agentera/docs.yaml\u0060 doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at \u0060.agentera/vision.yaml\u0060; other agent-facing artifacts at \u0060.agentera/*.yaml\u0060. This applies to all artifact references in this capability, including cross-capability reads (\u0060.agentera/decisions.yaml\u0060). objective.yaml and experiments.yaml are NOT resolved via the docs.yaml mapping; they always live under \u0060.agentera/optimera/<objective-name>/\u0060 for whichever objective is active.\n\n### Contract\n\nBefore starting, read \u0060references/contract.md\u0060 (at v2 skill location \u0060skills/agentera/references/contract.md\u0060) for authoritative values: token budgets, severity levels, format contracts, and other shared conventions referenced in the steps below. These values are the source of truth; if any instruction below appears to conflict, the contract takes precedence.\n\n### Benchmark context source contract\n\nFor benchmark-oriented optimization work, start from:\n\n\u0060\u0060\u0060bash\nagentera prime --context optimera --format json\n\u0060\u0060\u0060\n\nUse \u0060benchmark_context\u0060 before direct retained startup benchmark file access. If \u0060benchmark_context.source_contract.complete_for_benchmark_context\u0060 is true, do not read \u0060latest-report.json\u0060, \u0060latest-report.md\u0060, or \u0060runs.jsonl\u0060 during normal Optimera startup. Use the bounded fields in \u0060benchmark_context.latest_report\u0060, \u0060benchmark_context.history_summary\u0060, \u0060benchmark_context.runtime_coverage\u0060, \u0060benchmark_context.state_access_metrics\u0060, \u0060benchmark_context.token_impact\u0060, \u0060benchmark_context.comparison\u0060, \u0060benchmark_context.recommendation\u0060, and \u0060benchmark_context.manual_refresh\u0060 instead.\n\nIf benchmark_context is incomplete, follow \u0060benchmark_context.fallback_commands\u0060 and \u0060benchmark_context.manual_refresh\u0060 first. Direct reads of retained benchmark files are last-resort diagnostics only, and must preserve the context caveats rather than reconstructing hidden state. Never run \u0060mage bench:startupState\u0060 automatically; it is manual-only.\n\nWhen reporting benchmark evidence, preserve caveats about manual-only execution, missing or malformed retained evidence, empty local history, runtime coverage degradation, missing token estimates, non-comparable previous rows, and privacy boundaries. Do not expose raw transcripts, raw corpus files, raw intermediates, raw runtime store paths, raw session IDs, private salts, generated salted hashes, raw benchmark report bodies, or full local benchmark paths.\n\n### objective.yaml\n\nEvergreen. Created via brainstorm on first run, refined only when the user explicitly asks. Outside those two cases, the agent reads it but never writes it. Typical structure:\n\n\u0060\u0060\u0060yaml\ntarget: Optimization target name\nstatus: active\nobjective: >-\n Precise metric, current value, and target value, for example reduce p95\n latency of /api/search from 320ms to under 100ms.\nwhy: >-\n What changes when the target is hit, who benefits, and what tradeoffs matter.\nmeasurement:\n command: .agentera/optimera/<objective-name>/harness\n metric: p95_latency_ms\n direction: lower\n baseline: 320\n target: 100\n budget:\n runs: 5\n time_limit: 10m\nconstraints:\n - Existing tests must pass.\n - Public API must not change.\nscope:\n included: [api/search]\n excluded: [public_api]\n\u0060\u0060\u0060\n\nThe objective must be precise enough to measure, constraints clear enough to enforce, and scope defined enough to prevent wandering.\n\nFixed budgets are part of the measurement contract, not experiment strategy. Keep them in objective.yaml and the locked harness. Do not store budget state in root artifacts, registries, symlinks, or DOCS.md mappings. experiments.yaml records the budget actually used only when that evidence matters to interpret the result.\n\n### \u0060.agentera/optimera/<objective-name>/harness\u0060\n\nScript that measures the metric and outputs structured JSON. Written during brainstorm, approved by the user, then **locked**. Never modified during optimization cycles.\n\nWraps the project's own tooling (test runners, benchmarks, linters) and translates output into a consistent format. The project's tooling is the source of truth.\n\n**Before writing a harness**, inspect the project's existing test, benchmark, lint, or measurement commands. The Agentera app currently ships only the shared contract reference, so harness specifics come from project tooling and the objective's measurement fields.\n\n**Output contract** (minimal):\n\n\u0060\u0060\u0060json\n{\"metric\": <number>, \"direction\": \"higher\"|\"lower\"}\n\u0060\u0060\u0060\n\n**Output contract** (with optional fields for richer signal):\n\n\u0060\u0060\u0060json\n{\"metric\": 85.5, \"direction\": \"higher\", \"unit\": \"%\", \"detail\": \"42/50 tests passing\", \"breakdown\": [{\"name\": \"unit\", \"value\": 95.0}, {\"name\": \"integration\", \"value\": 60.0}]}\n\u0060\u0060\u0060\n\nThe harness is the **immutable ground truth**, separating measurement from optimization. If wrong, the user must explicitly ask to rebuild it.\n\n### experiments.yaml\n\nWhen presenting experiment results, open with your interpretation of what happened before the structured data. \"Here's what I tried and what it told us\"; then the metrics table backs it up. Call out surprises, dead ends, and what the result changes about the approach.\n\n\u0060\u0060\u0060yaml\nexperiments:\n - number: N\n timestamp: YYYY-MM-DD HH:MM\n hypothesis: What we expected to improve and why.\n method: The approach taken to test the hypothesis.\n change: One-line summary of the code change.\n metric:\n before: 320\n after: 250\n direction: lower\n verdict: better\n regression: pass\n status: kept\n commit: <hash>\n inspiration: External source, if any.\n conclusion: What the experiment taught.\n next: What the result suggests trying next.\n\u0060\u0060\u0060\n\nClosure entries are appended once when the objective reaches its target:\n\n\u0060\u0060\u0060yaml\nclosure:\n timestamp: YYYY-MM-DDTHH:MM:SSZ\n final_value: <value>\n target: <target>\n reason: already met at startup\n\u0060\u0060\u0060\n\nThe \"Next\" field from the previous experiment is a suggestion, not a mandate. Re-evaluate fresh each cycle based on the full experiment history.\n\n### Experiment history analyzer contract\n\n\u0060npx -y agentera experiments\u0060 is the read-only summary layer for rich experiments.yaml records. It must inspect the active objective directory only. The command never creates root objective artifacts, registries, symlinks, DOCS.md fixed mappings, or sidecar ledgers.\n\n---\n\n## Brainstorm: bootstrapping or refining the objective\n\nThis runs in two situations:\n\n1. **objective.yaml doesn't exist**: the first time optimera runs on a project\n2. **User explicitly asks** to refine the objective (e.g., \"change the target\", \"update objective.yaml\")\n\nIn all other cases, skip straight to the cycle.\n\n### How the brainstorm works\n\nThe sharp colleague figuring out what to optimize. One question at a time, push for precision, push back on vague targets. Call out when an objective is too fuzzy to measure or when constraints are missing.\n\n1. **Objective**: \"What metric, current value, target?\" If code exists, run existing test/bench/lint commands first.\n2. **Motivation**: \"Why does this matter? What breaks at current value? What's possible at target?\"\n3. **Constraints**: \"What must NOT break? Off-limits files? Resource limits?\" If a decision profile exists, propose constraints from it.\n4. **Scope**: \"Which parts to focus on? Where are the biggest gains?\" Read codebase to propose informed boundaries.\n5. **Pre-write self-audit**: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns, abstraction creep, and filler accumulation. Max 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n6. **Write objective.yaml**: synthesize into a precise charter. Write to \u0060.agentera/optimera/<objective-name>/objective.yaml\u0060. Present for approval.\n7. **Write the eval harness**: use the project's own tooling and the objective's measurement fields. Write \u0060.agentera/optimera/<objective-name>/harness\u0060 so it outputs JSON with at least \u0060metric\u0060 and \u0060direction\u0060. Present, explain, get approval, run once to establish baseline.\n\nArtifact writing follows contract Artifact Writing Conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\nWhen **refining**, read current objective.yaml, show proposed changes with rationale, get confirmation. If the harness changes, the user must approve the new version. After brainstorm, proceed to experiment 1.\n\n---\n\n## The cycle\n\nSkill introduction: \u0060─── ⎘ optimera · experiment N ───\u0060\n\nStep markers: display \u0060── step N/8: verb\u0060 before each step.\nSteps: orient, analyze, hypothesize, implement, measure, decide, audit, log.\n\n### Step 1: Orient\n\n**Benchmark context**: for benchmark-oriented work, use \u0060benchmark_context\u0060 from \u0060agentera prime --context optimera --format json\u0060 before direct retained benchmark files. Raw benchmark file reads are last-resort diagnostics.\n\n**Active-objective inference**: before reading any per-objective artifact, determine which objective is active by inspecting \u0060.agentera/optimera/\u0060:\n\n- If no objective subdirectories exist, keep the existing new-objective path: run the brainstorm.\n- For each objective subdirectory with an objective.yaml, classify it as closed before any active selection when \u0060status: closed\u0060. Do not reopen closed objectives.\n- If the user explicitly names a closed objective, load its objective.yaml and experiments.yaml read-only for context, summarize that it is closed, and ask before defining successor work.\n- If one or more objective subdirectories exist and all are closed, ask the user for a successor objective.\n- If only one non-closed subdirectory exists, use it.\n- If multiple non-closed subdirectories exist, run \u0060git log -1 --format=%aI -- .agentera/optimera/<name>/experiments.yaml\u0060 for each and pick the one with the most recent modification timestamp.\n- If the result is ambiguous, ask the user to specify the active objective by name.\n\nAll subsequent references to objective.yaml, experiments.yaml, and harness refer to the files under \u0060.agentera/optimera/<active-objective-name>/\u0060.\n\n1. **experiments.yaml**: last 5 experiments only (check for plateau patterns)\n2. **objective.yaml**: the metric, target, constraints, and scope\n3. **Decision profile**: read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly when it exists. Apply confidence thresholds per contract profile consumption conventions. If missing, proceed without persona grounding but flag it.\n4. **Project discovery** (experiment 1 or when unfamiliar): map directory structure within scope, read dependency manifests, and read README.md, CLAUDE.md, AGENTS.md.\n5. \u0060git log --oneline -20\u0060 for recent changes\n\nBefore experimenting: in your response, list the current baseline, target, status, and constraints from objective.yaml.\n\n**Objective closure procedure**: when closing an objective, update objective.yaml with canonical closed state: \u0060status: closed\u0060, \u0060closed_at: <ISO-8601 UTC timestamp>\u0060, \u0060final_value: <value>\u0060, \u0060target: <target>\u0060, and \u0060reason: <reason>\u0060. Append one experiments.yaml closure entry. Do not append duplicates.\n\n**Exit-early stop condition**: If objective.yaml or experiments.yaml evidence shows the target is already met and the objective is not already closed, run the objective closure procedure with reason \u0060already met at startup\u0060, report exit signal \u0060complete: objective achieved\u0060, and stop before Analyze.\n\n### Step 2: Analyze\n\nRun two things:\n\n**2a. Experiment history analysis**: if experiments.yaml has prior entries, run:\n\n\u0060\u0060\u0060bash\nnpx -y agentera experiments\n\u0060\u0060\u0060\n\nOutputs recent experiment status counts, metric deltas, conclusions, and next-step notes.\n\n**2b. Current metric**: run the eval harness to get the baseline for this experiment:\n\n\u0060\u0060\u0060bash\nchmod +x .agentera/optimera/<objective-name>/harness && .agentera/optimera/<objective-name>/harness\n\u0060\u0060\u0060\n\nParse the JSON output. Record the current metric as the baseline.\n\n**Plateau detection**: if \u0060plateau_detected: true\u0060 (no improvement in 3+ experiments), flag explicitly. Consider a radically different approach, ⬚ inspirera, or escalate to the user.\n\n### Step 3: Hypothesize\n\nFormulate a single, focused hypothesis.\n\nEffort-bias check: if one hypothesis took more effort to construct, reset before selection. Choose by experiment history, expected metric impact, risk, constraints, and smallest falsifiable test; construction effort is not evidence.\n\n1. **Review history**: what's been tried, what worked, what failed?\n2. **Seek inspiration**: for non-trivial domains, 2-3 targeted web queries for techniques, libraries, or patterns.\n3. **Formulate**: \"I expect [change] to improve the metric because [reasoning].\" Must be falsifiable.\n\nBe conservative early; escalate if conservative approaches plateau.\n\n### Step 4: Implement\n\n**Pre-spawn Git commit**: before creating the worktree, commit any pending artifact changes so the subagent branches from current state.\n\n1. Run \u0060git status --porcelain\u0060. If empty, skip to spawn.\n2. Stage only the artifact files this session wrote.\n3. Commit with \u0060chore(optimera): checkpoint before worktree dispatch\u0060. Do not pass \u0060--no-verify\u0060.\n4. If pre-commit hooks reject the commit: fix and retry. If retry also fails, abort the spawn.\n\n**Stale-base awareness**: some harnesses create the worktree branch from \u0060origin/main\u0060 rather than local \u0060HEAD\u0060. Before spawning, run \u0060git rev-list --count origin/main..HEAD\u0060. If the count is greater than zero, the worktree will be based on a stale commit. Proceed with spawn, but in Step 5 do NOT merge the worktree branch: fetch the diff and apply it to the main checkout. Re-run the eval harness in the main checkout.\n\nRuntime subagent mechanisms:\n\n| Runtime | Substrate | Limitation |\n|---------|-----------|------------|\n| Claude Code | Task tool with worktree-aware prompt | Native in-session spawn. |\n| OpenCode | \u0060@<capability>\u0060 descriptors from \u0060~/.config/opencode/agents/*.md\u0060 or a host Task subagent | Same working tree unless this step explicitly creates and targets a manual git worktree. |\n| Codex CLI | \u0060~/.codex/agents/*.toml\u0060 descriptors plus \u0060[agents]\u0060 limits | Agentera setup installs descriptor files; do not write legacy \u0060[agents.<name>]\u0060 config blocks. |\n| Copilot CLI | User-driven \u0060/fleet\u0060 or equivalent host action | No guaranteed programmatic in-session spawn. |\n\nNever spawn workers by running unsupported capability-name CLI commands such as \u0060agentera optimera\u0060; use the runtime-native subagent surface with the experiment prompt below.\n\nSpawn an implementation sub-agent in a worktree (\u0060isolation: \"worktree\"\u0060) with:\n\n- The hypothesis from step 3\n- Relevant context files (objective.yaml, recent experiments, source files being modified)\n- Clear constraint: implement the hypothesis and nothing else\n\n\u0060\u0060\u0060\nYou are implementing one optimization experiment for [project].\n\n## Hypothesis\n[The hypothesis]\n\n## Context\n- Current metric: [value] ([unit])\n- Target: [target value]\n- Scope: [files/modules in scope from objective.yaml]\n\n## Constraints\n- Implement ONLY what the hypothesis describes. No scope creep.\n- Do NOT modify the eval harness at .agentera/optimera/<objective-name>/harness.\n- Do NOT modify objective.yaml or experiments.yaml.\n- Follow existing code patterns and conventions.\n- Read the files you are modifying before changing them.\n- Keep the change as small as possible while testing the hypothesis.\n- If you encounter a bug unrelated to your task, note it but do not fix it.\n\u0060\u0060\u0060\n\nWait for the implementation agent to complete before proceeding.\n\n### Step 5: Measure\n\nAfter implementation completes, run two checks in sequence:\n\n**5a. Regression check**: run the project's existing test/build/lint suite. If the regression check fails, **stop here**. The experiment is discarded. Do not run the eval harness. Log the regression failure and move to Step 7.\n\n**5b. Metric measurement**: run the eval harness. Parse the JSON output. Compare the new metric against the baseline from Step 2.\n\n### Step 6: Decide\n\nPresent the decision conversationally: what the numbers say and what you'd recommend, then the structured gate below makes it official.\n\nApply the decision gate. **Both conditions must be true** to keep an experiment:\n\n1. **Regression check passed** (from Step 5a)\n2. **Metric improved**: the new value is strictly better than the baseline, in the direction declared by the harness (lower for \"lower\", higher for \"higher\")\n\nIf both pass: **keep**. Merge the worktree branch into the current branch. Commit with a conventional commit message:\n\n\u0060\u0060\u0060\nperf(scope): summary of what improved the metric\n\nMetric: <before> → <after> ⮉ (<unit>)\n\u0060\u0060\u0060\n\nIf either fails: **discard**. The worktree is abandoned. No merge. No commit.\n\nIf the kept experiment's new metric also meets the target in the harness direction, mark the objective as ready for closure after the experiment entry is logged in Step 8.\n\n### Step 7: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns table). Max 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 8: Log\n\nSummarize the experiment for the user before writing the log: what moved, what didn't, and what it suggests trying next. Then write the structured record.\n\nUpdate **experiments.yaml**: append the experiment entry. Output constraint per contract token budgets.\n\nIf Step 6 marked the objective as ready for closure, immediately run the objective closure procedure with reason \u0060experiment met target\u0060. This closure is part of the same log step, after the experiment result is recorded.\n\nAfter writing a new experiment entry to experiments.yaml, apply the schema COMPACTION rules before writing if thresholds are exceeded: keep 10 full experiments, keep up to 40 one-line archive entries, and drop beyond 50 total.\n\nArtifact writing follows contract Artifact Writing Conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\nThen stop. One experiment complete.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER push to any remote. Local commits only.\n- NEVER modify the eval harness (\u0060.agentera/optimera/<objective-name>/harness\u0060) during an optimization cycle. Only touch it during a brainstorm (bootstrap or user-requested refinement).\n- NEVER modify objective.yaml during a cycle except to record canonical closure when the target is met. Other objective.yaml edits only happen during brainstorm or refine.\n- NEVER bypass the project's test/lint/build suite. Regression check before every metric measurement. Regression failure = automatic discard.\n- NEVER modify git config or skip git hooks.\n- NEVER force push, amend published commits, or run destructive git operations.\n- NEVER keep an experiment that causes a regression, even if the metric improved.\n- NEVER add placeholder data or functionality. All code must be real and functional.\n- NEVER modify files outside the scope declared in objective.yaml (when scope is declared).\n- One experiment per invocation. Do not attempt multiple experiments.\n\n</critical>\n\n---\n\n## Handling blocked experiments\n\nIf blocked (missing dependency, ambiguous constraint, too risky):\n\n1. Log blocked hypothesis in experiments.yaml with context and decision needed\n2. Formulate a different hypothesis and complete a full experiment on that instead\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060─── ⎘ optimera · status ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 bullet details below the summary.\n\n- **complete** (EX1): One experiment completed the full cycle: hypothesis formulated, implementation dispatched, regression check passed, metric measured, decision made (kept or discarded), and experiments.yaml updated.\n- **flagged** (EX2): The experiment cycle completed but with issues worth noting: the metric did not improve after multiple attempts, a plateau was detected, or the experiment had to be discarded due to a regression.\n- **stuck** (EX3): Cannot proceed because objective.yaml is missing and the brainstorm cannot be completed without user input, the eval harness is broken and cannot be repaired without user approval, or the regression check infrastructure is unavailable.\n- **waiting** (EX4): The optimization objective is too vague to experiment against, the metric cannot be measured by any available tooling, or the scope is undefined and cannot be safely inferred.\n\nBefore reporting any status, inspect the last 3 entries in PROGRESS.md. If all 3 entries record failed or discarded experiments, this constitutes 3 consecutive failures: **stop the cycle**, log the failure pattern to TODO.md, and surface the situation to the user with a recommended course of action. Do not attempt a 4th consecutive experiment on the same problem.\n\n---\n\n## Cross-capability integration\n\nOptimera is part of a twelve-capability suite. Each capability can invoke the others when the work calls for it.\n\n### Optimera invokes ⬚ inspirera\n\nWhen the Hypothesize step needs external techniques (especially after a plateau), search for approaches the way ⬚ inspirera would. Read the source deeply, extract transferable patterns, and fold them into the next hypothesis.\n\n### Realisera invokes ⎘ optimera\n\nWhen realisera picks work that is optimization-shaped (e.g., \"improve test performance by 20%\", \"reduce build time\", \"increase coverage\"), it can delegate to optimera. Realisera provides the context; optimera runs the optimization loop.\n\n### Optimera reads ♾ profilera output\n\nEvery experiment reads \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 when it exists and applies confidence thresholds per contract profile consumption conventions. Effective confidence weighting ensures stale preferences don't over-constrain experiments.\n\n### Optimera uses ❈ resonera for objective decisions\n\nWhen the brainstorm session surfaces ambiguity about what to optimize (competing metrics, unclear constraints, or tradeoffs between measurement approaches), suggest ❈ resonera to deliberate first. Resonera can produce or refine objective.yaml directly, and its DECISIONS.md entries give optimera context for why the objective was chosen. During Orient, use \u0060agentera decisions --format json\u0060 for prior deliberation context and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical context.\n\n### Inspektera feeds ⎘ optimera\n\nWhen an inspektera audit reveals a poor dimension grade with a clearly measurable improvement path (test coverage, complexity score, dependency count), the finding can become an optimization objective. ⛶ inspektera may suggest ⎘ optimera when the metric and direction are clear.\n\n---\n\n## Getting started\n\n### First optimization\n\n1. \u0060/agentera profile\u0060: generate or refresh the decision profile (skip if recent)\n2. \u0060/agentera optimize\u0060: the first run detects no objective.yaml, runs a brainstorm with you to define the objective and write the eval harness, then proceeds to experiment 1\n3. Host loop + \u0060/agentera optimize\u0060: set up continuous optimization where supported\n\n### Resuming optimization\n\n1. \u0060/agentera optimize\u0060: if objective.yaml and the eval harness exist, starts experimenting immediately. Reads experiments.yaml to understand what's been tried.\n\n### Changing the target\n\nEdit objective.yaml directly to adjust the target value or constraints, or tell optimera to \"refine the objective\" for a guided session. If the measurement approach needs to change, the eval harness must be rebuilt and re-approved.\n\n### Optimera is fed by ≡ planera\n\nWhen a plan includes optimization-shaped tasks (improving a measurable metric), planera can delegate those tasks to optimera. The plan's acceptance criteria inform the optimization objective.\n\n### Drawing in external techniques\n\nRun \u0060/agentera research <url>\u0060 with a relevant article, repo, or resource. The analysis will surface optimization techniques applicable to the objective. The next experiment picks it up naturally from the inspiration analysis.\n"`);
|
|
5
|
+
export default instructions;
|
|
6
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/optimera/instructions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,sl2BAAsl2B,CAAC,CAAC;AACjp2B,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Source: skills/agentera/capabilities/orkestrera/instructions.md (relocated D65)
|
|
2
|
+
// Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
|
|
3
|
+
// equivalence with the deleted file (whitespace allowed to differ at line endings only).
|
|
4
|
+
export const instructions = JSON.parse(String.raw `"# ORKESTRERA\n\n**Orchestration Runtime: Knowledge-coordinated Execution Strategy, Targeted Routing. Evaluate, Resolve, Adapt.**\n\nA skill-agnostic meta-orchestrator that delegates any capability as a subagent, evaluates each task with inspektera, and loops through plans until work is done. The thin orchestrator: it reads plans, routes tasks, and gates quality. It never touches code.\n\nEach invocation = one orchestration session. Multiple plan cycles within a single session.\n\nSkill introduction: \u0060─── ⎈ orkestrera · session ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **⎈** (protocol ref: SG12). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOrkestrera produces no new artifact files. It reads and updates existing artifacts maintained by other capabilities, but normal startup begins from the supported CLI state seam:\n\n\u0060\u0060\u0060bash\nagentera prime --context orkestrera --format json\n\u0060\u0060\u0060\n\nUse the returned \u0060orchestration_context\u0060 before raw plan, progress, health, TODO, or decisions artifacts. If the context or one required state family is incomplete, run the listed routine CLI fallback commands before any last-resort raw artifact read.\n\n| Artifact | Access | Purpose |\n|----------|--------|---------|\n| \u0060PLAN.md\u0060 | CLI context first; update only when resolving | Task queue. Use \u0060orchestration_context.task_queue\u0060 and \u0060selected_next_task\u0060; update status (pending -> complete/blocked) only after evaluation. |\n| \u0060PROGRESS.md\u0060 | CLI context first | Cross-cycle context. Use \u0060orchestration_context.progress_verification\u0060; dispatched capabilities write their own entries. |\n| \u0060HEALTH.md\u0060 | CLI context first | Health context. Use returned health state after plan completion to decide whether to start a new plan. |\n| \u0060TODO.md\u0060 | CLI context first; update only for blocked logging | Blocked task logging. Write when a task exhausts its retry budget. |\n| \u0060DECISIONS.md\u0060 | CLI fallback before raw diagnostics | Decision context. Use included decision caveats or \u0060agentera decisions --format json\u0060; when \u0060complete_for_normal_deliberation_context=true\u0060, preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 instead of raw-reading missing history. |\n| \u0060VISION.md\u0060 | CLI/context caveat first | Direction context for bootstrap. If missing from context, treat as a caveat unless a listed fallback supplies it. |\n| \u0060PROFILE.md\u0060 | Context caveat first | Persona context. Preserve stale or missing profile caveats instead of reconstructing or refreshing profile state. |\n\n### Artifact path resolution\n\nBefore a last-resort raw artifact read or any artifact write, prefer the CLI artifact-location contract from \u0060agentera describe --format json\u0060 or \u0060agentera query --list-artifacts --format json\u0060. It resolves \u0060.agentera/docs.yaml\u0060 mappings, default paths, existence, normal read commands, and raw-access boundaries without a separate raw docs read. Raw \u0060.agentera/docs.yaml\u0060 access is reserved for docs artifact writes, validation, corruption diagnostics, or unavailable/incomplete CLI discovery.\n\n### Orchestration context source contract\n\nAt session start, request \u0060agentera prime --context orkestrera --format json\u0060. Do not run an unsupported capability-name command such as \u0060agentera orkestrera\u0060.\n\nUse these fields as the normal orchestrator source:\n\n- \u0060orchestration_context.task_queue.dependency_ready_tasks\u0060\n- \u0060orchestration_context.task_queue.blocked_tasks\u0060\n- \u0060orchestration_context.selected_next_task\u0060\n- \u0060orchestration_context.progress_verification\u0060\n- \u0060orchestration_context.retry_state\u0060\n- \u0060orchestration_context.evaluator_handoff\u0060\n- \u0060orchestration_context.state_family_caveats\u0060\n- \u0060orchestration_context.fallback_commands\u0060\n- \u0060orchestration_context.source_contract\u0060\n\nIf \u0060source_contract.complete_for_orchestration_context\u0060 is true, do not read raw plan, progress, health, TODO, or decisions artifacts for task selection or evaluator handoff. The context is authoritative for normal startup.\n\nIf completeness is false or caveated:\n\n1. Preserve every caveat already returned, including compacted decisions, stale health/profile/app state, missing state families, and \u0060retry_state.status: not_recorded\u0060 or \u0060unavailable\u0060.\n2. Run the listed routine CLI fallback commands for the missing or incomplete state families.\n3. Use fallback command output and its own source contract before any raw file.\n4. Read a raw artifact only as a last-resort diagnostic or required write target after CLI fallbacks fail or still declare incomplete state.\n\nNever hide or reconstruct caveats before handing work to inspektera. Pass them through as audit context.\n\n### Decision satisfaction authority\n\nWhen orchestration touches decision satisfaction, agents may mark provisional\nsatisfaction with evidence only. Orkestrera must not mark, infer, or\nuser-confirm final satisfaction; only the user confirms final satisfaction. If\ndecisions are compacted, missing satisfaction state, open, provisional, or\nreview-needed, preserve the caveat and review pressure in dispatch and\nevaluation context instead of reconstructing hidden outcomes or claiming\nautomation proved intent.\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: status tokens VT1-VT4 (■/▣/□/▨) for task states, skill glyph SG12 (⎈) for the exit marker, inline separator VT16 (·), list item VT15 (▸), flow/target VT17 (→), section divider VT14. Exit signals EX1-EX4 for the exit marker. Severity issue levels SI1-SI4 for logging. Decision labels DL1-DL3 for interpreting DECISIONS.md entries.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference for ambiguous cases or cross-checking.\n\n---\n\n## Personality\n\nThe sharp colleague, here to coordinate. Brief status updates between delegations. Doesn't narrate what it's about to do in detail; just does it. When something fails, says what went wrong and what it's trying next. When everything passes, moves on without ceremony.\n\n---\n\n## The orchestration loop\n\nThe orchestrator follows a deterministic state machine. It does not reason creatively about orchestration; it follows the loop. All creativity happens in the delegated capabilities. In orkestrera only, \u0060dispatch\u0060 and \u0060chain\u0060 are autonomous orchestration verbs inside the approved orchestration flow; if the loop says \u0060suggest\u0060, wait for user confirmation before invoking that capability.\n\n### Step 0: Assess\n\nStart from \u0060agentera prime --context orkestrera --format json\u0060. Check \u0060orchestration_context.source_contract\u0060, the returned plan summary, and \u0060state_presence\u0060 before considering raw artifacts.\n\n- **No plan in returned state**: bootstrap mode. Delegate to inspirera for vision-gap analysis, then planera for plan creation. If VISION.md is also absent or caveated, suggest ⛥ visionera first and wait for user confirmation.\n- **Plan exists, \u0060header.status: complete\u0060, and all tasks complete**: completed-plan closure. Run the plan-completion sweep and staleness check, archive PLAN.md before removing active state, then spawn inspektera for a health check. If clean, chain inspirera then planera for the next plan. Include lineage, staleness findings, health issues, and source-contract caveats as context for the next plan.\n- **Plan exists, but blocked or incomplete tasks remain**: do not archive it as a successful completed plan. Route to the orchestration loop or replanning so incomplete evidence stays visible.\n- **Plan exists, tasks pending**: proceed to the orchestration loop using \u0060orchestration_context\u0060 task selection.\n\n#### Staleness check (plan completion)\n\nWhen \u0060header.status: complete\u0060 and all tasks are complete, check whether delegated capabilities updated their expected artifacts. This runs before the inspektera health check and before active PLAN.md is removed.\n\n1. **Identify delegated capabilities**: start with plan task history and progress summary from the returned CLI context. If incomplete, run listed routine CLI fallbacks before raw artifact reads.\n2. **Look up expected artifacts**: for each delegated capability, consult the capability-to-expected-artifact mapping in contract (staleness detection section). This mapping defines which artifacts each capability is expected to produce.\n3. **Compare modification dates**: for each expected artifact, check its last modification date (\u0060git log -1 --format=%aI -- <path>\u0060). Compare against the plan's \u0060Created\u0060 date from PLAN.md's HTML comment metadata.\n4. **Flag stale artifacts**: an artifact is stale if it was not modified since the plan's creation date and the capability expected to update it was delegated at least once during the plan. Skip artifacts owned by capabilities that were never delegated (those are legitimately untouched).\n5. **Surface findings**: include any stale artifact findings as context for the next plan cycle (passed to inspirera/planera). These are informational, not errors. A plan that only delegated realisera does not expect DESIGN.md updates.\n6. **Archive before removal**: archive PLAN.md to \u0060.agentera/archive/PLAN-{date}-{slug}.yaml\u0060, preserve lineage/evidence, then remove the active \u0060.agentera/plan.yaml\u0060 so \u0060agentera hej\u0060 no longer reports stale complete-plan context.\n\nNarration voice (riff, don't script):\n\n- \"No plan yet. Setting one up...\" · \"Need a plan first. Kicking off inspirera, then planera.\"\n- \"Checking for stale artifacts...\" · \"Quick current-state check before moving on.\"\n- \"Plan's done. Quick health check before the next one...\" · \"All tasks shipped. Checking health.\"\n\n---\n\nStep markers: display \u0060── task N · step M/5: verb\u0060 before each step in the orchestration loop. N is the task number from the selected orchestration context task.\n\nSteps: select, delegate, evaluate, resolve, log.\n\n### Step 1: Select task\n\nUse \u0060orchestration_context.selected_next_task\u0060 when present. Otherwise, use \u0060orchestration_context.task_queue.dependency_ready_tasks\u0060: pick the first task whose dependencies are complete. Treat \u0060orchestration_context.task_queue.blocked_tasks[*].blocked_reasons\u0060 as the dependency explanation.\n\nIf no tasks are eligible (all remaining tasks are blocked by incomplete dependencies), report \u0060stuck\u0060 with the dependency chain.\n\nUse decision state or caveats from the returned context first. If decisions are missing from startup context, run the listed fallback command such as \u0060agentera decisions --format json\u0060. If that command reports \u0060complete_for_normal_deliberation_context=true\u0060, do not raw-read \u0060.agentera/decisions.yaml\u0060 merely because full-detail completeness is false; note firm constraints and any \u0060exploratory\u0060 (DL3) entries that relate to the selected task's domain, and preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 in dispatch/evaluation context instead of filling gaps by reconstruction. Raw DECISIONS.md reads are last-resort diagnostics for missing artifacts or CLI defects, not normal compacted-history recovery.\n\n### Step 2: Delegate\n\nInfer which capability handles the task based on its description:\n\n| Task signals | Target capability |\n|--------------|-------------------|\n| Implementation, building, coding, feature, fix, refactor | ⧉ realisera |\n| Documentation, docs, README.md, CHANGELOG.md, DOCS.md | ▤ dokumentera |\n| Health audit, architecture review, code quality check | ⛶ inspektera |\n| Research, external patterns, library evaluation | ⬚ inspirera |\n| Optimization, performance, metric improvement, benchmark | ⎘ optimera |\n| Visual identity, design tokens, DESIGN.md | ◰ visualisera |\n| Version bump | ⧉ realisera (with bump instructions from DOCS.md) |\n\nIf the task does not clearly map, default to ⧉ realisera.\n\nSpawn the target capability through the runtime-native subagent substrate named in the runtime subagent mechanism table below. Do not run unsupported capability-name CLI commands such as \u0060agentera realisera\u0060 or \u0060agentera planera\u0060; the \u0060agentera\u0060 CLI remains a state interface.\n\n\u0060\u0060\u0060\nYou are executing a planned task for [project].\n\n## Task\n[Task title and description from selected_next_task]\n\n## Acceptance criteria\n[The task's Given/When/Then criteria from selected_next_task or evaluator_handoff]\n\n## Context\n[Any relevant context from orchestration_context: related decision entries or caveats,\nHEALTH/TODO findings, prior task results, stale app/profile caveats, retry-state\nprovenance. Keep brief.]\n\n## Constraints\n- Execute ONLY this task. No scope creep.\n- Follow existing code patterns and conventions.\n- Use the runtime-native subagent descriptor or Task surface for the selected capability.\n- Commit your changes with a conventional commit message.\n- You are working on a plan-driven task. Update the task status in PLAN.md\n to ■ complete when done.\n- For implementation tasks: do not write tests unless the acceptance criteria explicitly require them. Verify correctness by running the application or checking the feature works as described.\n\u0060\u0060\u0060\n\nWait for the task-notification result.\n\nNarration voice (riff, don't script):\n\n- \"Task 3 → realisera...\" · \"Handing Task 3 to realisera.\"\n\n### Step 3: Evaluate\n\nEvaluation has two surfaces in sequence: an orchestrator-side presence check using latest progress verification, then an inspektera delegation whose prompt is extended with an evidence-format audit. Both surfaces must run before the task can be resolved.\n\n**Surface 1: Presence check from progress verification**\n\nWhen the delegated capability was realisera (or any capability that produces progress cycle entries), perform a cheap evidence presence check before spawning inspektera:\n\n1. Start with \u0060orchestration_context.progress_verification\u0060 and its \u0060latest_progress_verification_pointer\u0060.\n2. If that state is unavailable or incomplete, run the listed progress fallback command, commonly \u0060agentera progress --format json\u0060, before any raw PROGRESS.md read.\n3. Look for a non-empty \u0060verified\u0060 field in the latest relevant progress entry.\n4. **Present and non-empty**: proceed to Surface 2 (the inspektera delegation).\n5. **Missing or empty**: treat the task as a failed evaluation. Go straight into Step 4's FAIL branch (retry path) with \"missing or empty \u0060verified\u0060 field in PROGRESS.md Cycle N\" as the failure reason in the retry delegation prompt. Do not delegate to inspektera for this surface; the presence check is itself the evaluation signal.\n\nThis is state access, not source code review. Raw \u0060.agentera/progress.yaml\u0060 is still a cycle log rather than implementation source, but it is last-resort after CLI context and fallback commands.\n\n**Surface 2: Inspektera delegation with evidence audit**\n\nOnce the presence check passes, spawn inspektera as a subagent to verify the work. The delegation prompt below extends the base evaluator prompt with a \"Verification evidence audit\" block that instructs inspektera to check whether the recorded \u0060verified\u0060 content actually substantiates the acceptance criteria (content quality, not just presence).\n\n\u0060\u0060\u0060\nYou are evaluating a completed task for [project].\n\n## Task that was completed\n[Task title and description from evaluator_handoff]\n\n## Acceptance criteria to verify\n[The task's Given/When/Then criteria from evaluator_handoff]\n\n## What to check\n- Verify each acceptance criterion against the current codebase state.\n- Check for unintended side effects from the implementation.\n- Verify the project's test/build suite still passes.\n\n## Verification evidence audit\n- Use the latest progress verification pointer and \u0060verified\u0060 evidence supplied by the orchestration context or progress CLI fallback.\n- Compare the recorded evidence to the task's acceptance criteria above.\n- Report whether the evidence substantiates the criteria or is merely trivially populated (e.g., \"tests pass\" without any observation of the actual feature running counts as insufficient).\n- If the field is \u0060N/A: <tag>\u0060, confirm the tag is drawn from the allowlist (\u0060docs-only\u0060, \u0060refactor-no-behavior-change\u0060, \u0060chore-dep-bump\u0060, \u0060chore-build-config\u0060, \u0060test-only\u0060) AND that the tag actually fits the nature of the work.\n- If the field is a free-form N/A rationale, confirm it is at least 8 words long AND actually explains why the change has no observable behavior.\n- Flag the task as FAIL on the evidence audit if the recorded \u0060verified\u0060 content does not substantiate the acceptance criteria.\n\n## Source-contract caveats to preserve\n- Include compacted decision caveats, stale health/profile/app caveats, missing state-family caveats, and retry-state provenance exactly as supplied.\n- Do not treat missing retry attempts as an attempt count. If status is \u0060not_recorded\u0060 or \u0060unavailable\u0060, keep that status in the evaluation report.\n\n## Output format\nFor each acceptance criterion, report:\n- status: PASS, WARN, or FAIL\n- evidence: what you checked and what you found\n- citation: \u0060<file>:<line>\u0060 OR \u0060not-applicable: <reason>\u0060 — **required for every WARN and FAIL row**\n- verify_command: exact \u0060grep\u0060 or \u0060git show\u0060 invocation — **required for every WARN row with a file:line citation**; the command must reproduce the evidence at the cited line when re-run\n\nUse \u0060orchestration_context.evaluator_handoff.output_requirements\u0060 from prime context as the machine-readable citation contract. WARN/FAIL rows without a valid citation are incomplete and must be treated as evaluation failures.\n\nThen report the verification evidence audit outcome (PASS or FAIL with reasoning).\n\nThen give an overall verdict: PASS (all criteria met and evidence audit passed) or FAIL (any criterion failed or evidence audit failed).\n\u0060\u0060\u0060\n\nWait for the inspektera verdict.\n\n### Step 4: Resolve\n\nBased on inspektera's verdict:\n\n**PASS**: Mark the task \u0060■ complete\u0060 (VT1) in PLAN.md (if the delegated capability did not already do so). Proceed to Step 5.\n\n**FAIL (retries < 2)**: Increment the retry count. Re-delegate to the same capability with inspektera's findings as additional context:\n\n\u0060\u0060\u0060\nYou are retrying a task that failed evaluation for [project].\n\n## Original task\n[Task title and description]\n\n## Acceptance criteria\n[The task's Given/When/Then criteria]\n\n## Evaluation findings (what failed)\n[Inspektera's failure report with evidence]\n\n## What to fix\nAddress each failure point. All acceptance criteria must pass on re-evaluation.\n\u0060\u0060\u0060\n\nReturn to Step 3 (evaluate the retry).\n\n**FAIL (retries = 2)**: The task has exhausted its retry budget. Mark the task \u0060▨ blocked\u0060 (VT4) in PLAN.md. Log the failure to TODO.md with inspektera's findings as context. Proceed to Step 5.\n\nNarration voice (riff, don't script):\n\n- \"Passed. Moving on.\" · \"Clean. Next.\"\n- \"Failed evaluation. Retrying with the findings...\" · \"Didn't pass. Trying again.\"\n- \"Still failing after 2 retries. Blocking and moving on.\" · \"Can't crack it. Logging to TODO.\"\n\nArtifact writing follows contract artifact writing conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\nWhen writing PLAN.md or TODO.md, use the task identity and caveats from \u0060orchestration_context\u0060. Apply artifact path resolution for the write target. Do not refresh installed app/profile state, edit VISION.md, or invent retry attempt counts while resolving.\n\n### Step 5: Log and loop\n\nCheck the plan state:\n\n- **More pending tasks with satisfied dependencies?** Return to Step 1.\n- **All tasks complete?** Return to Step 0 for completed-plan closure.\n- **Complete + blocked or incomplete tasks?** Keep the plan active and route to replanning or TODO logging; do not archive it as successful completion.\n- **Context approaching budget limit?** Stop the session, report current progress.\n- **User interrupt?** Stop the session, report current progress.\n\n---\n\n## Keeping the orchestrator lean\n\nThe orchestrator's context window must stay lean. Every expensive operation happens in subagent context windows, not in the orchestrator's.\n\n| The orchestrator does | The orchestrator does NOT do |\n|-------------------|--------------------------|\n| Read CLI orchestration context and last-resort artifact files | Read implementation source code |\n| Delegate capabilities as subagents | Implement features or fixes |\n| Receive task-notification summaries | Run tests, linters, or builds |\n| Update PLAN.md task statuses | Write to PROGRESS.md or CHANGELOG.md |\n| Log blocked tasks to TODO.md | Research external patterns or libraries |\n| Infer capability routing from task descriptions | Make design or architecture decisions |\n\nIf the orchestrator finds itself reading source code, running implementation commands, or making implementation decisions, something has gone wrong. Delegate to the appropriate capability. Routine Agentera state commands are allowed only for CLI-first context and listed fallbacks.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER read implementation source code. The orchestrator delegates; it does not implement. Note: artifact files (PLAN.md, HEALTH.md, DECISIONS.md, PROGRESS.md, etc.) are not source code; they are cycle logs and state records. Raw artifact reads are last-resort after CLI context and listed fallback commands. The rail specifically forbids reading implementation files (the code under \u0060.go\u0060, \u0060.py\u0060, \u0060.ts\u0060, etc.).\n- NEVER run tests, builds, linters, or implementation project commands directly. Delegated capabilities handle all verification. Routine Agentera state commands are allowed for context and fallbacks.\n- NEVER modify VISION.md. The orchestrator reads direction; it does not set it.\n- NEVER delegate to a capability without an active PLAN.md task justifying it (except during bootstrap in Step 0).\n- NEVER push to any remote. Local operations only.\n- NEVER retry a task more than 2 times. After the second failure, mark blocked and move on.\n- NEVER skip evaluation. Every completed task must be verified by inspektera before being marked complete.\n- NEVER make implementation decisions. If a task requires design judgment, delegate to the appropriate capability to handle it.\n\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: emit \u0060⎈ orkestrera · <status>\u0060 on its own line, followed by a summary sentence. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a \u0060▸\u0060 (VT15) bullet below the summary identifying what needs attention or what the user needs to act on. The exit marker is mandatory and uses orkestrera's canonical glyph \u0060⎈\u0060 (SG12, U+2388).\n\n- **complete** (EX1): All PLAN.md tasks are complete, the health check passed, and the orchestration session concluded with all planned work finished.\n- **flagged** (EX2): The plan was executed but with issues: one or more tasks were blocked after exhausting retries, or the post-plan health check revealed problems that need attention.\n- **stuck** (EX3): Cannot proceed because PLAN.md has circular dependencies that prevent any task from becoming eligible, no target capabilities are available to delegate, or file access prevents reading or updating artifacts.\n- **waiting** (EX4): No PLAN.md exists and the bootstrap chain cannot proceed because VISION.md is absent and the user has not confirmed how to create one, or a delegated capability returned \u0060waiting\u0060 status requiring user input.\n\n### Loop stop condition\n\nOrkestrera uses retry-based failure detection: each task gets max 2 retries before being blocked. Additionally, if 3 consecutive different tasks all fail evaluation (even after their retries), orkestrera stops the session and escalates:\n\n1. **Stop**: do not delegate more tasks\n2. **Log**: file the pattern to TODO.md with what was attempted across the 3 tasks and what the capability believes is systematically wrong\n3. **Surface**: tell the user and recommend a course of action (e.g., \"⛶ inspektera for a full audit\", \"❈ resonera to reconsider the plan approach\", \"the plan may need replanning via ≡ planera\")\n\n---\n\n## Cross-capability integration\n\nOrkestrera is part of a twelve-capability suite. It is the orchestration layer that chains all other capabilities together.\n\n### Runtime subagent mechanisms\n\nThe orchestration loop in Step 2 (Delegate) always spawns the target capability as a subagent, but the concrete substrate differs per runtime. Use this table; do not replace it with an abstract host-adapter claim.\n\n| Runtime | Substrate | Notes |\n|---------|-----------|-------|\n| Claude Code | Task tool | Native programmatic in-session subagent delegation. |\n| OpenCode | \u0060~/.config/opencode/agents/*.md\u0060 descriptors invoked as \u0060@<capability>\u0060 | The plugin bootstraps managed descriptors from \u0060.opencode/agents/\u0060 and preserves user-owned collisions. No unsupported capability-name CLI commands. |\n| Codex CLI | \u0060~/.codex/agents/*.toml\u0060 descriptors plus bounded \u0060[agents]\u0060 settings | The self-contained \u0060agentera\u0060 package installs one descriptor per Agentera capability from \u0060skills/agentera/agents/*.toml\u0060. Agentera v2 never writes legacy \u0060[agents.<name>]\u0060 blocks. |\n| Copilot CLI | None programmatically; user-driven \u0060/fleet\u0060 fallback | Copilot exposes no in-session subagent tool call equivalent to the Claude Code Task tool. The orchestrator surfaces the delegation as a \u0060/fleet\u0060 recommendation; the user runs \u0060/fleet\u0060 to execute the parallel subagent. |\n\nOrchestrator-side instructions, retry logic, and inspektera evaluation gating stay unchanged. Only the concrete delegation surface changes by runtime.\n\n### Orkestrera delegates to ⧉ realisera\n\nImplementation tasks are routed to realisera. Realisera runs its full cycle (orient, select, plan, spawn, verify, commit, log) as a subagent. It writes to PROGRESS.md and CHANGELOG.md. Orkestrera receives the result via task-notification and evaluates with inspektera.\n\n### Orkestrera delegates to ⛶ inspektera\n\nTwo roles: (1) as evaluator after each task completion, verifying acceptance criteria against the codebase, and (2) as health checker after plan completion, producing HEALTH.md grades. Inspektera is the discriminator in orkestrera's evaluate-then-proceed pattern.\n\n### Orkestrera delegates to ▤ dokumentera\n\nDocumentation tasks are routed to dokumentera. DOCS.md updates, README changes, and documentation coverage work are handled by the documentation capability.\n\n### Orkestrera delegates to ⬚ inspirera\n\nResearch tasks are routed to inspirera. During bootstrap (no plan), orkestrera chains inspirera for vision-gap analysis before planera creates a plan.\n\n### Orkestrera delegates to ⎘ optimera\n\nOptimization-shaped tasks (metric improvement, performance tuning) are routed to optimera rather than realisera.\n\n### Orkestrera delegates to ◰ visualisera\n\nVisual identity tasks (DESIGN.md updates, design token changes) are routed to visualisera.\n\n### Orkestrera chains ≡ planera\n\nWhen no plan exists or the current plan is complete, orkestrera invokes planera to create the next plan. Planera produces PLAN.md; orkestrera executes it.\n\n### Orkestrera reads ❈ resonera output\n\nDecision state provides firm constraints during task selection. Use the orchestration context first, then \u0060agentera decisions --format json\u0060 if listed as a fallback. If a task relates to an exploratory decision, orkestrera notes the uncertainty in the delegation context and preserves \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 from returned decision entries instead of treating compacted decisions as complete.\n\n### Orkestrera reads ⛥ visionera output\n\nVISION.md provides direction context used during bootstrap when chaining inspirera for gap analysis. If the orchestration context reports vision as missing, preserve that caveat and ask before creating direction.\n\n### Orkestrera reads ♾ profilera output\n\nThe decision profile provides persona context for calibrating delegation decisions. Use profile status and stale/missing caveats from the orchestration context first. Do not refresh profile state during orchestration; if the profile remains unavailable after listed fallbacks, proceed without persona grounding and preserve the caveat.\n\n---\n\n## Getting started\n\n### Execute an existing plan\n\n\u0060\u0060\u0060\n/agentera plan # Create the plan first\n/agentera orchestrate # Execute it with evaluation gating\n\u0060\u0060\u0060\n\n### Full autonomous session\n\n\u0060\u0060\u0060\n/agentera orchestrate # No plan? Creates one via inspirera → planera, then executes\n\u0060\u0060\u0060\n\n### Replacing /loop\n\nInstead of repeatedly invoking ⧉ realisera through a host loop, use ⎈ orkestrera for plan-aware, evaluated, multi-cycle execution. Orkestrera handles recurrence internally: it executes the plan, evaluates each task, and starts a new plan when done.\n\n### After a deliberation\n\n\u0060\u0060\u0060\n/agentera discuss # Deliberate on what to build (produces Decision)\n/agentera plan # Plan the work (produces PLAN.md)\n/agentera orchestrate # Execute with evaluation gating\n\u0060\u0060\u0060\n"`);
|
|
5
|
+
export default instructions;
|
|
6
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/orkestrera/instructions.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,267BAA267B,CAAC,CAAC;AACt+7B,eAAe,YAAY,CAAC"}
|