briefops 1.0.0

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 (255) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/CODE_OF_CONDUCT.md +13 -0
  3. package/CONTRIBUTING.md +53 -0
  4. package/LICENSE +21 -0
  5. package/README.md +801 -0
  6. package/SECURITY.md +59 -0
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.js +54 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/commands/approve.d.ts +2 -0
  11. package/dist/commands/approve.js +38 -0
  12. package/dist/commands/approve.js.map +1 -0
  13. package/dist/commands/brief.d.ts +2 -0
  14. package/dist/commands/brief.js +81 -0
  15. package/dist/commands/brief.js.map +1 -0
  16. package/dist/commands/codex.d.ts +2 -0
  17. package/dist/commands/codex.js +163 -0
  18. package/dist/commands/codex.js.map +1 -0
  19. package/dist/commands/compare.d.ts +2 -0
  20. package/dist/commands/compare.js +48 -0
  21. package/dist/commands/compare.js.map +1 -0
  22. package/dist/commands/continue.d.ts +2 -0
  23. package/dist/commands/continue.js +66 -0
  24. package/dist/commands/continue.js.map +1 -0
  25. package/dist/commands/doctor.d.ts +2 -0
  26. package/dist/commands/doctor.js +90 -0
  27. package/dist/commands/doctor.js.map +1 -0
  28. package/dist/commands/eval.d.ts +2 -0
  29. package/dist/commands/eval.js +89 -0
  30. package/dist/commands/eval.js.map +1 -0
  31. package/dist/commands/export.d.ts +2 -0
  32. package/dist/commands/export.js +105 -0
  33. package/dist/commands/export.js.map +1 -0
  34. package/dist/commands/finish.d.ts +2 -0
  35. package/dist/commands/finish.js +71 -0
  36. package/dist/commands/finish.js.map +1 -0
  37. package/dist/commands/handoff.d.ts +2 -0
  38. package/dist/commands/handoff.js +77 -0
  39. package/dist/commands/handoff.js.map +1 -0
  40. package/dist/commands/inbox.d.ts +2 -0
  41. package/dist/commands/inbox.js +36 -0
  42. package/dist/commands/inbox.js.map +1 -0
  43. package/dist/commands/init.d.ts +2 -0
  44. package/dist/commands/init.js +13 -0
  45. package/dist/commands/init.js.map +1 -0
  46. package/dist/commands/inspect.d.ts +2 -0
  47. package/dist/commands/inspect.js +226 -0
  48. package/dist/commands/inspect.js.map +1 -0
  49. package/dist/commands/log.d.ts +2 -0
  50. package/dist/commands/log.js +96 -0
  51. package/dist/commands/log.js.map +1 -0
  52. package/dist/commands/memory.d.ts +2 -0
  53. package/dist/commands/memory.js +236 -0
  54. package/dist/commands/memory.js.map +1 -0
  55. package/dist/commands/pack.d.ts +2 -0
  56. package/dist/commands/pack.js +42 -0
  57. package/dist/commands/pack.js.map +1 -0
  58. package/dist/commands/prime.d.ts +4 -0
  59. package/dist/commands/prime.js +44 -0
  60. package/dist/commands/prime.js.map +1 -0
  61. package/dist/commands/project.d.ts +2 -0
  62. package/dist/commands/project.js +50 -0
  63. package/dist/commands/project.js.map +1 -0
  64. package/dist/commands/shared.d.ts +3 -0
  65. package/dist/commands/shared.js +24 -0
  66. package/dist/commands/shared.js.map +1 -0
  67. package/dist/commands/skill.d.ts +2 -0
  68. package/dist/commands/skill.js +146 -0
  69. package/dist/commands/skill.js.map +1 -0
  70. package/dist/commands/worker.d.ts +2 -0
  71. package/dist/commands/worker.js +128 -0
  72. package/dist/commands/worker.js.map +1 -0
  73. package/dist/core/adapter.d.ts +22 -0
  74. package/dist/core/adapter.js +167 -0
  75. package/dist/core/adapter.js.map +1 -0
  76. package/dist/core/approval.d.ts +26 -0
  77. package/dist/core/approval.js +86 -0
  78. package/dist/core/approval.js.map +1 -0
  79. package/dist/core/brief.d.ts +47 -0
  80. package/dist/core/brief.js +411 -0
  81. package/dist/core/brief.js.map +1 -0
  82. package/dist/core/codex.d.ts +53 -0
  83. package/dist/core/codex.js +286 -0
  84. package/dist/core/codex.js.map +1 -0
  85. package/dist/core/codexPlugin.d.ts +51 -0
  86. package/dist/core/codexPlugin.js +228 -0
  87. package/dist/core/codexPlugin.js.map +1 -0
  88. package/dist/core/compatibility.d.ts +2 -0
  89. package/dist/core/compatibility.js +16 -0
  90. package/dist/core/compatibility.js.map +1 -0
  91. package/dist/core/config.d.ts +19 -0
  92. package/dist/core/config.js +77 -0
  93. package/dist/core/config.js.map +1 -0
  94. package/dist/core/contextBudget.d.ts +12 -0
  95. package/dist/core/contextBudget.js +22 -0
  96. package/dist/core/contextBudget.js.map +1 -0
  97. package/dist/core/contextCompare.d.ts +27 -0
  98. package/dist/core/contextCompare.js +97 -0
  99. package/dist/core/contextCompare.js.map +1 -0
  100. package/dist/core/continuity.d.ts +25 -0
  101. package/dist/core/continuity.js +73 -0
  102. package/dist/core/continuity.js.map +1 -0
  103. package/dist/core/errors.d.ts +4 -0
  104. package/dist/core/errors.js +12 -0
  105. package/dist/core/errors.js.map +1 -0
  106. package/dist/core/eval.d.ts +38 -0
  107. package/dist/core/eval.js +180 -0
  108. package/dist/core/eval.js.map +1 -0
  109. package/dist/core/exportPolicy.d.ts +7 -0
  110. package/dist/core/exportPolicy.js +17 -0
  111. package/dist/core/exportPolicy.js.map +1 -0
  112. package/dist/core/exportTargets.d.ts +25 -0
  113. package/dist/core/exportTargets.js +292 -0
  114. package/dist/core/exportTargets.js.map +1 -0
  115. package/dist/core/handoff.d.ts +48 -0
  116. package/dist/core/handoff.js +611 -0
  117. package/dist/core/handoff.js.map +1 -0
  118. package/dist/core/inbox.d.ts +15 -0
  119. package/dist/core/inbox.js +56 -0
  120. package/dist/core/inbox.js.map +1 -0
  121. package/dist/core/lock.d.ts +11 -0
  122. package/dist/core/lock.js +99 -0
  123. package/dist/core/lock.js.map +1 -0
  124. package/dist/core/log.d.ts +38 -0
  125. package/dist/core/log.js +93 -0
  126. package/dist/core/log.js.map +1 -0
  127. package/dist/core/memory.d.ts +86 -0
  128. package/dist/core/memory.js +353 -0
  129. package/dist/core/memory.js.map +1 -0
  130. package/dist/core/memoryHygiene.d.ts +25 -0
  131. package/dist/core/memoryHygiene.js +95 -0
  132. package/dist/core/memoryHygiene.js.map +1 -0
  133. package/dist/core/memoryProposal.d.ts +40 -0
  134. package/dist/core/memoryProposal.js +279 -0
  135. package/dist/core/memoryProposal.js.map +1 -0
  136. package/dist/core/output.d.ts +7 -0
  137. package/dist/core/output.js +18 -0
  138. package/dist/core/output.js.map +1 -0
  139. package/dist/core/patch.d.ts +37 -0
  140. package/dist/core/patch.js +220 -0
  141. package/dist/core/patch.js.map +1 -0
  142. package/dist/core/paths.d.ts +33 -0
  143. package/dist/core/paths.js +84 -0
  144. package/dist/core/paths.js.map +1 -0
  145. package/dist/core/prime.d.ts +17 -0
  146. package/dist/core/prime.js +298 -0
  147. package/dist/core/prime.js.map +1 -0
  148. package/dist/core/privacyDoctor.d.ts +14 -0
  149. package/dist/core/privacyDoctor.js +59 -0
  150. package/dist/core/privacyDoctor.js.map +1 -0
  151. package/dist/core/project.d.ts +16 -0
  152. package/dist/core/project.js +73 -0
  153. package/dist/core/project.js.map +1 -0
  154. package/dist/core/securityDoctor.d.ts +14 -0
  155. package/dist/core/securityDoctor.js +96 -0
  156. package/dist/core/securityDoctor.js.map +1 -0
  157. package/dist/core/skill.d.ts +16 -0
  158. package/dist/core/skill.js +81 -0
  159. package/dist/core/skill.js.map +1 -0
  160. package/dist/core/storage.d.ts +20 -0
  161. package/dist/core/storage.js +112 -0
  162. package/dist/core/storage.js.map +1 -0
  163. package/dist/core/tokens.d.ts +5 -0
  164. package/dist/core/tokens.js +24 -0
  165. package/dist/core/tokens.js.map +1 -0
  166. package/dist/core/worker.d.ts +51 -0
  167. package/dist/core/worker.js +312 -0
  168. package/dist/core/worker.js.map +1 -0
  169. package/dist/core/workflow.d.ts +61 -0
  170. package/dist/core/workflow.js +308 -0
  171. package/dist/core/workflow.js.map +1 -0
  172. package/dist/core/workspace.d.ts +7 -0
  173. package/dist/core/workspace.js +214 -0
  174. package/dist/core/workspace.js.map +1 -0
  175. package/dist/index.d.ts +2 -0
  176. package/dist/index.js +16 -0
  177. package/dist/index.js.map +1 -0
  178. package/dist/schemas/brief.d.ts +12 -0
  179. package/dist/schemas/brief.js +2 -0
  180. package/dist/schemas/brief.js.map +1 -0
  181. package/dist/schemas/eval.d.ts +96 -0
  182. package/dist/schemas/eval.js +30 -0
  183. package/dist/schemas/eval.js.map +1 -0
  184. package/dist/schemas/handoff.d.ts +33 -0
  185. package/dist/schemas/handoff.js +13 -0
  186. package/dist/schemas/handoff.js.map +1 -0
  187. package/dist/schemas/log.d.ts +51 -0
  188. package/dist/schemas/log.js +19 -0
  189. package/dist/schemas/log.js.map +1 -0
  190. package/dist/schemas/memory.d.ts +112 -0
  191. package/dist/schemas/memory.js +21 -0
  192. package/dist/schemas/memory.js.map +1 -0
  193. package/dist/schemas/memoryProposal.d.ts +181 -0
  194. package/dist/schemas/memoryProposal.js +46 -0
  195. package/dist/schemas/memoryProposal.js.map +1 -0
  196. package/dist/schemas/patch.d.ts +38 -0
  197. package/dist/schemas/patch.js +15 -0
  198. package/dist/schemas/patch.js.map +1 -0
  199. package/dist/schemas/project.d.ts +23 -0
  200. package/dist/schemas/project.js +8 -0
  201. package/dist/schemas/project.js.map +1 -0
  202. package/dist/schemas/skill.d.ts +26 -0
  203. package/dist/schemas/skill.js +9 -0
  204. package/dist/schemas/skill.js.map +1 -0
  205. package/dist/schemas/worker.d.ts +29 -0
  206. package/dist/schemas/worker.js +12 -0
  207. package/dist/schemas/worker.js.map +1 -0
  208. package/dist/version.d.ts +1 -0
  209. package/dist/version.js +3 -0
  210. package/dist/version.js.map +1 -0
  211. package/docs/codex-resume.md +13 -0
  212. package/docs/compatibility.md +49 -0
  213. package/docs/concept.md +13 -0
  214. package/docs/evals.md +18 -0
  215. package/docs/file-format.md +67 -0
  216. package/docs/handoff-briefs.md +9 -0
  217. package/docs/integrations/harnesses.md +74 -0
  218. package/docs/memory-lifecycle.md +23 -0
  219. package/docs/persistent-worker.md +15 -0
  220. package/docs/privacy-model.md +40 -0
  221. package/docs/quickstart.md +74 -0
  222. package/docs/release-checklist.md +68 -0
  223. package/docs/roadmap.md +33 -0
  224. package/docs/superpowers/plans/2026-06-08-briefops-oss-readiness.md +1272 -0
  225. package/docs/superpowers/plans/2026-06-08-codex-first-context-optimization.md +1176 -0
  226. package/docs/token-budget.md +63 -0
  227. package/examples/atlas-q/README.md +15 -0
  228. package/examples/codex-first-context/README.md +48 -0
  229. package/examples/codex-first-context/after-briefops-prime.md +40 -0
  230. package/examples/codex-first-context/before-manual-history-dump.md +18 -0
  231. package/examples/persistent-worker-demo/README.md +15 -0
  232. package/examples/persistent-worker-demo/after-codex-resume.md +17 -0
  233. package/examples/persistent-worker-demo/before-context-dump.md +5 -0
  234. package/examples/persistent-worker-demo/briefops-workspace/codex/prompts/resume_demo.md +29 -0
  235. package/examples/persistent-worker-demo/briefops-workspace/handoffs/handoff_demo.md +50 -0
  236. package/examples/persistent-worker-demo/briefops-workspace/logs/log_20260604_001.yaml +14 -0
  237. package/examples/persistent-worker-demo/briefops-workspace/logs/log_20260604_002.yaml +12 -0
  238. package/examples/persistent-worker-demo/briefops-workspace/memory/decisions.yaml +12 -0
  239. package/examples/persistent-worker-demo/briefops-workspace/memory/deprecated.yaml +1 -0
  240. package/examples/persistent-worker-demo/briefops-workspace/memory/facts.yaml +12 -0
  241. package/examples/persistent-worker-demo/briefops-workspace/memory/incidents.yaml +12 -0
  242. package/examples/persistent-worker-demo/briefops-workspace/memory/lessons.yaml +12 -0
  243. package/examples/persistent-worker-demo/briefops-workspace/memory-proposals/memprop_demo_001.memory-proposal.yaml +23 -0
  244. package/examples/persistent-worker-demo/briefops-workspace/projects/atlas-q.project.md +18 -0
  245. package/examples/persistent-worker-demo/briefops-workspace/skills/backtest-validation.skill.md +13 -0
  246. package/examples/persistent-worker-demo/briefops-workspace/skills/risk-review.skill.md +15 -0
  247. package/examples/persistent-worker-demo/briefops-workspace/workers/quant-reviewer.worker.yaml +12 -0
  248. package/examples/persistent-worker-demo/briefops-workspace/workers/summaries/quant-reviewer.summary.md +44 -0
  249. package/package.json +59 -0
  250. package/plugins/briefops-codex/.codex-plugin/plugin.json +39 -0
  251. package/plugins/briefops-codex/README.md +44 -0
  252. package/plugins/briefops-codex/skills/briefops-continue-worker/SKILL.md +22 -0
  253. package/plugins/briefops-codex/skills/briefops-finish-task/SKILL.md +22 -0
  254. package/plugins/briefops-codex/skills/briefops-prime-context/SKILL.md +24 -0
  255. package/plugins/briefops-codex/skills/briefops-review-memory/SKILL.md +27 -0
