agentera 3.0.0-dev.5 → 3.0.0-dev.7

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 (510) hide show
  1. package/README.md +4 -3
  2. package/bundle/extract-corpus-parity.json +23 -0
  3. package/bundle/references/adapters/cursor.md +10 -9
  4. package/bundle/references/adapters/opencode.md +26 -26
  5. package/bundle/references/adapters/package-registry.yaml +0 -1
  6. package/bundle/references/adapters/package-surface-characterization.md +1 -2
  7. package/bundle/references/adapters/runtime-adapter-characterization.md +1 -1
  8. package/bundle/references/adapters/runtime-adapter-registry.yaml +16 -10
  9. package/bundle/references/adapters/runtime-feature-parity.md +2 -2
  10. package/bundle/references/analysis/benchmark.md +1 -1
  11. package/bundle/references/analysis/startup-measurement-contract.yaml +18 -18
  12. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +4 -3
  13. package/bundle/references/cli/agent-ready-state-contract.yaml +6 -6
  14. package/bundle/references/cli/app-lifecycle-vocabulary.yaml +4 -4
  15. package/bundle/references/cli/audience-namespace-cli-migration.yaml +40 -26
  16. package/bundle/references/cli/bundle-skill-vocabulary.yaml +1 -29
  17. package/bundle/references/cli/capability-tool-classification.yaml +12 -12
  18. package/bundle/references/cli/coexistence-probe.yaml +13 -0
  19. package/bundle/references/cli/parity-expected-actual-template.md +30 -0
  20. package/bundle/references/cli/routing-execution-vocabulary.yaml +6 -6
  21. package/bundle/references/cli/routing-model.md +96 -0
  22. package/bundle/references/cli/single-name-protocol.yaml +42 -0
  23. package/bundle/references/cli/trigger-schema-enrichment.md +136 -0
  24. package/bundle/references/cli/update-channels.yaml +16 -0
  25. package/bundle/references/cli/upgrade-repair-wording.md +45 -0
  26. package/bundle/references/cli/v3-handoff-manifest.schema.yaml +98 -0
  27. package/bundle/references/cli/vocabulary-index.yaml +17 -12
  28. package/bundle/references/cli/vocabulary.md +316 -309
  29. package/bundle/references/meta/documentation-inventory.md +9 -3
  30. package/bundle/registry.json +13 -13
  31. package/bundle/skills/agentera/.claude-plugin/plugin.json +13 -13
  32. package/bundle/skills/agentera/SKILL.md +99 -415
  33. package/bundle/skills/agentera/agents/audit.toml +6 -0
  34. package/bundle/skills/agentera/agents/build.toml +6 -0
  35. package/bundle/skills/agentera/agents/design.toml +6 -0
  36. package/bundle/skills/agentera/agents/{planera.toml → discuss.toml} +3 -3
  37. package/bundle/skills/agentera/agents/{resonera.toml → document.toml} +3 -3
  38. package/bundle/skills/agentera/agents/{optimera.toml → optimize.toml} +2 -2
  39. package/bundle/skills/agentera/agents/orchestrate.toml +6 -0
  40. package/bundle/skills/agentera/agents/plan.toml +6 -0
  41. package/bundle/skills/agentera/agents/profile.toml +6 -0
  42. package/bundle/skills/agentera/agents/research.toml +6 -0
  43. package/bundle/skills/agentera/agents/status.toml +6 -0
  44. package/bundle/skills/agentera/agents/vision.toml +6 -0
  45. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/artifacts.yaml +10 -10
  46. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/triggers.yaml +15 -6
  47. package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/validation.yaml +9 -9
  48. package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/artifacts.yaml +11 -11
  49. package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/triggers.yaml +13 -3
  50. package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/validation.yaml +7 -7
  51. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/artifacts.yaml +6 -6
  52. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/triggers.yaml +15 -3
  53. package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/validation.yaml +5 -5
  54. package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/artifacts.yaml +6 -6
  55. package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/triggers.yaml +11 -3
  56. package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/validation.yaml +4 -4
  57. package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/artifacts.yaml +10 -10
  58. package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/triggers.yaml +14 -3
  59. package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/validation.yaml +8 -8
  60. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/artifacts.yaml +8 -8
  61. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/triggers.yaml +11 -3
  62. package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/validation.yaml +7 -7
  63. package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/artifacts.yaml +10 -10
  64. package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/triggers.yaml +16 -3
  65. package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/validation.yaml +27 -27
  66. package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/artifacts.yaml +8 -8
  67. package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/exit.yaml +2 -2
  68. package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/triggers.yaml +15 -3
  69. package/bundle/skills/agentera/capabilities/{planera → plan}/schemas/validation.yaml +3 -3
  70. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/artifacts.yaml +2 -2
  71. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/exit.yaml +2 -1
  72. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/triggers.yaml +7 -3
  73. package/bundle/skills/agentera/capabilities/{profilera → profile}/schemas/validation.yaml +2 -2
  74. package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/artifacts.yaml +5 -5
  75. package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/triggers.yaml +9 -3
  76. package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/validation.yaml +2 -2
  77. package/bundle/skills/agentera/capabilities/{hej → status}/schemas/artifacts.yaml +14 -11
  78. package/bundle/skills/agentera/capabilities/{hej → status}/schemas/triggers.yaml +10 -4
  79. package/bundle/skills/agentera/capabilities/{hej → status}/schemas/validation.yaml +5 -5
  80. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/artifacts.yaml +8 -8
  81. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/triggers.yaml +17 -3
  82. package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/validation.yaml +7 -7
  83. package/bundle/skills/agentera/capability_schema_contract.yaml +178 -34
  84. package/bundle/skills/agentera/protocol.yaml +29 -29
  85. package/bundle/skills/agentera/references/contract.md +328 -319
  86. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +4 -4
  87. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +9 -9
  88. package/bundle/skills/agentera/schemas/artifacts/design.yaml +4 -4
  89. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +8 -7
  90. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +5 -5
  91. package/bundle/skills/agentera/schemas/artifacts/health.yaml +5 -5
  92. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +4 -4
  93. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +5 -5
  94. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +5 -5
  95. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +40 -35
  96. package/bundle/skills/agentera/schemas/artifacts/vision.yaml +3 -3
  97. package/dist/analytics/extractCorpus/cli.js +149 -0
  98. package/dist/analytics/extractCorpus/cli.js.map +1 -0
  99. package/dist/analytics/extractCorpus/copilotSessions.js +273 -0
  100. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -0
  101. package/dist/analytics/extractCorpus/core.js +364 -0
  102. package/dist/analytics/extractCorpus/core.js.map +1 -0
  103. package/dist/analytics/extractCorpus/corpus.js +145 -0
  104. package/dist/analytics/extractCorpus/corpus.js.map +1 -0
  105. package/dist/analytics/extractCorpus/coverageAudit.js +261 -0
  106. package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -0
  107. package/dist/analytics/extractCorpus/cursorSessions.js +423 -0
  108. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -0
  109. package/dist/analytics/extractCorpus/extractCorpusParity.js +105 -0
  110. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -0
  111. package/dist/analytics/extractCorpus/filesystemSources.js +122 -0
  112. package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -0
  113. package/dist/analytics/extractCorpus/index.js +12 -0
  114. package/dist/analytics/extractCorpus/index.js.map +1 -0
  115. package/dist/analytics/extractCorpus/jsonlSessions.js +185 -0
  116. package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -0
  117. package/dist/analytics/extractCorpus/sqliteCaps.js +44 -0
  118. package/dist/analytics/extractCorpus/sqliteCaps.js.map +1 -0
  119. package/dist/analytics/extractCorpus/sqliteSessions.js +368 -0
  120. package/dist/analytics/extractCorpus/sqliteSessions.js.map +1 -0
  121. package/dist/analytics/extractCorpus.js +2 -1790
  122. package/dist/analytics/extractCorpus.js.map +1 -1
  123. package/dist/analytics/usageStats.js +20 -20
  124. package/dist/analytics/usageStats.js.map +1 -1
  125. package/dist/capabilities/audit/instructions.js +6 -0
  126. package/dist/capabilities/audit/instructions.js.map +1 -0
  127. package/dist/capabilities/build/instructions.js +6 -0
  128. package/dist/capabilities/build/instructions.js.map +1 -0
  129. package/dist/capabilities/design/instructions.js +5 -0
  130. package/dist/capabilities/design/instructions.js.map +1 -0
  131. package/dist/capabilities/discuss/instructions.js +6 -0
  132. package/dist/capabilities/discuss/instructions.js.map +1 -0
  133. package/dist/capabilities/document/instructions.js +6 -0
  134. package/dist/capabilities/document/instructions.js.map +1 -0
  135. package/dist/capabilities/index.js +24 -24
  136. package/dist/capabilities/index.js.map +1 -1
  137. package/dist/capabilities/inspirera/instructions.js +1 -1
  138. package/dist/capabilities/inspirera/instructions.js.map +1 -1
  139. package/dist/capabilities/optimize/instructions.js +6 -0
  140. package/dist/capabilities/optimize/instructions.js.map +1 -0
  141. package/dist/capabilities/orchestrate/instructions.js +6 -0
  142. package/dist/capabilities/orchestrate/instructions.js.map +1 -0
  143. package/dist/capabilities/plan/instructions.js +6 -0
  144. package/dist/capabilities/plan/instructions.js.map +1 -0
  145. package/dist/capabilities/planera/instructions.js +1 -1
  146. package/dist/capabilities/planera/instructions.js.map +1 -1
  147. package/dist/capabilities/profile/instructions.js +6 -0
  148. package/dist/capabilities/profile/instructions.js.map +1 -0
  149. package/dist/capabilities/profilera/instructions.js +1 -1
  150. package/dist/capabilities/profilera/instructions.js.map +1 -1
  151. package/dist/capabilities/realisera/instructions.js +1 -1
  152. package/dist/capabilities/realisera/instructions.js.map +1 -1
  153. package/dist/capabilities/research/instructions.js +6 -0
  154. package/dist/capabilities/research/instructions.js.map +1 -0
  155. package/dist/capabilities/resonera/instructions.js +1 -1
  156. package/dist/capabilities/resonera/instructions.js.map +1 -1
  157. package/dist/capabilities/status/instructions.js +6 -0
  158. package/dist/capabilities/status/instructions.js.map +1 -0
  159. package/dist/capabilities/vision/instructions.js +6 -0
  160. package/dist/capabilities/vision/instructions.js.map +1 -0
  161. package/dist/capabilities/visionera/instructions.js +1 -1
  162. package/dist/capabilities/visionera/instructions.js.map +1 -1
  163. package/dist/capabilities/visualisera/instructions.js +3 -4
  164. package/dist/capabilities/visualisera/instructions.js.map +1 -1
  165. package/dist/cli/appContext.js +16 -17
  166. package/dist/cli/appContext.js.map +1 -1
  167. package/dist/cli/capabilityContext/benchmark.js +564 -0
  168. package/dist/cli/capabilityContext/benchmark.js.map +1 -0
  169. package/dist/cli/capabilityContext/bespoke.js +36 -0
  170. package/dist/cli/capabilityContext/bespoke.js.map +1 -0
  171. package/dist/cli/capabilityContext/build.js +177 -0
  172. package/dist/cli/capabilityContext/build.js.map +1 -0
  173. package/dist/cli/capabilityContext/closeout.js +230 -0
  174. package/dist/cli/capabilityContext/closeout.js.map +1 -0
  175. package/dist/cli/capabilityContext/contract.js +188 -0
  176. package/dist/cli/capabilityContext/contract.js.map +1 -0
  177. package/dist/cli/capabilityContext/evidence.js +456 -0
  178. package/dist/cli/capabilityContext/evidence.js.map +1 -0
  179. package/dist/cli/capabilityContext/index.js +4 -0
  180. package/dist/cli/capabilityContext/index.js.map +1 -0
  181. package/dist/cli/capabilityContext/orchestration.js +107 -0
  182. package/dist/cli/capabilityContext/orchestration.js.map +1 -0
  183. package/dist/cli/capabilityContext/planState.js +271 -0
  184. package/dist/cli/capabilityContext/planState.js.map +1 -0
  185. package/dist/cli/capabilityContext/progress.js +103 -0
  186. package/dist/cli/capabilityContext/progress.js.map +1 -0
  187. package/dist/cli/capabilityContext/realisera.js +174 -0
  188. package/dist/cli/capabilityContext/realisera.js.map +1 -0
  189. package/dist/cli/capabilityContext/shared.js +94 -0
  190. package/dist/cli/capabilityContext/shared.js.map +1 -0
  191. package/dist/cli/capabilityContext/slim.js +108 -0
  192. package/dist/cli/capabilityContext/slim.js.map +1 -0
  193. package/dist/cli/capabilityContext/startup.js +213 -0
  194. package/dist/cli/capabilityContext/startup.js.map +1 -0
  195. package/dist/cli/capabilityContext/types.js +40 -0
  196. package/dist/cli/capabilityContext/types.js.map +1 -0
  197. package/dist/cli/capabilityContext.js +1 -2486
  198. package/dist/cli/capabilityContext.js.map +1 -1
  199. package/dist/cli/commands/appHome.js +23 -0
  200. package/dist/cli/commands/appHome.js.map +1 -0
  201. package/dist/cli/commands/backfill.js +84 -0
  202. package/dist/cli/commands/backfill.js.map +1 -0
  203. package/dist/cli/commands/capability.js +2 -2
  204. package/dist/cli/commands/capability.js.map +1 -1
  205. package/dist/cli/commands/compact.js +1 -1
  206. package/dist/cli/commands/compact.js.map +1 -1
  207. package/dist/cli/commands/doctor.js +17 -98
  208. package/dist/cli/commands/doctor.js.map +1 -1
  209. package/dist/cli/commands/lint.js +4 -36
  210. package/dist/cli/commands/lint.js.map +1 -1
  211. package/dist/cli/commands/prime/bundleStatus.js +140 -0
  212. package/dist/cli/commands/prime/bundleStatus.js.map +1 -0
  213. package/dist/cli/commands/prime/collectOrientationState.js +156 -0
  214. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -0
  215. package/dist/cli/commands/prime/orientationOutput.js +210 -0
  216. package/dist/cli/commands/prime/orientationOutput.js.map +1 -0
  217. package/dist/cli/commands/prime/routeOutput.js +50 -0
  218. package/dist/cli/commands/prime/routeOutput.js.map +1 -0
  219. package/dist/cli/commands/prime/types.js +2 -0
  220. package/dist/cli/commands/prime/types.js.map +1 -0
  221. package/dist/cli/commands/prime/v1Migration.js +39 -0
  222. package/dist/cli/commands/prime/v1Migration.js.map +1 -0
  223. package/dist/cli/commands/prime.js +11 -554
  224. package/dist/cli/commands/prime.js.map +1 -1
  225. package/dist/cli/commands/query.js +5 -2
  226. package/dist/cli/commands/query.js.map +1 -1
  227. package/dist/cli/commands/report.js +27 -10
  228. package/dist/cli/commands/report.js.map +1 -1
  229. package/dist/cli/commands/schema.js +24 -20
  230. package/dist/cli/commands/schema.js.map +1 -1
  231. package/dist/cli/commands/state/decisions.js +403 -0
  232. package/dist/cli/commands/state/decisions.js.map +1 -0
  233. package/dist/cli/commands/state/docs.js +97 -0
  234. package/dist/cli/commands/state/docs.js.map +1 -0
  235. package/dist/cli/commands/state/experiments.js +68 -0
  236. package/dist/cli/commands/state/experiments.js.map +1 -0
  237. package/dist/cli/commands/state/health.js +116 -0
  238. package/dist/cli/commands/state/health.js.map +1 -0
  239. package/dist/cli/commands/state/index.js +51 -0
  240. package/dist/cli/commands/state/index.js.map +1 -0
  241. package/dist/cli/commands/state/objective.js +69 -0
  242. package/dist/cli/commands/state/objective.js.map +1 -0
  243. package/dist/cli/commands/state/plan.js +173 -0
  244. package/dist/cli/commands/state/plan.js.map +1 -0
  245. package/dist/cli/commands/state/progress.js +47 -0
  246. package/dist/cli/commands/state/progress.js.map +1 -0
  247. package/dist/cli/commands/state/shared.js +15 -0
  248. package/dist/cli/commands/state/shared.js.map +1 -0
  249. package/dist/cli/commands/state/todo.js +121 -0
  250. package/dist/cli/commands/state/todo.js.map +1 -0
  251. package/dist/cli/commands/state.js +7 -7
  252. package/dist/cli/commands/state.js.map +1 -1
  253. package/dist/cli/commands/validate.js +50 -100
  254. package/dist/cli/commands/validate.js.map +1 -1
  255. package/dist/cli/commands/verify.js +1 -1
  256. package/dist/cli/commands/verify.js.map +1 -1
  257. package/dist/cli/contracts/bundleStatus.js +2 -0
  258. package/dist/cli/contracts/bundleStatus.js.map +1 -0
  259. package/dist/cli/contracts/orientationState.js +2 -0
  260. package/dist/cli/contracts/orientationState.js.map +1 -0
  261. package/dist/cli/dispatch/argvParser.js +33 -0
  262. package/dist/cli/dispatch/argvParser.js.map +1 -0
  263. package/dist/cli/dispatch/check.js +328 -0
  264. package/dist/cli/dispatch/check.js.map +1 -0
  265. package/dist/cli/dispatch/commands.js +27 -0
  266. package/dist/cli/dispatch/commands.js.map +1 -0
  267. package/dist/cli/dispatch/index.js +182 -0
  268. package/dist/cli/dispatch/index.js.map +1 -0
  269. package/dist/cli/dispatch/lifecycle.js +597 -0
  270. package/dist/cli/dispatch/lifecycle.js.map +1 -0
  271. package/dist/cli/dispatch/prime.js +104 -0
  272. package/dist/cli/dispatch/prime.js.map +1 -0
  273. package/dist/cli/dispatch/shared.js +64 -0
  274. package/dist/cli/dispatch/shared.js.map +1 -0
  275. package/dist/cli/dispatch/state.js +144 -0
  276. package/dist/cli/dispatch/state.js.map +1 -0
  277. package/dist/cli/dispatch.js +1 -1293
  278. package/dist/cli/dispatch.js.map +1 -1
  279. package/dist/cli/help.js +41 -8
  280. package/dist/cli/help.js.map +1 -1
  281. package/dist/cli/orientation/attention.js +61 -0
  282. package/dist/cli/orientation/attention.js.map +1 -0
  283. package/dist/cli/orientation/corpusCoverage.js +71 -0
  284. package/dist/cli/orientation/corpusCoverage.js.map +1 -0
  285. package/dist/cli/orientation.js +129 -78
  286. package/dist/cli/orientation.js.map +1 -1
  287. package/dist/cli/prime-blob.js +1 -1
  288. package/dist/cli/startupCompletenessContract.js +56 -0
  289. package/dist/cli/startupCompletenessContract.js.map +1 -0
  290. package/dist/cli/stateQuery.js +9 -2
  291. package/dist/cli/stateQuery.js.map +1 -1
  292. package/dist/cli/todoSeverity.js +19 -0
  293. package/dist/cli/todoSeverity.js.map +1 -0
  294. package/dist/core/envPaths.js +21 -0
  295. package/dist/core/envPaths.js.map +1 -0
  296. package/dist/core/git.js +43 -0
  297. package/dist/core/git.js.map +1 -0
  298. package/dist/core/jsonValue.js +6 -0
  299. package/dist/core/jsonValue.js.map +1 -0
  300. package/dist/core/pyjson.js +67 -2
  301. package/dist/core/pyjson.js.map +1 -1
  302. package/dist/eval/evalSkills.js +17 -12
  303. package/dist/eval/evalSkills.js.map +1 -1
  304. package/dist/eval/semanticEval.js +43 -19
  305. package/dist/eval/semanticEval.js.map +1 -1
  306. package/dist/eval/semanticFixtures.js +16 -4
  307. package/dist/eval/semanticFixtures.js.map +1 -1
  308. package/dist/hooks/common.js +8 -23
  309. package/dist/hooks/common.js.map +1 -1
  310. package/dist/hooks/compaction/apply.js +269 -0
  311. package/dist/hooks/compaction/apply.js.map +1 -0
  312. package/dist/hooks/compaction/dryRun.js +183 -0
  313. package/dist/hooks/compaction/dryRun.js.map +1 -0
  314. package/dist/hooks/compaction/index.js +23 -0
  315. package/dist/hooks/compaction/index.js.map +1 -0
  316. package/dist/hooks/compaction/parse.js +258 -0
  317. package/dist/hooks/compaction/parse.js.map +1 -0
  318. package/dist/hooks/compaction/retention.js +199 -0
  319. package/dist/hooks/compaction/retention.js.map +1 -0
  320. package/dist/hooks/compaction/status.js +241 -0
  321. package/dist/hooks/compaction/status.js.map +1 -0
  322. package/dist/hooks/compaction/todoResolved.js +137 -0
  323. package/dist/hooks/compaction/todoResolved.js.map +1 -0
  324. package/dist/hooks/compaction/types.js +6 -0
  325. package/dist/hooks/compaction/types.js.map +1 -0
  326. package/dist/hooks/compaction.js +20 -20
  327. package/dist/hooks/compaction.js.map +1 -1
  328. package/dist/hooks/cursorPreToolUse.js +1 -1
  329. package/dist/hooks/cursorPreToolUse.js.map +1 -1
  330. package/dist/hooks/cursorSessionStart.js +10 -2
  331. package/dist/hooks/cursorSessionStart.js.map +1 -1
  332. package/dist/hooks/sessionStart.js +18 -11
  333. package/dist/hooks/sessionStart.js.map +1 -1
  334. package/dist/hooks/sessionStop.js +6 -12
  335. package/dist/hooks/sessionStop.js.map +1 -1
  336. package/dist/hooks/todoLayout.js +177 -0
  337. package/dist/hooks/todoLayout.js.map +1 -0
  338. package/dist/hooks/validateArtifact/agentFacing.js +10 -0
  339. package/dist/hooks/validateArtifact/agentFacing.js.map +1 -0
  340. package/dist/hooks/validateArtifact/index.js +151 -0
  341. package/dist/hooks/validateArtifact/index.js.map +1 -0
  342. package/dist/hooks/validateArtifact/markdown.js +146 -0
  343. package/dist/hooks/validateArtifact/markdown.js.map +1 -0
  344. package/dist/hooks/validateArtifact/runtime.js +86 -0
  345. package/dist/hooks/validateArtifact/runtime.js.map +1 -0
  346. package/dist/hooks/validateArtifact/schema.js +459 -0
  347. package/dist/hooks/validateArtifact/schema.js.map +1 -0
  348. package/dist/hooks/validateArtifact/traversal.js +106 -0
  349. package/dist/hooks/validateArtifact/traversal.js.map +1 -0
  350. package/dist/hooks/validateArtifact/violations.js +105 -0
  351. package/dist/hooks/validateArtifact/violations.js.map +1 -0
  352. package/dist/hooks/validateArtifact.js +29 -40
  353. package/dist/hooks/validateArtifact.js.map +1 -1
  354. package/dist/migrate/v2HandoffManifest.js +447 -0
  355. package/dist/migrate/v2HandoffManifest.js.map +1 -0
  356. package/dist/registries/artifactProtocolIds.js +77 -0
  357. package/dist/registries/artifactProtocolIds.js.map +1 -0
  358. package/dist/registries/artifactRegistry.js +23 -9
  359. package/dist/registries/artifactRegistry.js.map +1 -1
  360. package/dist/registries/capabilityContract.js +144 -1
  361. package/dist/registries/capabilityContract.js.map +1 -1
  362. package/dist/registries/evaluatorHandoffContract.js +2 -2
  363. package/dist/registries/evaluatorHandoffContract.js.map +1 -1
  364. package/dist/registries/packageRegistry.js +4 -3
  365. package/dist/registries/packageRegistry.js.map +1 -1
  366. package/dist/registries/runtimeAdapterRegistry.js +5 -4
  367. package/dist/registries/runtimeAdapterRegistry.js.map +1 -1
  368. package/dist/registries/triggerLoader.js +211 -0
  369. package/dist/registries/triggerLoader.js.map +1 -0
  370. package/dist/release/releaseMetadata.js +235 -0
  371. package/dist/release/releaseMetadata.js.map +1 -0
  372. package/dist/routing/index.js +2 -0
  373. package/dist/routing/index.js.map +1 -0
  374. package/dist/routing/routeEngine.js +189 -0
  375. package/dist/routing/routeEngine.js.map +1 -0
  376. package/dist/setup/codex/agents.js +96 -0
  377. package/dist/setup/codex/agents.js.map +1 -0
  378. package/dist/setup/codex/cli.js +161 -0
  379. package/dist/setup/codex/cli.js.map +1 -0
  380. package/dist/setup/codex/configToml.js +639 -0
  381. package/dist/setup/codex/configToml.js.map +1 -0
  382. package/dist/setup/codex/constants.js +29 -0
  383. package/dist/setup/codex/constants.js.map +1 -0
  384. package/dist/setup/codex/installRoot.js +64 -0
  385. package/dist/setup/codex/installRoot.js.map +1 -0
  386. package/dist/setup/codex/state.js +270 -0
  387. package/dist/setup/codex/state.js.map +1 -0
  388. package/dist/setup/codex.js +11 -1196
  389. package/dist/setup/codex.js.map +1 -1
  390. package/dist/setup/cursor.js +6 -4
  391. package/dist/setup/cursor.js.map +1 -1
  392. package/dist/setup/cursorSurfaces.js +67 -0
  393. package/dist/setup/cursorSurfaces.js.map +1 -0
  394. package/dist/setup/doctor/core.js +300 -0
  395. package/dist/setup/doctor/core.js.map +1 -0
  396. package/dist/setup/doctor/diagnostics.js +240 -0
  397. package/dist/setup/doctor/diagnostics.js.map +1 -0
  398. package/dist/setup/doctor/opencode.js +313 -0
  399. package/dist/setup/doctor/opencode.js.map +1 -0
  400. package/dist/setup/doctor/report.js +425 -0
  401. package/dist/setup/doctor/report.js.map +1 -0
  402. package/dist/setup/doctor.js +9 -1296
  403. package/dist/setup/doctor.js.map +1 -1
  404. package/dist/setup/opencode.js +13 -0
  405. package/dist/setup/opencode.js.map +1 -0
  406. package/dist/setup/smokeChecks.js +11 -11
  407. package/dist/setup/smokeChecks.js.map +1 -1
  408. package/dist/state/installRoot.js +49 -18
  409. package/dist/state/installRoot.js.map +1 -1
  410. package/dist/state/progressCommit.js +289 -0
  411. package/dist/state/progressCommit.js.map +1 -0
  412. package/dist/state/startupAnalysis/benchmark.js +371 -0
  413. package/dist/state/startupAnalysis/benchmark.js.map +1 -0
  414. package/dist/state/startupAnalysis/contract.js +126 -0
  415. package/dist/state/startupAnalysis/contract.js.map +1 -0
  416. package/dist/state/startupAnalysis/helpers.js +287 -0
  417. package/dist/state/startupAnalysis/helpers.js.map +1 -0
  418. package/dist/state/startupAnalysis/index.js +7 -0
  419. package/dist/state/startupAnalysis/index.js.map +1 -0
  420. package/dist/state/startupAnalysis/metrics.js +341 -0
  421. package/dist/state/startupAnalysis/metrics.js.map +1 -0
  422. package/dist/state/startupAnalysis/records.js +199 -0
  423. package/dist/state/startupAnalysis/records.js.map +1 -0
  424. package/dist/state/startupAnalysis/report.js +112 -0
  425. package/dist/state/startupAnalysis/report.js.map +1 -0
  426. package/dist/state/startupAnalysis/threshold.js +500 -0
  427. package/dist/state/startupAnalysis/threshold.js.map +1 -0
  428. package/dist/state/startupAnalysis.js +2 -1952
  429. package/dist/state/startupAnalysis.js.map +1 -1
  430. package/dist/upgrade/appContentRefresh.js +342 -0
  431. package/dist/upgrade/appContentRefresh.js.map +1 -0
  432. package/dist/upgrade/appModel.js +8 -6
  433. package/dist/upgrade/appModel.js.map +1 -1
  434. package/dist/upgrade/bundleEvidence.js +34 -0
  435. package/dist/upgrade/bundleEvidence.js.map +1 -0
  436. package/dist/upgrade/channels.js +11 -4
  437. package/dist/upgrade/channels.js.map +1 -1
  438. package/dist/upgrade/cliProbe.js +22 -0
  439. package/dist/upgrade/cliProbe.js.map +1 -0
  440. package/dist/upgrade/coexistenceProbe.js +107 -0
  441. package/dist/upgrade/coexistenceProbe.js.map +1 -0
  442. package/dist/upgrade/compatibility.js +13 -4
  443. package/dist/upgrade/compatibility.js.map +1 -1
  444. package/dist/upgrade/doctor.js +165 -183
  445. package/dist/upgrade/doctor.js.map +1 -1
  446. package/dist/upgrade/doctorClassifier.js +177 -0
  447. package/dist/upgrade/doctorClassifier.js.map +1 -0
  448. package/dist/upgrade/installedHooksRetirement.js +190 -0
  449. package/dist/upgrade/installedHooksRetirement.js.map +1 -0
  450. package/dist/upgrade/legacyAgentCleanup.js +116 -0
  451. package/dist/upgrade/legacyAgentCleanup.js.map +1 -0
  452. package/dist/upgrade/migrateArtifactsV2ToV3.js +57 -109
  453. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  454. package/dist/upgrade/nextMajorDoctor.js +42 -7
  455. package/dist/upgrade/nextMajorDoctor.js.map +1 -1
  456. package/dist/upgrade/npxPlatformStatus.js +23 -0
  457. package/dist/upgrade/npxPlatformStatus.js.map +1 -0
  458. package/dist/upgrade/projectIntegration.js +69 -73
  459. package/dist/upgrade/projectIntegration.js.map +1 -1
  460. package/dist/upgrade/projectIntegrationDecision.js +93 -0
  461. package/dist/upgrade/projectIntegrationDecision.js.map +1 -0
  462. package/dist/upgrade/runtimeMigration.js +169 -68
  463. package/dist/upgrade/runtimeMigration.js.map +1 -1
  464. package/dist/upgrade/v3CapabilitySurface.js +15 -0
  465. package/dist/upgrade/v3CapabilitySurface.js.map +1 -0
  466. package/dist/upgrade/versionResolution.js +8 -0
  467. package/dist/upgrade/versionResolution.js.map +1 -1
  468. package/dist/validate/appHomeContract.js +4 -4
  469. package/dist/validate/appHomeContract.js.map +1 -1
  470. package/dist/validate/capability.js +124 -11
  471. package/dist/validate/capability.js.map +1 -1
  472. package/dist/validate/crossCapability.js +1 -1
  473. package/dist/validate/crossCapability.js.map +1 -1
  474. package/dist/validate/lifecycleAdapters/legacyPythonParity.js +93 -0
  475. package/dist/validate/lifecycleAdapters/legacyPythonParity.js.map +1 -0
  476. package/dist/validate/lifecycleAdapters/nodeFormChecks.js +488 -0
  477. package/dist/validate/lifecycleAdapters/nodeFormChecks.js.map +1 -0
  478. package/dist/validate/lifecycleAdapters/shared.js +198 -0
  479. package/dist/validate/lifecycleAdapters/shared.js.map +1 -0
  480. package/dist/validate/lifecycleAdapters.js +13 -723
  481. package/dist/validate/lifecycleAdapters.js.map +1 -1
  482. package/dist/validate/selfAudit.js +62 -20
  483. package/dist/validate/selfAudit.js.map +1 -1
  484. package/dist/validate/vocabularyAuthority.js +303 -0
  485. package/dist/validate/vocabularyAuthority.js.map +1 -0
  486. package/package.json +27 -24
  487. package/bundle/references/v1-section-mapping.md +0 -47
  488. package/bundle/skills/agentera/agents/dokumentera.toml +0 -6
  489. package/bundle/skills/agentera/agents/hej.toml +0 -6
  490. package/bundle/skills/agentera/agents/inspektera.toml +0 -6
  491. package/bundle/skills/agentera/agents/inspirera.toml +0 -6
  492. package/bundle/skills/agentera/agents/orkestrera.toml +0 -6
  493. package/bundle/skills/agentera/agents/profilera.toml +0 -6
  494. package/bundle/skills/agentera/agents/realisera.toml +0 -6
  495. package/bundle/skills/agentera/agents/visionera.toml +0 -6
  496. package/bundle/skills/agentera/agents/visualisera.toml +0 -6
  497. package/bundle/skills/hej/.claude-plugin/plugin.json +0 -6
  498. package/bundle/skills/hej/SKILL.md +0 -69
  499. package/bundle/skills/hej/agents/hej.toml +0 -11
  500. package/bundle/skills/hej/agents/openai.yaml +0 -8
  501. /package/bundle/skills/agentera/capabilities/{inspektera → audit}/schemas/exit.yaml +0 -0
  502. /package/bundle/skills/agentera/capabilities/{realisera → build}/schemas/exit.yaml +0 -0
  503. /package/bundle/skills/agentera/capabilities/{visualisera → design}/schemas/exit.yaml +0 -0
  504. /package/bundle/skills/agentera/capabilities/{resonera → discuss}/schemas/exit.yaml +0 -0
  505. /package/bundle/skills/agentera/capabilities/{dokumentera → document}/schemas/exit.yaml +0 -0
  506. /package/bundle/skills/agentera/capabilities/{optimera → optimize}/schemas/exit.yaml +0 -0
  507. /package/bundle/skills/agentera/capabilities/{orkestrera → orchestrate}/schemas/exit.yaml +0 -0
  508. /package/bundle/skills/agentera/capabilities/{inspirera → research}/schemas/exit.yaml +0 -0
  509. /package/bundle/skills/agentera/capabilities/{hej → status}/schemas/exit.yaml +0 -0
  510. /package/bundle/skills/agentera/capabilities/{visionera → vision}/schemas/exit.yaml +0 -0
