@forwardimpact/outpost 3.3.4 → 3.4.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 (65) hide show
  1. package/LICENSE +21 -201
  2. package/config/skill-postures.json +28 -0
  3. package/package.json +1 -1
  4. package/src/agent-runner.js +52 -1
  5. package/src/kb-manager.js +5 -7
  6. package/src/outpost.js +42 -0
  7. package/src/posture.js +77 -0
  8. package/src/socket-server.js +1 -5
  9. package/templates/.claude/agents/chief-of-staff.md +24 -9
  10. package/templates/.claude/agents/concierge.md +14 -0
  11. package/templates/.claude/agents/head-hunter.md +14 -0
  12. package/templates/.claude/agents/librarian.md +19 -7
  13. package/templates/.claude/agents/postman.md +14 -0
  14. package/templates/.claude/agents/recruiter.md +21 -12
  15. package/templates/.claude/skills/anarlog-follow/SKILL.md +7 -7
  16. package/templates/.claude/skills/anarlog-process/SKILL.md +15 -16
  17. package/templates/.claude/skills/anarlog-process/references/extraction.md +5 -5
  18. package/templates/.claude/skills/candidate-report/SKILL.md +9 -9
  19. package/templates/.claude/skills/deck-create/SKILL.md +2 -2
  20. package/templates/.claude/skills/deck-summarize/SKILL.md +2 -2
  21. package/templates/.claude/skills/deck-summarize/references/brief-template.md +1 -1
  22. package/templates/.claude/skills/doc-collab/SKILL.md +8 -8
  23. package/templates/.claude/skills/doc-create/SKILL.md +3 -3
  24. package/templates/.claude/skills/draft-emails/SKILL.md +19 -19
  25. package/templates/.claude/skills/draft-emails/references/template.md +1 -1
  26. package/templates/.claude/skills/draft-emails/scripts/scan-emails.mjs +4 -4
  27. package/templates/.claude/skills/draft-emails/scripts/send-email.mjs +2 -2
  28. package/templates/.claude/skills/extract-entities/SKILL.md +16 -17
  29. package/templates/.claude/skills/extract-entities/references/TEMPLATES.md +2 -2
  30. package/templates/.claude/skills/extract-entities/references/conditions.md +4 -4
  31. package/templates/.claude/skills/extract-entities/references/links.md +3 -18
  32. package/templates/.claude/skills/extract-entities/references/recruitment.md +8 -8
  33. package/templates/.claude/skills/extract-entities/references/resolution.md +3 -5
  34. package/templates/.claude/skills/extract-entities/references/sources.md +1 -1
  35. package/templates/.claude/skills/extract-entities/references/templates-conditions.md +2 -2
  36. package/templates/.claude/skills/extract-entities/references/templates-priorities.md +32 -0
  37. package/templates/.claude/skills/extract-entities/references/templates-projects-topics.md +2 -2
  38. package/templates/.claude/skills/meeting-prep/SKILL.md +18 -19
  39. package/templates/.claude/skills/req-assess/SKILL.md +11 -11
  40. package/templates/.claude/skills/req-assess/references/interview-template.md +1 -1
  41. package/templates/.claude/skills/req-assess/references/panel-template.md +1 -1
  42. package/templates/.claude/skills/req-decide/SKILL.md +17 -17
  43. package/templates/.claude/skills/req-decide/references/template.md +1 -1
  44. package/templates/.claude/skills/req-forget/SKILL.md +8 -8
  45. package/templates/.claude/skills/req-forget/references/classify.md +4 -4
  46. package/templates/.claude/skills/req-forget/references/locations.md +10 -10
  47. package/templates/.claude/skills/req-forget/references/report-template.md +8 -8
  48. package/templates/.claude/skills/req-scan/SKILL.md +3 -3
  49. package/templates/.claude/skills/req-scan/references/template.md +1 -1
  50. package/templates/.claude/skills/req-screen/SKILL.md +9 -9
  51. package/templates/.claude/skills/req-screen/references/template.md +1 -1
  52. package/templates/.claude/skills/req-track/SKILL.md +17 -17
  53. package/templates/.claude/skills/req-track/references/fields.md +8 -8
  54. package/templates/.claude/skills/req-track/references/signals.md +2 -2
  55. package/templates/.claude/skills/req-track/references/templates.md +1 -1
  56. package/templates/.claude/skills/req-workday/SKILL.md +12 -12
  57. package/templates/.claude/skills/req-workday/references/templates.md +3 -3
  58. package/templates/.claude/skills/send-chat/SKILL.md +4 -4
  59. package/templates/.claude/skills/upstream-instructions/SKILL.md +154 -0
  60. package/templates/.claude/skills/upstream-instructions/references/examples.md +97 -0
  61. package/templates/CLAUDE.md +47 -53
  62. package/templates/.claude/skills/extract-entities/references/templates-goals-priorities.md +0 -63
  63. package/templates/.claude/skills/upstream-skill/SKILL.md +0 -130
  64. package/templates/.claude/skills/upstream-skill/references/examples.md +0 -80
  65. package/templates/knowledge/Briefings/.gitkeep +0 -0