@@ -0,0 +1,63 @@
1
+ # Token Budget
2
+
3
+ BriefOps estimates tokens locally and reports section budgets in generated artifacts.
4
+
5
+ Brief generation uses the final rendered Markdown estimate as `totalTokens`. Inspection calls the same generate path so token reports match generated output.
6
+
7
+ Handoffs also include section budgets and warnings when generated content exceeds the requested budget.
8
+
9
+ View the default budget policy:
10
+
11
+ ```bash
12
+ briefops inspect budget
13
+ ```
14
+
15
+ Current targets:
16
+
17
+ - `AGENTS.md`: 500 tokens
18
+ - `CLAUDE.md`: 700 tokens
19
+ - Cursor rule: 350 tokens
20
+ - Cursor rules total: 1200 tokens
21
+ - prime default: 800 tokens
22
+ - handoff default: 2500 tokens
23
+ - resume pack default: 3000 tokens
24
+
25
+ `briefops prime` is the smallest start-of-thread artifact. Use it before broad history inspection:
26
+
27
+ ```bash
28
+ briefops prime --task "Continue unresolved checks." --format codex --max-tokens 800
29
+ ```
30
+
31
+ For sharing outside the local machine, use:
32
+
33
+ ```bash
34
+ briefops prime --task "Continue unresolved checks." --export-policy shared-only
35
+ briefops pack resume --worker <worker> --task "Continue unresolved checks." --export-policy shared-only
36
+ ```
37
+
38
+ `shared-only` includes only memory items marked `visibility: shared` and `exportable: true`.
39
+ It omits private memory, local project file details, raw work logs, open risks, local next steps, private worker lessons, private incidents, recent work history, and private metadata counts.
40
+
41
+ `local-private` is intended for local terminal/Codex use only.
42
+
43
+ ## Compare Context
44
+
45
+ Use `compare context` to see why BriefOps compiles context instead of dumping history:
46
+
47
+ ```bash
48
+ briefops compare context --worker <worker> --task "Review this PR."
49
+ ```
50
+
51
+ The command estimates local `.briefops` candidate inputs such as project context, worker summary, active memory, and recent logs, then compares them with compiled `briefops prime` output.
52
+
53
+ ## Harness Router Budgets
54
+
55
+ Harness exports should stay small:
56
+
57
+ ```bash
58
+ briefops export agents-md
59
+ briefops export claude-md
60
+ briefops export cursor-rules
61
+ ```
62
+
63
+ These exports are routers. They include command usage and safety boundaries, not raw memory, logs, decisions, incidents, or handoffs.
@@ -0,0 +1,15 @@
1
+ # Atlas-Q Example
2
+
3
+ This folder is a tiny placeholder example for the README workflow.
4
+
5
+ Example BriefOps setup:
6
+
7
+ ```bash
8
+ briefops init
9
+ briefops skill create risk-review --description "Review changes for risk and governance violations" --tags "review,risk,governance"
10
+ briefops project create atlas-q --description "Rule-based non-ML quantitative trading system" --tags "quant,trading"
11
+ briefops memory add --type lessons --project atlas-q --skill risk-review --content "Always verify turnover warning threshold when rebalance logic changes."
12
+ briefops brief generate --skill risk-review --project atlas-q --task "Review recent rebalance logic changes." --budget 2000
13
+ ```
14
+
15
+ The generated brief should include the skill, project context, matching active memory, task, delivery format, source references, and token budget report.
@@ -0,0 +1,48 @@
1
+ # Codex First Context Example
2
+
3
+ This example shows the intended BriefOps first-context workflow.
4
+
5
+ The problem: a fresh Codex thread often spends tokens rediscovering project history, prior decisions, unresolved risks, and worker habits.
6
+
7
+ The BriefOps path:
8
+
9
+ ```bash
10
+ briefops init
11
+ briefops codex install
12
+ briefops codex plugin install
13
+ briefops skill create risk-review
14
+ briefops project create atlas-q
15
+ briefops worker create quant-reviewer --project atlas-q --skills risk-review
16
+ briefops worker use quant-reviewer
17
+ briefops export agents-md --worker quant-reviewer --force
18
+ briefops prime --task "Continue unresolved slippage checks." --format codex --max-tokens 800
19
+ ```
20
+
21
+ `briefops prime` is intentionally smaller than a handoff or portable resume pack. It selects the smallest useful context for starting work, then points Codex to the next command only when a full continuation pack is actually needed.
22
+
23
+ `briefops export agents-md` is a router export. It tells Codex how to call BriefOps and keeps private memory, raw logs, handoffs, decisions, incidents, and worker summaries out of `AGENTS.md`.
24
+
25
+ For portable/shared artifacts:
26
+
27
+ ```bash
28
+ briefops prime --task "Continue unresolved slippage checks." --format codex --export-policy shared-only
29
+ briefops pack resume --worker quant-reviewer --task "Continue unresolved slippage checks." --export-policy shared-only
30
+ ```
31
+
32
+ `shared-only` omits private memory, local project file details, raw work logs, open risks, local next steps, private worker lessons, private incidents, recent work history, and private metadata counts. `local-private` is intended for local terminal/Codex use only.
33
+
34
+ BriefOps skills must never auto-approve memory proposals or skill patches.
35
+
36
+ Harnesses such as LazyCodex or OmO can use BriefOps as the first local context ledger before they run their own orchestration. Keep approval human-confirmed: do not let a harness auto-run `briefops approve latest`.
37
+
38
+ Useful context-minimalism checks:
39
+
40
+ ```bash
41
+ briefops inspect budget
42
+ briefops compare context --worker quant-reviewer --task "Continue unresolved slippage checks."
43
+ ```
44
+
45
+ Files:
46
+
47
+ - `before-manual-history-dump.md` shows the kind of repeated context users often paste manually.
48
+ - `after-briefops-prime.md` shows the compact shape BriefOps should produce.
@@ -0,0 +1,40 @@
1
+ # BriefOps Prime Context
2
+
3
+ Status: ready
4
+
5
+ ## Token Budget
6
+
7
+ - Maximum: 800
8
+ - Export policy: local-private
9
+
10
+ ## Current Task
11
+
12
+ Continue unresolved slippage checks.
13
+
14
+ ## Worker
15
+
16
+ - Worker: quant-reviewer
17
+ - Project: atlas-q
18
+ - Skills: risk-review
19
+
20
+ ## Continuity Status
21
+
22
+ - Readiness: PASS
23
+ - Work logs: 8
24
+
25
+ ## Highest-Value Memory
26
+
27
+ - [lesson] Always verify turnover warning threshold before merge recommendation.
28
+ - [decision] Treat unverified slippage assumptions as blocking.
29
+
30
+ ## Open Risks And Next Steps
31
+
32
+ Open risks:
33
+ - Slippage assumptions remain unresolved.
34
+
35
+ Next steps:
36
+ - Verify slippage assumptions against policy.
37
+
38
+ ## Pending User Review
39
+
40
+ - No pending user review found.
@@ -0,0 +1,18 @@
1
+ # Manual History Dump
2
+
3
+ Project: atlas-q is a rule-based quantitative trading system.
4
+
5
+ Worker: quant-reviewer reviews risk and governance before merge recommendations.
6
+
7
+ Prior notes repeated into fresh threads:
8
+
9
+ - Always verify turnover warning threshold before recommending merge.
10
+ - Treat unverified slippage assumptions as blocking.
11
+ - Missing turnover warning checks were previously missed during rebalance review.
12
+ - Slippage assumptions remain unresolved until checked against policy.
13
+ - Continue by inspecting risk policy and adding slippage verification to the review checklist.
14
+ - The worker style is skeptical and verification-first.
15
+ - The project does not allow strategy drift without approval.
16
+ - The reviewer should call out unresolved risk explicitly.
17
+
18
+ This kind of manual context grows quickly as logs, handoffs, and memory files accumulate.
@@ -0,0 +1,15 @@
1
+ # Persistent Worker Demo
2
+
3
+ This example shows BriefOps carrying work memory across fresh AI coding threads.
4
+
5
+ Before: the user pastes repeated project rules, prior decisions, and missed-check lessons into every new thread.
6
+
7
+ After:
8
+
9
+ ```bash
10
+ briefops codex resume --worker quant-reviewer --task "Continue the rebalance review and identify remaining risks."
11
+ ```
12
+
13
+ The resume prompt includes a compact handoff, worker judgment rules, recent work, active decisions, lessons, incidents, evidence gates, and after-completion logging commands.
14
+
15
+ The `briefops-workspace/` folder mirrors the important `.briefops/` files for a small atlas-q project.
@@ -0,0 +1,17 @@
1
+ # After: Codex Resume
2
+
3
+ Generated with:
4
+
5
+ ```bash
6
+ briefops codex resume --worker quant-reviewer --task "Continue the rebalance review and identify remaining risks." --save
7
+ ```
8
+
9
+ The prompt contains:
10
+
11
+ - worker summary for `quant-reviewer`
12
+ - active decision: missing universe coverage above 20% stops execution
13
+ - active lesson: verify turnover warning thresholds
14
+ - incident: prior missed turnover warning check
15
+ - recent work history
16
+ - evidence gates
17
+ - after-completion BriefOps commands
@@ -0,0 +1,5 @@
1
+ # Before: Context Dump
2
+
3
+ We are working on atlas-q, a rule-based quantitative trading system. Remember that missing universe coverage above 20% must stop execution. The reviewer should be skeptical and governance-first. Last time the review missed a turnover warning check, so always verify the turnover warning threshold when rebalance logic changes. Also check slippage and fee assumptions before approving backtest changes.
4
+
5
+ Please continue the rebalance review and identify remaining risks.
@@ -0,0 +1,29 @@
1
+ # BriefOps Codex Resume Mission
2
+
3
+ ## Mission
4
+
5
+ Continue the rebalance review and identify remaining risks.
6
+
7
+ ## Continuity Contract
8
+
9
+ 1. Read the handoff before making changes.
10
+ 2. Treat active decisions as constraints.
11
+ 3. Apply worker judgment rules.
12
+ 4. Avoid repeating known failure patterns.
13
+
14
+ ## Evidence Gates
15
+
16
+ - Context gate: list files/docs inspected.
17
+ - Continuity gate: mention which prior decision/lesson influenced the work.
18
+ - Verification gate: include commands or manual checks.
19
+ - Memory gate: state what should be logged or promoted after completion.
20
+
21
+ ## Handoff Brief
22
+
23
+ See `handoffs/handoff_demo.md`.
24
+
25
+ ## Completion Signal
26
+
27
+ ```text
28
+ <briefops-complete>DONE</briefops-complete>
29
+ ```
@@ -0,0 +1,50 @@
1
+ ---
2
+ id: handoff_demo
3
+ created_at: "2026-06-04T00:15:00.000Z"
4
+ project: atlas-q
5
+ worker: quant-reviewer
6
+ task: Continue reviewing rebalance policy changes.
7
+ adapter: codex
8
+ budget: 3000
9
+ total_tokens: 420
10
+ warnings: []
11
+ ---
12
+
13
+ # BriefOps Handoff Brief
14
+
15
+ ## Purpose
16
+
17
+ This handoff prepares a fresh AI coding thread to continue work without restarting from zero.
18
+
19
+ ## Project
20
+
21
+ atlas-q is a rule-based non-ML quantitative trading system with governance checks for rebalance and risk policy.
22
+
23
+ ## Worker
24
+
25
+ Use `quant-reviewer` summary: skeptical, governance-first, verify before completion.
26
+
27
+ ## Recent Work History
28
+
29
+ - 2026-06-04: Review rebalance logic.; Found missing turnover warning check.
30
+ - 2026-06-04: Review slippage assumptions.; Requested explicit slippage test.
31
+
32
+ ## Active Decisions
33
+
34
+ - Missing universe coverage above 20% must stop execution.
35
+
36
+ ## Active Lessons
37
+
38
+ - Always verify turnover warning threshold when rebalance logic changes.
39
+
40
+ ## Known Incidents / Failure Patterns
41
+
42
+ - Previous review missed turnover warning check.
43
+
44
+ ## After Completion
45
+
46
+ ```bash
47
+ briefops log add ...
48
+ briefops memory propose-from-log latest
49
+ briefops worker refresh-summary quant-reviewer
50
+ ```
@@ -0,0 +1,14 @@
1
+ id: log_20260604_001
2
+ created_at: "2026-06-04T00:00:00.000Z"
3
+ project: atlas-q
4
+ skill: risk-review
5
+ worker: quant-reviewer
6
+ task: Review rebalance logic.
7
+ result: Found missing turnover warning check.
8
+ lessons:
9
+ - Always verify turnover warning threshold when rebalance logic changes.
10
+ files_changed:
11
+ - src/risk/turnover.ts
12
+ commands_run:
13
+ - npm test
14
+ notes: "decision: Keep rebalance warning thresholds centralized."
@@ -0,0 +1,12 @@
1
+ id: log_20260604_002
2
+ created_at: "2026-06-04T01:00:00.000Z"
3
+ project: atlas-q
4
+ skill: backtest-validation
5
+ worker: quant-reviewer
6
+ task: Review slippage assumptions.
7
+ result: Requested explicit slippage test.
8
+ lessons:
9
+ - Always check slippage and fee assumptions before approving backtest changes.
10
+ files_changed: []
11
+ commands_run: []
12
+ notes: ""
@@ -0,0 +1,12 @@
1
+ items:
2
+ - id: mem_demo_decision_001
3
+ type: decision
4
+ status: active
5
+ project: atlas-q
6
+ skill: risk-review
7
+ content: Missing universe coverage above 20% must stop execution.
8
+ source: manual
9
+ created_at: "2026-06-04T00:00:00.000Z"
10
+ tags:
11
+ - universe
12
+ - governance
@@ -0,0 +1,12 @@
1
+ items:
2
+ - id: mem_demo_fact_001
3
+ type: fact
4
+ status: active
5
+ project: atlas-q
6
+ skill: risk-review
7
+ content: Project uses Vite + React for internal review tools.
8
+ source: manual
9
+ created_at: "2026-06-04T00:00:00.000Z"
10
+ tags:
11
+ - vite
12
+ - react
@@ -0,0 +1,12 @@
1
+ items:
2
+ - id: mem_demo_incident_001
3
+ type: incident
4
+ status: active
5
+ project: atlas-q
6
+ skill: risk-review
7
+ content: Previous review missed turnover warning check.
8
+ source: proposal:memprop_demo_001
9
+ created_at: "2026-06-04T00:00:00.000Z"
10
+ tags:
11
+ - missed-check
12
+ - turnover
@@ -0,0 +1,12 @@
1
+ items:
2
+ - id: mem_demo_lesson_001
3
+ type: lesson
4
+ status: active
5
+ project: atlas-q
6
+ skill: risk-review
7
+ content: Always verify turnover warning threshold when rebalance logic changes.
8
+ source: proposal:memprop_demo_001
9
+ created_at: "2026-06-04T00:00:00.000Z"
10
+ tags:
11
+ - turnover
12
+ - rebalance
@@ -0,0 +1,23 @@
1
+ id: memprop_demo_001
2
+ created_at: "2026-06-04T00:05:00.000Z"
3
+ from_log: log_20260604_001
4
+ status: applied
5
+ project: atlas-q
6
+ skill: risk-review
7
+ worker: quant-reviewer
8
+ proposals:
9
+ - type: lesson
10
+ status: active
11
+ content: Always verify turnover warning threshold when rebalance logic changes.
12
+ tags:
13
+ - turnover
14
+ - rebalance
15
+ rationale: Extracted from work log lesson.
16
+ - type: incident
17
+ status: active
18
+ content: Found missing turnover warning check.
19
+ tags:
20
+ - turnover
21
+ - missing
22
+ rationale: Extracted from work log result.
23
+ applied_at: "2026-06-04T00:06:00.000Z"
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: atlas-q
3
+ description: Rule-based non-ML quantitative trading system.
4
+ version: 0.1.0
5
+ tags:
6
+ - quant
7
+ max_tokens: 500
8
+ ---
9
+
10
+ ## Context
11
+
12
+ atlas-q uses explicit governance checks around rebalance, universe coverage, slippage, and turnover warnings.
13
+
14
+ ## Read If Needed
15
+
16
+ - src/rebalance/policy.ts
17
+ - src/risk/turnover.ts
18
+ - tests/rebalance-policy.test.ts
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: backtest-validation
3
+ description: Validate backtest assumptions and reporting.
4
+ version: 0.1.0
5
+ tags:
6
+ - backtest
7
+ max_tokens: 400
8
+ ---
9
+
10
+ ## Protocol
11
+
12
+ - Check slippage and fee assumptions.
13
+ - Require explicit evidence for changed metrics.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: risk-review
3
+ description: Review quantitative strategy changes for risk and governance violations.
4
+ version: 0.1.0
5
+ tags:
6
+ - risk
7
+ - review
8
+ max_tokens: 400
9
+ ---
10
+
11
+ ## Protocol
12
+
13
+ - Check risk-policy enforcement before approving behavior changes.
14
+ - Treat missing risk-policy tests as blocking.
15
+ - Verify turnover warning thresholds when rebalance logic changes.
@@ -0,0 +1,12 @@
1
+ name: quant-reviewer
2
+ description: Risk-focused quantitative strategy reviewer.
3
+ project: atlas-q
4
+ default_skills:
5
+ - risk-review
6
+ - backtest-validation
7
+ style:
8
+ - skeptical
9
+ - governance-first
10
+ - verify before completion
11
+ max_tokens: 500
12
+ status: active
@@ -0,0 +1,44 @@
1
+ # Worker Summary: quant-reviewer
2
+
3
+ ## Identity
4
+
5
+ Risk-focused quantitative strategy reviewer.
6
+
7
+ ## Default Project
8
+
9
+ atlas-q
10
+
11
+ ## Default Skills
12
+
13
+ - risk-review
14
+ - backtest-validation
15
+
16
+ ## Operating Style
17
+
18
+ - skeptical
19
+ - governance-first
20
+ - verify before completion
21
+
22
+ ## Recent Work
23
+
24
+ - 2026-06-04: Review rebalance logic.; Found missing turnover warning check.
25
+ - 2026-06-04: Review slippage assumptions.; Requested explicit slippage test.
26
+
27
+ ## Accumulated Lessons
28
+
29
+ - Always verify turnover warning threshold when rebalance logic changes.
30
+ - Always check slippage and fee assumptions before approving backtest changes.
31
+
32
+ ## Known Failure Patterns
33
+
34
+ - Previous review missed turnover warning check.
35
+
36
+ ## Active Judgment Rules
37
+
38
+ - Reject unverified behavior changes.
39
+ - Require explicit approval for strategy drift.
40
+ - Treat missing risk-policy tests as blocking.
41
+
42
+ ## Last Refreshed
43
+
44
+ 2026-06-04T00:10:00.000Z
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "briefops",
3
+ "version": "1.0.0",
4
+ "description": "Local-first, token-aware skill and briefing layer for AI coding agents.",
5
+ "type": "module",
6
+ "bin": {
7
+ "briefops": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc -p tsconfig.json",
11
+ "test": "vitest run",
12
+ "dev": "tsx src/index.ts",
13
+ "verify:release": "npm run build && npm test && npm audit --audit-level=moderate && npm pack --dry-run"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/simony-816/briefops.git"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/simony-816/briefops/issues"
21
+ },
22
+ "homepage": "https://github.com/simony-816/briefops#readme",
23
+ "keywords": [
24
+ "codex",
25
+ "ai-agents",
26
+ "local-first",
27
+ "memory",
28
+ "context",
29
+ "handoff",
30
+ "developer-tools"
31
+ ],
32
+ "dependencies": {
33
+ "commander": "^12.1.0",
34
+ "yaml": "^2.5.1",
35
+ "zod": "^3.23.8"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^22.5.5",
39
+ "tsx": "^4.19.1",
40
+ "typescript": "^5.6.2",
41
+ "vitest": "^4.1.8"
42
+ },
43
+ "engines": {
44
+ "node": ">=20"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "plugins",
49
+ "examples",
50
+ "docs",
51
+ "README.md",
52
+ "LICENSE",
53
+ "SECURITY.md",
54
+ "CONTRIBUTING.md",
55
+ "CODE_OF_CONDUCT.md",
56
+ "CHANGELOG.md"
57
+ ],
58
+ "license": "MIT"
59
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "briefops",
3
+ "version": "1.0.0",
4
+ "description": "Local-first, token-aware persistent work history for Codex workflows.",
5
+ "author": {
6
+ "name": "BriefOps contributors",
7
+ "url": "https://github.com/simony-816/briefops"
8
+ },
9
+ "homepage": "https://github.com/simony-816/briefops",
10
+ "repository": "https://github.com/simony-816/briefops",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "codex",
14
+ "local-first",
15
+ "context",
16
+ "memory",
17
+ "handoff",
18
+ "workflow"
19
+ ],
20
+ "skills": "./skills/",
21
+ "interface": {
22
+ "displayName": "BriefOps",
23
+ "shortDescription": "local-first context priming and continuity for Codex",
24
+ "longDescription": "Use BriefOps to prime Codex with compact local context, record task outcomes, review durable memory proposals, and resume persistent workers without hosted services.",
25
+ "developerName": "BriefOps contributors",
26
+ "category": "Developer Tools",
27
+ "capabilities": [
28
+ "Read",
29
+ "Write"
30
+ ],
31
+ "defaultPrompt": [
32
+ "Start this task with the smallest useful BriefOps context.",
33
+ "Finish this task and prepare memory for the next thread."
34
+ ],
35
+ "websiteURL": "https://github.com/simony-816/briefops",
36
+ "brandColor": "#2563EB",
37
+ "screenshots": []
38
+ }
39
+ }
@@ -0,0 +1,44 @@
1
+ # BriefOps Codex Plugin
2
+
3
+ This is a skill-only Codex plugin bundle for BriefOps.
4
+
5
+ It does not run a hosted service and does not sync data. The skills call the local `briefops` CLI and local `.briefops/` workspace.
6
+ It does not publish to a marketplace and does not write to global Codex folders by default.
7
+
8
+ The BriefOps plugin is a local CLI helper. It does not require network access, does not publish to a marketplace, and should not auto-approve memory or skill patches. Use `--export-policy shared-only` before copying context outside the local workspace.
9
+
10
+ Recommended local setup:
11
+
12
+ ```bash
13
+ briefops init
14
+ briefops codex install
15
+ briefops codex plugin install
16
+ briefops worker use <worker>
17
+ briefops prime --task "Start this task." --format codex
18
+ ```
19
+
20
+ The generated local plugin copy is written to:
21
+
22
+ ```text
23
+ .briefops/codex/plugin/briefops
24
+ ```
25
+
26
+ BriefOps plugin skills must never auto-approve memory proposals or skill patches.
27
+
28
+ For repo-level harness guidance, generate router files:
29
+
30
+ ```bash
31
+ briefops export agents-md
32
+ briefops export all
33
+ ```
34
+
35
+ These exports route local harnesses back to `briefops prime`, `briefops finish`, `briefops approve`, and `briefops continue --pack`. They do not copy `.briefops` memory, logs, handoffs, or worker summaries.
36
+
37
+ Use shared-only exports for portable context:
38
+
39
+ ```bash
40
+ briefops prime --task "Start this task." --format codex --export-policy shared-only
41
+ briefops pack resume --worker <worker> --task "Start this task." --export-policy shared-only
42
+ ```
43
+
44
+ `shared-only` omits private memory, local project file details, raw work logs, open risks, local next steps, private worker lessons, private incidents, recent work history, and private metadata counts.