@@ -0,0 +1,6 @@
1
+ // Source: skills/agentera/capabilities/profile/instructions.md (relocated D65)
2
+ // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
+ // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
+ export const instructions = JSON.parse(String.raw `"# PROFILE\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─── ♾ profile · 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$AGENTERA_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 \u0060AGENTERA_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$AGENTERA_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♾ profile · 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$AGENTERA_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$AGENTERA_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$AGENTERA_PROFILE_DIR/PROFILE.md\u0060.\n\nIf a previous version exists: copy to \u0060$AGENTERA_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$AGENTERA_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. Profile 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♾ profile · <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 profile'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\nProfile is part of a twelve-capability suite. The decision profile it produces is consumed by the other capabilities.\n\n### Consumed by build\n\nBuild 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 optimize\n\nOptimize 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 research\n\nResearch 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 discuss\n\nDiscuss 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 discuss\n\nDECISIONS.md (maintained by discuss) is a high-signal source for profile'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 audit\n\nAudit 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 plan\n\nPlan 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$AGENTERA_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$AGENTERA_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
+ export default instructions;
6
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/profile/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,0uyBAA0uyB,CAAC,CAAC;AACryyB,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
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/realisera/instructions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,y4oBAAy4oB,CAAC,CAAC;AACp8oB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/realisera/instructions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,kwpBAAkwpB,CAAC,CAAC;AAC7zpB,eAAe,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Source: skills/agentera/capabilities/research/instructions.md (relocated D65)
2
+ // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
+ // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
+ export const instructions = JSON.parse(String.raw `"# RESEARCH\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─── ⬚ research · 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 build (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$AGENTERA_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 profile: \u0060$AGENTERA_PROFILE_DIR/PROFILE.md\u0060 (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060). Check the profile-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. Research 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⬚ research · <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 research'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\nResearch is part of a twelve-capability suite. Its analysis feeds naturally into the other capabilities.\n\n### Feeding into build\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 build cycle picks up the changes automatically.\n\n### Feeding into optimize\n\nWhen the source contains optimization techniques (performance patterns, algorithm improvements, caching strategies), optimize's Hypothesize step can draw on the analysis for its next experiment.\n\n### Informed by profile\n\nIf a decision profile exists at \u0060$AGENTERA_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 vision\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 ⛥ vision to revisit VISION.md with the new context.\n\n### Feeding into plan\n\nWhen the analysis recommends adopting patterns or libraries, plan can incorporate those recommendations into a plan's design section and task decomposition.\n\n### Feeding into discuss\n\nWhen the analysis surfaces recommendations that require deliberation (competing approaches, unclear adoption cost, or tradeoffs the user needs to resolve), suggest ❈ discuss to think it through before acting. Discuss 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 ⧉ build to pick up, or refine VISION.md if the research shifts your project's direction.\n\n---\n\n## Notes on depth vs. speed\n\n- Read more files, not fewer. Shallow reads produce shallow analysis.\n- Large repos: focus on modules most relevant to the concept, not everything.\n- Explore source and target concurrently where possible.\n- Always use the optional GitHub MCP integration for GitHub URLs.\n"`);
5
+ export default instructions;
6
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/research/instructions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,yjZAAyjZ,CAAC,CAAC;AACpnZ,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Source: skills/agentera/capabilities/resonera/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 `"# RESONERA\n\n**Reflective Engagement: Socratic Observation Nexus. Examine, Reason, Arbitrate**\n\nStructured deliberation via Socratic questioning. Decisions captured as artifacts the suite consumes. The user thinks; the capability asks the right questions, challenges assumptions, and ensures sound reasoning before action.\n\nEach invocation = one deliberation. The user controls when it ends.\n\nSkill introduction: \u0060─── ❈ resonera · deliberation ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **❈** (protocol ref: SG4). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne file in \u0060.agentera/\u0060, bootstrapped if absent.\n\n| File | Purpose | Bootstrap |\n|------|---------|-----------|\n| \u0060DECISIONS.md\u0060 | Canonical decision artifact, stored as \u0060.agentera/decisions.yaml\u0060 unless mapped otherwise. What was decided, alternatives considered, and why. | First decision entry in YAML form. |\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060decisions\u0060 to locate the active installed schema; do not search Agentera directories manually. Existing decisions artifacts provide repository-local examples of the shape.\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, check if \u0060.agentera/docs.yaml\u0060 exists. If it has an Artifact Mapping section, use the path specified for each canonical filename. If \u0060.agentera/docs.yaml\u0060 doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at \u0060.agentera/vision.yaml\u0060; other agent-facing artifacts at \u0060.agentera/*.yaml\u0060.\n\nWhen feeding a decision into OBJECTIVE.md, write to the active objective's file at \u0060.agentera/optimera/<objective-name>/objective.yaml\u0060 using optimera's active-objective inference.\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: confidence markers VT9-VT11 (━/─/┄), list item VT15 (▸), inline separator VT16 (·), section divider VT14. Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Decision labels DL1-DL3 for confidence field. Severity issue levels SI1-SI4 for TODO 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.\n\n### decisions.yaml\n\n\u0060\u0060\u0060yaml\ndecisions:\n - number: N\n date: YYYY-MM-DD\n question: what was being decided\n context: relevant constraints, triggers, or prior decisions\n alternatives:\n - name: Option A\n tradeoffs: Tradeoffs.\n win_condition: Concrete signal that proves this option right.\n chosen: true\n - name: Option B\n tradeoffs: Tradeoffs.\n win_condition: Concrete signal that proves this option right.\n chosen: false\n choice: what was chosen\n reasoning: the key insight or tradeoff that resolved it\n confidence: firm\n feeds_into: [VISION.md]\n\u0060\u0060\u0060\n\nCompatibility rule: preserve the semantic top-level fields exactly (\u0060question\u0060, \u0060context\u0060, \u0060alternatives\u0060, \u0060choice\u0060, \u0060reasoning\u0060, \u0060confidence\u0060, \u0060feeds_into\u0060). Win conditions live inside each alternative entry.\n\nThe \"Confidence\" field signals how settled the decision is:\n\n- **firm** (DL1): the user is committed; other capabilities treat this as a constraint\n- **provisional** (DL2): best current answer, open to revision if evidence changes\n- **exploratory** (DL3): a direction to try, explicitly expected to be revisited\n\nDecision numbering: \u0060N = highest existing decision number + 1\u0060. Insert before \u0060## Archived Decisions\u0060.\n\n---\n\n## Personality\n\nThe sharp colleague, here to help you think, not consult.\n\n- Short sentences. Direct. \"Huh, interesting.\" \"Wait, back up.\" \"OK so what I'm hearing is...\"\n- Reflect back before asking the next question. This is the core move.\n- Challenge assumptions gently. If something's taken for granted, poke at it.\n- Celebrate insights. One question at a time; let the user think.\n\n---\n\n## Interaction rules\n\n- Once routed to resonera, ask every user-facing deliberation question through\n the runtime-native question tool: Claude Code \u0060AskUserQuestion\u0060, OpenCode\n \u0060question\u0060, Copilot \u0060ask_user\u0060, and Codex \u0060request_user_input\u0060.\n **One per turn, no exceptions.** This overrides the routing layer's\n generic hej/handoff question-tool gate.\n- Every question includes a \u0060Done\u0060 option.\n- If the user asks for a recommendation, provide a provisional recommendation\n in the question text, then ask whether to accept it, challenge it, choose an\n alternative, or stop.\n- Don't ask about \"depth\" or \"mode.\" Read the room.\n\n---\n\n## Starting a session\n\n### If a topic is provided\n\n1. Read relevant codebase context (enough to ask informed questions, not a research binge)\n2. If decision profile exists, read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly. Check for high-confidence entries and surface them.\n3. Run \u0060agentera decisions --format json\u0060 for prior decision context. Use the returned \u0060entries\u0060 and \u0060source_contract\u0060 as sufficient for normal deliberation, including capability startup fallback.\n4. Reflect your understanding in 1-2 sentences\n5. Ask the first question through the runtime-native question tool; for\n \u0060resonera <topic>\u0060, this is the first user-facing action after the reflection.\n\n### Decision context source contract\n\nFor normal startup and deliberation, \u0060agentera decisions --format json\u0060 is the\ndecision context source. The JSON result includes active and archive entries,\ntop-level \u0060source_contract\u0060 guidance, and per-decision \u0060context_complete\u0060,\n\u0060missing_fields\u0060, \u0060compacted\u0060, and \u0060caveats\u0060 fields.\n\n- When \u0060source_contract.complete_for_returned_decisions\u0060 is true, reference the returned decisions without defensively reading raw \u0060.agentera/decisions.yaml\u0060.\n- When a returned decision is compacted or incomplete, surface the missing context as a decision caveat and continue with only the structured fields present.\n- Do not reconstruct absent historical reasoning, alternatives, confidence, or downstream references during normal deliberation.\n- Read the raw decision artifact only for explicit artifact repair/corruption work or after the CLI itself reports an unavailable/defective state path.\n- When source_contract reports \u0060complete_for_normal_deliberation_context=true\u0060, do not raw-read \u0060.agentera/decisions.yaml\u0060 merely because \u0060complete_for_decision_context\u0060 is false; preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 in downstream handoffs.\n\n### Decision satisfaction authority\n\nWhen deliberation touches decision satisfaction, agents may mark provisional\nsatisfaction with evidence only. Resonera must not mark or imply user-confirmed\nfinal satisfaction unless the user explicitly confirms it in the current\ndeliberation; only the user confirms final satisfaction. If decisions are\ncompacted, missing satisfaction state, open, provisional, or review-needed,\npreserve the caveat and review pressure in the scratchpad or decision note\ninstead of reconstructing hidden outcomes or claiming automation proved intent.\n\n### If no topic is provided\n\nAsk what's on their mind.\n\n---\n\n## Running state\n\nAfter each answer, show a short scratchpad:\n\n\u0060\u0060\u0060\n── scratchpad\n\nDecision: one-liner framing of what's being decided, updated as understanding evolves\n\nConstraints:\n▸ hard requirements that any option must satisfy\n\nOptions:\n▸ the options being considered · emerging pros/cons\n\nCrux: the key tension or uncertainty that needs to resolve for the decision to land\n\u0060\u0060\u0060\n\n5-8 bullets max. Drop items that stop being relevant.\n\n---\n\n## Asking good questions\n\nQuestions should do one of these:\n\n- **Clarify**: \"When you say X, do you mean A or B?\"\n- **Dig deeper**: \"What's driving that? What happens if that's wrong?\"\n- **Reframe**: \"What if you looked at this from the user's perspective instead?\"\n- **Challenge**: \"Is that actually true, or is it just how it's always been done?\"\n- **Connect**: \"That sounds like the same tension as Y. Is there a link?\"\n- **Unstick**: \"If you had to decide right now with what you know, what would you pick?\"\n- **Scope**: \"What's in and what's out? Where do you draw the line?\"\n- **Constrain**: \"What absolutely must NOT happen?\"\n- **Tradeoff**: \"You can't have both X and Y at this scale. Which do you optimize for?\"\n\nOutput constraint: ≤15 words per question.\n\n### When the decision involves code\n\nRead files or search the web for better questions, but just enough context.\n\n### When the decision profile has signal\n\nSkip settled ground. Don't re-ask what the profile answers with high confidence.\n\n### Pushback discipline\n\nHonest friction. Don't let vague answers slide.\n\n- **Demand specifics.** \"What does 'better' look like? What would you measure?\"\n- **Name hidden assumptions.** \"That assumes X. Based on something you've seen, or a hunch?\"\n- **Reframe imprecise framing.** \"Let me restate: I think the real question is Y, not X.\"\n- **Don't lower the bar.** \"Earlier you wanted Z. This gives half. Is half enough?\"\n\n### Pressure-test committed directions\n\nWhen the user leans toward a consequential direction, challenge before offering alternatives:\n\n1. Name 1-3 context-specific blind spots first.\n2. Then present serious alternatives with concrete win conditions.\n3. Make the call with explicit confidence (DL1-DL3).\n\nRed-flag phrasing is banned:\n\n- \"That sounds reasonable.\"\n- \"Either way is fine.\"\n- \"It depends\" without naming the deciding variable.\n- \"There is no wrong answer here.\"\n- \"Both options are valid\" when one conflicts with constraints.\n\n---\n\n## When the user picks \"Done\"\n\nProduce something actionable.\n\n### Step 1: Summarize the decision\n\nBrief, casual: where we landed (2-3 sentences), key insight, confidence (DL1/DL2/DL3).\n\n### Step 2: Offer to capture and connect\n\nRelevant options only:\n\n- **Log it**: add a new numbered entry to \u0060DECISIONS.md\u0060 (always offered)\n- **Feed into VISION.md**: if about direction/scope/principles\n- **Feed into OBJECTIVE.md**: if about what to optimize\n- **File to TODO.md**: if surfaced tech debt\n- **Just wrap up**: no artifacts needed\n\n### Step 3: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns, abstraction creep, and filler accumulation.\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\n### Step 4: Write artifacts\n\nFor any option the user selects:\n\n- **DECISIONS.md**: write chosen decision, confidence, and rationale per contract token budgets. Compute next decision number before writing. Apply the schema COMPACTION rules before writing if thresholds are exceeded: keep 10 full decisions, keep up to 40 one-line archive entries, and drop beyond 50 total.\n- **VISION.md / OBJECTIVE.md**: brief follow-up. Present draft for approval.\n- **TODO.md**: standard format (severity, context, impact).\n\nArtifact writing follows contract Section 24 conventions.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER make the decision for the user. Your job is to help them think, not to decide.\n- NEVER skip to implementation. Resonera deliberates; other capabilities build.\n- NEVER modify VISION.md, OBJECTIVE.md, or TODO.md without explicit user confirmation.\n- NEVER ask compound questions. One question per turn.\n- NEVER ignore the decision profile. If high-confidence entries exist, acknowledge them.\n- NEVER dismiss a user's stated concern. Explore it.\n\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060─── ❈ resonera · <status> ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 (VT15) bullet details.\n\n- **complete** (EX1): Deliberation reached a conclusion; artifacts written with user approval; decision confidence captured.\n- **flagged** (EX2): Deliberation concluded but decision remains unresolved or provisional; significant tensions unresolved; conclusion contradicts prior decisions.\n- **stuck** (EX3): Cannot proceed: topic requires inaccessible external research, or artifact write failed.\n- **waiting** (EX4): No topic provided and user hasn't responded, or surfaced that a different capability is needed first.\n\n---\n\n## Cross-capability integration\n\nResonera is the deliberation layer.\n\n### Feeds into ⧉ realisera\n\nDecisions about project direction captured in VISION.md. DECISIONS.md entries with \u0060Feeds into: VISION.md\u0060 give realisera reasoning context.\n\n### Feeds into ⎘ optimera\n\nDecisions about what to optimize captured in OBJECTIVE.md at \u0060.agentera/optimera/<objective-name>/objective.yaml\u0060.\n\n### Triggers ⬚ inspirera\n\nDuring deliberation, if the user needs external research: \"Sounds like we need to research X with ⬚ inspirera?\"\n\n### Informed by ♾ profilera\n\nIf a decision profile exists, read it at session start. High-confidence entries acknowledged; low-confidence entries treated as hypotheses.\n\n### Feeds ♾ profilera\n\nDECISIONS.md is a high-signal source for profilera's extraction scripts.\n\n### Feeds ≡ planera\n\nWhen deliberation concludes with a decision to build something, the natural next step is ≡ planera.\n\n### Triggered by ⛶ inspektera\n\nWhen audits reveal an architecture mismatch, inspektera suggests ❈ resonera to think through the response.\n\n---\n\n## Getting started\n\n### Before a realisera session\n\nRun \u0060/agentera discuss\u0060 to think through project direction before creating VISION.md.\n\n### Before an optimera session\n\nRun \u0060/agentera discuss\u0060 to think through what metric matters and why before creating OBJECTIVE.md.\n\n### After an inspirera analysis\n\nRun \u0060/agentera discuss\u0060 to evaluate which recommendations to adopt.\n\n### Standalone\n\nRun \u0060/agentera discuss\u0060 whenever you need to think through something complex.\n"`);
4
+ export const instructions = JSON.parse(String.raw `"# RESONERA\n\n**Reflective Engagement: Socratic Observation Nexus. Examine, Reason, Arbitrate**\n\nStructured deliberation via Socratic questioning. Decisions captured as artifacts the suite consumes. The user thinks; the capability asks the right questions, challenges assumptions, and ensures sound reasoning before action.\n\nEach invocation = one deliberation. The user controls when it ends.\n\nSkill introduction: \u0060─── ❈ resonera · deliberation ───\u0060\n\n---\n\n## Visual identity\n\nGlyph: **❈** (protocol ref: SG4). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne file in \u0060.agentera/\u0060, bootstrapped if absent.\n\n| File | Purpose | Bootstrap |\n|------|---------|-----------|\n| \u0060DECISIONS.md\u0060 | Canonical decision artifact, stored as \u0060.agentera/decisions.yaml\u0060 unless mapped otherwise. What was decided, alternatives considered, and why. | First decision entry in YAML form. |\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060decisions\u0060 to locate the active installed schema; do not search Agentera directories manually. Existing decisions artifacts provide repository-local examples of the shape.\n\n### Artifact path resolution\n\nBefore reading or writing any artifact, check if \u0060.agentera/docs.yaml\u0060 exists. If it has an Artifact Mapping section, use the path specified for each canonical filename. If \u0060.agentera/docs.yaml\u0060 doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at \u0060.agentera/vision.yaml\u0060; other agent-facing artifacts at \u0060.agentera/*.yaml\u0060.\n\nWhen feeding a decision into OBJECTIVE.md, write to the active objective's file at \u0060.agentera/optimera/<objective-name>/objective.yaml\u0060 using optimera's active-objective inference.\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: confidence markers VT9-VT11 (━/─/┄), list item VT15 (▸), inline separator VT16 (·), section divider VT14. Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Decision labels DL1-DL3 for confidence field. Severity issue levels SI1-SI4 for TODO 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.\n\n### decisions.yaml\n\n\u0060\u0060\u0060yaml\ndecisions:\n - number: N\n date: \"YYYY-MM-DD\"\n question: what was being decided\n context: relevant constraints, triggers, or prior decisions\n alternatives:\n - name: Option A\n description: Tradeoffs.\n status: chosen\n - name: Option B\n description: Tradeoffs.\n status: rejected\n choice: what was chosen\n reasoning: the key insight or tradeoff that resolved it\n confidence: firm\n feeds_into: [VISION.md]\n\u0060\u0060\u0060\n\nCompatibility rule: preserve the semantic top-level fields exactly (\u0060question\u0060, \u0060context\u0060, \u0060alternatives\u0060, \u0060choice\u0060, \u0060reasoning\u0060, \u0060confidence\u0060, \u0060feeds_into\u0060). Each alternative has \u0060name\u0060, \u0060status\u0060 (chosen or rejected), and optional \u0060description\u0060.\n\nThe \"Confidence\" field signals how settled the decision is:\n\n- **firm** (DL1): the user is committed; other capabilities treat this as a constraint\n- **provisional** (DL2): best current answer, open to revision if evidence changes\n- **exploratory** (DL3): a direction to try, explicitly expected to be revisited\n\nDecision numbering: \u0060N = highest existing decision number + 1\u0060. Insert in the active section before the \u0060archive:\u0060 list; if no archive exists, append at end of file. Active entries and archive entries must remain in ascending order by \u0060number\u0060.\n\n---\n\n## Personality\n\nThe sharp colleague, here to help you think, not consult.\n\n- Short sentences. Direct. \"Huh, interesting.\" \"Wait, back up.\" \"OK so what I'm hearing is...\"\n- Reflect back before asking the next question. This is the core move.\n- Challenge assumptions gently. If something's taken for granted, poke at it.\n- Celebrate insights. One question at a time; let the user think.\n\n---\n\n## Interaction rules\n\n- Once routed to resonera, ask every user-facing deliberation question through\n the runtime-native question tool: Claude Code \u0060AskUserQuestion\u0060, OpenCode\n \u0060question\u0060, Copilot \u0060ask_user\u0060, and Codex \u0060request_user_input\u0060.\n **One per turn, no exceptions.** This overrides the routing layer's\n generic hej/handoff question-tool gate.\n- Every question includes a \u0060Done\u0060 option.\n- If the user asks for a recommendation, provide a provisional recommendation\n in the question text, then ask whether to accept it, challenge it, choose an\n alternative, or stop.\n- Don't ask about \"depth\" or \"mode.\" Read the room.\n\n---\n\n## Starting a session\n\n### If a topic is provided\n\n1. Read relevant codebase context (enough to ask informed questions, not a research binge)\n2. If decision profile exists, read \u0060$PROFILERA_PROFILE_DIR/PROFILE.md\u0060 directly. Check for high-confidence entries and surface them.\n3. Run \u0060agentera decisions --format json\u0060 for prior decision context. Use the returned \u0060entries\u0060 and \u0060source_contract\u0060 as sufficient for normal deliberation, including capability startup fallback.\n4. Reflect your understanding in 1-2 sentences\n5. Ask the first question through the runtime-native question tool; for\n \u0060resonera <topic>\u0060, this is the first user-facing action after the reflection.\n\n### Decision context source contract\n\nFor normal startup and deliberation, \u0060agentera decisions --format json\u0060 is the\ndecision context source. The JSON result includes active and archive entries,\ntop-level \u0060source_contract\u0060 guidance, and per-decision \u0060context_complete\u0060,\n\u0060missing_fields\u0060, \u0060compacted\u0060, and \u0060caveats\u0060 fields.\n\n- When \u0060source_contract.complete_for_returned_decisions\u0060 is true, reference the returned decisions without defensively reading raw \u0060.agentera/decisions.yaml\u0060.\n- When a returned decision is compacted or incomplete, surface the missing context as a decision caveat and continue with only the structured fields present.\n- Do not reconstruct absent historical reasoning, alternatives, confidence, or downstream references during normal deliberation.\n- Read the raw decision artifact only for explicit artifact repair/corruption work or after the CLI itself reports an unavailable/defective state path.\n- When source_contract reports \u0060complete_for_normal_deliberation_context=true\u0060, do not raw-read \u0060.agentera/decisions.yaml\u0060 merely because \u0060complete_for_decision_context\u0060 is false; preserve \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 in downstream handoffs.\n\n### Decision satisfaction authority\n\nWhen deliberation touches decision satisfaction, agents may mark provisional\nsatisfaction with evidence only. Resonera must not mark or imply user-confirmed\nfinal satisfaction unless the user explicitly confirms it in the current\ndeliberation; only the user confirms final satisfaction. If decisions are\ncompacted, missing satisfaction state, open, provisional, or review-needed,\npreserve the caveat and review pressure in the scratchpad or decision note\ninstead of reconstructing hidden outcomes or claiming automation proved intent.\n\n### If no topic is provided\n\nAsk what's on their mind.\n\n---\n\n## Running state\n\nAfter each answer, show a short scratchpad:\n\n\u0060\u0060\u0060\n── scratchpad\n\nDecision: one-liner framing of what's being decided, updated as understanding evolves\n\nConstraints:\n▸ hard requirements that any option must satisfy\n\nOptions:\n▸ the options being considered · emerging pros/cons\n\nCrux: the key tension or uncertainty that needs to resolve for the decision to land\n\u0060\u0060\u0060\n\n5-8 bullets max. Drop items that stop being relevant.\n\n---\n\n## Asking good questions\n\nQuestions should do one of these:\n\n- **Clarify**: \"When you say X, do you mean A or B?\"\n- **Dig deeper**: \"What's driving that? What happens if that's wrong?\"\n- **Reframe**: \"What if you looked at this from the user's perspective instead?\"\n- **Challenge**: \"Is that actually true, or is it just how it's always been done?\"\n- **Connect**: \"That sounds like the same tension as Y. Is there a link?\"\n- **Unstick**: \"If you had to decide right now with what you know, what would you pick?\"\n- **Scope**: \"What's in and what's out? Where do you draw the line?\"\n- **Constrain**: \"What absolutely must NOT happen?\"\n- **Tradeoff**: \"You can't have both X and Y at this scale. Which do you optimize for?\"\n\nOutput constraint: ≤15 words per question.\n\n### When the decision involves code\n\nRead files or search the web for better questions, but just enough context.\n\n### When the decision profile has signal\n\nSkip settled ground. Don't re-ask what the profile answers with high confidence.\n\n### Pushback discipline\n\nHonest friction. Don't let vague answers slide.\n\n- **Demand specifics.** \"What does 'better' look like? What would you measure?\"\n- **Name hidden assumptions.** \"That assumes X. Based on something you've seen, or a hunch?\"\n- **Reframe imprecise framing.** \"Let me restate: I think the real question is Y, not X.\"\n- **Don't lower the bar.** \"Earlier you wanted Z. This gives half. Is half enough?\"\n\n### Pressure-test committed directions\n\nWhen the user leans toward a consequential direction, challenge before offering alternatives:\n\n1. Name 1-3 context-specific blind spots first.\n2. Then present serious alternatives with concrete win conditions.\n3. Make the call with explicit confidence (DL1-DL3).\n\nRed-flag phrasing is banned:\n\n- \"That sounds reasonable.\"\n- \"Either way is fine.\"\n- \"It depends\" without naming the deciding variable.\n- \"There is no wrong answer here.\"\n- \"Both options are valid\" when one conflicts with constraints.\n\n---\n\n## When the user picks \"Done\"\n\nProduce something actionable.\n\n### Step 1: Summarize the decision\n\nBrief, casual: where we landed (2-3 sentences), key insight, confidence (DL1/DL2/DL3).\n\n### Step 2: Offer to capture and connect\n\nRelevant options only:\n\n- **Log it**: add a new numbered entry to \u0060DECISIONS.md\u0060 (always offered)\n- **Feed into VISION.md**: if about direction/scope/principles\n- **Feed into OBJECTIVE.md**: if about what to optimize\n- **File to TODO.md**: if surfaced tech debt\n- **Just wrap up**: no artifacts needed\n\n### Step 3: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera check 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 4: Write artifacts\n\nFor any option the user selects:\n\n- **DECISIONS.md**: write chosen decision, confidence, and rationale per contract token budgets. Compute next decision number before writing. Apply the schema COMPACTION rules before writing if thresholds are exceeded: keep 10 full decisions, keep up to 40 one-line archive entries, and drop beyond 50 total.\n- **VISION.md / OBJECTIVE.md**: brief follow-up. Present draft for approval.\n- **TODO.md**: standard format (severity, context, impact).\n\nArtifact writing follows contract Section 24 conventions.\n\n---\n\n## Safety rails\n\n<critical>\n\n- NEVER make the decision for the user. Your job is to help them think, not to decide.\n- NEVER skip to implementation. Resonera deliberates; other capabilities build.\n- NEVER modify VISION.md, OBJECTIVE.md, or TODO.md without explicit user confirmation.\n- NEVER ask compound questions. One question per turn.\n- NEVER ignore the decision profile. If high-confidence entries exist, acknowledge them.\n- NEVER dismiss a user's stated concern. Explore it.\n\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060─── ❈ resonera · <status> ───\u0060 followed by a summary sentence.\nFor flagged, stuck, and waiting: add \u0060▸\u0060 (VT15) bullet details.\n\n- **complete** (EX1): Deliberation reached a conclusion; artifacts written with user approval; decision confidence captured.\n- **flagged** (EX2): Deliberation concluded but decision remains unresolved or provisional; significant tensions unresolved; conclusion contradicts prior decisions.\n- **stuck** (EX3): Cannot proceed: topic requires inaccessible external research, or artifact write failed.\n- **waiting** (EX4): No topic provided and user hasn't responded, or surfaced that a different capability is needed first.\n\n---\n\n## Cross-capability integration\n\nResonera is the deliberation layer.\n\n### Feeds into ⧉ realisera\n\nDecisions about project direction captured in VISION.md. DECISIONS.md entries with \u0060Feeds into: VISION.md\u0060 give realisera reasoning context.\n\n### Feeds into ⎘ optimera\n\nDecisions about what to optimize captured in OBJECTIVE.md at \u0060.agentera/optimera/<objective-name>/objective.yaml\u0060.\n\n### Triggers ⬚ inspirera\n\nDuring deliberation, if the user needs external research: \"Sounds like we need to research X with ⬚ inspirera?\"\n\n### Informed by ♾ profilera\n\nIf a decision profile exists, read it at session start. High-confidence entries acknowledged; low-confidence entries treated as hypotheses.\n\n### Feeds ♾ profilera\n\nDECISIONS.md is a high-signal source for profilera's extraction scripts.\n\n### Feeds ≡ planera\n\nWhen deliberation concludes with a decision to build something, the natural next step is ≡ planera.\n\n### Triggered by ⛶ inspektera\n\nWhen audits reveal an architecture mismatch, inspektera suggests ❈ resonera to think through the response.\n\n---\n\n## Getting started\n\n### Before a realisera session\n\nRun \u0060/agentera discuss\u0060 to think through project direction before creating VISION.md.\n\n### Before an optimera session\n\nRun \u0060/agentera discuss\u0060 to think through what metric matters and why before creating OBJECTIVE.md.\n\n### After an inspirera analysis\n\nRun \u0060/agentera discuss\u0060 to evaluate which recommendations to adopt.\n\n### Standalone\n\nRun \u0060/agentera discuss\u0060 whenever you need to think through something complex.\n"`);
5
5
  export default instructions;
6
6
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/resonera/instructions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,mgdAAmgd,CAAC,CAAC;AAC9jd,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/resonera/instructions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,mmdAAmmd,CAAC,CAAC;AAC9pd,eAAe,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Source: skills/agentera/capabilities/status/instructions.md (relocated D65)
2
+ // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
+ // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
+ export const instructions = JSON.parse(String.raw `"# STATUS\n\n**Holistic Entry Junction. Orient, Route, Activate**\n\nSingle entry point to the agentera suite. Detects fresh vs returning, delivers a situational briefing, routes to the right capability. Same on first install and 100th session. A bare user message exactly \u0060/agentera\u0060 uses this same briefing path, not generic greeting behavior.\n\nEach invocation = one orientation. Uses the CLI composite briefing first,\nwrites nothing.\n\n---\n\n## State artifacts\n\nGlyph: **⌂** (SG1). Status reads suite state through \u0060agentera prime\u0060 and writes\nnothing. It may fall back to direct reads only when the composite command fails\nor explicitly asks for fallback.\n\n### CLI-first access\n\nFor returning projects, run one composite command before any individual state\naccess:\n\n\u0060\u0060\u0060bash\nnpx -y agentera prime\n\u0060\u0060\u0060\n\nUse that output to render the dashboard and select the concrete next action. Do\nnot relay raw CLI lines as the user-facing briefing. Source labels such as\n\u0060mode:\u0060, \u0060profile:\u0060, \u0060v1_migration:\u0060, \u0060health:\u0060, \u0060todo:\u0060, \u0060plan:\u0060,\n\u0060objective:\u0060, \u0060attention:\u0060, \u0060next_action:\u0060, \u0060source_contract:\u0060, and the\ncompatibility \u0060bundle:\u0060 installed-app status object are parsing aids, not\ndashboard lines. Do not run \u0060agentera plan\u0060, \u0060agentera progress\u0060, \u0060agentera\nhealth\u0060, \u0060agentera todo\u0060, \u0060agentera decisions\u0060, or \u0060agentera objective\u0060 as part\nof normal status briefing assembly. Do not read raw\n\u0060.agentera/*.yaml\u0060 files for normal status orientation. If a normal dashboard field\nis missing from \u0060agentera prime\u0060, fix or extend the composite CLI contract instead\nof adding routine fallback reads. Use top-level fallback commands only when\n\u0060agentera prime\u0060 fails or explicitly reports fallback-only recovery.\n\nResolve \u0060RESOLVED_AGENTERA_HOME\u0060 with the app-home precedence \u0060AGENTERA_HOME\u0060\nwhen set, otherwise the platform data home, then run\nthe installed command once. Do not preflight app health with \u0060glob\u0060, \u0060grep\u0060,\n\u0060read\u0060, \u0060ls\u0060, \u0060python\u0060, \u0060doctor\u0060, \u0060--help\u0060,\n\u0060registry.json\u0060, or \u0060.agentera-bundle.json\u0060.\nNever combine the app-home assignment with the same shell command that expands\nthe managed app script path; shell expansion can otherwise turn an unset\n\u0060AGENTERA_HOME\u0060 into \u0060npx -y agentera\u0060 before the assignment takes effect.\n\nRecovery copy must be plain-language and recommendation-first. Never ask users\nto choose between technical install concepts, internal directory states,\ncommand-mode flags, or package-layout terms. Say what happened, what changed,\nwhat the safe fix does, and what it will not touch. The safe fix must say it will\nnot edit project files, shell startup files, or unknown directories. Good recovery labels are \u0060Use the safe fix\n(Recommended)\u0060, \u0060Choose a different directory\u0060, and \u0060Stop\u0060.\n\nIf the command cannot execute because \u0060AGENTERA_HOME\u0060 names the old default\n\u0060$HOME/.agents/agentera\u0060 and \u0060npx -y agentera\u0060 is missing,\ndo not require a successful failed CLI invocation and do not first ask the user to\nunset \u0060AGENTERA_HOME\u0060. Say: \u0060Agentera found an old or broken local copy of\nitself. The safe fix is to install a fresh copy in the normal Agentera directory.\u0060\nThen show this preview command and say it changes nothing:\n\n\u0060\u0060\u0060bash\nnpx -y agentera@latest doctor\n\u0060\u0060\u0060\n\nThat preview writes nothing. Because no explicit \u0060--install-root\u0060 is supplied,\nupgrade can choose the normal platform app directory and preview repair for app\nfiles, managed runtime surfaces, and cleanup of the old directory. Ask for\nexplicit approval before writes, using plain wording such as\n\u0060Approve the safe Agentera repair at <directory>\u0060. Then apply the same safe repair path:\n\n\u0060\u0060\u0060bash\nnpx -y agentera@latest prime\n\u0060\u0060\u0060\n\nAfter apply, retry the installed command from the platform app home reported by\nthe upgrade output, not from the old default directory. If the command exits\nsuccessfully, inspect the CLI-provided \u0060bundle.status\u0060 installed-app status\nobject. Only \u0060up_to_date\u0060 passes the installed Agentera app gate for normal briefing.\nThe object also carries \u0060appHome\u0060, \u0060managedAppRoot\u0060, \u0060userDataRoot\u0060,\n\u0060expectedVersionSource\u0060, \u0060bundle.dryRunCommand\u0060, \u0060bundle.applyCommand\u0060, and\napproval text. If the installed command cannot execute, is out of date, missing\n\u0060prime\u0060, fails before argparse, or reports manual-review-needed/repair-needed status, tell\nthe user \u0060Agentera found an old or broken local copy of itself.\u0060 Then preview the\nrepair with the CLI-provided command when present:\n\n\u0060\u0060\u0060bash\nnpx -y agentera@latest doctor\n\u0060\u0060\u0060\n\nDo not run the matching apply command until the user explicitly approves the\nsame Agentera repair and directory.\nAfter apply, retry \u0060npx -y agentera prime\u0060; do not treat local checkout\nfallback as installed-app success. If \u0060AGENTERA_HOME\u0060 names the old default\n\u0060$HOME/.agents/agentera\u0060, no explicit \u0060--install-root\u0060 was supplied, and\n\u0060npx -y agentera\u0060 is missing or out of date, show the normal\nAgentera directory preview above instead of first asking the user to unset\n\u0060AGENTERA_HOME\u0060; do not claim to prove where the environment value came from. If\n\u0060AGENTERA_HOME\u0060 points at any other missing path, file, or directory with unknown\nfiles, say: \u0060Agentera was told to use a directory it cannot safely use. Choose a\ndifferent Agentera directory, or approve --force only after checking that directory is\nsafe to replace.\u0060\n\nIf doctor reports a leftover 1.x managed marker block in\nshell startup files, say plainly that Agentera will not edit those files.\nCleanup is user-owned manual cleanup, not a repair write.\n\nUse \u0060agentera query <artifact-name> --format json|yaml\u0060 only for advanced or\ncustom artifact inspection when no top-level command serves the needed state.\n\n### Artifact path resolution\n\nOnly if \u0060agentera prime\u0060 fails and fallback raw artifact access is explicitly\nneeded, check \u0060.agentera/docs.yaml\u0060 for path mappings before reading artifacts.\nWithout a mapping, use the default layout:\n\n- Human-facing artifacts at the project root (Markdown): \u0060TODO.md\u0060, \u0060CHANGELOG.md\u0060, \u0060DESIGN.md\u0060\n- Agent-facing artifacts in \u0060.agentera/\u0060 (YAML): \u0060progress.yaml\u0060, \u0060decisions.yaml\u0060, \u0060health.yaml\u0060, \u0060plan.yaml\u0060, \u0060docs.yaml\u0060, \u0060vision.yaml\u0060, and per-objective \u0060objective.yaml\u0060 / \u0060experiments.yaml\u0060\n\nCanonical names are identifiers, not literal paths. PROFILE.md is global:\n\u0060$AGENTERA_PROFILE_DIR/PROFILE.md\u0060, default \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060.\n\n### Contract values\n\nUse protocol tokens by ID where needed: severity arrows VT5-VT8, trend arrows\nVT12-VT13, progress bar VT18, separator VT16, list item VT15, section divider\nVT14, flow arrow VT17, skill glyphs SG1-SG12, exits EX1-EX4, issues SI1-SI4.\n\n---\n\n## Step 0: Detect mode\n\nRun the resolved installed \u0060agentera prime\u0060 and use its \u0060mode\u0060 field. If the\ninstalled-app status check reports out-of-date or blocked, show the CLI-provided\nrefresh preview before normal mode handling.\n\n- **No artifacts found** → Step 1a (first time on this project)\n- **Artifacts found** → Step 1b (returning to known project)\n\nNarration voice: warm, brief, unscripted.\n\n---\n\n## Step 0.5: CLI-owned checks\n\nDo not run separate v1 artifact or PROFILE.md checks during normal status\norientation. \u0060agentera prime\u0060 owns those checks and emits the mode, profile status,\n\u0060v1_migration.detected\u0060, \u0060v1_migration.affected_files\u0060,\n\u0060v1_migration.dry_run_command\u0060, \u0060v1_migration.apply_command\u0060, \u0060project_integration.recommendation\u0060, \u0060project_integration.message\u0060, \u0060project_integration.dry_run_command\u0060, \u0060project_integration.apply_command\u0060, attention items,\nand next action. When \u0060project_integration.recommendation\u0060 is \u0060upgrade\u0060, explain the plain-language \u0060project_integration.message\u0060, show the preview command (\u0060project_integration.dry_run_command\u0060; it changes nothing), and ask before \u0060project_integration.apply_command\u0060. When it is \u0060stay\u0060, do not suggest upgrade. User-facing upgrade commands omit \u0060--project\u0060 because the CLI defaults to the current repo. Render those fields; do not spend additional tool calls on\n\u0060.agentera/*.md\u0060, \u0060.agentera/*.yaml\u0060, \u0060VISION.md\u0060, or global profile-path\ndiscovery. Treat \u0060v1_migration.dry_run_command\u0060 as the CLI-supplied preview and\ntell the user it changes nothing. Ask before any upgrade apply command, and only run\n\u0060v1_migration.apply_command\u0060 after confirmation.\nThe artifacts phase migrates supported v1 Markdown files to YAML with backups\nafter preview and confirmation.\n\nIf \u0060v1_migration.detected\u0060 is false, emit no upgrade notice. Profile status is\nalso CLI-owned: render \u0060profile: loaded\u0060 without warning, and render\n\u0060profile.suggested_action\u0060 or a missing-profile attention item only when\n\u0060agentera prime\u0060 supplies one.\n\nIf \u0060npx skills update\u0060 refreshed only the visible skill and \u0060/agentera\u0060 next\nfinds missing or out-of-date app files, explain in plain language that Agentera\nalso needs to repair its local app copy; the visible skill update alone is not\nenough. Package-manager repair commands remain opt-in through\n\u0060--update-packages\u0060.\n\n---\n\n## Step 1a: Welcome\n\nFirst impression: the colleague meets a new project.\n\n1. **Use composite state**: Build the welcome from \u0060agentera prime\u0060 output only.\n Do not scan README files, git history, languages, framework files, or project\n size during bare orientation.\n\n2. **Share what's available**: lead with the suggested capability from\n \u0060next_action\u0060. Do not enumerate the full suite unless asked.\n\n3. **Route**: ask what they'd like to do with a free-form prompt. Do not use a\n native question menu on the initial welcome unless the user explicitly asked\n for bounded choices. Invoke a capability only after the user confirms it.\n\n---\n\n## Step 1b: Briefing\n\nShow where things stand.\n\n1. **Use composite state**: Build the briefing from \u0060agentera prime\u0060 output.\n - Use its mode, profile, health, todo counts, plan progress, objective,\n attention, and next_action fields.\n - Do not issue individual artifact queries during normal returning-project\n orientation.\n - Do not open raw \u0060.agentera/*.yaml\u0060 files unless the composite command fails\n or names a fallback need.\n - If exceptional fallback is required, prefer top-level commands such as\n \u0060agentera plan\u0060, \u0060agentera progress\u0060, \u0060agentera health\u0060, \u0060agentera todo\u0060,\n \u0060agentera decisions\u0060, \u0060agentera objective\u0060, and \u0060agentera experiments\u0060.\n Missing normal dashboard fields should be repaired in \u0060agentera prime\u0060\n instead of weakening the one-command path.\n - Keep \u0060agentera query\u0060 for advanced/custom inspection only.\n\n2. **Brief them**: concise status, only what exists. No empty sections.\n Show the agentera logo.\n\n \u0060\u0060\u0060\n ┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐┬─┐┌─┐\n ├─┤│ ┬├┤ │││ │ ├┤ ├┬┘├─┤\n ┴ ┴└─┘└─┘┘└┘ ┴ └─┘┴└─┴ ┴\n\n ─── status ─────────────────────────────\n\n ⛶ health [⮉|⮋] [grade] ([worst dimension: grade])\n ⇶ todo N critical · M degraded · J annoying\n ≡ plan [██████▓░░░] N/M tasks\n ⎘ optim [metric] [current] → [target]\n ♾ profile [loaded | not found]\n\n [1-2 sentence narrative read: what shipped, what's moving, what needs eyes.\n Interpretation, not metrics. Closes the status section before attention.]\n\n ─── attention ──────────────────────────\n\n ⇶ [critical items, triple arrow for critical]\n ⇉ [degraded items, double arrow for degraded]\n → [normal items, single arrow for normal]\n ⇢ [annoying items, dashed arrow for annoying]\n\n ─── next ───────────────────────────────\n\n suggested → [glyph] [capability] ([reason])\n \u0060\u0060\u0060\n\n Output constraint: ≤120 words total briefing, ≤15 words per routing suggestion.\n\n **Exit marker**: after the closing code fence of the dashboard, emit \u0060⌂ status · <status>\u0060 on its own line, followed by a one-sentence summary of what you delivered. For \u0060waiting\u0060, \u0060flagged\u0060, or \u0060stuck\u0060, add a \u0060▸\u0060 bullet below the summary identifying what the user needs to decide or act on next. The exit marker is mandatory on every invocation regardless of mode (fresh welcome or returning briefing).\n\n **Formatting rules**:\n - Each status line uses the skill glyph that owns that data\n - Severity arrows (VT5-VT8) mark attention items by urgency\n - Trend arrows (VT12/VT13) show health trajectory\n - Progress bars (VT18) show plan completion visually\n - The inline separator (VT16) joins counts on a single line\n - Lead with status metrics, then the narrative read inside the status section\n - The narrative read is colleague interpretation; metric lines above it are evidence\n - The todo summary line lists critical, degraded, and annoying counts only;\n normal-priority items belong in attention with → (SI3), not on the summary line\n - Omit any line whose source artifact is missing\n - Omit any section that would be empty (e.g., no attention items = no attention section)\n\n3. **Attention items**: priority order with severity arrows (SI1-SI4):\n - ⇶ (SI1) Critical issues, degrading health dimensions\n - ⇉ (SI2) Blocked/overdue plan tasks, stale artifacts (plan-relative per contract staleness detection; fall back to PROGRESS.md recency heuristic when no plan context exists), overdue health audits (hybrid time/cycle staleness via \u0060AGENTERA_AUDIT_MAX_AGE_DAYS\u0060 default 30 and \u0060AGENTERA_AUDIT_MAX_CYCLES\u0060 default 10; stale when either axis exceeds its threshold), loop stop-condition triggers\n - → (SI3) Standard work: features, improvements, routine tasks\n - ⇢ (SI4) Unresolved exploratory decisions\n\n Nothing? Say so. A clean bill of health is useful.\n\n4. **Select the concrete next action before selecting the skill**.\n - The routing suggestion MUST name the artifact item it would act on.\n - Valid objects: \u0060PLAN Task N: <title>\u0060, \u0060TODO: <item>\u0060, \u0060DECISION N follow-up\u0060, \u0060OBJECTIVE: <metric>\u0060, or \u0060VISION refresh\u0060.\n - A skill name without a concrete object is not a valid suggestion.\n\n Priority order. SG codes are internal protocol references; never render them\n in user-facing handoff labels:\n - Active PLAN with pending tasks → suggest ⎈ orchestrate for the first unblocked pending task.\n - Critical or degrading health → suggest ⛶ audit or ⧉ build for the named finding.\n - Stale health audit (CLI \u0060health.stale=true\u0060) with no higher-priority work → suggest ⛶ audit for \u0060HEALTH: Audit N stale\u0060.\n - Active non-closed OBJECTIVE with stalled or missing metric evidence → suggest ⎘ optimize for that metric.\n - TODO.md open items → select the highest-severity open item, then route by shape: narrow one-cycle TODOs suggest ⧉ build; contract-shaped, multi-surface, dependency-heavy, migration, schema, metadata, validation, or acceptance-risky TODOs suggest ≡ plan first. Prefer items that unlock product evidence or future plans.\n - Pending DECISIONS.md follow-up → suggest ❈ discuss for the named unresolved decision.\n - Vision exists but no plan, objective, decision follow-up, or TODO work is active → suggest ≡ plan.\n - No vision, no executable follow-ups, and no active plan → suggest ⛥ vision to choose a direction.\n\n Do not let \u0060healthy + plan complete → ⛥\u0060 override active TODO, OBJECTIVE, DECISIONS, or a newer active PLAN. A completed plan means \"look for the next executable follow-up,\" not automatically \"refresh vision.\"\n\n5. **Route**: present one concrete suggestion and let the user choose. No coercion.\n - Do not list generic skill options unless the user asks for the full menu.\n - The waiting bullet should ask whether to run the named action, not ask the user to pick from skills.\n - On the initial Agentera/status brief, use a free-form continuation prompt rather than a native question menu unless the user asked for bounded choices or the suggested next step is a state-changing Proceed/Cancel handoff.\n - Mid-conversation, use the native question tool only for at least two meaningful non-terminal next actions or a consequential Proceed/Cancel decision; \u0060Done\u0060 and free-form/custom answer affordances do not count as alternatives.\n - State-changing handoffs are consequential Proceed/Cancel decisions even when there is only one suggested action. State-changing means the proposed next step may write artifacts, edit code, run optimization or orchestration cycles, apply migrations, refresh app/runtime state, or otherwise mutate project/runtime state.\n - Use the behavior rule first, with common examples such as ⧉ build, ≡ plan when creating or updating plans, ▤ document when writing docs, ⎘ optimize when running or applying optimization cycles, and ⎈ orchestrate when dispatching cycles.\n - For one non-mutating suggested action, clear free-form acceptance such as \u0060yes\u0060, \u0060start\u0060, \u0060do it\u0060, or \u0060run <capability>\u0060 confirms that suggestion. Ambiguous replies get one clarifying question.\n\n---\n\n## Step 2: Route\n\nNarration voice: \"Kicking off [skill]...\" or similarly brief.\n\nInvoke the capability. Status's work is done.\n\nUnclear mapping? Ask **one** clarifying question. No compound questions.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER execute implementation work. Status orients and routes; it does not build, audit, plan, or decide.\n- NEVER dump full artifact contents verbatim. Summarize concisely; the user can read the files themselves.\n- NEVER skip the briefing in returning mode. The user needs context before choosing a direction.\n- NEVER assume what the user wants without asking. Present the suggestion, then wait for confirmation.\n- NEVER modify any state artifact. Status is strictly read-only.\n- NEVER route to a capability without the user's consent. Suggest, don't force.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: emit \u0060⌂ status · <status>\u0060 on its own line below the dashboard's closing code fence, followed by a one-sentence summary of what was delivered. For \u0060flagged\u0060 (EX2), \u0060stuck\u0060 (EX3), and \u0060waiting\u0060 (EX4), add a \u0060▸\u0060 (VT15) bullet below the summary identifying what the user needs to decide or act on next. The exit marker is mandatory and uses status's canonical glyph \u0060⌂\u0060 (SG1, U+2302).\n\n- **complete** (EX1): Briefing delivered (or welcome shown) and user successfully routed to a capability.\n- **flagged** (EX2): Briefing delivered but critical attention items were found: critical issues, degrading health, loop stop-condition triggers. Each concern is listed explicitly.\n- **stuck** (EX3): Cannot orient: the working directory is not a code project, no readable files exist, or permissions prevent scanning.\n- **waiting** (EX4): Briefing or welcome delivered, suggestion made, awaiting user input on which direction to take.\n\n---\n\n## Cross-capability integration\n\nStatus is the suite entry point. It reads other capabilities' artifacts, produces\nno artifact, and outputs only a briefing plus routing suggestion.\n"`);
5
+ export default instructions;
6
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/status/instructions.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,6joBAA6joB,CAAC,CAAC;AACxnoB,eAAe,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Source: skills/agentera/capabilities/vision/instructions.md (relocated D65)
2
+ // Markdown body lifted verbatim; the JSON literal below round-trips to byte-for-byte
3
+ // equivalence with the deleted file (whitespace allowed to differ at line endings only).
4
+ export const instructions = JSON.parse(String.raw `"# VISION\n\n**Visionary Inception: Strategic Imagination, Observation Nexus. Envision, Refine, Anchor**\n\nThe strategic steward of the canonical vision artifact, stored as \u0060.agentera/vision.yaml\u0060 unless mapped otherwise. Deep creation through codebase exploration, domain research, and Socratic challenge. Ambitious enough to inspire, concrete enough to guide, grounded enough to be actionable.\n\nTwo modes: **create** (new projects) and **refine** (evolve existing visions).\n\n---\n\n## Visual identity\n\nGlyph: **⛥** (protocol ref: SG6). Used in the mandatory exit marker.\n\n---\n\n## State artifacts\n\nOne agent-facing file in \u0060.agentera/\u0060 by default.\n\n| Artifact | Purpose | Bootstrap |\n|----------|---------|-----------|\n| \u0060VISION.md\u0060 | Canonical vision artifact. North star, direction, principles, personas, aspirations. An evergreen constitution. | Created via deep brainstorm session, written to \u0060.agentera/vision.yaml\u0060 by default. |\n\nUse \u0060agentera describe --format json\u0060 and its \u0060artifact_schemas\u0060 entry for \u0060vision\u0060 to locate the active installed schema; do not search Agentera directories manually. Existing vision artifacts provide repository-local examples of the shape. Vision adapts and expands them based on the conversation.\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, 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. This applies to all artifact references in this capability, including cross-capability reads (.agentera/decisions.yaml, .agentera/health.yaml, .agentera/progress.yaml, TODO.md).\n\n### Contract values\n\nContract values are inlined where referenced. Visual tokens from protocol: severity arrows VT5-VT8, trend arrows VT12-VT13, progress bar VT18, inline separator VT16 (·), list item VT15 (▸), section divider VT14, flow/target VT17 (→). Skill glyph SG6 for the exit marker. Exit signals EX1-EX4 for the exit marker. Confidence scale CS1-CS5 for decision profile consumption.\n\n\u0060references/contract.md\u0060 (at the v2 skill location \u0060skills/agentera/references/contract.md\u0060) remains available as a full-spec reference for ambiguous cases or cross-checking.\n\n---\n\n## vision.yaml shape\n\n\u0060\u0060\u0060yaml\nproject_name: Project Name\nnorth_star: The dream. Not what the software does, but what it makes possible.\npersonas:\n - name: Persona name\n description: Their day, frustrations, and workflow.\nprinciples:\n - name: Principle name\n description: What this principle optimizes for and what it resists.\ndirection: Where this project is heading. Aspirational, not prescriptive.\n\nEach principle MUST state a tradeoff direction (\"A over B when they conflict\"). Principles SHOULD name what each one actively prevents. Principles MUST NOT name specific libraries, modules, file paths, or implementation patterns — those belong in constraints or task scope. \"Tests over time-to-first-commit\" is a principle; \"use vitest\" is not.\nidentity:\n personality: adjective · adjective · adjective\n voice: How it communicates.\n emotional_register: What it feels like to use.\n naming: Convention or philosophy.\ntension: The hardest tension in the vision.\n\u0060\u0060\u0060\n\nVision must be ambitious enough for months of development, personas concrete enough for \"who is this for?\" debates, direction clear enough to derive next steps, and identity vivid enough to guide decisions from error messages to module names. If DESIGN.md exists, Identity should cohere with the visual system.\n\n---\n\n## Step 0: Detect mode\n\n**If the vision artifact does NOT exist**: Proceed to **Create** mode (Step 1).\n\n**If the vision artifact exists**: Present the mode choice.\n\nNarration voice (riff, don't script):\n\n- \"You've already got a vision. Sharpen it or start over?\" · \"Found your vision. Refine what's there, or fresh start?\"\n\nOffer:\n\n> **Refine**: Evolve the existing vision based on what you've learned. Reads the current vision, the codebase state, and recent progress to propose informed updates.\n>\n> **Replace**: Start fresh with a deep brainstorm. Archives the current vision and creates a new one from scratch.\n\nIf **Refine**, skip to Refine mode.\nIf **Replace**, archive the current vision artifact to \u0060.agentera/archive/vision-{date}.yaml\u0060, then proceed to Create mode.\n\n---\n\n## Create mode\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: explore, research, converse, audit, write.\n\n### Step 1: Explore the codebase\n\nIf code exists, read deeply before asking questions. You arrive informed.\n\n1. Map structure: directory layout, key modules, entry points\n2. Read dependency manifests: stack, libraries, what choices reveal\n3. Read README.md, CLAUDE.md, AGENTS.md if they exist\n4. Read key source files to understand what the software does today\n5. Read PROGRESS.md, TODO.md, DECISIONS.md for trajectory; use \u0060agentera decisions --format json\u0060 for normal decision context and preserve returned \u0060missing_fields\u0060, \u0060compacted\u0060, \u0060caveats\u0060, and \u0060satisfaction.review_needed\u0060 pressure instead of raw-reading missing historical decision context.\n6. Read HEALTH.md for current quality\n7. Read DESIGN.md for existing visual identity\n8. **Decision profile**: read \u0060$AGENTERA_PROFILE_DIR/PROFILE.md\u0060 (default: \u0060$XDG_DATA_HOME/agentera/PROFILE.md\u0060) directly per protocol confidence scale (CS1-CS5) conventions. If missing, proceed without persona grounding.\n9. \u0060git log --oneline -30\u0060 for recent story\n\nSynthesize: \"The project does X, built with Y, moving toward Z. Strongest patterns: A. Gaps: B.\"\n\nGreenfield? Skip to Step 2.\n\n### Step 2: Research the domain\n\nSearch for context grounding the vision in reality:\n\n1. **What exists**: similar tools, competing approaches, adjacent projects\n2. **State of the art**: recent developments, emerging patterns\n3. **What's missing**: suite gaps this project could fill\n4. **Who talks about it**: communities, forums, common frustrations\n\n3-5 targeted searches. Synthesize: \"The gap is X. The opportunity is Y.\"\n\n### Step 3: The conversation\n\nEngage the user. Ask one question at a time through the runtime question tool\n(\u0060AskUserQuestion\u0060, always include \u0060Done\u0060 option).\n\n**Personality**: the sharp colleague, here to dream with you. Pushes past safe answers: \"That's good, but what if it was more?\"\n\nFollow a narrative arc, not a checklist. Adapt, but cover:\n\n1. **The dream**: \"Based on what I see in the codebase [and the domain research], here's where I think this wants to go: [synthesis]. But I bet you're thinking bigger than that. What does this project make possible if it wildly succeeds?\"\n\n Push beyond utility: \"It does X faster, but why does that matter? What can they do that they couldn't before?\"\n\n2. **The people**: \"Who reaches for this? Not 'developers,' a specific person. Their Tuesday morning. The frustration that makes them think 'I need something better'?\"\n\n Challenge abstract personas: \"'Data engineers': the one at a startup with 3 services, or the one at a bank with 3,000?\"\n\n3. **The principles**: \"What principles should guide every decision? What do you optimize for when you can't have everything? What do you actively resist?\"\n\n If decision profile exists, propose principles from it: \"Your profile says you value X over Y. Should that be a principle here?\"\n\n4. **The direction**: \"Given all of that, where is this heading? Not features. Capabilities. What kind of tool does this become in a year? What would surprise you?\"\n\n5. **The identity**: \"If this product were a person, bold and direct, or quiet and precise? How does it talk? How should it feel to use? What emotion does a successful interaction leave?\" Also naming: \"Convention, cultural reference, philosophy?\"\n\n If DESIGN.md exists: \"Your visual system says X. Does the verbal identity match?\"\n\n6. **The tension**: \"What's the hardest tension in this vision? Where do the principles conflict? What will you have to give up to get what matters most?\"\n\n This question often produces the most useful material for the vision document.\n\n### Step 4: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 5: Write the vision artifact\n\nSynthesize into an aspirational north star. **Tone**: evocative, not clinical. A rallying cry, not a requirements doc. **Structure**: follow template but adapt; add dimensions that emerged, omit sections that produced nothing interesting.\n\nOutput constraint: ≤20 words per principle.\n\nPresent the draft to the user. Get explicit approval before writing.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n**Exit marker**: emit \u0060⛥ vision · <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 \u0060▸\u0060 (VT15) bullet below the summary identifying what needs resolution. The exit marker is mandatory on every invocation.\n\n---\n\n## Refine mode\n\nStep markers: display \u0060── step N/5: verb\u0060 before each step.\nSteps: read, research, propose, audit, update.\n\n### Step 1: Read the current state\n\n1. Read the current vision artifact\n2. Read the codebase (same depth as Create Step 1)\n3. Read PROGRESS.md for what's been built since the vision was created\n4. Use \u0060agentera decisions --format json\u0060 for what decisions have shifted thinking; carry compacted/missing-field caveats forward rather than reconstructing absent historical context.\n5. Read HEALTH.md for what structural realities constrain the vision\n6. Read TODO.md for what recurring problems suggest the vision needs adjustment\n\n### Step 2: Research updates\n\nSearch for domain developments since the vision was written: new tools, community shifts, things the user might not have seen.\n\n### Step 3: Propose changes\n\nPresent your assessment:\n\n> Here's what's changed since the vision was written:\n>\n> - The project has built [A, B, C] (from PROGRESS.md)\n> - Decision [X] shifted thinking about [Y] (from DECISIONS.md)\n> - The domain has moved: [Z] (from research)\n>\n> I'd suggest updating:\n>\n> - [Section]: [what to change and why]\n> - [Section]: [what to change and why]\n>\n> What resonates? What's off?\n\nBrief conversation (2-4 exchanges) to refine proposed changes.\n\n### Step 4: Pre-write self-audit\n\nPre-write self-audit: run \u0060agentera lint --artifact <ARTIFACT> --text \"<DRAFT>\"\u0060 (or \u0060--file <PATH>\u0060; schema names such as \u0060decisions\u0060 auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns).\nMax 3 revision attempts. Flag with [post-audit-flagged] if still failing.\n\nNarration voice (riff, don't script):\n\n- \"Tightening this up...\" · \"Cutting the filler first...\" · \"One more pass...\"\n\n### Step 5: Update the vision artifact\n\nShow the updated vision as a diff (what changed and why). Get explicit approval before writing.\n\nArtifact writing follows contract Section 24 (Artifact Writing Conventions): banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.\n\n---\n\n## Safety rails\n\n<critical>\n- NEVER write the vision artifact without explicit user approval. Present drafts and get confirmation.\n- NEVER modify the vision artifact during a build cycle. Vision changes happen in dedicated vision sessions only.\n- NEVER produce a clinical, requirements-style document. The vision should inspire, not specify. If it reads like a PRD, rewrite it.\n- NEVER skip the codebase exploration (Step 1) when code exists. Arriving informed is the whole point.\n- NEVER propose a vision so vague it can't guide autonomous development. \"Make a great tool\" is not a vision. \"Make it possible for a solo developer to ship production-grade systems by letting an AI team handle the parts they'd otherwise skip\" is.\n- NEVER dismiss the user's ambition. If they dream big, help them articulate it. If they think small, push them bigger. But never cap their aspiration.\n</critical>\n\n---\n\n## Exit signals\n\nReport one of these statuses at workflow completion (protocol refs: EX1-EX4).\n\nFormat: \u0060⛥ vision · <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): The vision artifact was written (Create/Replace mode) or updated (Refine mode) with explicit user approval; the vision is ambitious, concrete, and structured to sustain autonomous development.\n- **flagged** (EX2): The vision was produced but with weaknesses worth surfacing: the user settled for a less ambitious or less specific vision than the capability pushed for, key sections (personas, principles, direction) are thin due to limited conversation depth, or the vision has unresolved tensions with existing DECISIONS.md entries.\n- **stuck** (EX3): Cannot write the vision artifact because the user declined to approve the draft and no actionable revision direction was given, or codebase exploration failed in a way that would make the vision unreliable (e.g., inaccessible repo).\n- **waiting** (EX4): The user has not provided enough about the project's purpose or direction to write a meaningful vision, and the codebase (if any) does not provide sufficient signal to proceed without a conversation.\n\n---\n\n## Cross-capability integration\n\nVision is part of a twelve-capability suite. It is the strategic layer, the capability that defines where the project is going.\n\n### Vision produces what build consumes\n\nThe vision artifact is the north star that drives build's work selection every cycle. When vision is installed, build defers to it for vision creation and refinement. When vision is NOT installed, build falls back to its own quick brainstorm. Both paths produce the same \u0060.agentera/vision.yaml\u0060 shape by default; the capabilities are interchangeable at the artifact level.\n\n### Vision is informed by discuss\n\nDECISIONS.md entries provide context for vision refinement: what choices have been made and why. When vision detects that decisions have shifted thinking away from the current vision, it surfaces this during refine mode.\n\n### Vision is informed by profile\n\nThe decision profile calibrates the vision conversation: what patterns the user values, what principles they've established across projects, what they resist. High-confidence entries (CS1-CS2, 70+) become proposed principles in the vision.\n\n### Vision is informed by research\n\nWhen research analysis has shifted thinking about the project's direction, vision reads DECISIONS.md for these insights and incorporates them into vision refinement.\n\n### Vision is informed by audit\n\nHEALTH.md tells vision what structural realities constrain the vision. A project with D-grade architecture may need a vision adjustment, or the vision may confirm that the architecture needs to change.\n\n### Vision reads design output\n\nIf DESIGN.md exists, vision reads it during codebase exploration to understand the project's visual identity. The \u0060identity\u0060 section in the vision artifact should be coherent with the visual system declared in DESIGN.md. Vision reads DESIGN.md for context but never writes it; design owns all DESIGN.md writes.\n\n### Vision reads document output\n\nDOCS.md provides artifact path resolution for the canonical vision artifact. Document's documentation coverage tracking helps vision understand what documentation exists in the project.\n\n### Vision feeds plan\n\nWhen a new or refined vision changes the project's direction, plan can produce a plan to realign the codebase with the updated vision.\n\n---\n\n## Getting started\n\n### New project\n\n1. ⛥ vision: deep creation of the vision artifact through codebase exploration, domain research, and aspirational conversation\n2. ≡ plan: plan the first features (if complex)\n3. ⧉ build: start building\n\n### Existing project without a vision\n\n1. ⛥ vision: reads the codebase, understands what exists, then pushes the user to articulate where it should go\n\n### Vision refinement\n\n1. ⛥ vision: detects the existing vision artifact, offers refine mode, reads progress and decisions since last update, proposes informed changes\n\n### Without vision installed\n\nBuild's built-in quick brainstorm creates a workable vision artifact. Vision adds depth and stewardship but is not required for the suite to function.\n"`);
5
+ export default instructions;
6
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/capabilities/vision/instructions.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAW,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAA,6+iBAA6+iB,CAAC,CAAC;AACxijB,eAAe,YAAY,CAAC"}