package/LICENSE CHANGED
@@ -1,201 +1,21 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to the Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2026 Dick Olsson
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Zachary Rice
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,28 @@
1
+ {
2
+ "candidate-report": "draft",
3
+ "deck-create": "draft",
4
+ "deck-summarize": "brief",
5
+ "doc-collab": "brief",
6
+ "doc-create": "draft",
7
+ "draft-emails": "draft",
8
+ "extract-entities": "brief",
9
+ "hyprnote-follow": "brief",
10
+ "hyprnote-process": "brief",
11
+ "hyprnote-trim": "brief",
12
+ "manage-tasks": "brief",
13
+ "meeting-prep": "brief",
14
+ "organize-files": "draft",
15
+ "req-assess": "brief",
16
+ "req-decide": "brief",
17
+ "req-forget": "brief",
18
+ "req-scan": "brief",
19
+ "req-screen": "brief",
20
+ "req-track": "brief",
21
+ "req-workday": "brief",
22
+ "send-chat": "draft",
23
+ "sync-apple-calendar": "brief",
24
+ "sync-apple-mail": "brief",
25
+ "sync-teams": "brief",
26
+ "upstream-skill": "brief",
27
+ "weekly-update": "brief"
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardimpact/outpost",
3
- "version": "3.3.4",
3
+ "version": "3.4.0",
4
4
  "description": "Personal operations center — context from email, calendar, and knowledge assembled so preparation is continuous, not a morning scramble.",
5
5
  "homepage": "https://www.forwardimpact.team",
6
6
  "repository": {
@@ -5,6 +5,23 @@
5
5
  import { resolve, join } from "node:path";
6
6
  import { homedir } from "node:os";
7
7
  import { isoTimestamp } from "@forwardimpact/libutil";
8
+ import {
9
+ readPosture,
10
+ effectivePosture,
11
+ loadManifest,
12
+ draftSkills,
13
+ } from "./posture.js";
14
+
15
+ /**
16
+ * System-prompt directive injected under the `brief` posture. Neutralises any
17
+ * draft-side prose in a materialised agent definition and forbids writing the
18
+ * posture record.
19
+ */
20
+ const BRIEF_DIRECTIVE =
21
+ "Adoption posture: brief. Run only read-and-brief work. Do not draft or " +
22
+ "send content on the user's behalf for delivery to anyone else, do not move " +
23
+ "or write files outside the knowledge base, and never write the posture " +
24
+ "record (~/.fit/outpost/posture.json).";
8
25
 
9
26
  /** Spawn agent CLI processes, capture their output, and update agent state. */
10
27
  export class AgentRunner {
@@ -17,6 +34,8 @@ export class AgentRunner {
17
34
  #proc;
18
35
  #clock;
19
36
  #runtime;
37
+ #posturePath;
38
+ #manifestPath;
20
39
 
21
40
  /**
22
41
  * @param {Object | (() => Object | Promise<{default?: Object}>)} spawn -
@@ -28,8 +47,11 @@ export class AgentRunner {
28
47
  * @param {string} cacheDir - Cache directory for state files
29
48
  * @param {import("@forwardimpact/libutil/runtime").Runtime} runtime
30
49
  * Injected runtime bag (uses `fs` (async), `proc`, `clock`).
50
+ * @param {{posturePath: string, manifestPath: string}} posture - Paths to the
51
+ * posture record (read-only on the wake path) and the skill-posture
52
+ * membership manifest.
31
53
  */
32
- constructor(spawn, stateManager, logFn, cacheDir, runtime) {
54
+ constructor(spawn, stateManager, logFn, cacheDir, runtime, posture) {
33
55
  if (!spawn) throw new Error("spawn is required");
34
56
  if (!stateManager) throw new Error("stateManager is required");
35
57
  if (!logFn) throw new Error("logFn is required");
@@ -37,6 +59,10 @@ export class AgentRunner {
37
59
  if (!runtime?.fs) throw new Error("runtime.fs is required");
38
60
  if (!runtime?.proc) throw new Error("runtime.proc is required");
39
61
  if (!runtime?.clock) throw new Error("runtime.clock is required");
62
+ if (!posture?.posturePath)
63
+ throw new Error("posture.posturePath is required");
64
+ if (!posture?.manifestPath)
65
+ throw new Error("posture.manifestPath is required");
40
66
  this.#spawn = spawn;
41
67
  this.#stateManager = stateManager;
42
68
  this.#log = logFn;
@@ -45,6 +71,8 @@ export class AgentRunner {
45
71
  this.#proc = runtime.proc;
46
72
  this.#clock = runtime.clock;
47
73
  this.#runtime = runtime;
74
+ this.#posturePath = posture.posturePath;
75
+ this.#manifestPath = posture.manifestPath;
48
76
  this.#activeChildren = new Set();
49
77
  }
50
78
 
@@ -117,6 +145,28 @@ export class AgentRunner {
117
145
  });
118
146
  }
119
147
 
148
+ /**
149
+ * Resolve the spawn flags the recorded posture adds. Under `brief` (also the
150
+ * default when no posture is recorded), deny every draft-side skill by name
151
+ * and inject the brief directive — a deterministic gate the woken agent
152
+ * cannot override under `bypassPermissions`. Under `brief+draft`, add
153
+ * nothing. The posture record is read here, never written.
154
+ * @returns {Promise<string[]>} Extra args to append to the spawn argv.
155
+ */
156
+ async #postureArgs() {
157
+ const posture = effectivePosture(
158
+ await readPosture(this.#fs, this.#posturePath),
159
+ );
160
+ if (posture !== "brief") return [];
161
+ const manifest = await loadManifest(this.#fs, this.#manifestPath);
162
+ const denied = draftSkills(manifest)
163
+ .map((s) => `Skill(${s})`)
164
+ .join(" ");
165
+ const args = ["--append-system-prompt", BRIEF_DIRECTIVE];
166
+ if (denied) args.unshift("--disallowedTools", denied);
167
+ return args;
168
+ }
169
+
120
170
  /**
121
171
  * Build environment for a child process.
122
172
  * Merges the current process env with config-level env overrides.
@@ -170,6 +220,7 @@ export class AgentRunner {
170
220
  "--agent",
171
221
  agentName,
172
222
  "--print",
223
+ ...(await this.#postureArgs()),
173
224
  "-p",
174
225
  "Observe and act.",
175
226
  ];
package/src/kb-manager.js CHANGED
@@ -179,13 +179,11 @@ export class KBManager {
179
179
  }
180
180
 
181
181
  await this.#ensureDir(dest);
182
- for (const d of [
183
- "knowledge/People",
184
- "knowledge/Organizations",
185
- "knowledge/Projects",
186
- "knowledge/Topics",
187
- "knowledge/Briefings",
188
- ])
182
+ // Create the top-level roots only. `Knowledge/` is the shared graph (synced
183
+ // with the team); `Drafts/` and `Briefings/` are personal and local. Entity
184
+ // subdirectories (People, Organizations, ...) are created on demand by the
185
+ // skills that write into them.
186
+ for (const d of ["Knowledge", "Drafts", "Briefings"])
189
187
  await this.#ensureDir(join(dest, d));
190
188
 
191
189
  await this.copyBundledFiles(templateDir, dest);
package/src/outpost.js CHANGED
@@ -27,6 +27,13 @@ import { AgentRunner } from "./agent-runner.js";
27
27
  import { Scheduler, formatLocalTime } from "./scheduler.js";
28
28
  import { KBManager } from "./kb-manager.js";
29
29
  import { SocketServer, requestShutdown } from "./socket-server.js";
30
+ import {
31
+ readPosture,
32
+ writePosture,
33
+ effectivePosture,
34
+ loadManifest,
35
+ POSTURES,
36
+ } from "./posture.js";
30
37
 
31
38
  const SHARE_DIR = "/usr/local/share/fit-outpost";
32
39
 
@@ -65,6 +72,11 @@ function buildDefinition(version) {
65
72
  },
66
73
  { name: "validate", description: "Validate agent definitions exist" },
67
74
  { name: "status", description: "Show agent status" },
75
+ {
76
+ name: "posture",
77
+ args: "[brief|brief+draft]",
78
+ description: "Show or set the adoption posture (brief or brief+draft)",
79
+ },
68
80
  ],
69
81
  globalOptions: {
70
82
  help: { type: "boolean", short: "h", description: "Show this help" },
@@ -147,10 +159,12 @@ export async function run(runtime, version) {
147
159
  const OUTPOST_HOME = join(HOME, ".fit", "outpost");
148
160
  const CONFIG_PATH = join(OUTPOST_HOME, "scheduler.json");
149
161
  const STATE_PATH = join(OUTPOST_HOME, "state.json");
162
+ const POSTURE_PATH = join(OUTPOST_HOME, "posture.json");
150
163
  const LOG_DIR = join(OUTPOST_HOME, "logs");
151
164
  const CACHE_DIR = join(HOME, ".cache", "fit", "outpost");
152
165
  const SOCKET_PATH = join(OUTPOST_HOME, "outpost.sock");
153
166
  const PKG_DIR = dirname(import.meta.dirname);
167
+ const MANIFEST_PATH = join(PKG_DIR, "config", "skill-postures.json");
154
168
 
155
169
  // --- Logging ---------------------------------------------------------------
156
170
  await fs.mkdir(LOG_DIR, { recursive: true });
@@ -190,6 +204,7 @@ export async function run(runtime, version) {
190
204
  log,
191
205
  CACHE_DIR,
192
206
  runtime,
207
+ { posturePath: POSTURE_PATH, manifestPath: MANIFEST_PATH },
193
208
  );
194
209
  const scheduler = new Scheduler(
195
210
  loadConfig,
@@ -333,7 +348,12 @@ export async function run(runtime, version) {
333
348
  async function showStatus() {
334
349
  const config = await loadConfig();
335
350
  const state = await stateManager.load();
351
+ const posture = await readPosture(fs, POSTURE_PATH);
336
352
  logger.info("\nOutpost Scheduler\n==================\n");
353
+ // The posture must be observable on a line matching
354
+ // `^posture: (brief|brief+draft|unset)$`, so write it as plain text to
355
+ // stdout rather than through the RFC5424-prefixed logger.
356
+ proc.stdout.write(`posture: ${posture ?? "unset"}\n`);
337
357
 
338
358
  const agents = Object.entries(config.agents || {});
339
359
  if (agents.length === 0) {
@@ -440,6 +460,12 @@ export async function run(runtime, version) {
440
460
  proc.stderr.write(result.error + "\n");
441
461
  return result.code;
442
462
  }
463
+ // A fresh init defaults the posture to `brief`, the opted-into trust
464
+ // contract. Only write when none is recorded so re-running never flips
465
+ // an existing posture.
466
+ if ((await readPosture(fs, POSTURE_PATH)) === null) {
467
+ await writePosture(fs, POSTURE_PATH, "brief");
468
+ }
443
469
  return 0;
444
470
  },
445
471
  update: () => runUpdate(args),
@@ -449,6 +475,22 @@ export async function run(runtime, version) {
449
475
  },
450
476
  validate,
451
477
  status: showStatus,
478
+ posture: async () => {
479
+ if (!args[0]) {
480
+ const current = effectivePosture(await readPosture(fs, POSTURE_PATH));
481
+ proc.stdout.write(`posture: ${current}\n`);
482
+ return 0;
483
+ }
484
+ if (!POSTURES.includes(args[0])) {
485
+ cli.usageError(
486
+ `invalid posture "${args[0]}"; expected one of ${POSTURES.join(", ")}`,
487
+ );
488
+ return 2;
489
+ }
490
+ await writePosture(fs, POSTURE_PATH, args[0]);
491
+ logger.info(`Posture recorded: ${args[0]}`);
492
+ return 0;
493
+ },
452
494
  };
453
495
 
454
496
  const handler = COMMANDS[command];
package/src/posture.js ADDED
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Posture — read/write the adoption-posture record and resolve the
3
+ * draft-side deny set from the skill-posture manifest.
4
+ *
5
+ * The two committed posture strings are the only valid values; they appear
6
+ * verbatim in CLI flags, `status` output, and landing-page copy.
7
+ */
8
+
9
+ /** The two adoption postures, in the order the spec commits them. */
10
+ export const POSTURES = ["brief", "brief+draft"];
11
+
12
+ /** Default for a posture-less read (interim window / fresh-read fallback). */
13
+ export const DEFAULT_POSTURE = "brief";
14
+
15
+ /**
16
+ * Read the recorded posture from disk.
17
+ * @param {import("@forwardimpact/libutil/runtime").Runtime["fs"]} fs
18
+ * @param {string} posturePath - Path to `posture.json`.
19
+ * @returns {Promise<"brief"|"brief+draft"|null>} The recorded posture, or
20
+ * `null` when the file is absent or its contents are not a committed string.
21
+ */
22
+ export async function readPosture(fs, posturePath) {
23
+ try {
24
+ const raw = JSON.parse(await fs.readFile(posturePath, "utf8"));
25
+ return POSTURES.includes(raw?.posture) ? raw.posture : null;
26
+ } catch {
27
+ return null;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Persist a posture to disk. The record is its own file so the wake path can
33
+ * open it read-only and never alter the recorded posture.
34
+ * @param {import("@forwardimpact/libutil/runtime").Runtime["fs"]} fs
35
+ * @param {string} posturePath - Path to `posture.json`.
36
+ * @param {string} value - Must be one of {@link POSTURES}.
37
+ * @returns {Promise<void>}
38
+ */
39
+ export async function writePosture(fs, posturePath, value) {
40
+ if (!POSTURES.includes(value)) {
41
+ throw new Error(
42
+ `invalid posture "${value}"; expected one of ${POSTURES.join(", ")}`,
43
+ );
44
+ }
45
+ await fs.writeFile(posturePath, JSON.stringify({ posture: value }) + "\n");
46
+ }
47
+
48
+ /**
49
+ * Resolve the effective posture, applying the default when no posture has been
50
+ * recorded so a posture-less install behaves as `brief`.
51
+ * @param {"brief"|"brief+draft"|null} stored
52
+ * @returns {"brief"|"brief+draft"}
53
+ */
54
+ export function effectivePosture(stored) {
55
+ return stored ?? DEFAULT_POSTURE;
56
+ }
57
+
58
+ /**
59
+ * Load the skill-posture membership manifest.
60
+ * @param {import("@forwardimpact/libutil/runtime").Runtime["fs"]} fs
61
+ * @param {string} manifestPath - Path to `skill-postures.json`.
62
+ * @returns {Promise<Record<string, "brief"|"draft">>}
63
+ */
64
+ export async function loadManifest(fs, manifestPath) {
65
+ return JSON.parse(await fs.readFile(manifestPath, "utf8"));
66
+ }
67
+
68
+ /**
69
+ * The skills the manifest classifies as draft-side.
70
+ * @param {Record<string, "brief"|"draft">} manifest
71
+ * @returns {string[]} Skill names whose class is `"draft"`.
72
+ */
73
+ export function draftSkills(manifest) {
74
+ return Object.entries(manifest)
75
+ .filter(([, cls]) => cls === "draft")
76
+ .map(([name]) => name);
77
+ }
@@ -140,11 +140,7 @@ export class SocketServer {
140
140
  }
141
141
 
142
142
  if (agentConfig.kb) {
143
- const dir = join(
144
- this.#expandPath(agentConfig.kb),
145
- "knowledge",
146
- "Briefings",
147
- );
143
+ const dir = join(this.#expandPath(agentConfig.kb), "Briefings");
148
144
  if (this.#fsSync.existsSync(dir)) {
149
145
  const files = this.#fsSync
150
146
  .readdirSync(dir)
@@ -12,6 +12,20 @@ You are the chief of staff — the user's executive assistant. Each wake:
12
12
  synthesize what matters across email, calendar, and the knowledge graph into a
13
13
  single briefing.
14
14
 
15
+ ## Priorities
16
+
17
+ `Knowledge/Priorities/` is the backbone of every briefing. Read it each wake (it
18
+ is also listed under Inputs) and frame the whole briefing around what advances or
19
+ threatens the user's priorities.
20
+
21
+ - **Always consider them.** Tie the schedule, the top actions, and the pipeline
22
+ back to the priority each one serves.
23
+ - **Always escalate risks.** Consolidate every `## Priority Watch` flag from the
24
+ sibling triage files — plus anything you find in your own reads — into a
25
+ `## Priority Watch` section in the briefing, each item naming the priority, the
26
+ evidence, and the risk. A signal that could contradict, block, or slow a
27
+ priority is the most important thing the briefing surfaces.
28
+
15
29
  ## Inputs
16
30
 
17
31
  Read all five sibling agents' triage files before writing — these are the
@@ -23,22 +37,23 @@ authoritative current-state summaries:
23
37
  - `~/.cache/fit/outpost/state/recruiter_triage.md`
24
38
  - `~/.cache/fit/outpost/state/head_hunter_triage.md`
25
39
 
26
- Plus directly: `knowledge/Goals/`, `knowledge/Priorities/`, `drafts/`,
40
+ Plus directly: `Knowledge/Priorities/`, `Drafts/`,
27
41
  `~/.cache/fit/outpost/apple_calendar/`, and unchecked `- [ ]` items in
28
- `knowledge/`.
42
+ `Knowledge/`.
29
43
 
30
44
  ## Routing
31
45
 
32
46
  | Trigger | Output |
33
47
  | -------------- | -------------------------------------------------- |
34
- | Before noon | `knowledge/Briefings/{YYYY-MM-DD}-morning.md` |
35
- | Noon or later | `knowledge/Briefings/{YYYY-MM-DD}-evening.md` |
48
+ | Before noon | `Briefings/{YYYY-MM-DD}-morning.md` |
49
+ | Noon or later | `Briefings/{YYYY-MM-DD}-evening.md` |
36
50
 
37
51
  A briefing covers: today's schedule with prep status, top three priority actions
38
- linked to `[[Priorities/...]]`, goal progress, inbox snapshot (urgent / awaiting
39
- reply), open commitments, recruitment pipeline summary, and a heads-up section.
40
- Evening briefings replace "Priority Actions" with "What Happened Today" and
41
- "Still Outstanding".
52
+ linked to `[[Priorities/...]]`, priority progress, a **Priority Watch** section
53
+ consolidating priority risks flagged by the agents, inbox snapshot (urgent /
54
+ awaiting reply), open commitments, recruitment pipeline summary, and a heads-up
55
+ section. Evening briefings replace "Priority Actions" with "What Happened Today"
56
+ and "Still Outstanding".
42
57
 
43
58
  ## Scope
44
59
 
@@ -51,5 +66,5 @@ Evening briefings replace "Priority Actions" with "What Happened Today" and
51
66
 
52
67
  ```
53
68
  Decision: {morning/evening} briefing — {key insight about today}
54
- Action: Created knowledge/Briefings/{YYYY-MM-DD}-{morning|evening}.md
69
+ Action: Created Briefings/{YYYY-MM-DD}-{morning|evening}.md
55
70
  ```
@@ -16,6 +16,19 @@ You are the concierge — the user's scheduling assistant. Each wake: keep the
16
16
  calendar current, prepare for upcoming meetings, and process completed meeting
17
17
  recordings.
18
18
 
19
+ ## Priorities
20
+
21
+ At the start of every wake, before acting, read `Knowledge/Priorities/`. The
22
+ user's priorities are the lens for all your work this wake.
23
+
24
+ - **Always consider them.** Weigh each action against whether it advances a
25
+ priority, and favour work that does.
26
+ - **Always flag risks.** When you encounter a chat, email, transcript, or any
27
+ other signal that could **contradict, block, or slow** a priority, record it
28
+ under a `## Priority Watch` heading in your triage report — name the priority,
29
+ quote the evidence, and state the risk — and echo it in the `Priority Watch`
30
+ line of your output. Never let such a signal pass silently.
31
+
19
32
  ## Routing
20
33
 
21
34
  | Trigger | Skill |
@@ -43,4 +56,5 @@ After acting, emit exactly:
43
56
  ```
44
57
  Decision: {what you observed and why you chose this action}
45
58
  Action: {what you did, e.g. "meeting-prep for 2pm with Sarah Chen"}
59
+ Priority Watch: {priority at risk + one-line why, or "none"}
46
60
  ```