agentera 3.0.0-dev.6 → 3.0.0-next.1

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.
Files changed (195) hide show
  1. package/bundle/extract-corpus-parity.json +23 -0
  2. package/bundle/references/adapters/cursor.md +9 -8
  3. package/bundle/references/analysis/startup-measurement-contract.yaml +4 -4
  4. package/bundle/references/cli/parity-expected-actual-template.md +30 -0
  5. package/bundle/references/cli/update-channels.yaml +15 -0
  6. package/bundle/references/cli/vocabulary-index.yaml +6 -4
  7. package/bundle/references/cli/vocabulary.md +305 -301
  8. package/bundle/skills/agentera/SKILL.md +35 -27
  9. package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +4 -1
  10. package/bundle/skills/agentera/capabilities/profilera/schemas/exit.yaml +2 -1
  11. package/bundle/skills/agentera/capability_schema_contract.yaml +28 -0
  12. package/bundle/skills/agentera/references/contract.md +324 -315
  13. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +38 -33
  14. package/dist/analytics/extractCorpus/cli.js +49 -1
  15. package/dist/analytics/extractCorpus/cli.js.map +1 -1
  16. package/dist/analytics/extractCorpus/copilotSessions.js +47 -5
  17. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -1
  18. package/dist/analytics/extractCorpus/core.js +11 -5
  19. package/dist/analytics/extractCorpus/core.js.map +1 -1
  20. package/dist/analytics/extractCorpus/corpus.js +26 -13
  21. package/dist/analytics/extractCorpus/corpus.js.map +1 -1
  22. package/dist/analytics/extractCorpus/coverageAudit.js +261 -0
  23. package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -0
  24. package/dist/analytics/extractCorpus/cursorSessions.js +6 -3
  25. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -1
  26. package/dist/analytics/extractCorpus/extractCorpusParity.js +105 -0
  27. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -0
  28. package/dist/analytics/extractCorpus/index.js +3 -0
  29. package/dist/analytics/extractCorpus/index.js.map +1 -1
  30. package/dist/analytics/extractCorpus/sqliteCaps.js +44 -0
  31. package/dist/analytics/extractCorpus/sqliteCaps.js.map +1 -0
  32. package/dist/analytics/extractCorpus/sqliteSessions.js +98 -5
  33. package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -1
  34. package/dist/capabilities/inspirera/instructions.js +1 -1
  35. package/dist/capabilities/inspirera/instructions.js.map +1 -1
  36. package/dist/capabilities/planera/instructions.js +1 -1
  37. package/dist/capabilities/planera/instructions.js.map +1 -1
  38. package/dist/capabilities/profilera/instructions.js +1 -1
  39. package/dist/capabilities/profilera/instructions.js.map +1 -1
  40. package/dist/capabilities/realisera/instructions.js +1 -1
  41. package/dist/capabilities/realisera/instructions.js.map +1 -1
  42. package/dist/capabilities/resonera/instructions.js +1 -1
  43. package/dist/capabilities/resonera/instructions.js.map +1 -1
  44. package/dist/capabilities/visionera/instructions.js +1 -1
  45. package/dist/capabilities/visionera/instructions.js.map +1 -1
  46. package/dist/capabilities/visualisera/instructions.js +3 -4
  47. package/dist/capabilities/visualisera/instructions.js.map +1 -1
  48. package/dist/cli/appContext.js +2 -14
  49. package/dist/cli/appContext.js.map +1 -1
  50. package/dist/cli/capabilityContext/benchmark.js +2 -2
  51. package/dist/cli/capabilityContext/benchmark.js.map +1 -1
  52. package/dist/cli/capabilityContext/closeout.js +5 -5
  53. package/dist/cli/capabilityContext/closeout.js.map +1 -1
  54. package/dist/cli/capabilityContext/evidence.js +6 -6
  55. package/dist/cli/capabilityContext/evidence.js.map +1 -1
  56. package/dist/cli/capabilityContext/orchestration.js +5 -5
  57. package/dist/cli/capabilityContext/orchestration.js.map +1 -1
  58. package/dist/cli/capabilityContext/realisera.js +8 -8
  59. package/dist/cli/capabilityContext/realisera.js.map +1 -1
  60. package/dist/cli/capabilityContext/startup.js +8 -8
  61. package/dist/cli/capabilityContext/startup.js.map +1 -1
  62. package/dist/cli/capabilityContext/types.js +9 -9
  63. package/dist/cli/capabilityContext/types.js.map +1 -1
  64. package/dist/cli/commands/appHome.js +23 -0
  65. package/dist/cli/commands/appHome.js.map +1 -0
  66. package/dist/cli/commands/doctor.js +10 -105
  67. package/dist/cli/commands/doctor.js.map +1 -1
  68. package/dist/cli/commands/prime/bundleStatus.js +126 -0
  69. package/dist/cli/commands/prime/bundleStatus.js.map +1 -0
  70. package/dist/cli/commands/prime/collectOrientationState.js +143 -0
  71. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
  72. package/dist/cli/commands/prime/orientationOutput.js +172 -0
  73. package/dist/cli/commands/prime/orientationOutput.js.map +1 -0
  74. package/dist/cli/commands/prime/types.js +2 -0
  75. package/dist/cli/commands/prime/types.js.map +1 -0
  76. package/dist/cli/commands/prime/v1Migration.js +39 -0
  77. package/dist/cli/commands/prime/v1Migration.js.map +1 -0
  78. package/dist/cli/commands/prime.js +10 -549
  79. package/dist/cli/commands/prime.js.map +1 -1
  80. package/dist/cli/commands/report.js +8 -2
  81. package/dist/cli/commands/report.js.map +1 -1
  82. package/dist/cli/commands/state/docs.js +2 -2
  83. package/dist/cli/commands/state/docs.js.map +1 -1
  84. package/dist/cli/commands/state/todo.js +1 -1
  85. package/dist/cli/commands/state/todo.js.map +1 -1
  86. package/dist/cli/commands/validate.js +9 -9
  87. package/dist/cli/commands/validate.js.map +1 -1
  88. package/dist/cli/contracts/bundleStatus.js +2 -0
  89. package/dist/cli/contracts/bundleStatus.js.map +1 -0
  90. package/dist/cli/contracts/orientationState.js +2 -0
  91. package/dist/cli/contracts/orientationState.js.map +1 -0
  92. package/dist/cli/dispatch/argvParser.js +33 -0
  93. package/dist/cli/dispatch/argvParser.js.map +1 -0
  94. package/dist/cli/dispatch/check.js +18 -18
  95. package/dist/cli/dispatch/check.js.map +1 -1
  96. package/dist/cli/dispatch/commands.js +27 -0
  97. package/dist/cli/dispatch/commands.js.map +1 -0
  98. package/dist/cli/dispatch/index.js +3 -1
  99. package/dist/cli/dispatch/index.js.map +1 -1
  100. package/dist/cli/dispatch/lifecycle.js +100 -55
  101. package/dist/cli/dispatch/lifecycle.js.map +1 -1
  102. package/dist/cli/dispatch/prime.js +31 -27
  103. package/dist/cli/dispatch/prime.js.map +1 -1
  104. package/dist/cli/dispatch/state.js +11 -16
  105. package/dist/cli/dispatch/state.js.map +1 -1
  106. package/dist/cli/help.js +30 -0
  107. package/dist/cli/help.js.map +1 -1
  108. package/dist/cli/orientation/attention.js +57 -0
  109. package/dist/cli/orientation/attention.js.map +1 -0
  110. package/dist/cli/orientation/corpusCoverage.js +71 -0
  111. package/dist/cli/orientation/corpusCoverage.js.map +1 -0
  112. package/dist/cli/orientation.js +40 -27
  113. package/dist/cli/orientation.js.map +1 -1
  114. package/dist/cli/startupCompletenessContract.js +49 -0
  115. package/dist/cli/startupCompletenessContract.js.map +1 -0
  116. package/dist/cli/todoSeverity.js +19 -0
  117. package/dist/cli/todoSeverity.js.map +1 -0
  118. package/dist/core/jsonValue.js +6 -0
  119. package/dist/core/jsonValue.js.map +1 -0
  120. package/dist/core/pyjson.js +67 -2
  121. package/dist/core/pyjson.js.map +1 -1
  122. package/dist/hooks/compaction/apply.js +25 -6
  123. package/dist/hooks/compaction/apply.js.map +1 -1
  124. package/dist/hooks/compaction/dryRun.js +3 -3
  125. package/dist/hooks/compaction/dryRun.js.map +1 -1
  126. package/dist/hooks/compaction/index.js +2 -2
  127. package/dist/hooks/compaction/index.js.map +1 -1
  128. package/dist/hooks/compaction/parse.js +132 -3
  129. package/dist/hooks/compaction/parse.js.map +1 -1
  130. package/dist/hooks/compaction/status.js +3 -5
  131. package/dist/hooks/compaction/status.js.map +1 -1
  132. package/dist/hooks/cursorSessionStart.js +10 -2
  133. package/dist/hooks/cursorSessionStart.js.map +1 -1
  134. package/dist/hooks/validateArtifact/markdown.js +57 -6
  135. package/dist/hooks/validateArtifact/markdown.js.map +1 -1
  136. package/dist/setup/cursor.js +1 -1
  137. package/dist/setup/cursor.js.map +1 -1
  138. package/dist/setup/doctor/report.js +2 -58
  139. package/dist/setup/doctor/report.js.map +1 -1
  140. package/dist/state/installRoot.js +49 -18
  141. package/dist/state/installRoot.js.map +1 -1
  142. package/dist/state/startupAnalysis/helpers.js +7 -52
  143. package/dist/state/startupAnalysis/helpers.js.map +1 -1
  144. package/dist/state/startupAnalysis/report.js +9 -31
  145. package/dist/state/startupAnalysis/report.js.map +1 -1
  146. package/dist/state/startupAnalysis/threshold.js +1 -1
  147. package/dist/state/startupAnalysis/threshold.js.map +1 -1
  148. package/dist/upgrade/appModel.js +1 -4
  149. package/dist/upgrade/appModel.js.map +1 -1
  150. package/dist/upgrade/bundleEvidence.js +34 -0
  151. package/dist/upgrade/bundleEvidence.js.map +1 -0
  152. package/dist/upgrade/channels.js +8 -1
  153. package/dist/upgrade/channels.js.map +1 -1
  154. package/dist/upgrade/cliProbe.js +22 -0
  155. package/dist/upgrade/cliProbe.js.map +1 -0
  156. package/dist/upgrade/coexistenceProbe.js +1 -4
  157. package/dist/upgrade/coexistenceProbe.js.map +1 -1
  158. package/dist/upgrade/compatibility.js +1 -4
  159. package/dist/upgrade/compatibility.js.map +1 -1
  160. package/dist/upgrade/doctor.js +168 -173
  161. package/dist/upgrade/doctor.js.map +1 -1
  162. package/dist/upgrade/doctorClassifier.js +208 -0
  163. package/dist/upgrade/doctorClassifier.js.map +1 -0
  164. package/dist/upgrade/migrateArtifactsV2ToV3.js +1 -1
  165. package/dist/upgrade/nextMajorDoctor.js +7 -3
  166. package/dist/upgrade/nextMajorDoctor.js.map +1 -1
  167. package/dist/upgrade/npxPlatformStatus.js +24 -0
  168. package/dist/upgrade/npxPlatformStatus.js.map +1 -0
  169. package/dist/upgrade/projectIntegration.js +54 -71
  170. package/dist/upgrade/projectIntegration.js.map +1 -1
  171. package/dist/upgrade/projectIntegrationDecision.js +93 -0
  172. package/dist/upgrade/projectIntegrationDecision.js.map +1 -0
  173. package/dist/upgrade/versionResolution.js +1 -1
  174. package/dist/upgrade/versionResolution.js.map +1 -1
  175. package/dist/validate/lifecycleAdapters/legacyPythonParity.js +93 -0
  176. package/dist/validate/lifecycleAdapters/legacyPythonParity.js.map +1 -0
  177. package/dist/validate/lifecycleAdapters/nodeFormChecks.js +488 -0
  178. package/dist/validate/lifecycleAdapters/nodeFormChecks.js.map +1 -0
  179. package/dist/validate/lifecycleAdapters/shared.js +198 -0
  180. package/dist/validate/lifecycleAdapters/shared.js.map +1 -0
  181. package/dist/validate/lifecycleAdapters.js +12 -722
  182. package/dist/validate/lifecycleAdapters.js.map +1 -1
  183. package/package.json +1 -1
  184. package/dist/cli/commands/backfill.js +0 -84
  185. package/dist/cli/commands/backfill.js.map +0 -1
  186. package/dist/cli/commands/state.js +0 -1023
  187. package/dist/cli/commands/state.js.map +0 -1
  188. package/dist/core/git.js +0 -43
  189. package/dist/core/git.js.map +0 -1
  190. package/dist/hooks/compaction.js +0 -935
  191. package/dist/hooks/compaction.js.map +0 -1
  192. package/dist/hooks/validateArtifact.js +0 -924
  193. package/dist/hooks/validateArtifact.js.map +0 -1
  194. package/dist/state/progressCommit.js +0 -289
  195. package/dist/state/progressCommit.js.map +0 -1
@@ -1,8 +1,9 @@
1
1
  import fs from "node:fs";
2
2
  import { createRequire } from "node:module";
3
3
  import { resolvePath } from "../../core/paths.js";
4
- import { MAX_SQLITE_ROWS, MAX_SQLITE_SESSIONS, isoFromMtime, record, signalType, textFromContent, } from "./core.js";
4
+ import { isoFromMtime, record, signalType, textFromContent, } from "./core.js";
5
5
  import { isPlainObject, isFilePath, rglob } from "./core.js";
6
+ import { resolveSqliteCaps, } from "./sqliteCaps.js";
6
7
  const requireCjs = createRequire(import.meta.url);
7
8
  /** Mirrors Python raising PermissionError on a locked/busy store. */
8
9
  export class PermissionDeniedError extends Error {
@@ -63,7 +64,7 @@ export function qualified(alias, column, label) {
63
64
  const escaped = column.replace(/"/g, '""');
64
65
  return `${alias}."${escaped}" AS ${label}`;
65
66
  }
66
- function opencodeRows(conn) {
67
+ function resolveOpencodeSchema(conn) {
67
68
  const tables = new Set(conn.prepare("SELECT name FROM sqlite_master WHERE type = 'table'").all().map((r) => String(r.name)));
68
69
  for (const t of ["session", "message", "part"]) {
69
70
  if (!tables.has(t)) {
@@ -96,6 +97,29 @@ function opencodeRows(conn) {
96
97
  const partId = firstColumn(partCols, ["id", "part_id", "partID"]);
97
98
  const sortExpr = `COALESCE(m."${messageTime || messageId}", p."${partTime || partMessage}", s."${sessionTime || sessionId}")`;
98
99
  const recentSessionExpr = `s."${sessionUpdated || sessionTime || sessionId}"`;
100
+ return {
101
+ sessionId,
102
+ messageId,
103
+ messageSession,
104
+ partMessage,
105
+ messageData,
106
+ partData,
107
+ roleCol,
108
+ messageTime,
109
+ partTime,
110
+ sessionTime,
111
+ sessionUpdated,
112
+ projectCol,
113
+ messageText,
114
+ partText,
115
+ partType,
116
+ partId,
117
+ sortExpr,
118
+ recentSessionExpr,
119
+ };
120
+ }
121
+ function opencodeRows(conn, caps, schema) {
122
+ const { sessionId, messageId, messageSession, partMessage, messageData, partData, roleCol, messageTime, partTime, sessionTime, projectCol, messageText, partText, partType, partId, sortExpr, recentSessionExpr, } = schema;
99
123
  const query = `
100
124
  WITH recent_sessions AS (
101
125
  SELECT s."${sessionId}" AS recent_session_id
@@ -135,16 +159,81 @@ function opencodeRows(conn) {
135
159
  FROM recent
136
160
  ORDER BY sort_time, message_id, part_id
137
161
  `;
138
- return conn.prepare(query).all(MAX_SQLITE_SESSIONS, MAX_SQLITE_ROWS);
162
+ return conn.prepare(query).all(caps.maxSessions, caps.maxRows);
163
+ }
164
+ export function probeOpencodeTruncation(conn, caps, fallback) {
165
+ const schema = resolveOpencodeSchema(conn);
166
+ const { sessionId, sessionTime, sessionUpdated, recentSessionExpr } = schema;
167
+ const sessionTimeCol = sessionTime || sessionId;
168
+ const sessionCount = Number(conn.prepare("SELECT COUNT(*) AS c FROM session").get()?.c ?? 0);
169
+ if (sessionCount > caps.maxSessions) {
170
+ const query = `
171
+ SELECT MIN(session_ts) AS truncated_at
172
+ FROM (
173
+ SELECT s."${sessionTimeCol}" AS session_ts
174
+ FROM session s
175
+ ORDER BY ${recentSessionExpr} DESC,
176
+ s."${sessionId}" DESC
177
+ LIMIT -1 OFFSET ?
178
+ )
179
+ `;
180
+ const row = conn.prepare(query).get(caps.maxSessions);
181
+ const truncatedAt = sqliteTimestamp(row?.truncated_at, fallback);
182
+ return { truncatedAt, cap: "sessions", limit: caps.maxSessions };
183
+ }
184
+ const { messageId, messageSession, partMessage, roleCol, messageTime, partTime, messageData, partData, messageText, partText, partType, partId, sortExpr, } = schema;
185
+ const rowCountQuery = `
186
+ WITH recent_sessions AS (
187
+ SELECT s."${sessionId}" AS recent_session_id
188
+ FROM session s
189
+ ORDER BY ${recentSessionExpr} DESC,
190
+ s."${sessionId}" DESC
191
+ LIMIT ?
192
+ )
193
+ SELECT COUNT(*) AS c
194
+ FROM message m
195
+ JOIN session s ON m."${messageSession}" = s."${sessionId}"
196
+ JOIN recent_sessions rs ON rs.recent_session_id = s."${sessionId}"
197
+ LEFT JOIN part p ON p."${partMessage}" = m."${messageId}"
198
+ `;
199
+ const rowCount = Number(conn.prepare(rowCountQuery).get(caps.maxSessions)?.c ?? 0);
200
+ if (rowCount > caps.maxRows) {
201
+ const query = `
202
+ WITH recent_sessions AS (
203
+ SELECT s."${sessionId}" AS recent_session_id
204
+ FROM session s
205
+ ORDER BY ${recentSessionExpr} DESC,
206
+ s."${sessionId}" DESC
207
+ LIMIT ?
208
+ ),
209
+ ranked AS (
210
+ SELECT ${sortExpr} AS sort_time
211
+ FROM message m
212
+ JOIN session s ON m."${messageSession}" = s."${sessionId}"
213
+ JOIN recent_sessions rs ON rs.recent_session_id = s."${sessionId}"
214
+ LEFT JOIN part p ON p."${partMessage}" = m."${messageId}"
215
+ ORDER BY sort_time DESC,
216
+ m."${messageId}" DESC,
217
+ p."${partId || partMessage}" DESC
218
+ LIMIT -1 OFFSET ?
219
+ )
220
+ SELECT MIN(sort_time) AS truncated_at FROM ranked
221
+ `;
222
+ const row = conn.prepare(query).get(caps.maxSessions, caps.maxRows);
223
+ const truncatedAt = sqliteTimestamp(row?.truncated_at, fallback);
224
+ return { truncatedAt, cap: "rows", limit: caps.maxRows };
225
+ }
226
+ return null;
139
227
  }
140
228
  function opencodeDbCandidates(storePath) {
141
229
  if (isFilePath(storePath))
142
230
  return [storePath];
143
231
  return rglob(storePath, "opencode.db");
144
232
  }
145
- export function extractOpencodeSessions(storePath, errors) {
233
+ export function extractOpencodeSessions(storePath, errors, ctx) {
146
234
  if (storePath === null || !fs.existsSync(storePath))
147
235
  return [];
236
+ const caps = ctx?.sqliteCaps ?? resolveSqliteCaps();
148
237
  const records = [];
149
238
  for (const dbPath of opencodeDbCandidates(storePath).slice(0, 1)) {
150
239
  const fallbackTimestamp = isoFromMtime(dbPath);
@@ -152,7 +241,11 @@ export function extractOpencodeSessions(storePath, errors) {
152
241
  let conn = null;
153
242
  try {
154
243
  conn = openSqlite(dbPath);
155
- rows = opencodeRows(conn);
244
+ const truncation = probeOpencodeTruncation(conn, caps, fallbackTimestamp);
245
+ if (truncation && ctx)
246
+ ctx.truncation = truncation;
247
+ const schema = resolveOpencodeSchema(conn);
248
+ rows = opencodeRows(conn, caps, schema);
156
249
  }
157
250
  catch (exc) {
158
251
  const msg = exc.message || "";
@@ -1 +1 @@
1
- {"version":3,"file":"sqliteSessions.js","sourceRoot":"","sources":["../../../src/analytics/extractCorpus/sqliteSessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAEL,eAAe,EACf,mBAAmB,EAEnB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,UAAU,GAAG,aAAa,CAAC,MAA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S,EAAE;iBACvE,CAAC,CACH,CAAC;YACJ,CAAC;YACD,IAAI,IAAI,KAAK,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC/B,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;gBAChC,IAAI,GAAG,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CACV,MAAM,CAAC;wBACL,UAAU,EAAE,gBAAgB;wBAC5B,SAAS,EAAE,IAAI,CAAC,SAAS;wBACzB,WAAW;wBACX,OAAO,EAAE,UAAU;wBACnB,WAAW,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;wBAC3E,SAAS,EAAE,IAAI,CAAC,UAAU;wBAC1B,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE;qBAC5C,CAAC,CACH,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Source: skills/agentera/capabilities/inspirera/instructions.md (relocated D65)
2
2
  // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
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"`);
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 where/how it concretely applies to the target.\n\n### [Concept Name]\nSection repeats for each significant concept (typically 2–5).\n\nReasoning about applicability SHOULD live in the response text, not the matrix.\nThe Applicability Matrix MUST contain only conclusions, not reasoning chains.\nEach matrix cell MUST be ≤15 words.\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]\nSteps SHOULD be ordered 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
5
  export default instructions;
6
6
  //# sourceMappingURL=instructions.js.map
@@ -1 +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"}
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,umZAAumZ,CAAC,CAAC;AAClqZ,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Source: skills/agentera/capabilities/planera/instructions.md (relocated D65)
2
2
  // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
3
  // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
- export const instructions = JSON.parse(String.raw `"# PLANERA\n\n**Planning Logic: Adaptive Notation, Executable Requirements Architecture. Enumerate, Refine, Assign**\n\nScale-adaptive planning bridging deliberation and execution. PLAN.md with behavioral acceptance criteria for realisera. Planera owns WHAT and WHY; realisera owns HOW.\n\nVoice: the sharp colleague, here to plan the work. Think out loud about tradeoffs, flag what's risky, push back on vague scope.\n\nThree levels: **skip** (trivial), **light** (single-cycle), **full** (multi-cycle with adversarial review).\n\nSkill introduction: \u0060─── ≡ planera · planning ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **≡** (protocol ref: SG5). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne file and one archive directory in \u0060.agentera/\u0060.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060PLAN.md\u0060 | Canonical plan artifact, stored as \u0060.agentera/plan.yaml\u0060 unless mapped otherwise. Spec, tasks, acceptance criteria. | Created during planning session. |\n| \u0060.agentera/archive/\u0060 | Completed or discarded plans. | Created on first archival. |\n\n**Presence signal**: \u0060.agentera/plan.yaml\u0060 means active planned work. Absence means no plan, so realisera reasons from VISION.md.\n\nFor read-only current-plan startup or evaluation context, use \u0060agentera plan\n--format json\u0060 first. When its \u0060source_contract.complete_for_plan_artifact\u0060 is\ntrue, its \u0060summary\u0060, \u0060entries\u0060, and \u0060source_contract\u0060 are complete for plan\nmetadata, task dependencies, acceptance criteria, task evidence, overall\nacceptance, surprises, and previous-plan archive references; do not reread the\npersisted plan artifact defensively. Raw mapped plan artifact access is still\nrequired for writing a new plan, archiving a completed plan, artifact validation,\ncorruption diagnostics, or when CLI output is unavailable or incomplete after\nCLI fallbacks.\n\nWhen a user directly invokes ≡ planera to create a new plan and the existing\nPLAN.md is already complete, archiving that completed plan before writing its\nreplacement is implicit in the direct Planera invocation and does not require a\nseparate pre-write confirmation. Human-initiated replacement plans still require\nplan approval before the write. Replacing, discarding, or archiving an active or\nincomplete plan is not implicit; ask for explicit confirmation before the write.\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060plan\u0060 to locate the active installed schema; use \u0060artifact_locations\u0060 or \u0060agentera query --list-artifacts --format json\u0060 to locate the mapped plan path and raw-access boundary before any diagnostic raw read. Do not search Agentera directories manually. Existing plan artifacts provide repository-local examples of the shape.\n\nFor normal Planera startup, \u0060agentera prime --context planera --format json\u0060\nexposes \u0060capability_context.context.planning_context.startup_contract\u0060 as the\ncompact read model for planning levels, step markers, CLI-first orientation, plan\nartifact boundaries, full-plan review/self-audit requirements, and handoff\nexpectations. Use that context before rereading this prose. Read this file when editing Planera,\nresolving contradiction or ambiguity, validating detailed behavior not covered\nby compact context, or investigating benchmark/read-trigger evidence.\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, and read 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### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: status tokens VT1-VT4 (■/▣/□/▨), list item VT15 (▸), inline separator VT16 (·), section divider VT14, flow/target VT17 (→). Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Decision labels DL1-DL3 for DECISIONS.md reading. Severity issue levels SI1-SI4 for TODO entries. Phases PH1-PH5 for phase context.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference.\n\n---\n\n## Step 0: Detect level\n\nAssess work complexity. Read the description (user, DECISIONS.md, or TODO.md). Scan codebase if needed.\n\n| Signal | Level |\n|--------|-------|\n| Single-file change, bug fix, config tweak, < 50 lines | **Skip** |\n| One module affected, clear scope, fits one realisera cycle | **Light** |\n| Multiple modules, multi-file changes, 3+ logical steps, new feature spanning architecture | **Full** |\n\n**Skip**: This doesn't need a plan. Suggest ⧉ realisera and wait for\nconfirmation unless the user already asked to implement now. Stop here.\n\n**Light or Full**: Proceed to planning.\n\nIf uncertain between light and full, default to light.\n\n---\n\nStep markers: display \u0060── step N/6: verb\u0060 before each step (Step 0 excluded). Steps: orient, specify, review, audit, write, handoff.\n\n## Step 1: Orient\n\nUse CLI-provided startup state and listed CLI fallbacks before raw artifact reads.\nFor current PLAN.md context, prefer \u0060agentera plan --format json\u0060; if its source\ncontract is complete, skip raw \u0060.agentera/plan.yaml\u0060 reads during this read-only\norientation step.\n\nOrient on VISION.md, DECISIONS.md, TODO.md, HEALTH.md, PROGRESS.md, and profile\nstate through the supported CLI state seam where available. If a required state\nfamily is missing or incomplete, run the CLI-provided fallback before any\nlast-resort raw artifact read.\n\n1. **VISION.md**: the north star (if exists)\n2. **DECISIONS.md**: use \u0060agentera decisions --format json\u0060; read \u0060firm\u0060 (DL1) entries only (hard constraints for planning), and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical context.\n3. **HEALTH.md**: latest codebase health grades (if exists)\n4. **TODO.md**: related known issues (if exists)\n5. **PROGRESS.md**: what was built recently (if exists)\n6. **Decision profile**: read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly when it exists. If missing, proceed without persona grounding.\n\n7. **Project discovery** (if unfamiliar):\n - Map directory structure\n - Read dependency manifests, README.md, CLAUDE.md, AGENTS.md\n - Identify build/test/lint commands\n\nBefore decomposing: summarize the constraints from VISION.md and DECISIONS.md. If the decisions source contract reports \u0060complete_for_normal_deliberation_context=true\u0060, do not read raw \u0060.agentera/decisions.yaml\u0060 for normal planning context.\n\n---\n\n## Step 2: Specify\n\nDefine WHAT and WHY. Intent layer, not implementation details.\n\nEffort-bias check: when comparing plan shapes, do not treat effort spent constructing an option as evidence for it.\n\n### Light plans\n\nBrief conversation (2-3 questions):\n\n- **What**: one-paragraph description of the change\n- **Why**: what value it delivers or what problem it solves\n- **Constraints**: what must NOT break, what's out of scope\n- **Acceptance criteria**: 3-5 behavioral criteria in Given/When/Then format\n\nWrite PLAN.md. Present for approval (human-initiated) or proceed (autonomous).\n\n### Full plans\n\nDeeper conversation:\n\n- **What**: detailed description\n- **Why**: motivation, user impact, relationship to VISION.md\n- **Constraints**: architectural boundaries, off-limits modules\n- **Scope**: what's in, out, deferred\n- **Design**: high-level approach. NOT implementation details.\n- **Task decomposition**: 3-8 ordered tasks, each one realisera cycle. Per task: description, dependencies, 3-5 behavioral Given/When/Then acceptance criteria\n- **Test proportionality**: for tasks with tests, add a proportionality target. Default: one pass + one fail per testable unit.\n- **Plan-level current-state check**: every full plan ends with a final state sync task depending on all prior tasks.\n- **Version bump check**: add a bump task when DOCS.md versioning exists and the plan includes \u0060feat\u0060/\u0060fix\u0060 work.\n- **Overall acceptance criteria**: behavioral criteria for the complete feature\n\nPresent for approval or proceed to adversarial review.\n\n---\n\n## Step 3: Review (full plans only)\n\nSpawn an adversarial critic. The critic MUST find issues.\n\n\u0060\u0060\u0060\nYou are reviewing a development plan for [project]. Your job is to find problems.\n\n## The plan\n[Full PLAN.md content]\n\n## Your mandate\nYou MUST identify at least one issue. \"Looks good\" is not acceptable.\n\nLook for:\n- Tasks too large for a single implementation cycle\n- Missing dependencies between tasks\n- Acceptance criteria too vague to verify\n- Acceptance criteria that leak implementation details\n- Scope gaps or scope creep\n- Ordering issues\n- Conflicting constraints\n- Unacknowledged risks\n\u0060\u0060\u0060\n\nAddress legitimate issues; dismiss false positives with rationale. Present reviewed plan.\n\n---\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, abstraction creep, and filler accumulation.\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\n## Step 5: Write PLAN.md\n\nWrite tasks with acceptance criteria. The conversation preserves reasoning; the artifact preserves the plan.\n\nWrite the plan to \u0060.agentera/plan.yaml\u0060.\n\nArtifact writing follows contract Section 24 conventions.\n\n### Light plan format\n\n\u0060\u0060\u0060yaml\nheader:\n level: light\n created: YYYY-MM-DD\n status: active\n title: Short Title\nwhat: One paragraph.\nwhy: Motivation and value.\nconstraints: What must not break; what is out of scope.\noverall_acceptance:\n - GIVEN context WHEN action THEN expected outcome\ntasks: []\n\u0060\u0060\u0060\n\n### Full plan format\n\n\u0060\u0060\u0060yaml\nheader:\n level: full\n created: YYYY-MM-DD\n status: active\n reviewed: YYYY-MM-DD\n critic_issues: \"N found, N addressed, N dismissed\"\n title: Short Title\nwhat: Detailed description.\nwhy: Motivation, user impact, relationship to vision.\nconstraints: Architectural boundaries and off-limits modules.\nscope:\n included: []\n excluded: []\n deferred: []\ndesign: High-level approach, not implementation details.\ntasks:\n - number: 1\n name: Title\n depends_on: []\n status: pending\n acceptance:\n - GIVEN context WHEN action THEN expected outcome\noverall_acceptance:\n - GIVEN context WHEN action THEN expected outcome\nsurprises: []\n\u0060\u0060\u0060\n\n---\n\n## Step 6: Handoff\n\n- **Single task**: suggest ⧉ realisera to execute and wait for confirmation.\n- **Full plan**: suggest ⎈ orkestrera to execute the entire plan and wait for confirmation.\n\n---\n\n## How realisera reads PLAN.md\n\nWhen PLAN.md has pending tasks, realisera's Step 2 changes:\n\n1. Read PLAN.md\n2. Find tasks with \u0060Status: □\u0060 (VT3) pending whose dependencies are all \u0060Status: ■\u0060 (VT1) complete\n3. Pick the first eligible task\n4. Use the task's acceptance criteria as exit conditions\n5. After committing, update task status to \u0060■ complete\u0060\n6. If unexpected, add to \u0060## Surprises\u0060\n7. If a task doesn't make sense, mark it \u0060skipped\u0060\n\nWhen all tasks complete:\n\n1. Archive PLAN.md to \u0060.agentera/archive/plan-{date}.yaml\u0060\n2. Delete \u0060.agentera/plan.yaml\u0060\n3. Realisera resumes vision-driven work selection\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER include implementation details in PLAN.md. Planera owns WHAT and WHY. Realisera owns HOW.\n- NEVER write acceptance criteria that reference implementation. Use behavioral, domain-language criteria only.\n- NEVER produce more than 8 tasks in a full plan. If work requires more, split into sequential plans.\n- NEVER modify PLAN.md during a realisera cycle except to update task status and add surprises.\n- NEVER skip adversarial review for full plans.\n- NEVER auto-approve plans when human-initiated. Present for approval.\n- NEVER plan trivial work. If skip level, say so and stop.\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─── ≡ planera · <status> ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 (VT15) bullet details.\n\n- **complete** (EX1): PLAN.md written and approved, adversarial review ran for full plans, handoff suggested.\n- **flagged** (EX2): Plan produced with caveats: critic issues dismissed, scope larger than ideal, or acceptance criteria not fully behavioral.\n- **stuck** (EX3): Cannot plan: description too ambiguous, context files contradict, or user declined approval with no revision path.\n- **waiting** (EX4): Feature not specified enough for acceptance criteria, or key architectural constraints unknown.\n\n---\n\n## Cross-capability integration\n\nPlanera is the bridge between deliberation and execution.\n\n### Fed by ❈ resonera\n\nWhen resonera's deliberation concludes with a decision to build, the next step is ≡ planera. DECISIONS.md provides the \"why\" context.\n\n### Feeds ⧉ realisera\n\nPLAN.md tasks become realisera's work queue. Task acceptance criteria become cycle exit conditions. Realisera updates status and logs surprises.\n\n### Feeds ⎘ optimera\n\nWhen a plan includes optimization-shaped tasks, those tasks can be delegated to optimera.\n\n### Informed by ⛶ inspektera\n\nHEALTH.md findings can trigger remediation plans. Inspektera reveals structural issues; planera produces a plan to address them.\n\n### Informed by ♾ profilera\n\nDecision profile calibrates planning depth and pattern preferences.\n\n### Informed by ⬚ inspirera\n\nWhen inspirera recommends patterns or libraries, planera incorporates them into the plan's design section.\n\n### Reads ⛥ visionera output\n\nVISION.md provides the north star that planera reads during Orient.\n\n### Fed by ▤ dokumentera (docs-first workflow)\n\nIn the docs-first workflow, dokumentera writes intent docs first, then planera decomposes them into tasks.\n\n### Reads ▤ dokumentera versioning conventions\n\nPlanera reads the \u0060versioning\u0060 block from DOCS.md. When the plan includes \u0060feat\u0060/\u0060fix\u0060 work, planera appends a version bump task.\n\n---\n\n## Getting started\n\n### Planning a new feature\n\n1. ❈ resonera: deliberate on what to build and why\n2. ≡ planera: plan how to build it\n3. ⧉ realisera or ⎈ orkestrera: execute\n\n### Planning a remediation\n\n1. ⛶ inspektera: audit codebase health\n2. ≡ planera: plan fixes\n3. ⧉ realisera: execute\n\n### Mid-feature replanning\n\nIf realisera logs multiple surprises in PLAN.md:\n\n1. Read the surprises section\n2. ≡ planera: reassess tasks\n3. Resume ⧉ realisera\n\n### Skipping the plan\n\nFor trivial work, planera detects skip level and routes to ⧉ realisera directly.\n"`);
4
+ export const instructions = JSON.parse(String.raw `"# PLANERA\n\n**Planning Logic: Adaptive Notation, Executable Requirements Architecture. Enumerate, Refine, Assign**\n\nScale-adaptive planning bridging deliberation and execution. PLAN.md with behavioral acceptance criteria for realisera. Planera owns WHAT and WHY; realisera owns HOW.\n\nVoice: the sharp colleague, here to plan the work. Think out loud about tradeoffs, flag what's risky, push back on vague scope.\n\nThree levels: **skip** (trivial), **light** (single-cycle), **full** (multi-cycle with adversarial review).\n\nSkill introduction: \u0060─── ≡ planera · planning ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **≡** (protocol ref: SG5). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne file and one archive directory in \u0060.agentera/\u0060.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060PLAN.md\u0060 | Canonical plan artifact, stored as \u0060.agentera/plan.yaml\u0060 unless mapped otherwise. Spec, tasks, acceptance criteria. | Created during planning session. |\n| \u0060.agentera/archive/\u0060 | Completed or discarded plans. | Created on first archival. |\n\n**Presence signal**: \u0060.agentera/plan.yaml\u0060 means active planned work. Absence means no plan, so realisera reasons from VISION.md.\n\nFor read-only current-plan startup or evaluation context, use \u0060agentera plan\n--format json\u0060 first. When its \u0060source_contract.complete_for_plan_artifact\u0060 is\ntrue, its \u0060summary\u0060, \u0060entries\u0060, and \u0060source_contract\u0060 are complete for plan\nmetadata, task dependencies, acceptance criteria, task evidence, overall\nacceptance, surprises, and previous-plan archive references; do not reread the\npersisted plan artifact defensively. Raw mapped plan artifact access is still\nrequired for writing a new plan, archiving a completed plan, artifact validation,\ncorruption diagnostics, or when CLI output is unavailable or incomplete after\nCLI fallbacks.\n\nWhen a user directly invokes ≡ planera to create a new plan and the existing\nPLAN.md is already complete, archiving that completed plan before writing its\nreplacement is implicit in the direct Planera invocation and does not require a\nseparate pre-write confirmation. Human-initiated replacement plans still require\nplan approval before the write. Replacing, discarding, or archiving an active or\nincomplete plan is not implicit; ask for explicit confirmation before the write.\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060plan\u0060 to locate the active installed schema; use \u0060artifact_locations\u0060 or \u0060agentera query --list-artifacts --format json\u0060 to locate the mapped plan path and raw-access boundary before any diagnostic raw read. Do not search Agentera directories manually. Existing plan artifacts provide repository-local examples of the shape.\n\nFor normal Planera startup, \u0060agentera prime --context planera --format json\u0060\nexposes \u0060capability_context.context.planning_context.startup_contract\u0060 as the\ncompact read model for planning levels, step markers, CLI-first orientation, plan\nartifact boundaries, full-plan review/self-audit requirements, and handoff\nexpectations. Use that context before rereading this prose. Read this file when editing Planera,\nresolving contradiction or ambiguity, validating detailed behavior not covered\nby compact context, or investigating benchmark/read-trigger evidence.\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, and read 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### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: status tokens VT1-VT4 (■/▣/□/▨), list item VT15 (▸), inline separator VT16 (·), section divider VT14, flow/target VT17 (→). Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Decision labels DL1-DL3 for DECISIONS.md reading. Severity issue levels SI1-SI4 for TODO entries. Phases PH1-PH5 for phase context.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference.\n\n---\n\n## Step 0: Detect level\n\nAssess work complexity. Read the description (user, DECISIONS.md, or TODO.md). Scan codebase if needed.\n\n| Signal | Level |\n|--------|-------|\n| Single-file change, bug fix, config tweak, < 50 lines | **Skip** |\n| One module affected, clear scope, fits one realisera cycle | **Light** |\n| Multiple modules, multi-file changes, 3+ logical steps, new feature spanning architecture | **Full** |\n\n**Skip**: This doesn't need a plan. Suggest ⧉ realisera and wait for\nconfirmation unless the user already asked to implement now. Stop here.\n\n**Light or Full**: Proceed to planning.\n\nIf uncertain between light and full, default to light.\n\n---\n\nStep markers: display \u0060── step N/6: verb\u0060 before each step (Step 0 excluded). Steps: orient, specify, review, audit, write, handoff.\n\n## Step 1: Orient\n\nUse CLI-provided startup state and listed CLI fallbacks before raw artifact reads.\nFor current PLAN.md context, prefer \u0060agentera plan --format json\u0060; if its source\ncontract is complete, skip raw \u0060.agentera/plan.yaml\u0060 reads during this read-only\norientation step.\n\nOrient on VISION.md, DECISIONS.md, TODO.md, HEALTH.md, PROGRESS.md, and profile\nstate through the supported CLI state seam where available. If a required state\nfamily is missing or incomplete, run the CLI-provided fallback before any\nlast-resort raw artifact read.\n\n1. **VISION.md**: the north star (if exists)\n2. **DECISIONS.md**: use \u0060agentera decisions --format json\u0060; read \u0060firm\u0060 (DL1) entries only (hard constraints for planning), and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical context.\n3. **HEALTH.md**: latest codebase health grades (if exists)\n4. **TODO.md**: related known issues (if exists)\n5. **PROGRESS.md**: what was built recently (if exists)\n6. **Decision profile**: read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly when it exists. If missing, proceed without persona grounding.\n\n7. **Project discovery** (if unfamiliar):\n - Map directory structure\n - Read dependency manifests, README.md, CLAUDE.md, AGENTS.md\n - Identify build/test/lint commands\n\nBefore decomposing: summarize the constraints from VISION.md and DECISIONS.md. If the decisions source contract reports \u0060complete_for_normal_deliberation_context=true\u0060, do not read raw \u0060.agentera/decisions.yaml\u0060 for normal planning context.\n\n---\n\n## Step 2: Specify\n\nDefine WHAT and WHY. Intent layer, not implementation details.\n\nEffort-bias check: when comparing plan shapes, do not treat effort spent constructing an option as evidence for it.\n\n### Light plans\n\nBrief conversation (2-3 questions):\n\n- **What**: one-paragraph description of the change\n- **Why**: what value it delivers or what problem it solves\n- **Constraints**: what must NOT break, what's out of scope\n- **Acceptance criteria**: 3-5 behavioral criteria in Given/When/Then format\n\nWrite PLAN.md. Present for approval (human-initiated) or proceed (autonomous).\n\n### Full plans\n\nDeeper conversation:\n\n- **What**: detailed description\n- **Why**: motivation, user impact, relationship to VISION.md\n- **Constraints**: architectural boundaries, off-limits modules\n- **Scope**: what's in, out, deferred\n- **Design**: approach at the level of subsystems and phases. MUST NOT name modules, libraries, file paths, or code structure; those belong in scope or task-level acceptance. Design SHOULD describe how subsystems interrelate and the order phases SHOULD run in.\n- **Task decomposition**: 3-8 ordered tasks, each one realisera cycle. Per task: description, dependencies, 3-5 behavioral Given/When/Then acceptance criteria\n- **Test proportionality**: for tasks with tests, add a proportionality target. Default: one pass + one fail per testable unit.\n- **Plan-level current-state check**: every full plan ends with a final state sync task depending on all prior tasks.\n- **Version bump check**: add a bump task when DOCS.md versioning exists and the plan includes \u0060feat\u0060/\u0060fix\u0060 work.\n- **Overall acceptance criteria**: behavioral criteria for the complete feature\n\nPresent for approval or proceed to adversarial review.\n\n---\n\n## Step 3: Review (full plans only)\n\nSpawn an adversarial critic. The critic MUST find issues.\n\n\u0060\u0060\u0060\nYou are reviewing a development plan for [project]. Your job is to find problems.\n\n## The plan\n[Full PLAN.md content]\n\n## Your mandate\nYou MUST identify at least one issue. \"Looks good\" is not acceptable.\n\nLook for:\n- Tasks too large for a single implementation cycle\n- Missing dependencies between tasks\n- Acceptance criteria too vague to verify\n- Acceptance criteria that leak implementation details\n- Scope gaps or scope creep\n- Ordering issues\n- Conflicting constraints\n- Unacknowledged risks\n\u0060\u0060\u0060\n\nAddress legitimate issues; dismiss false positives with rationale. Present reviewed plan.\n\n---\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, abstraction creep, and filler accumulation.\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\n## Step 5: Write PLAN.md\n\nWrite tasks with acceptance criteria. The conversation preserves reasoning; the artifact preserves the plan.\n\nWrite the plan to \u0060.agentera/plan.yaml\u0060.\n\nArtifact writing follows contract Section 24 conventions.\n\n### Light plan format\n\n\u0060\u0060\u0060yaml\nheader:\n level: light\n created: YYYY-MM-DD\n status: active\n title: Short Title\nwhat: One paragraph.\nwhy: Motivation and value.\nconstraints: What must not break; what is out of scope.\noverall_acceptance:\n - GIVEN context WHEN action THEN expected outcome\ntasks: []\n\u0060\u0060\u0060\n\n### Full plan format\n\n\u0060\u0060\u0060yaml\nheader:\n level: full\n created: YYYY-MM-DD\n status: active\n reviewed: YYYY-MM-DD\n critic_issues: \"N found, N addressed, N dismissed\"\n title: Short Title\nwhat: Detailed description.\nwhy: Motivation, user impact, relationship to vision.\nconstraints: Architectural boundaries and off-limits modules.\nscope:\n included: []\n excluded: []\n deferred: []\ndesign: Approach at the level of subsystems and phases. MUST NOT name modules, libraries, file paths, or code structure.\ntasks:\n - number: 1\n name: Title\n depends_on: []\n status: pending\n acceptance:\n - GIVEN context WHEN action THEN expected outcome\noverall_acceptance:\n - GIVEN context WHEN action THEN expected outcome\nsurprises: []\n\u0060\u0060\u0060\n\n---\n\n## Step 6: Handoff\n\n- **Single task**: suggest ⧉ realisera to execute and wait for confirmation.\n- **Full plan**: suggest ⎈ orkestrera to execute the entire plan and wait for confirmation.\n\n---\n\n## How realisera reads PLAN.md\n\nWhen PLAN.md has pending tasks, realisera's Step 2 changes:\n\n1. Read PLAN.md\n2. Find tasks with \u0060Status: □\u0060 (VT3) pending whose dependencies are all \u0060Status: ■\u0060 (VT1) complete\n3. Pick the first eligible task\n4. Use the task's acceptance criteria as exit conditions\n5. After committing, update task status to \u0060■ complete\u0060\n6. If unexpected, add to \u0060## Surprises\u0060\n7. If a task doesn't make sense, mark it \u0060skipped\u0060\n\nWhen all tasks complete:\n\n1. Archive PLAN.md to \u0060.agentera/archive/plan-{date}.yaml\u0060\n2. Delete \u0060.agentera/plan.yaml\u0060\n3. Realisera resumes vision-driven work selection\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER include implementation details in PLAN.md. Planera owns WHAT and WHY. Realisera owns HOW.\n- NEVER write acceptance criteria that reference implementation. Use behavioral, domain-language criteria only.\n- NEVER produce more than 8 tasks in a full plan. If work requires more, split into sequential plans.\n- NEVER modify PLAN.md during a realisera cycle except to update task status and add surprises.\n- NEVER skip adversarial review for full plans.\n- NEVER auto-approve plans when human-initiated. Present for approval.\n- NEVER plan trivial work. If skip level, say so and stop.\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─── ≡ planera · <status> ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 (VT15) bullet details.\n\n- **complete** (EX1): PLAN.md written and approved, adversarial review ran for full plans, handoff suggested.\n- **flagged** (EX2): Plan produced with caveats: critic issues dismissed, scope larger than ideal, or acceptance criteria not fully behavioral.\n- **stuck** (EX3): Cannot plan: description too ambiguous, context files contradict, or user declined approval with no revision path.\n- **waiting** (EX4): Feature not specified enough for acceptance criteria, or key architectural constraints unknown.\n\n---\n\n## Cross-capability integration\n\nPlanera is the bridge between deliberation and execution.\n\n### Fed by ❈ resonera\n\nWhen resonera's deliberation concludes with a decision to build, the next step is ≡ planera. DECISIONS.md provides the \"why\" context.\n\n### Feeds ⧉ realisera\n\nPLAN.md tasks become realisera's work queue. Task acceptance criteria become cycle exit conditions. Realisera updates status and logs surprises.\n\n### Feeds ⎘ optimera\n\nWhen a plan includes optimization-shaped tasks, those tasks can be delegated to optimera.\n\n### Informed by ⛶ inspektera\n\nHEALTH.md findings can trigger remediation plans. Inspektera reveals structural issues; planera produces a plan to address them.\n\n### Informed by ♾ profilera\n\nDecision profile calibrates planning depth and pattern preferences.\n\n### Informed by ⬚ inspirera\n\nWhen inspirera recommends patterns or libraries, planera incorporates them into the plan's design section.\n\n### Reads ⛥ visionera output\n\nVISION.md provides the north star that planera reads during Orient.\n\n### Fed by ▤ dokumentera (docs-first workflow)\n\nIn the docs-first workflow, dokumentera writes intent docs first, then planera decomposes them into tasks.\n\n### Reads ▤ dokumentera versioning conventions\n\nPlanera reads the \u0060versioning\u0060 block from DOCS.md. When the plan includes \u0060feat\u0060/\u0060fix\u0060 work, planera appends a version bump task.\n\n---\n\n## Getting started\n\n### Planning a new feature\n\n1. ❈ resonera: deliberate on what to build and why\n2. ≡ planera: plan how to build it\n3. ⧉ realisera or ⎈ orkestrera: execute\n\n### Planning a remediation\n\n1. ⛶ inspektera: audit codebase health\n2. ≡ planera: plan fixes\n3. ⧉ realisera: execute\n\n### Mid-feature replanning\n\nIf realisera logs multiple surprises in PLAN.md:\n\n1. Read the surprises section\n2. ≡ planera: reassess tasks\n3. Resume ⧉ realisera\n\n### Skipping the plan\n\nFor trivial work, planera detects skip level and routes to ⧉ realisera directly.\n"`);
5
5
  export default instructions;
6
6
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/planera/instructions.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,+2eAA+2e,CAAC,CAAC;AAC16e,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/planera/instructions.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,qnfAAqnf,CAAC,CAAC;AAChrf,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Source: skills/agentera/capabilities/profilera/instructions.md (relocated D65)
2
2
  // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
3
  // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
- export const instructions = JSON.parse(String.raw `"# PROFILERA\n\n**Persona Reconstruction: Observable Footprint Indexing Logic. Extract, Reconcile, Formalize**\n\nMine the user's session history and produce a structured decision profile for predicting \"What would this person decide?\" Each entry carries numeric confidence, permanence classification, and temporal metadata enabling dormancy decay.\n\nSkill introduction: \u0060─── ♾ profilera · profile ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **♾** (protocol ref: SG9). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne global artifact (written) and project-level artifacts (read).\n\n| Artifact | Purpose | Path |\n|----------|---------|------|\n| PROFILE.md | Decision profile consumed by all capabilities | \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060) |\n| DECISIONS.md | High-signal source for pattern extraction | \u0060.agentera/decisions.yaml\u0060 (per docs.yaml mapping) |\n\n### Artifact path resolution\n\nPROFILE.md is global. Its base directory defaults to the platform-appropriate data directory (\u0060$XDG_DATA_HOME/agentera/\u0060 on Linux, \u0060~/Library/Application Support/agentera/\u0060 on macOS, \u0060%APPDATA%/agentera/\u0060 on Windows). Override via \u0060PROFILERA_PROFILE_DIR\u0060 environment variable. Existing profiles at \u0060~/.claude/profile/\u0060 are auto-migrated on first run. \u0060.agentera/docs.yaml\u0060 mapping does not apply to PROFILE.md. For project-level artifacts, check if .agentera/docs.yaml exists and use its path mapping; if absent, use the default layout.\n\n### Contract values\n\nContract values are inlined where referenced. Confidence scale tiers CS1-CS5 for numeric boundaries (90-100, 70-89, 50-69, 30-49, 0-29) with thresholds at 65 (strong constraint) and 45 (suggestion). Visual tokens: confidence tokens VT9-VT11 (━/─/┄), list item VT15 (▸), inline separator VT16 (·), section divider VT14, progress bar VT18. Skill glyph SG9 for exit markers. Exit signals EX1-EX4 for status reporting. Decision labels DL1-DL3 for entry firmness.\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\nTwo modes:\n\n- **Full**: Detect available local runtime history, ask which extractable runtimes to include, synthesize from scratch, write a fresh PROFILE.md.\n- **Validate**: Quick incremental check. Surface the ~6 entries most worth validating, let the user confirm or challenge each one, update metadata in place.\n\n---\n\n## Step 0: Detect mode\n\nBefore doing anything else, check if \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 exists (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060).\n\n**If it does NOT exist**: Proceed directly to Full mode (Step 1).\n\n**If it DOES exist**: Present the mode choice.\n\nNarration voice (riff, don't script):\n\n- \"Profile's here. Full rebuild or quick tune-up?\" · \"You've got a profile already. Regenerate from scratch, or just validate what's there?\"\n\nOffer:\n\n> **Full**: Regenerate from scratch using all session data. Replaces the existing profile including any accumulated tensions. Best when the profile feels significantly outdated or you want a clean baseline.\n>\n> **Validate**: Quick check of your existing profile (~2 minutes). Reviews the entries most worth validating: confirm, challenge, or skip each one. Best for regular maintenance between full regenerations.\n\nIf the user chooses **Full**, proceed to Step 1.\nIf the user chooses **Validate**, skip to Validate Mode.\n\n---\n\n## Full Mode\n\nThe sharp colleague, here to pay attention to how you decide, not run a classification pipeline. This is someone who's been watching your work, noticing patterns, and reflecting back what they've seen. \"Here's what I've noticed about how you work,\" not \"Signal extraction complete.\"\n\nStep markers: display \u0060── step N/6: verb\u0060 before each step.\nSteps: detect, extract, read, categorize, generate, validate.\n\n### Step 1: Detect runtime sources\n\nBefore asking what to include, run a deterministic local preview that uses the extractor defaults and writes a temporary preview corpus:\n\n\u0060\u0060\u0060bash\nnpx -y agentera report refresh --consent local-history --output <temporary-preview-corpus>\n\u0060\u0060\u0060\n\nRead only the preview corpus top-level \u0060metadata.runtime_statuses\u0060 plus per-runtime record counts. Do not display raw transcript content in the source-selection prompt. Remove the temporary preview after source selection unless it is reused as the final corpus for \u0060All (Recommended)\u0060.\n\nTreat a runtime as selectable only when its status is \u0060ok\u0060 and its \u0060record_count\u0060 is greater than zero. Treat \u0060missing\u0060, \u0060skipped\u0060, \u0060sparse\u0060, and \u0060degraded\u0060 runtimes as unavailable for this run; report them briefly with bounded status/reason labels and remediation labels when present.\n\nSupported runtime sources:\n\n- **Claude Code**: default \u0060~/.claude/projects\u0060, override with \u0060--claude-projects-dir <path>\u0060, disable with \u0060--no-claude\u0060\n- **Codex**: default \u0060~/.codex/sessions\u0060, override with \u0060--codex-sessions-dir <path>\u0060, disable with \u0060--no-codex\u0060\n- **OpenCode**: default \u0060opencode db path\u0060 when available, override with \u0060--opencode-conversations-dir <path>\u0060, disable with \u0060--no-opencode\u0060\n- **GitHub Copilot**: default \u0060$COPILOT_HOME\u0060 or \u0060~/.copilot\u0060, override with \u0060--copilot-conversations-dir <path>\u0060, disable with \u0060--no-copilot\u0060\n- **Cursor IDE**: default \u0060$CURSOR_HOME/projects\u0060 or \u0060~/.cursor/projects\u0060, override with \u0060--cursor-projects-dir <path>\u0060, disable with \u0060--no-cursor\u0060\n- **Cursor Agent CLI**: default \u0060~/.config/cursor/chats\u0060, override with \u0060--cursor-chats-dir <path>\u0060 or \u0060$CURSOR_CONFIG_HOME/chats\u0060; disabled with \u0060--no-cursor\u0060\n\nAsk which runtime histories to include with a multi-select question. Put \u0060All (Recommended)\u0060 first; it means every selectable runtime from the preview and wins over any individual runtime selections. Also offer one option per selectable runtime and a docs/config-only option for cases where the user wants no runtime conversation history. The question controls runtime conversation sources only; instruction documents and project config signals remain included.\n\nIf no runtime has extractable records, skip the selection question, say no local runtime history is currently extractable, and continue with instruction documents and project config signals.\n\n### Step 2: Run extraction\n\nRead \u0060$PROFILERA_PROFILE_DIR/intermediate/corpus.json\u0060 if it already exists and still matches the selected runtime set. If the corpus is absent, stale, or was produced for a different source selection, run the extractor from the Agentera app:\n\n\u0060\u0060\u0060bash\nnpx -y agentera report refresh --consent local-history\n\u0060\u0060\u0060\n\nApply runtime opt-out flags from Step 1. For example, if the user selects Claude Code and OpenCode only, run with \u0060--no-codex --no-copilot --no-cursor\u0060. If the user selects docs/config-only, run with \u0060--no-claude --no-codex --no-opencode --no-copilot --no-cursor\u0060. If the user selects \u0060All (Recommended)\u0060, use no runtime opt-out flags.\n\nThe extractor writes the default \u0060$PROFILERA_PROFILE_DIR/intermediate/corpus.json\u0060 envelope and emits the four portable Section 22 families: \u0060instruction_document\u0060, \u0060history_prompt\u0060, \u0060conversation_turn\u0060, and \u0060project_config_signal\u0060. Use \u0060--output <path>\u0060, repeated \u0060--project-root <path>\u0060, \u0060--codex-sessions-dir <path>\u0060, \u0060--claude-projects-dir <path>\u0060, \u0060--opencode-conversations-dir <path>\u0060, \u0060--copilot-conversations-dir <path>\u0060, \u0060--cursor-projects-dir <path>\u0060, or \u0060--cursor-chats-dir <path>\u0060 when the host stores data outside the defaults.\n\nRead the corpus file's top-level \u0060metadata\u0060 object to confirm counts per source family. Report totals to the user.\n\n**If extraction fails**: common causes include \u0060npx\u0060/agentera not found, permission errors, and empty output (no session history). If only some runtimes fail, the corpus will contain partial data with bounded runtime notes in \u0060metadata.runtime_statuses\u0060; proceed and note missing sources.\n\n---\n\n### Step 3: Read corpus data\n\nRead the corpus.json produced in Step 2. Each record carries a \u0060source_kind\u0060 field. Group records by source family for synthesis:\n\n1. **instruction_document**: Memory files, CLAUDE.md, AGENTS.md (highest signal: explicit user instructions)\n2. **history_prompt**: Decision-rich prompts from session history\n3. **conversation_turn**: Decision exchanges from conversations (most nuanced: real-time reasoning)\n4. **project_config_signal**: Recurring config patterns across projects (most objective: what shipped)\n\nRead the full corpus before synthesis. If total records exceed 500, prioritize high-signal records:\n\n- history correction or decision kinds\n- longer user responses\n- configs shared across projects\n\n---\n\n### Step 4: Categorize and synthesize\n\nGroup signals into 12 categories:\n\n1. **Architecture & Design Patterns**: package layout, abstraction boundaries, API design\n2. **Technology & Tooling Selection**: languages, frameworks, libraries, build tools\n3. **Agent & Automation Philosophy**: agent behavior, autonomy, interaction patterns\n4. **Code Quality & Standards**: error handling, testing, validation, naming\n5. **DX & Project Structure**: directory layout, build targets, configuration\n6. **Scoping & Prioritization**: what to build, milestones, complexity budgets\n7. **Communication Style**: writing preferences, documentation voice\n8. **Process & Workflow**: git workflow, commit conventions, release process\n9. **UI/UX Preferences**: visual patterns, interaction design, CLI vs TUI vs web\n10. **Trade-off Heuristics**: simplicity vs flexibility, speed vs correctness\n11. **Anti-patterns & Rejections**: things actively avoided, with reasoning\n12. **Meta-decision Style**: frameworks used, information gathering, decide vs defer\n\nPer category: identify distinct decisions (not just preferences; decisions have conditions and reasoning), look for the *why*, note exceptions where the rule was overridden.\n\n#### Assign confidence (numeric, 0-100, protocol ref: CS1-CS5)\n\nDecision patterns are empirically verifiable via git history and configs:\n\n| Range | Label | Token | Criteria |\n|-------|-------|-------|----------|\n| 90-100 (CS1) | Shipped consistently | ━ (VT9) | Appears in configs/code across 3+ projects, verifiable from artifacts |\n| 70-89 (CS2) | Established | ━ (VT9) | Consistent across sessions, corroborated by behavior |\n| 50-69 (CS3) | Emerging | ─ (VT10) | Observed multiple times but limited context or minor variations |\n| 30-49 (CS4) | Single signal | ┄ (VT11) | One data point or inferred from adjacent patterns |\n| 0-29 (CS5) | Speculative | ┄ (VT11) | No direct evidence, extrapolated from related decisions |\n\n**Bias check**: Confidence is earned through evidence, not assigned by how insightful the decision sounds. A pithy design principle observed once is 30, not 75.\n\n#### Assign permanence class\n\nPermanence captures domain *stability*, independent of confidence. You can be highly confident about something that will change (85, situational) or uncertain about something deep (35, stable).\n\n| Class | Domain | Timescale |\n|-------|--------|-----------|\n| **stable** | Architecture principles, design patterns, meta-decision heuristics | Decade |\n| **durable** | Tooling choices, code standards, process conventions, DX preferences | Year |\n| **situational** | Current project priorities, active initiative choices, recent tech stack picks | Month |\n\nDefault permanence mapping by category:\n\n- Architecture & Design Patterns, Meta-decision Style → stable\n- Technology & Tooling, Code Quality & Standards, Process & Workflow, DX & Project Structure,\n Communication Style, Trade-off Heuristics, Anti-patterns → durable\n- Scoping & Prioritization, UI/UX Preferences → situational (unless clearly long-standing)\n- Agent & Automation Philosophy → durable (unless project-specific)\n\nOverride the default when the evidence suggests otherwise.\n\n#### Set dates\n\n- **first**: Earliest timestamp from the source data that evidences this decision\n- **refresh date**: Set to today's date (the generation date)\n- **challenged**: Set to \u0060—\u0060 (none yet on a fresh profile)\n\n#### Identify tensions\n\nLook for cross-category patterns and contradictions: stated principle vs shipped code, conflicts between categories, \"Exceptions\" suggesting a weaker rule. Record contradictions in the Tensions section rather than smoothing them into a coherent narrative.\n\n---\n\n### Step 5: Generate the profile\n\nOutput constraint: ≤30 words per signal, ≤15 words per evidence line.\n\nWrite the decision profile to \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060.\n\nIf a previous version exists: copy to \u0060$PROFILERA_PROFILE_DIR/history/PROFILE-{timestamp}.md\u0060, generate new version, show change summary (added, updated, removed).\n\nWhen presenting the profile, frame it as a colleague reflecting on what they've observed, not a system delivering results. Open with what stood out, what surprised you, where the user is most consistent and where they contradict themselves. The structured profile follows, but the human read comes first.\n\n#### Profile format\n\n\u0060\u0060\u0060markdown\n# Decision Profile: [User Name]\n\n<!-- Generated: {date} | Data: {date range from earliest to latest timestamp} -->\n<!-- Sources: {N} memory files, {N} history prompts, {N} conversation exchanges, {N} configs -->\n<!-- Decay parameters: stable λ=0.001, durable λ=0.005, situational λ=0.015 -->\n<!-- Formula: effective_conf = conf × e^(-λ × days_since_confirmed), floor 20 -->\n<!-- Regenerate with /agentera profile -->\n\n## How to Use This Profile\n\nThis profile captures decision-making patterns extracted from {N} months of sessions across {N} projects. Each entry carries inline metadata:\n\n\u0060━ conf:75 | perm:durable | first:2026-01-15 | confirmed:2026-03-28 | challenged:—\u0060\n\n- **conf** (0-100): Evidence-based confidence. 90+ shipped consistently (CS1), 70-89\n established (CS2), 50-69 emerging (CS3), 30-49 single signal (CS4), 0-29 speculative (CS5).\n Line weight tokens: ━ (VT9) high (90-100), ─ (VT10) medium (50-89), ┄ (VT11) low (0-49).\n- **perm**: How stable the decision domain is. stable (decade), durable (year),\n situational (month).\n- **dates**: When the decision was first observed, refreshed,\n and last challenged.\n\nWhen consuming this profile, compute effective confidence using the decay formula.\nStale situational entries carry less weight than fresh stable ones.\n\n**When the profile is silent**: If a situation isn't covered, look for the closest trade-off\nheuristic or meta-decision pattern. When truly uncertain, ask.\n\n## Decision-Making Philosophy\n\n[2-3 paragraphs describing the meta-patterns: how this person approaches decisions, what\nframeworks they use, their risk posture, when they decide quickly vs deliberate, what\ninformation they seek before deciding]\n\n## [Category Name]\n\n### [Decision Name]\n\u0060━ conf:75 | perm:durable | first:2026-01-15 | confirmed:2026-03-28 | challenged:—\u0060\n\n- ▸ **Rule**: [Imperative statement an agent can follow directly]\n- ▸ **When**: [Specific conditions or triggers for this rule]\n- ▸ **Why**: [The reasoning, the value or concern that drives this]\n- ▸ **Exceptions**: [Known cases where this was overridden, or \"None observed\"]\n\n[Repeat for each decision in the category. Order by confidence (highest first).]\n\n[Repeat for all 12 categories. Skip categories with no signal.]\n\n## Tensions\n\nEach entry records a contradiction or divergence found during profile generation or challenged during validation. Default status is **unresolved**. Resist the urge to wrap tensions in resolution narratives. Some tensions are real and persistent.\n\n### YYYY-MM-DD: [Short description]\n\n**Decision affected**: [which decision was contradicted]\n**What happened**: [what was observed or said that didn't fit]\n**Status**: unresolved\n\u0060\u0060\u0060\n\n#### Writing guidelines\n\n- Write rules as imperatives (\"Use X\" not \"[Name] prefers X\")\n- Be specific (\"when building Go CLIs\" not \"when building things\")\n- Always include the *why* because agents need reasoning for edge cases\n- Don't duplicate CLAUDE.md. This covers decision *patterns*, not project instructions\n- Omit categories with <2 decisions (insufficient signal)\n- Every entry MUST have inline metadata after the ### heading\n\n---\n\n### Step 6: Validate predictions\n\nPick 5 decision-rich prompts NOT used to create profile entries. For each: predict what the profile would recommend, check against what happened. Report accuracy (e.g., \"4/5\"). Below 3/5: identify categories needing more signal, note in profile header.\n\n---\n\n## Validate Mode\n\nQuick incremental check (~2 minutes). Same colleague voice: you're checking in on what you noticed before, not running a diagnostic. \"Still true? Let me know.\"\n\nStep markers: display \u0060── step N/4: verb\u0060 before each step.\nSteps: select, present, apply, write.\n\n### Step V1: Run smart selection\n\nIdentify which entries are most worth checking by reading \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly and prioritizing high-confidence, stale, or tension-heavy entries. If PROFILE.md is missing, fall back to Full mode.\n\n### Step V2: Present entries for validation\n\nPresent entries one at a time: decision name, rule text, reason surfaced, stored vs effective confidence. Ask: **Confirm**, **Challenge**, or **Skip**.\n\n### Step V3: Apply updates\n\nFor each response:\n\n- **Confirm**: Bump \u0060conf\u0060 by 5 (cap at 95). Update \u0060confirmed\u0060 to today's date.\n- **Challenge**: Soften \u0060conf\u0060 by 10 (floor at 10). Update \u0060challenged\u0060 to today's date.\n Append a tension entry to the \u0060## Tensions\u0060 section:\n\n \u0060\u0060\u0060\n ### {today}: {decision name} challenged during validation\n **Decision affected**: {decision name}\n **What happened**: Challenged by user during validation\n **Status**: unresolved\n \u0060\u0060\u0060\n\n- **Skip**: No changes to this entry.\n\n### Step V4: Write and report\n\nWrite updated PROFILE.md. Report: \"Reviewed {N} entries: {N} accepted, {N} challenged, {N} skipped.\" Mention challenged entries by name.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER fabricate decision patterns. Every profile entry must be grounded in observed evidence from session history, memory files, configs, or conversation data.\n- NEVER assign confidence higher than the evidence warrants. A single data point is 30-49 (CS4), not 70+, regardless of how insightful the decision sounds.\n- NEVER smooth over contradictions. When evidence conflicts, record tensions rather than forcing a coherent narrative.\n- NEVER modify the user's session history, memory files, or config files. Profilera reads these sources; it never writes to them.\n- NEVER share profile contents with external services or include them in commits.\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♾ profilera · <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 profilera's canonical glyph ♾ (SG9, U+267E).\n\n- **complete** (EX1): PROFILE.md was written (Full mode) or updated (Validate mode). Metadata changes were applied, prediction accuracy was assessed, and changes were summarized.\n- **flagged** (EX2): Profile generation or validation completed but with data quality issues: extraction failed for one or more sources, prediction accuracy was below 3/5, or significant tensions were found that could not be resolved from available evidence.\n- **stuck** (EX3): Cannot generate or validate a profile because the extraction scripts failed entirely, Python is unavailable, or \u0060~/.claude/\u0060 is unreadable and no session data can be accessed.\n- **waiting** (EX4): The user chose Validate mode but PROFILE.md lacks valid metadata. A Full mode run needs user approval, or the requested mode is ambiguous.\n\n---\n\n## Cross-capability integration\n\nProfilera is part of a twelve-capability suite. The decision profile it produces is consumed by the other capabilities.\n\n### Consumed by realisera\n\nRealisera runs the effective profile script in its Orient step to get a confidence-weighted summary table. High effective confidence entries are treated as strong constraints; low effective confidence entries are treated as suggestions. Full rules are read from PROFILE.md when needed for detailed reasoning.\n\n### Consumed by optimera\n\nOptimera runs the effective profile script to calibrate experimentation style: how aggressive to be, how much complexity is acceptable, what trade-offs the user prefers. Effective confidence weighting ensures stale preferences don't over-constrain experiments.\n\n### Consumed by inspirera\n\nInspirera can run the effective profile script to inform applicability judgments: what patterns the user favors, what they resist, how to weigh recommendations. High-confidence entries strongly constrain recommendations; low-confidence entries are treated as tendencies.\n\n### Consumed by resonera\n\nResonera reads the decision profile at the start of every deliberation. High-confidence entries in the relevant domain are acknowledged upfront to prevent re-deliberating settled preferences. Low-confidence entries are surfaced as hypotheses worth testing during the conversation.\n\n### Fed by resonera\n\nDECISIONS.md (maintained by resonera) is a high-signal source for profilera's extraction scripts. Each decision entry captures reasoning, tradeoffs, and confidence, making deliberation sessions one of the richest inputs for decision profile generation. For normal read-only extraction, prefer \u0060agentera decisions --format json\u0060 and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure rather than raw-reading missing historical context.\n\n### Consumed by inspektera\n\nInspektera reads the decision profile to calibrate what \"healthy\" means for this user. Quality preferences, complexity tolerance, and pattern priorities from the profile weight the grading and determine which findings matter most.\n\n### Consumed by planera\n\nPlanera reads the decision profile during its Orient step to calibrate planning depth, pattern preferences, and constraint priorities.\n\n### Profile consumption\n\nAll consuming capabilities read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly when it exists. Confidence thresholds and dormancy notes are kept in the profile itself so the guidance remains editable and portable.\n\n---\n\n## Getting started\n\n### First profile generation\n\n\u0060\u0060\u0060\n/agentera profile\n\u0060\u0060\u0060\n\nFull extraction across all sources. Produces \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060.\n\n### Regular validation\n\n\u0060\u0060\u0060\n/agentera profile validate\n\u0060\u0060\u0060\n\nQuick confidence refresh without full regeneration. Run weekly or per-session.\n\n### Using the profile in other capabilities\n\nAll capabilities may read the profile directly when \u0060PROFILE.md\u0060 exists. No manual steps needed; just ensure PROFILE.md exists.\n\n---\n\n## Notes on depth vs speed\n\n- Extraction scripts handle I/O; Claude's job is synthesis, not parsing.\n- Large intermediate files: use subagents to read in parallel.\n- Signal hierarchy: crystallized.json (highest: memory + CLAUDE.md), conversation exchanges (most nuanced: real-time reasoning), config patterns (most objective: what shipped).\n- Validate mode: weekly/per-session. Full mode: monthly or when significantly stale.\n"`);
4
+ export const instructions = JSON.parse(String.raw `"# PROFILERA\n\n**Persona Reconstruction: Observable Footprint Indexing Logic. Extract, Reconcile, Formalize**\n\nMine the user's session history and produce a structured decision profile for predicting \"What would this person decide?\" Each entry carries numeric confidence, permanence classification, and temporal metadata enabling dormancy decay.\n\nSkill introduction: \u0060─── ♾ profilera · profile ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **♾** (protocol ref: SG9). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne global artifact (written) and project-level artifacts (read).\n\n| Artifact | Purpose | Path |\n|----------|---------|------|\n| PROFILE.md | Decision profile consumed by all capabilities | \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060) |\n| DECISIONS.md | High-signal source for pattern extraction | \u0060.agentera/decisions.yaml\u0060 (per docs.yaml mapping) |\n\n### Artifact path resolution\n\nPROFILE.md is global. Its base directory defaults to the platform-appropriate data directory (\u0060$XDG_DATA_HOME/agentera/\u0060 on Linux, \u0060~/Library/Application Support/agentera/\u0060 on macOS, \u0060%APPDATA%/agentera/\u0060 on Windows). Override via \u0060PROFILERA_PROFILE_DIR\u0060 environment variable. Existing profiles at \u0060~/.claude/profile/\u0060 are auto-migrated on first run. \u0060.agentera/docs.yaml\u0060 mapping does not apply to PROFILE.md. For project-level artifacts, check if .agentera/docs.yaml exists and use its path mapping; if absent, use the default layout.\n\n### Contract values\n\nContract values are inlined where referenced. Confidence scale tiers CS1-CS5 for numeric boundaries (90-100, 70-89, 50-69, 30-49, 0-29) with thresholds at 65 (strong constraint) and 45 (suggestion). Visual tokens: confidence tokens VT9-VT11 (━/─/┄), list item VT15 (▸), inline separator VT16 (·), section divider VT14, progress bar VT18. Skill glyph SG9 for exit markers. Exit signals EX1-EX4 for status reporting. Decision labels DL1-DL3 for entry firmness.\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\nTwo modes:\n\n- **Full**: Detect available local runtime history, ask which extractable runtimes to include, synthesize from scratch, write a fresh PROFILE.md.\n- **Validate**: Quick incremental check. Surface the ~6 entries most worth validating, let the user confirm or challenge each one, update metadata in place.\n\n---\n\n## Step 0: Detect mode\n\nBefore doing anything else, check if \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 exists (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060).\n\n**If it does NOT exist**: Proceed directly to Full mode (Step 1).\n\n**If it DOES exist**: Present the mode choice.\n\nNarration voice (riff, don't script):\n\n- \"Profile's here. Full rebuild or quick tune-up?\" · \"You've got a profile already. Regenerate from scratch, or just validate what's there?\"\n\nOffer:\n\n> **Full**: Regenerate from scratch using all session data. Replaces the existing profile including any accumulated tensions. Best when the profile feels significantly outdated or you want a clean baseline.\n>\n> **Validate**: Quick check of your existing profile (~2 minutes). Reviews the entries most worth validating: confirm, challenge, or skip each one. Best for regular maintenance between full regenerations.\n\nIf the user chooses **Full**, proceed to Step 1.\nIf the user chooses **Validate**, skip to Validate Mode.\n\n---\n\n## Full Mode\n\nThe sharp colleague, here to pay attention to how you decide, not run a classification pipeline. This is someone who's been watching your work, noticing patterns, and reflecting back what they've seen. \"Here's what I've noticed about how you work,\" not \"Signal extraction complete.\"\n\nStep markers: display \u0060── step N/6: verb\u0060 before each step.\nSteps: detect, extract, read, categorize, generate, validate.\n\n### Step 1: Coverage Audit (mandatory pre-extraction)\n\nBefore asking what to include or running extraction, run the Coverage Audit. This is the **first user-visible output** of every Full-mode run:\n\n\u0060\u0060\u0060bash\nnpx -y agentera report refresh --consent local-history --coverage-audit-only\n\u0060\u0060\u0060\n\nThe audit enumerates all supported runtimes (codex, claude-code, cursor, cursor-agent, opencode, github-copilot) with store paths and earliest/latest session timestamps. It names skipped runtimes and reasons. Do not display raw transcript content.\n\nTreat a runtime as **available** when the audit marks it \u0060available\u0060 with session timestamps. Treat \u0060missing\u0060, \u0060skipped\u0060, \u0060sparse\u0060, and \u0060degraded\u0060 runtimes as unavailable for selection; report them briefly with bounded status/reason labels and remediation labels when present.\n\n**EX2 gating:** If any available runtime would be skipped by flags or the user's selection, stop and emit \u0060♾ profilera · flagged\u0060 (EX2). Do not extract until the user explicitly accepts the coverage gap. When the user accepts, rerun extraction with \u0060--accept-coverage-gap\u0060 plus the agreed runtime opt-out flags. If all available runtimes are selected, proceed without EX2 for coverage.\n\nSupported runtime sources:\n\n- **Claude Code**: default \u0060~/.claude/projects\u0060, override with \u0060--claude-projects-dir <path>\u0060, disable with \u0060--no-claude\u0060\n- **Codex**: default \u0060~/.codex/sessions\u0060, override with \u0060--codex-sessions-dir <path>\u0060, disable with \u0060--no-codex\u0060\n- **OpenCode**: default \u0060opencode db path\u0060 when available, override with \u0060--opencode-conversations-dir <path>\u0060, disable with \u0060--no-opencode\u0060\n- **GitHub Copilot**: default \u0060$COPILOT_HOME\u0060 or \u0060~/.copilot\u0060, override with \u0060--copilot-conversations-dir <path>\u0060, disable with \u0060--no-copilot\u0060\n- **Cursor IDE**: default \u0060$CURSOR_HOME/projects\u0060 or \u0060~/.cursor/projects\u0060, override with \u0060--cursor-projects-dir <path>\u0060, disable with \u0060--no-cursor\u0060\n- **Cursor Agent CLI**: default \u0060~/.config/cursor/chats\u0060, override with \u0060--cursor-chats-dir <path>\u0060 or \u0060$CURSOR_CONFIG_HOME/chats\u0060; disabled with \u0060--no-cursor\u0060\n\nAsk which runtime histories to include with a multi-select question. Put \u0060All (Recommended)\u0060 first; it means every selectable runtime from the preview and wins over any individual runtime selections. Also offer one option per selectable runtime and a docs/config-only option for cases where the user wants no runtime conversation history. The question controls runtime conversation sources only; instruction documents and project config signals remain included.\n\nIf no runtime has extractable records, skip the selection question, say no local runtime history is currently extractable, and continue with instruction documents and project config signals.\n\n### Step 2: Run extraction\n\nRead \u0060$PROFILERA_PROFILE_DIR/intermediate/corpus.json\u0060 if it already exists and still matches the selected runtime set. If the corpus is absent, stale, or was produced for a different source selection, run the extractor from the Agentera app:\n\n\u0060\u0060\u0060bash\nnpx -y agentera report refresh --consent local-history\n\u0060\u0060\u0060\n\nThe extractor always emits the Coverage Audit summary before writing corpus files. Apply runtime opt-out flags from Step 1. For example, if the user selects Claude Code and OpenCode only, run with \u0060--no-codex --no-copilot --no-cursor\u0060. If the user selects docs/config-only, run with \u0060--no-claude --no-codex --no-opencode --no-copilot --no-cursor\u0060. If the user selects \u0060All (Recommended)\u0060, use no runtime opt-out flags. When the user explicitly accepted skipping available runtimes in Step 1, add \u0060--accept-coverage-gap\u0060; without it the extractor stops with EX2.\n\nThe extractor writes the default \u0060$PROFILERA_PROFILE_DIR/intermediate/corpus.json\u0060 envelope and emits the four portable Section 22 families: \u0060instruction_document\u0060, \u0060history_prompt\u0060, \u0060conversation_turn\u0060, and \u0060project_config_signal\u0060. Use \u0060--output <path>\u0060, repeated \u0060--project-root <path>\u0060, \u0060--codex-sessions-dir <path>\u0060, \u0060--claude-projects-dir <path>\u0060, \u0060--opencode-conversations-dir <path>\u0060, \u0060--copilot-conversations-dir <path>\u0060, \u0060--cursor-projects-dir <path>\u0060, or \u0060--cursor-chats-dir <path>\u0060 when the host stores data outside the defaults.\n\nRead the corpus file's top-level \u0060metadata\u0060 object to confirm counts per source family. Report totals to the user.\n\n**If extraction fails**: common causes include \u0060npx\u0060/agentera not found, permission errors, and empty output (no session history). If only some runtimes fail, the corpus will contain partial data with bounded runtime notes in \u0060metadata.runtime_statuses\u0060; proceed and note missing sources.\n\n---\n\n### Step 3: Read corpus data\n\nRead the corpus.json produced in Step 2. Each record carries a \u0060source_kind\u0060 field. Group records by source family for synthesis:\n\n1. **instruction_document**: Memory files, CLAUDE.md, AGENTS.md (highest signal: explicit user instructions)\n2. **history_prompt**: Decision-rich prompts from session history\n3. **conversation_turn**: Decision exchanges from conversations (most nuanced: real-time reasoning)\n4. **project_config_signal**: Recurring config patterns across projects (most objective: what shipped)\n\nRead the full corpus before synthesis. If total records exceed 500, prioritize high-signal records:\n\n- history correction or decision kinds\n- longer user responses\n- configs shared across projects\n\n---\n\n### Step 4: Categorize and synthesize\n\nGroup signals into 12 categories:\n\n1. **Architecture & Design Patterns**: package layout, abstraction boundaries, API design\n2. **Technology & Tooling Selection**: languages, frameworks, libraries, build tools\n3. **Agent & Automation Philosophy**: agent behavior, autonomy, interaction patterns\n4. **Code Quality & Standards**: error handling, testing, validation, naming\n5. **DX & Project Structure**: directory layout, build targets, configuration\n6. **Scoping & Prioritization**: what to build, milestones, complexity budgets\n7. **Communication Style**: writing preferences, documentation voice\n8. **Process & Workflow**: git workflow, commit conventions, release process\n9. **UI/UX Preferences**: visual patterns, interaction design, CLI vs TUI vs web\n10. **Trade-off Heuristics**: simplicity vs flexibility, speed vs correctness\n11. **Anti-patterns & Rejections**: things actively avoided, with reasoning\n12. **Meta-decision Style**: frameworks used, information gathering, decide vs defer\n\nPer category: identify distinct decisions (not just preferences; decisions have conditions and reasoning), look for the *why*, note exceptions where the rule was overridden.\n\n#### Assign confidence (numeric, 0-100, protocol ref: CS1-CS5)\n\nDecision patterns are empirically verifiable via git history and configs:\n\n| Range | Label | Token | Criteria |\n|-------|-------|-------|----------|\n| 90-100 (CS1) | Shipped consistently | ━ (VT9) | Appears in configs/code across 3+ projects, verifiable from artifacts |\n| 70-89 (CS2) | Established | ━ (VT9) | Consistent across sessions, corroborated by behavior |\n| 50-69 (CS3) | Emerging | ─ (VT10) | Observed multiple times but limited context or minor variations |\n| 30-49 (CS4) | Single signal | ┄ (VT11) | One data point or inferred from adjacent patterns |\n| 0-29 (CS5) | Speculative | ┄ (VT11) | No direct evidence, extrapolated from related decisions |\n\n**Bias check**: Confidence is earned through evidence, not assigned by how insightful the decision sounds. A pithy design principle observed once is 30, not 75.\n\n#### Assign permanence class\n\nPermanence captures domain *stability*, independent of confidence. You can be highly confident about something that will change (85, situational) or uncertain about something deep (35, stable).\n\n| Class | Domain | Timescale |\n|-------|--------|-----------|\n| **stable** | Architecture principles, design patterns, meta-decision heuristics | Decade |\n| **durable** | Tooling choices, code standards, process conventions, DX preferences | Year |\n| **situational** | Current project priorities, active initiative choices, recent tech stack picks | Month |\n\nDefault permanence mapping by category:\n\n- Architecture & Design Patterns, Meta-decision Style → stable\n- Technology & Tooling, Code Quality & Standards, Process & Workflow, DX & Project Structure,\n Communication Style, Trade-off Heuristics, Anti-patterns → durable\n- Scoping & Prioritization, UI/UX Preferences → situational (unless clearly long-standing)\n- Agent & Automation Philosophy → durable (unless project-specific)\n\nOverride the default when the evidence suggests otherwise.\n\n#### Set dates\n\n- **first**: Earliest timestamp from the source data that evidences this decision\n- **refresh date**: Set to today's date (the generation date)\n- **challenged**: Set to \u0060—\u0060 (none yet on a fresh profile)\n\n#### Identify tensions\n\nLook for cross-category patterns and contradictions: stated principle vs shipped code, conflicts between categories, \"Exceptions\" suggesting a weaker rule. Record contradictions in the Tensions section rather than smoothing them into a coherent narrative.\n\n---\n\n### Step 5: Generate the profile\n\nOutput constraint: ≤30 words per signal, ≤15 words per evidence line.\n\nWrite the decision profile to \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060.\n\nIf a previous version exists: copy to \u0060$PROFILERA_PROFILE_DIR/history/PROFILE-{timestamp}.md\u0060, generate new version, show change summary (added, updated, removed).\n\nWhen presenting the profile, frame it as a colleague reflecting on what they've observed, not a system delivering results. Open with what stood out, what surprised you, where the user is most consistent and where they contradict themselves. The structured profile follows, but the human read comes first.\n\n#### Profile format\n\n\u0060\u0060\u0060markdown\n# Decision Profile: [User Name]\n\n<!-- Generated: {date} | Data: {date range from earliest to latest timestamp} | Validated: — -->\n<!-- Sources: {N} memory files, {N} history prompts, {N} conversation exchanges, {N} configs -->\n<!-- Decay parameters: stable λ=0.001, durable λ=0.005, situational λ=0.015 -->\n<!-- Formula: effective_conf = conf × e^(-λ × days_since_confirmed), floor 20 -->\n<!-- Regenerate with /agentera profile -->\n\n## How to Use This Profile\n\nThis profile captures decision-making patterns extracted from {N} months of sessions across {N} projects. Each entry carries inline metadata:\n\n\u0060━ conf:75 | perm:durable | first:2026-01-15 | confirmed:2026-03-28 | challenged:—\u0060\n\n- **conf** (0-100): Evidence-based confidence. 90+ shipped consistently (CS1), 70-89\n established (CS2), 50-69 emerging (CS3), 30-49 single signal (CS4), 0-29 speculative (CS5).\n Line weight tokens: ━ (VT9) high (90-100), ─ (VT10) medium (50-89), ┄ (VT11) low (0-49).\n- **perm**: How stable the decision domain is. stable (decade), durable (year),\n situational (month).\n- **dates**: When the decision was first observed, refreshed,\n and last challenged.\n- **Generated / Validated**: Full rebuild date vs last validate-mode\n maintenance date in the header comment. \u0060agentera prime\u0060 treats the\n profile as fresh through the newer of the two.\n\nWhen consuming this profile, compute effective confidence using the decay formula.\nStale situational entries carry less weight than fresh stable ones.\n\n**When the profile is silent**: If a situation isn't covered, look for the closest trade-off\nheuristic or meta-decision pattern. When truly uncertain, ask.\n\n## Decision-Making Philosophy\n\n[2-3 paragraphs describing the meta-patterns: how this person approaches decisions, what\nframeworks they use, their risk posture, when they decide quickly vs deliberate, what\ninformation they seek before deciding]\n\n## [Category Name]\n\n### [Decision Name]\n\u0060━ conf:75 | perm:durable | first:2026-01-15 | confirmed:2026-03-28 | challenged:—\u0060\n\n- ▸ **Rule**: [Imperative statement an agent can follow directly]\n- ▸ **When**: [Specific conditions or triggers for this rule]\n- ▸ **Why**: [The reasoning, the value or concern that drives this]\n- ▸ **Exceptions**: [Known cases where this was overridden, or \"None observed\"]\n\n[Repeat for each decision in the category. Order by confidence (highest first).]\n\n[Repeat for all 12 categories. Skip categories with no signal.]\n\n## Tensions\n\nEach entry records a contradiction or divergence found during profile generation or challenged during validation. Default status is **unresolved**. Resist the urge to wrap tensions in resolution narratives. Some tensions are real and persistent.\n\n### YYYY-MM-DD: [Short description]\n\n**Decision affected**: [which decision was contradicted]\n**What happened**: [what was observed or said that didn't fit]\n**Status**: unresolved\n\u0060\u0060\u0060\n\n#### Writing guidelines\n\n- Write rules as imperatives (\"Use X\" not \"[Name] prefers X\")\n- Be specific (\"when building Go CLIs\" not \"when building things\")\n- Always include the *why* because agents need reasoning for edge cases\n- Don't duplicate CLAUDE.md. This covers decision *patterns*, not project instructions\n- Omit categories with <2 decisions (insufficient signal)\n- Every entry MUST have inline metadata after the ### heading\n\n---\n\n### Step 6: Validate predictions\n\nPick 5 decision-rich prompts NOT used to create profile entries. For each: predict what the profile would recommend, check against what happened. Report accuracy (e.g., \"4/5\"). Below 3/5: identify categories needing more signal, note in profile header.\n\n---\n\n## Validate Mode\n\nQuick incremental check (~2 minutes). Same colleague voice: you're checking in on what you noticed before, not running a diagnostic. \"Still true? Let me know.\"\n\nStep markers: display \u0060── step N/4: verb\u0060 before each step.\nSteps: select, present, apply, write.\n\n### Step V1: Run smart selection\n\nIdentify which entries are most worth checking by reading \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly and prioritizing high-confidence, stale, or tension-heavy entries. If PROFILE.md is missing, fall back to Full mode.\n\n### Step V2: Present entries for validation\n\nPresent entries one at a time: decision name, rule text, reason surfaced, stored vs effective confidence. Ask: **Confirm**, **Challenge**, or **Skip**.\n\n### Step V3: Apply updates\n\nFor each response:\n\n- **Confirm**: Bump \u0060conf\u0060 by 5 (cap at 95). Update \u0060confirmed\u0060 to today's date.\n- **Challenge**: Soften \u0060conf\u0060 by 10 (floor at 10). Update \u0060challenged\u0060 to today's date.\n Append a tension entry to the \u0060## Tensions\u0060 section:\n\n \u0060\u0060\u0060\n ### {today}: {decision name} challenged during validation\n **Decision affected**: {decision name}\n **What happened**: Challenged by user during validation\n **Status**: unresolved\n \u0060\u0060\u0060\n\n- **Skip**: No changes to this entry.\n\n### Step V4: Write and report\n\nUpdate the first header comment before writing PROFILE.md:\n\n- Set \u0060Validated:\u0060 to today's date.\n- Preserve \u0060Generated:\u0060 unchanged (last full rebuild date).\n- If the profile predates \u0060Validated:\u0060, append \u0060| Validated: {today}\u0060 to that comment line.\n- If \u0060Validated:\u0060 already exists, replace its date.\n\nWrite updated PROFILE.md. Report: \"Reviewed {N} entries: {N} accepted, {N} challenged, {N} skipped.\" Mention challenged entries by name.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER fabricate decision patterns. Every profile entry must be grounded in observed evidence from session history, memory files, configs, or conversation data.\n- NEVER assign confidence higher than the evidence warrants. A single data point is 30-49 (CS4), not 70+, regardless of how insightful the decision sounds.\n- NEVER smooth over contradictions. When evidence conflicts, record tensions rather than forcing a coherent narrative.\n- NEVER modify the user's session history, memory files, or config files. Profilera reads these sources; it never writes to them.\n- NEVER share profile contents with external services or include them in commits.\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♾ profilera · <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 profilera's canonical glyph ♾ (SG9, U+267E).\n\n- **complete** (EX1): PROFILE.md was written (Full mode) or updated (Validate mode). Metadata changes were applied, prediction accuracy was assessed, and changes were summarized.\n- **flagged** (EX2): Profile generation or validation completed but with data quality issues: available runtime history was skipped without explicit acceptance, extraction failed for one or more sources, prediction accuracy was below 3/5, or significant tensions were found that could not be resolved from available evidence.\n- **stuck** (EX3): Cannot generate or validate a profile because the extraction scripts failed entirely, Python is unavailable, or \u0060~/.claude/\u0060 is unreadable and no session data can be accessed.\n- **waiting** (EX4): The user chose Validate mode but PROFILE.md lacks valid metadata. A Full mode run needs user approval, or the requested mode is ambiguous.\n\n---\n\n## Cross-capability integration\n\nProfilera is part of a twelve-capability suite. The decision profile it produces is consumed by the other capabilities.\n\n### Consumed by realisera\n\nRealisera runs the effective profile script in its Orient step to get a confidence-weighted summary table. High effective confidence entries are treated as strong constraints; low effective confidence entries are treated as suggestions. Full rules are read from PROFILE.md when needed for detailed reasoning.\n\n### Consumed by optimera\n\nOptimera runs the effective profile script to calibrate experimentation style: how aggressive to be, how much complexity is acceptable, what trade-offs the user prefers. Effective confidence weighting ensures stale preferences don't over-constrain experiments.\n\n### Consumed by inspirera\n\nInspirera can run the effective profile script to inform applicability judgments: what patterns the user favors, what they resist, how to weigh recommendations. High-confidence entries strongly constrain recommendations; low-confidence entries are treated as tendencies.\n\n### Consumed by resonera\n\nResonera reads the decision profile at the start of every deliberation. High-confidence entries in the relevant domain are acknowledged upfront to prevent re-deliberating settled preferences. Low-confidence entries are surfaced as hypotheses worth testing during the conversation.\n\n### Fed by resonera\n\nDECISIONS.md (maintained by resonera) is a high-signal source for profilera's extraction scripts. Each decision entry captures reasoning, tradeoffs, and confidence, making deliberation sessions one of the richest inputs for decision profile generation. For normal read-only extraction, prefer \u0060agentera decisions --format json\u0060 and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure rather than raw-reading missing historical context.\n\n### Consumed by inspektera\n\nInspektera reads the decision profile to calibrate what \"healthy\" means for this user. Quality preferences, complexity tolerance, and pattern priorities from the profile weight the grading and determine which findings matter most.\n\n### Consumed by planera\n\nPlanera reads the decision profile during its Orient step to calibrate planning depth, pattern preferences, and constraint priorities.\n\n### Profile consumption\n\nAll consuming capabilities read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly when it exists. Confidence thresholds and dormancy notes are kept in the profile itself so the guidance remains editable and portable.\n\n---\n\n## Getting started\n\n### First profile generation\n\n\u0060\u0060\u0060\n/agentera profile\n\u0060\u0060\u0060\n\nFull extraction across all sources. Produces \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060.\n\n### Regular validation\n\n\u0060\u0060\u0060\n/agentera profile validate\n\u0060\u0060\u0060\n\nQuick confidence refresh without full regeneration. Run weekly or per-session.\n\n### Using the profile in other capabilities\n\nAll capabilities may read the profile directly when \u0060PROFILE.md\u0060 exists. No manual steps needed; just ensure PROFILE.md exists.\n\n---\n\n## Notes on depth vs speed\n\n- Extraction scripts handle I/O; Claude's job is synthesis, not parsing.\n- Large intermediate files: use subagents to read in parallel.\n- Signal hierarchy: crystallized.json (highest: memory + CLAUDE.md), conversation exchanges (most nuanced: real-time reasoning), config patterns (most objective: what shipped).\n- Validate mode: weekly/per-session. Full mode: monthly or when significantly stale.\n"`);
5
5
  export default instructions;
6
6
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/profilera/instructions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,8lwBAA8lwB,CAAC,CAAC;AACzpwB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/profilera/instructions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,kyyBAAkyyB,CAAC,CAAC;AAC71yB,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Source: skills/agentera/capabilities/realisera/instructions.md (relocated D65)
2
2
  // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
3
  // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
- export const instructions = JSON.parse(String.raw `"# REALISERA\n\n**Relentless Execution: Autonomous Loops Iterating Software. Evolve, Refine, Adapt**\n\nAn autonomous development loop that evolves any software project one cycle at a time. Decisions grounded in the user's decision profile. Continuity lives in files, not memory.\n\nEach invocation = one cycle. \u0060/loop\u0060 handles recurrence.\n\n---\n\n## Visual identity\n\nGlyph: **⧉** (protocol ref: SG2). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nFour artifacts, bootstrapped if absent. TODO.md and CHANGELOG.md stay at project root; canonical VISION.md and PROGRESS.md are stored as \u0060.agentera/vision.yaml\u0060 and \u0060.agentera/progress.yaml\u0060 unless mapped otherwise.\n\n| File | Purpose | Bootstrap |\n|------|---------|-----------|\n| \u0060VISION.md\u0060 | Canonical vision artifact. North star, direction, principles, aspirations. | Via inline brainstorm session (see below), written to \u0060.agentera/vision.yaml\u0060 by default. |\n| \u0060TODO.md\u0060 | Tech debt, bugs, discrepancies. | \u0060# TODO\\n\\n## ⇶ Critical\\n\\n## ⇉ Degraded\\n\\n## → Normal\\n\\n## ⇢ Annoying\\n\\n## Resolved\\n\u0060 |\n| \u0060CHANGELOG.md\u0060 | Public change history. | \u0060# Changelog\\n\\n## [Unreleased]\\n\u0060 |\n| \u0060PROGRESS.md\u0060 | Canonical progress artifact. Operational cycle log. | First cycle entry in \u0060.agentera/progress.yaml\u0060 by default. |\n\nUse \u0060agentera schema --format json\u0060 and its \u0060artifact_schemas\u0060 entries for \u0060vision\u0060 and \u0060progress\u0060 to locate the active installed schemas; do not search Agentera directories manually. Top-level \u0060agentera describe\u0060 is a migration alias.\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 (VISION.md, TODO.md, .agentera/progress.yaml, etc.). 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.\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: severity arrows VT5-VT8 (⇶/⇉/→/⇢), status tokens VT1-VT4 (■/▣/□/▨), list item VT15 (▸), inline separator VT16 (·), section divider VT14, flow/target VT17 (→). Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Severity issue levels SI1-SI4 for TODO classification. Decision labels DL1-DL3 for DECISIONS.md entries. Confidence scale CS1-CS5 with thresholds for 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### vision.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. A constitution, not a backlog.\n\n\u0060\u0060\u0060yaml\nproject_name: Project Name\nnorth_star: The dream. What this software makes possible.\npersonas:\n - name: Specific persona\n description: Their day, frustrations, and workflow.\nprinciples:\n - name: Principle name\n description: What it means and what it resists.\ndirection: Where this project is heading.\nidentity:\n personality: Product personality.\n voice: Communication style.\n emotional_register: How it should feel to use.\n naming: Naming conventions.\ntension: The hardest strategic tension.\n\u0060\u0060\u0060\n\n### progress.yaml\n\n\u0060\u0060\u0060yaml\ncycles:\n - number: N\n timestamp: YYYY-MM-DD HH:MM\n type: feat\n phase: build\n what: One-line summary of what shipped.\n inspiration: External source, if any.\n discovered: Issues or ideas found.\n verified: Observed output, N/A tag, or rationale.\n next: Most valuable next work.\n context:\n intent: Why this cycle happened.\n constraints: What had to stay true.\n unknowns: What remains uncertain.\n scope: What changed.\narchive: []\n\u0060\u0060\u0060\n\nThe \u0060verified\u0060 field is mandatory for every cycle entry.\n\n### CHANGELOG.md\n\nPublic-facing change history. Keep-a-changelog format. Realisera appends entries under \u0060## [Unreleased]\u0060 based on commit type: \u0060feat\u0060 → Added, \u0060refactor/chore\u0060 → Changed, \u0060fix\u0060 → Fixed. On version bumps, promote the Unreleased section to a versioned heading.\n\n---\n\n## Brainstorm: bootstrapping or refining the vision artifact\n\nThis runs in two situations:\n\n1. **The vision artifact doesn't exist**: the first time realisera runs on a project\n2. **User explicitly asks** to refine the vision\n\nIn all other cases, skip straight to the cycle.\n\nThe sharp colleague, here to build. Brief, focused conversation. One question at a time. Push for ambition.\n\n1. **Understand the dream**: \"Not what the software does, but what does it make possible?\"\n2. **Find the people**: \"Who reaches for this? Describe a person: their day, their frustrations.\"\n3. **Find the principles**: \"What principles guide every decision?\" If a decision profile exists, propose principles from it.\n4. **Set the direction**: \"Where is this heading? Not features, but capabilities.\"\n5. **Write the vision artifact**: synthesize into an aspirational north star. Present for approval.\n\nArtifact writing follows contract Section 24 conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n---\n\n## The cycle\n\nSkill introduction: \u0060─── ⧉ realisera · cycle N ───\u0060\n\nStep markers: display \u0060── step N/9: verb\u0060 before each step.\nSteps: orient, select, research, plan, spawn, verify, commit, audit, log.\n\n### Step 1: Orient\n\nStart from the supported Realisera execution-context seam:\n\n\u0060\u0060\u0060bash\nagentera prime --context realisera --format json\n\u0060\u0060\u0060\n\nIf \u0060execution_context.source_contract.complete_for_execution_context\u0060 is true,\nuse \u0060execution_context\u0060 and included \u0060capability_context.state\u0060 as normal startup context. Do\nnot read raw PLAN, PROGRESS, TODO, DOCS, HEALTH, DECISIONS, CHANGELOG, VISION,\nPROFILE, or DESIGN artifacts just to re-check selected work, acceptance\ncriteria, constraints, verification expectations, artifact update requirements,\nprogress logging requirements, changelog boundary, or scope caveats.\n\nIf \u0060execution_context\u0060 is incomplete or caveated, preserve every caveat in the\ncycle report and run the listed \u0060execution_context.fallback_commands\u0060 before any\nlast-resort raw artifact diagnostic. Raw artifact reads are last-resort\ndiagnostics, not normal Realisera startup behavior.\n\nFor progress fallback specifically, use \u0060npx -y agentera state progress --format json\u0060\nor the installed app equivalent from the returned fallback command; the routine\nprogress command owns startup progress state.\n\n### Decision satisfaction authority\n\nWhen a cycle touches decision satisfaction, agents may mark provisional\nsatisfaction with evidence only. Realisera must not mark or imply\nuser-confirmed 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 the cycle report\ninstead of reconstructing hidden outcomes or claiming automation proved intent.\n\n1. **execution_context.work_selection**: selected task or no-plan/completed-plan mode\n2. **execution_context.acceptance_criteria**: exact criteria for this cycle\n3. **execution_context.constraints**: plan constraints and protected-action boundaries\n4. **execution_context.verification_expectations**: expected validation and latest progress evidence\n5. **execution_context.artifact_update_requirements**: plan, TODO, changelog, and progress update obligations\n6. **execution_context.changelog_boundary**: current public-history boundary or fallback\n7. **execution_context.scope_boundary**: artifact-family scope and conservative source-file scope\n8. **source_contract.capability_context**: missing state families and CLI fallback commands\n9. **profile summary**: use \u0060hej.profile\u0060; stale or missing profile is a caveat, not approval to refresh profile state.\n\n10. **Project discovery** (cycle 1 or when unfamiliar):\n - Map the directory structure\n - Read dependency manifests\n - Read README.md, CLAUDE.md, AGENTS.md if they exist\n - Identify build/test/lint commands\n - Read key source files to understand architecture\n\n11. \u0060git log --oneline -20\u0060 for recent changes\n\nBefore proceeding, list the 3-5 facts that determine this cycle.\n\n**Exit-early stop condition (plan-driven mode only)**: If PLAN.md has \u0060header.status: complete\u0060 and every task is complete, perform a **plan-completion sweep** before archiving. A plan with blocked, skipped, or otherwise incomplete tasks is not a successfully completed plan and must remain visible for replanning or follow-up. This stop condition does NOT apply in vision-driven mode.\n\nSweep checklist:\n\n1. **PROGRESS.md aggregate cycle entry**: insert a newest-first cycle entry summarizing the whole plan.\n2. **CHANGELOG.md plan-level entries**: verify \u0060## [Unreleased]\u0060 covers each completed task's user-facing impact.\n3. **TODO.md milestone advance**: mark each plan task as Resolved.\n4. **HEALTH.md cross-reference**: mention any resolved findings.\n\nAfter the sweep, archive PLAN.md to \u0060.agentera/archive/PLAN-{date}-{slug}.yaml\u0060, preserve lineage/evidence in the archive or next plan's \u0060previous_plan_archived\u0060, remove the active \u0060.agentera/plan.yaml\u0060, and report exit signal \u0060complete: plan finished\u0060.\n\n### Step 2: Pick work\n\nChoose **one** focused increment. No backlog; decide by reasoning about the gap between vision and codebase, weighted against known issues.\n\nEach cycle: **build toward the vision, or fix something broken?** Consult the decision profile. A critical bug trumps a new feature; a minor nit doesn't block progress.\n\n**Building toward vision:** Read codebase + VISION.md, identify the gap, pick the smallest increment closing the most valuable part.\n\n**Fixing issues:** Pick from TODO.md by severity (critical > degraded > annoying).\n\n**Optimization-shaped work:** suggest ⎘ optimera for measurable metrics and\nwait for confirmation instead of silently delegating.\n\nWrite a 1-2 sentence rationale. Scope down aggressively.\n\nCompose a Context block for this cycle: intent, constraints, unknowns, and scope. Keep it ≤80 words.\n\n**Decision gate**: After selecting work, use \u0060agentera decisions --format json\u0060 and check whether any \u0060exploratory\u0060 (DL3) entries in DECISIONS.md relate to the selected work area. Preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure in the cycle context instead of raw-reading missing historical context. If an exploratory decision is found: flag the uncertain foundation, suggest ❈ resonera to firm up the decision, and wait for confirmation before invoking it. In autonomous mode, proceed with the work but log the risk instead of silently delegating to resonera.\n\n### Step 3: Seek inspiration\n\nSearch for relevant external approaches before planning.\n\n1. **Assess**: bug fixes rarely benefit from inspiration. New features, architecture decisions, and unfamiliar domains do.\n2. **Search**: 2-3 targeted web queries for libraries, articles, repos, or patterns.\n3. **Analyze**: read promising finds deeply.\n4. **Integrate**: fold applicable patterns into the plan.\n\n### Step 4: Plan\n\nWrite a concrete plan: what changes in which files, expected behavior, verification approach.\n\nRead files you plan to modify before committing to the plan. If the docs-first workflow should update intent docs before tests and code, include that.\n\nKeep small enough for one agent session. Too large? Split and save the rest.\n\n### Step 5: Dispatch\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(realisera): checkpoint before worktree dispatch\u0060.\n4. If pre-commit hooks reject: fix, re-stage, retry. If retry fails, abort spawn.\n\n**Stale-base awareness**: Before spawning, run \u0060git rev-list --count origin/main..HEAD\u0060. If count > 0, do not merge the worktree branch. Fetch the sub-agent's diff and apply it to 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 realisera\u0060; use the runtime-native subagent surface with the implementation prompt below.\n\nSpawn an implementation sub-agent in a worktree with:\n\n- The plan from step 4\n- Relevant context files\n- Clear constraint: implement the plan and nothing else\n\n\u0060\u0060\u0060\nYou are implementing a focused change for [project].\n\n## Task\n[The plan]\n\n## Constraints\n- Implement ONLY what the plan describes. No scope creep.\n- Follow existing code patterns and conventions.\n- Read the files you are modifying before changing them.\n- Verify the change works as described, then run the project's test/build suite.\n- If you encounter a bug unrelated to your task, note it but do not fix it.\n\u0060\u0060\u0060\n\n### Step 6: Verify\n\nVerification has two phases: structural and behavioral. Both must pass before commit.\n\n**Phase A, structural verification**: After implementation:\n\n1. **Check the diff**: does it match the plan?\n2. **Functional check**: does the changed behavior work end-to-end?\n3. **Run the project's verification suite** (test/build/lint).\n\n**Phase B, behavioral verification gate**: observe the new behavior by running the project's primary entrypoint against real project state:\n\n- CLI tool: invoke with realistic arguments\n- Library/SDK: run a smoke driver\n- Web service: send a request to a production-shaped endpoint\n- Skill repo: \u0060npx -y agentera verify eval skills --skill <name>\u0060\n\nIf verification fails: diagnose, spawn a fix agent, re-verify.\n\n**N/A path**: If the cycle has no runnable behavior change, use \u0060N/A: <tag>\u0060 from the allowlist: \u0060docs-only\u0060, \u0060refactor-no-behavior-change\u0060, \u0060chore-dep-bump\u0060, \u0060chore-build-config\u0060, \u0060test-only\u0060.\n\n### Step 7: Commit\n\nOnce verified, commit with a conventional commit message: \u0060type(scope): summary\u0060.\n\nTypes: \u0060feat\u0060, \u0060fix\u0060, \u0060docs\u0060, \u0060refactor\u0060, \u0060chore\u0060, \u0060test\u0060. Include all related files. Never commit partial or broken work. Never push to remote.\n\nIf the current task is a version bump: read DOCS.md for the \u0060versioning\u0060 section. Update every file in \u0060version_files\u0060.\n\n### Step 8: 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, abstraction creep, and filler accumulation.\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\n### Step 9: Log\n\n**Dual-write**: realisera maintains the resolved PROGRESS.md YAML artifact and root CHANGELOG.md.\n\n- **TODO.md**: add newly discovered issues, mark resolved ones. Classify by severity (SI1-SI4).\n- **PROGRESS.md**: insert the newest cycle entry before older active cycles. The \u0060verified\u0060 field is mandatory.\n- **CHANGELOG.md**: append a one-line entry under \u0060## [Unreleased]\u0060.\n\nAfter writing PROGRESS.md, apply the schema COMPACTION rules if thresholds are exceeded: keep 10 full entries, keep up to 40 one-line archive entries, and drop beyond 50 total.\n\nArtifact writing follows contract Section 24 conventions.\n\nThen stop. One cycle complete.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER push to any remote. Local commits only.\n- NEVER bypass the project's test/lint/build suite.\n- NEVER modify git config or skip git hooks.\n- NEVER force push, amend published commits, or run destructive git operations.\n- NEVER add placeholder data or functionality.\n- NEVER modify files outside the project directory.\n- NEVER modify the vision artifact during a cycle. Only touch it during a brainstorm.\n- One cycle per invocation. Do not attempt multiple cycles.\n\n</critical>\n\n---\n\n## Handling blocked work\n\nIf blocked:\n\n1. Log blocker in TODO.md with context and decision needed\n2. Log skipped attempt in PROGRESS.md\n3. Pick different work and complete a full cycle 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─── ⧉ realisera · <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): One full cycle completed. Work selected, implemented, verified, committed, artifacts updated.\n- **flagged** (EX2): Cycle completed but with notable issues: verification warnings, scope reduction, or discoveries suggesting next cycle may face blockers.\n- **stuck** (EX3): Cannot complete: the vision artifact is missing and brainstorm can't proceed, all work blocked, or verification suite broken.\n- **waiting** (EX4): No vision artifact and no codebase to infer direction, or user instruction too ambiguous.\n\nBefore reporting any status, inspect the last 3 entries in PROGRESS.md. If all 3 record failed cycles, stop, log the failure pattern to TODO.md, and surface to the user. Do not attempt a 4th consecutive cycle on the same failing problem.\n\n---\n\n## Cross-capability integration\n\nRealisera is part of a twelve-capability suite.\n\n### Delegates to ⛥ visionera\n\nWhen visionera is installed and the vision artifact doesn't exist, suggest ⛥ visionera for deep vision creation. If visionera is NOT installed, the built-in brainstorm works as a standalone fallback.\n\n### Delegates to ⎘ optimera\n\nWhen picked work is optimization-shaped (improving a measurable metric), delegate to optimera.\n\n### Uses ⬚ inspirera\n\nIn Step 3 (Seek inspiration), search for external approaches. For deeper analysis, use \u0060/agentera research <url>\u0060.\n\n### Reads ♾ profilera output\n\nEvery cycle runs the effective profile script. Confidence thresholds (CS1-CS5) determine which entries are strong constraints vs suggestions.\n\n### Uses ❈ resonera for complex decisions\n\nWhen the brainstorm or work selection surfaces a decision too complex for inline resolution, suggest ❈ resonera.\n\n### Consumes ≡ planera plans\n\nWhen PLAN.md exists with pending tasks, Step 2 reads the plan instead of reasoning from vision. Pick next pending task with satisfied dependencies. Update task status. When \u0060header.status: complete\u0060 and every task is complete, run the plan-completion sweep, archive PLAN.md before removing active state, and preserve lineage/evidence.\n\n### Reads ▤ dokumentera output\n\nDOCS.md provides artifact path resolution. In the docs-first workflow, dokumentera writes intent docs that feed planera, which feeds realisera.\n\n### Reads ◰ visualisera output\n\nDESIGN.md provides visual identity context respected when building user-facing features.\n\n### Audited by ⛶ inspektera\n\nHEALTH.md findings become candidates for work selection. Run ⛶ inspektera every 5-10 cycles.\n"`);
4
+ export const instructions = JSON.parse(String.raw `"# REALISERA\n\n**Relentless Execution: Autonomous Loops Iterating Software. Evolve, Refine, Adapt**\n\nAn autonomous development loop that evolves any software project one cycle at a time. Decisions grounded in the user's decision profile. Continuity lives in files, not memory.\n\nEach invocation = one cycle. \u0060/loop\u0060 handles recurrence.\n\n---\n\n## Visual identity\n\nGlyph: **⧉** (protocol ref: SG2). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nFour artifacts, bootstrapped if absent. TODO.md and CHANGELOG.md stay at project root; canonical VISION.md and PROGRESS.md are stored as \u0060.agentera/vision.yaml\u0060 and \u0060.agentera/progress.yaml\u0060 unless mapped otherwise.\n\n| File | Purpose | Bootstrap |\n|------|---------|-----------|\n| \u0060VISION.md\u0060 | Canonical vision artifact. North star, direction, principles, aspirations. | Via inline brainstorm session (see below), written to \u0060.agentera/vision.yaml\u0060 by default. |\n| \u0060TODO.md\u0060 | Tech debt, bugs, discrepancies. | \u0060# TODO\\n\\n## ⇶ Critical\\n\\n## ⇉ Degraded\\n\\n## → Normal\\n\\n## ⇢ Annoying\\n\\n## Resolved\\n\u0060 |\n| \u0060CHANGELOG.md\u0060 | Public change history. | \u0060# Changelog\\n\\n## [Unreleased]\\n\u0060 |\n| \u0060PROGRESS.md\u0060 | Canonical progress artifact. Operational cycle log. | First cycle entry in \u0060.agentera/progress.yaml\u0060 by default. |\n\nUse \u0060agentera schema --format json\u0060 and its \u0060artifact_schemas\u0060 entries for \u0060vision\u0060 and \u0060progress\u0060 to locate the active installed schemas; do not search Agentera directories manually. Top-level \u0060agentera describe\u0060 is a migration alias.\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 (VISION.md, TODO.md, .agentera/progress.yaml, etc.). 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.\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: severity arrows VT5-VT8 (⇶/⇉/→/⇢), status tokens VT1-VT4 (■/▣/□/▨), list item VT15 (▸), inline separator VT16 (·), section divider VT14, flow/target VT17 (→). Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Severity issue levels SI1-SI4 for TODO classification. Decision labels DL1-DL3 for DECISIONS.md entries. Confidence scale CS1-CS5 with thresholds for 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### vision.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. A constitution, not a backlog.\n\n\u0060\u0060\u0060yaml\nproject_name: Project Name\nnorth_star: The dream. What this software makes possible.\npersonas:\n - name: Specific persona\n description: Their day, frustrations, and workflow.\nprinciples:\n - name: Principle name\n description: What it means and what it resists.\ndirection: Where this project is heading.\nidentity:\n personality: Product personality.\n voice: Communication style.\n emotional_register: How it should feel to use.\n naming: Naming conventions.\ntension: The hardest strategic tension.\n\u0060\u0060\u0060\n\n### progress.yaml\n\n\u0060\u0060\u0060yaml\ncycles:\n - number: N\n timestamp: YYYY-MM-DD HH:MM\n type: feat\n phase: build\n what: One-line summary of what shipped.\n inspiration: External source, if any.\n discovered: Issues or ideas found.\n verified: Observed output, N/A tag, or rationale.\n next: Most valuable next work.\n context:\n intent: Why this cycle happened.\n constraints: What had to stay true.\n unknowns: What remains uncertain.\n scope: What changed.\narchive: []\n\u0060\u0060\u0060\n\nThe \u0060verified\u0060 field is mandatory for every cycle entry.\n\n### CHANGELOG.md\n\nPublic-facing change history. Keep-a-changelog format. Realisera appends entries under \u0060## [Unreleased]\u0060 based on commit type: \u0060feat\u0060 → Added, \u0060refactor/chore\u0060 → Changed, \u0060fix\u0060 → Fixed. On version bumps, promote the Unreleased section to a versioned heading.\n\n---\n\n## Brainstorm: bootstrapping or refining the vision artifact\n\nThis runs in two situations:\n\n1. **The vision artifact doesn't exist**: the first time realisera runs on a project\n2. **User explicitly asks** to refine the vision\n\nIn all other cases, skip straight to the cycle.\n\nThe sharp colleague, here to build. Brief, focused conversation. One question at a time. Push for ambition.\n\n1. **Understand the dream**: \"Not what the software does, but what does it make possible?\"\n2. **Find the people**: \"Who reaches for this? Describe a person: their day, their frustrations.\"\n3. **Find the principles**: \"What principles guide every decision?\" If a decision profile exists, propose principles from it.\n4. **Set the direction**: \"Where is this heading? Not features, but capabilities.\"\n5. **Write the vision artifact**: synthesize into an aspirational north star. Present for approval.\n\nArtifact writing follows contract Section 24 conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n---\n\n## The cycle\n\nSkill introduction: \u0060─── ⧉ realisera · cycle N ───\u0060\n\nStep markers: display \u0060── step N/9: verb\u0060 before each step.\nSteps: orient, select, research, plan, spawn, verify, commit, audit, log.\n\n### Step 1: Orient\n\nStart from the supported Realisera execution-context seam:\n\n\u0060\u0060\u0060bash\nagentera prime --context realisera --format json\n\u0060\u0060\u0060\n\nIf \u0060execution_context.source_contract.complete_for_execution_context\u0060 is true,\nuse \u0060execution_context\u0060 and included \u0060capability_context.state\u0060 as normal startup context. Do\nnot read raw PLAN, PROGRESS, TODO, DOCS, HEALTH, DECISIONS, CHANGELOG, VISION,\nPROFILE, or DESIGN artifacts just to re-check selected work, acceptance\ncriteria, constraints, verification expectations, artifact update requirements,\nprogress logging requirements, changelog boundary, or scope caveats.\n\nIf \u0060execution_context\u0060 is incomplete or caveated, preserve every caveat in the\ncycle report and run the listed \u0060execution_context.fallback_commands\u0060 before any\nlast-resort raw artifact diagnostic. Raw artifact reads are last-resort\ndiagnostics, not normal Realisera startup behavior.\n\nFor progress fallback specifically, use \u0060npx -y agentera state progress --format json\u0060\nor the installed app equivalent from the returned fallback command; the routine\nprogress command owns startup progress state.\n\n### Decision satisfaction authority\n\nWhen a cycle touches decision satisfaction, agents may mark provisional\nsatisfaction with evidence only. Realisera must not mark or imply\nuser-confirmed 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 the cycle report\ninstead of reconstructing hidden outcomes or claiming automation proved intent.\n\n1. **execution_context.work_selection**: selected task or no-plan/completed-plan mode\n2. **execution_context.acceptance_criteria**: exact criteria for this cycle\n3. **execution_context.constraints**: plan constraints and protected-action boundaries\n4. **execution_context.verification_expectations**: expected validation and latest progress evidence\n5. **execution_context.artifact_update_requirements**: plan, TODO, changelog, and progress update obligations\n6. **execution_context.changelog_boundary**: current public-history boundary or fallback\n7. **execution_context.scope_boundary**: artifact-family scope and conservative source-file scope\n8. **source_contract.capability_context**: missing state families and CLI fallback commands\n9. **profile summary**: use \u0060hej.profile\u0060; stale or missing profile is a caveat, not approval to refresh profile state.\n\n10. **Project discovery** (cycle 1 or when unfamiliar):\n - Map the directory structure\n - Read dependency manifests\n - Read README.md, CLAUDE.md, AGENTS.md if they exist\n - Identify build/test/lint commands\n - Read key source files to understand architecture\n\n11. \u0060git log --oneline -20\u0060 for recent changes\n\nBefore proceeding, list the 3-5 facts that determine this cycle.\n\n**Exit-early stop condition (plan-driven mode only)**: If PLAN.md has \u0060header.status: complete\u0060 and every task is complete, perform a **plan-completion sweep** before archiving. A plan with blocked, skipped, or otherwise incomplete tasks is not a successfully completed plan and must remain visible for replanning or follow-up. This stop condition does NOT apply in vision-driven mode.\n\nSweep checklist:\n\n1. **PROGRESS.md aggregate cycle entry**: insert a newest-first cycle entry summarizing the whole plan.\n2. **CHANGELOG.md plan-level entries**: verify \u0060## [Unreleased]\u0060 covers each completed task's user-facing impact.\n3. **TODO.md milestone advance**: mark each plan task as Resolved.\n4. **HEALTH.md cross-reference**: mention any resolved findings.\n\nAfter the sweep, archive PLAN.md to \u0060.agentera/archive/PLAN-{date}-{slug}.yaml\u0060, preserve lineage/evidence in the archive or next plan's \u0060previous_plan_archived\u0060, remove the active \u0060.agentera/plan.yaml\u0060, and report exit signal \u0060complete: plan finished\u0060.\n\n### Step 2: Pick work\n\nChoose **one** focused increment. No backlog; decide by reasoning about the gap between vision and codebase, weighted against known issues.\n\nEach cycle: **build toward the vision, or fix something broken?** Consult the decision profile. A critical bug trumps a new feature; a minor nit doesn't block progress.\n\n**Building toward vision:** Read codebase + VISION.md, identify the gap, pick the smallest increment closing the most valuable part.\n\n**Fixing issues:** Pick from TODO.md by severity (critical > degraded > annoying).\n\n**Optimization-shaped work:** suggest ⎘ optimera for measurable metrics and\nwait for confirmation instead of silently delegating.\n\nWrite a 1-2 sentence rationale. Scope down aggressively.\n\nCompose a Context block for this cycle: intent, constraints, unknowns, and scope. Keep it ≤80 words.\n\n**Decision gate**: After selecting work, use \u0060agentera decisions --format json\u0060 and check whether any \u0060exploratory\u0060 (DL3) entries in DECISIONS.md relate to the selected work area. Preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure in the cycle context instead of raw-reading missing historical context. If an exploratory decision is found: flag the uncertain foundation, suggest ❈ resonera to firm up the decision, and wait for confirmation before invoking it. In autonomous mode, proceed with the work but log the risk instead of silently delegating to resonera.\n\n### Step 3: Seek inspiration\n\nSearch for relevant external approaches before planning.\n\n1. **Assess**: bug fixes rarely benefit from inspiration. New features, architecture decisions, and unfamiliar domains do.\n2. **Search**: 2-3 targeted web queries for libraries, articles, repos, or patterns.\n3. **Analyze**: read promising finds deeply.\n4. **Integrate**: fold applicable patterns into the plan.\n\n### Step 4: Plan\n\nWrite a concrete plan: what changes in which files, expected behavior, verification approach.\n\nRead files you plan to modify before committing to the plan. If the docs-first workflow should update intent docs before tests and code, include that.\n\nKeep small enough for one agent session. Too large? Split and save the rest.\n\n### Step 5: Dispatch\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(realisera): checkpoint before worktree dispatch\u0060.\n4. If pre-commit hooks reject: fix, re-stage, retry. If retry fails, abort spawn.\n\n**Stale-base awareness**: Before spawning, run \u0060git rev-list --count origin/main..HEAD\u0060. If count > 0, do not merge the worktree branch. Fetch the sub-agent's diff and apply it to 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 realisera\u0060; use the runtime-native subagent surface with the implementation prompt below.\n\nSpawn an implementation sub-agent in a worktree with:\n\n- The plan from step 4\n- Relevant context files\n- Clear constraint: implement the plan and nothing else\n\n\u0060\u0060\u0060\nYou are implementing a focused change for [project].\n\n## Task\n[The plan]\n\n## Constraints\n- Implement ONLY what the plan describes. No scope creep.\n- Follow existing code patterns and conventions.\n- Read the files you are modifying before changing them.\n- Verify the change works as described, then run the project's test/build suite.\n- If you encounter a bug unrelated to your task, note it but do not fix it.\n\u0060\u0060\u0060\n\n### Step 6: Verify\n\nVerification has two phases: structural and behavioral. Both must pass before commit.\n\n**Phase A, structural verification**: After implementation:\n\n1. **Check the diff**: does it match the plan?\n2. **Functional check**: does the changed behavior work end-to-end?\n3. **Run the project's verification suite** (test/build/lint).\n\n**Phase B, behavioral verification gate**: observe the new behavior by running the project's primary entrypoint against real project state:\n\n- CLI tool: invoke with realistic arguments\n- Library/SDK: run a smoke driver\n- Web service: send a request to a production-shaped endpoint\n- Skill repo: \u0060npx -y agentera verify eval skills --skill <name>\u0060\n\nIf verification fails: diagnose, spawn a fix agent, re-verify.\n\n**N/A path**: If the cycle has no runnable behavior change, use \u0060N/A: <tag>\u0060 from the allowlist: \u0060docs-only\u0060, \u0060refactor-no-behavior-change\u0060, \u0060chore-dep-bump\u0060, \u0060chore-build-config\u0060, \u0060test-only\u0060.\n\n### Step 7: Commit\n\nOnce verified, commit with a conventional commit message: \u0060type(scope): summary\u0060.\n\nTypes: \u0060feat\u0060, \u0060fix\u0060, \u0060docs\u0060, \u0060refactor\u0060, \u0060chore\u0060, \u0060test\u0060. Include all related files. Never commit partial or broken work. Never push to remote.\n\nIf the current task is a version bump: read DOCS.md for the \u0060versioning\u0060 section. Update every file in \u0060version_files\u0060.\n\n### Step 8: 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, abstraction creep, and filler accumulation.\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\n### Step 9: Log\n\n**Dual-write**: realisera maintains the resolved PROGRESS.md YAML artifact and root CHANGELOG.md.\n\n- **TODO.md**: add newly discovered open issues in severity bands with \u0060- [ ]\u0060. Move completed work to \u0060## ✓ Resolved\u0060 as \u0060- [x]\u0060 with a resolution summary; never leave checked or strikethrough items in severity bands. The validate-artifact hook auto-compacts Resolved when the 10/40/50 cap is exceeded.\n- **PROGRESS.md**: insert the newest cycle entry before older active cycles. The \u0060verified\u0060 field is mandatory.\n- **CHANGELOG.md**: append a one-line entry under \u0060## [Unreleased]\u0060.\n\nAfter writing PROGRESS.md, apply the schema COMPACTION rules if thresholds are exceeded: keep 10 full entries, keep up to 40 one-line archive entries, and drop beyond 50 total. TODO.md Resolved compaction follows the same 10/40/50 cap via the validate-artifact hook or \u0060agentera check compact --mode fix\u0060.\n\nArtifact writing follows contract Section 24 conventions.\n\nThen stop. One cycle complete.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER push to any remote. Local commits only.\n- NEVER bypass the project's test/lint/build suite.\n- NEVER modify git config or skip git hooks.\n- NEVER force push, amend published commits, or run destructive git operations.\n- NEVER add placeholder data or functionality.\n- NEVER modify files outside the project directory.\n- NEVER modify the vision artifact during a cycle. Only touch it during a brainstorm.\n- One cycle per invocation. Do not attempt multiple cycles.\n\n</critical>\n\n---\n\n## Handling blocked work\n\nIf blocked:\n\n1. Log blocker in TODO.md with context and decision needed\n2. Log skipped attempt in PROGRESS.md\n3. Pick different work and complete a full cycle 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─── ⧉ realisera · <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): One full cycle completed. Work selected, implemented, verified, committed, artifacts updated.\n- **flagged** (EX2): Cycle completed but with notable issues: verification warnings, scope reduction, or discoveries suggesting next cycle may face blockers.\n- **stuck** (EX3): Cannot complete: the vision artifact is missing and brainstorm can't proceed, all work blocked, or verification suite broken.\n- **waiting** (EX4): No vision artifact and no codebase to infer direction, or user instruction too ambiguous.\n\nBefore reporting any status, inspect the last 3 entries in PROGRESS.md. If all 3 record failed cycles, stop, log the failure pattern to TODO.md, and surface to the user. Do not attempt a 4th consecutive cycle on the same failing problem.\n\n---\n\n## Cross-capability integration\n\nRealisera is part of a twelve-capability suite.\n\n### Delegates to ⛥ visionera\n\nWhen visionera is installed and the vision artifact doesn't exist, suggest ⛥ visionera for deep vision creation. If visionera is NOT installed, the built-in brainstorm works as a standalone fallback.\n\n### Delegates to ⎘ optimera\n\nWhen picked work is optimization-shaped (improving a measurable metric), delegate to optimera.\n\n### Uses ⬚ inspirera\n\nIn Step 3 (Seek inspiration), search for external approaches. For deeper analysis, use \u0060/agentera research <url>\u0060.\n\n### Reads ♾ profilera output\n\nEvery cycle runs the effective profile script. Confidence thresholds (CS1-CS5) determine which entries are strong constraints vs suggestions.\n\n### Uses ❈ resonera for complex decisions\n\nWhen the brainstorm or work selection surfaces a decision too complex for inline resolution, suggest ❈ resonera.\n\n### Consumes ≡ planera plans\n\nWhen PLAN.md exists with pending tasks, Step 2 reads the plan instead of reasoning from vision. Pick next pending task with satisfied dependencies. Update task status. When \u0060header.status: complete\u0060 and every task is complete, run the plan-completion sweep, archive PLAN.md before removing active state, and preserve lineage/evidence.\n\n### Reads ▤ dokumentera output\n\nDOCS.md provides artifact path resolution. In the docs-first workflow, dokumentera writes intent docs that feed planera, which feeds realisera.\n\n### Reads ◰ visualisera output\n\nDESIGN.md provides visual identity context respected when building user-facing features.\n\n### Audited by ⛶ inspektera\n\nHEALTH.md findings become candidates for work selection. Run ⛶ inspektera every 5-10 cycles.\n"`);
5
5
  export default instructions;
6
6
  //# sourceMappingURL=instructions.js.map