Refactor AI workspace for improved context management and communication integration

- Introduced new commands and skills for workspace memory curation, professional communication, and status reporting.
- Updated existing commands to utilize new skills and improve clarity in instructions.
- Created a new workspace context command to load reusable core and active project profile.
- Enhanced Mattermost inbox integration with support for generic environment variables.
- Established a clear separation between project-independent core logic and project-specific profiles.
- Improved documentation across various files to reflect changes in workflow and command usage.
- Added operational memory management rules to ensure accurate context promotion and correction.
- Updated README and workflow documents to guide users in utilizing the new structure effectively.
This commit is contained in:
2026-04-16 08:35:53 -06:00
parent 1f57597ca3
commit 8026da5719
41 changed files with 1131 additions and 42 deletions

View File

@@ -10,6 +10,8 @@ Your job is not only to answer prompts, but to keep the workspace context accura
Behavior rules:
- Treat `core/` as the reusable project-independent operating model.
- Treat `profiles/fidelity/profile.md` as the active Fidelity project profile.
- Treat `README.md`, `ai/context/`, `ai/state/`, `knowledge/`, and `ai/logs/` as the persistent memory of the project.
- Before answering a prompt that depends on current state, verify the latest relevant files instead of relying only on conversation history.
- If the prompt asks for the latest Mattermost message, the last message from Jeff/current manager, or what someone just said, force a Mattermost refresh before answering and do not rely on stale inbox context.
@@ -30,6 +32,7 @@ Behavior rules:
- role-to-person mapping and recurring stakeholders go to `ai/context/people/`
- confirmed decisions go to `ai/context/decisions/`
- behavioral rules for how this workspace should respond go to the exact command, prompt, agent, skill, or knowledge file that enforces that behavior
- Use generic `AIW_*` integration variables for new tooling and keep `FIDELITY_*` only as compatibility aliases.
- Default to writing new same-day information to today's log unless a more durable destination is clearly better.
- Update preexisting memory when a new prompt clarifies or corrects something already stored.
- Do not wait for a dedicated sync command if the correct memory update is already obvious.

View File

@@ -0,0 +1,36 @@
---
description: Generic AI workspace agent for project-independent operational memory
mode: primary
temperature: 0.1
---
You are the generic AI workspace agent.
Your job is to answer prompts and maintain the workspace as living operational memory.
Behavior rules:
- Load `core/` first for project-independent operating rules.
- Load the active profile from `AIW_PROJECT_PROFILE` when available; otherwise use the configured project files in this workspace.
- Treat `ai/context/`, `ai/state/`, `ai/work-items/`, `ai/logs/`, `knowledge/`, and profile files as persistent memory.
- Before answering current-state questions, inspect current state, active work items, recent logs, and inbox evidence when available.
- For any meaningful prompt, decide whether it adds, corrects, or invalidates memory.
- Update the smallest correct canonical file when memory should change.
- If the user corrects recurring behavior, update the command, prompt, agent, skill, or knowledge file that controls that behavior.
- Keep imported evidence separate from promoted memory.
- If an integration or sync command fails, do not update project memory from that failure.
- Do not promote tooling noise, empty syncs, dependency failures, or generic chat chatter unless the user explicitly asks to track tooling work.
- Prefer generic `AIW_*` integration variables and support project-specific aliases only as compatibility.
- When drafting communication, preserve technical meaning, state scope clearly, and write in natural professional English.
Memory destinations:
- daily facts -> `ai/logs/YYYY-MM-DD.md`
- current priorities -> `ai/state/current.md`
- active work items -> `ai/work-items/*.md`
- active-work summary -> `ai/state/work-items.md`
- durable project knowledge -> `ai/context/`
- people and roles -> `ai/context/people/`
- confirmed decisions -> `ai/context/decisions/`
- reusable behavior -> `.opencode/commands/`, `prompts/`, `.opencode/agents/`, `.opencode/skills/`, `knowledge/`, or `ai/context/process/`

View File

@@ -0,0 +1,43 @@
---
description: Generate a self-contained prompt for another AI assistant
---
Generate a high-quality prompt for another AI assistant that may not have access to this workspace memory.
Read:
@core/README.md
@core/memory/operational-memory.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md
@ai/context/process/ai-to-ai-prompting.md
@ai/work-items/index.md
@ai/state/current.md
@ai/state/work-items.md
@knowledge/communication-rules.md
Read active profile, if present:
!`profile="${AIW_PROJECT_PROFILE:-fidelity}"; if [ -f "profiles/$profile/profile.md" ]; then cat "profiles/$profile/profile.md"; elif [ -f profiles/fidelity/profile.md ]; then cat profiles/fidelity/profile.md; else echo "No profile file found."; fi`
Relevant active work item files, if available:
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
User request:
$ARGUMENTS
Instructions:
- use `ai-prompt-engineering` when available
- make the prompt self-contained
- include only relevant project context
- tell the target AI what to inspect before changing code or producing conclusions
- include constraints, non-goals, expected output, and validation expectations
- include work-item IDs and approved titles when relevant
- do not assume the target AI can read this workspace
- do not invent file paths if the implementation repository is not available here
Return only the prompt unless the user asks for explanation.

View File

@@ -0,0 +1,62 @@
---
description: Import a historical communication archive and refine workspace memory
---
Use a historical communication export as archive evidence for the workspace.
Interpret this as historical recovery, not as current truth and not as model training.
Inputs:
- `$ARGUMENTS` may contain an export path, channel names, or date filters
- if no explicit path is given, use `AIW_SLACK_EXPORT_PATH` when available
- compatibility fallback: `FIDELITY_SLACK_EXPORT_PATH`
- otherwise, if `archives/slack/export/` exists, use it as the default import source
- if no channels are specified, auto-detect channels using `AIW_CHANNEL_PREFIX`
- compatibility/default prefix: `fidelity`
Run the importer:
!`prefix="${AIW_CHANNEL_PREFIX:-fidelity}"; if [ -n "$ARGUMENTS" ]; then python3 scripts/slack/import_slack_export.py $ARGUMENTS; elif [ -n "$AIW_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$AIW_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -n "$FIDELITY_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$FIDELITY_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -d archives/slack/export ]; then python3 scripts/slack/import_slack_export.py --export-path archives/slack/export --channel-prefix "$prefix"; else echo "Provide archive import arguments, set AIW_SLACK_EXPORT_PATH, set FIDELITY_SLACK_EXPORT_PATH, or place an extracted export in archives/slack/export."; fi`
Read:
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md
@ai/context/process/context-maintenance.md
@ai/context/people/index.md
@ai/context/people/manager.md
@ai/work-items/index.md
@ai/state/current.md
@ai/state/work-items.md
@knowledge/agent-memory-rules.md
@knowledge/memory-promotion-rules.md
Imported summary, if present:
!`if [ -s scripts/slack/generated/slack_summary.md ]; then cat scripts/slack/generated/slack_summary.md; else echo "No archive summary generated."; fi`
Imported archive context, if present:
!`if [ -s scripts/slack/generated/slack_context.jsonl ]; then cat scripts/slack/generated/slack_context.jsonl; else echo "No archive context generated."; fi`
Instructions:
- treat the archive as historical evidence
- promote durable project-relevant context automatically when confidence is high
- prefer durable role/person associations, recurring architecture patterns, repeated work-item references, approval/scope history, and process lessons
- create or update person files when a human repeatedly affects project flow
- avoid promoting outdated daily status unless it changes current understanding
- update existing memory when the archive clarifies or corrects it
- keep ambiguous or likely outdated facts as archive-only context
Return:
1. What was imported
2. Which files were updated
3. Which historical facts were promoted or intentionally left as archive-only context

View File

@@ -0,0 +1,52 @@
---
description: Sync live communication context and promote high-confidence memory
---
Use the configured live communication connector to fetch fresh evidence and maintain workspace memory automatically.
Preferred command sources:
- `AIW_MATTERMOST_SYNC_CMD`
- compatibility fallback: `FIDELITY_MATTERMOST_SYNC_CMD`
- workspace fallback: `bash scripts/mattermost/sync.sh`
Run the connector:
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No live communication sync command is configured."; fi`
Read:
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md
@ai/context/process/context-maintenance.md
@ai/work-items/index.md
@ai/state/current.md
@ai/state/work-items.md
@knowledge/memory-promotion-rules.md
Fresh communication evidence:
!`if [ -s ai/inbox/mattermost-latest.md ]; then cat ai/inbox/mattermost-latest.md; elif [ -s scripts/mattermost/generated/mattermost_context.jsonl ]; then cat scripts/mattermost/generated/mattermost_context.jsonl; else echo "No communication evidence available."; fi`
Instructions:
- if the sync command failed, stop and do not edit workspace memory
- treat connector output as evidence, not automatically as project truth
- promote only explicit, project-relevant, high-confidence facts
- default destination is `ai/logs/$(date +%F).md`
- update `ai/state/current.md` only for facts that materially change the active work window
- update `ai/work-items/*.md` for explicit work-item IDs, approved titles, points, scope, and status notes
- keep `ai/state/work-items.md` aligned as the compact summary of active work items
- do not write tooling noise, sync status, or generic chat chatter into project memory
- if a fact is ambiguous, skip it rather than asking what to do
Return:
1. What was synchronized
2. Which files were updated
3. Which facts were promoted or intentionally skipped

View File

@@ -6,6 +6,8 @@ Generate a prompt that the user can send to GitHub Copilot or another AI assista
Read:
@core/README.md
@core/memory/operational-memory.md
@prompts/copilot-prompt.md
@ai/AGENTS.md
@ai/context/process/ai-to-ai-prompting.md
@@ -19,6 +21,10 @@ Read:
@ai/state/current.md
@ai/state/work-items.md
Active profile, if present:
!`profile="${AIW_PROJECT_PROFILE:-fidelity}"; if [ -f "profiles/$profile/profile.md" ]; then cat "profiles/$profile/profile.md"; elif [ -f profiles/fidelity/profile.md ]; then cat profiles/fidelity/profile.md; else echo "No profile file found."; fi`
Detailed active work item files, if available:
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
@@ -29,7 +35,7 @@ $ARGUMENTS
Instructions:
- Use the `copilot-prompt-engineering` skill if available.
- Use `ai-prompt-engineering` and `copilot-prompt-engineering` if available.
- Generate a self-contained prompt for the target AI.
- Include only context relevant to the request.
- Include Jira ID/title when the task maps to an active work item.

View File

@@ -7,6 +7,10 @@ Load and internalize the active context for this Fidelity workspace before answe
Use these files as the baseline context:
@README.md
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@profiles/fidelity/profile.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md

View File

@@ -13,7 +13,7 @@ Use this when the user asks for:
Run sync:
!`if [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
Read refreshed Mattermost context:
@@ -27,7 +27,7 @@ Instructions:
- Do not answer from old conversation memory.
- Use only the refreshed Mattermost output above.
- If the user asks for Jeff/current manager, filter messages by `jeff`, `jeff.dewitte`, or the current manager profile when visible.
- If the user asks for the current manager/stakeholder, filter messages by the profile mapping when visible; for the Fidelity profile, also match `jeff` and `jeff.dewitte`.
- If multiple messages match, return the newest matching message first.
- Include timestamp, channel, sender, and concise summary.
- If the message changes project context, update the appropriate workspace memory after answering.

View File

@@ -7,6 +7,8 @@ Use this command for quick same-day note capture.
Read:
@README.md
@core/README.md
@core/memory/operational-memory.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md
@@ -28,6 +30,7 @@ $ARGUMENTS
Instructions:
- use `workspace-memory-curation` when available
- Update or create `ai/logs/$(date +%F).md`
- Preserve concrete technical meaning
- Capture both technical findings and communication context when relevant

View File

@@ -4,6 +4,8 @@ description: Draft or polish a Mattermost update for the current manager or stak
Draft a concise Mattermost message for the current manager or stakeholder in natural, manager-ready US English.
Use `professional-communication` when available.
Read:
@prompts/manager-update.md

View File

@@ -6,12 +6,13 @@ Use the configured Mattermost sync command to fetch fresh communication context
Preferred command sources:
- `FIDELITY_MATTERMOST_SYNC_CMD`
- `AIW_MATTERMOST_SYNC_CMD`
- compatibility fallback: `FIDELITY_MATTERMOST_SYNC_CMD`
- fallback: `bash scripts/mattermost/sync.sh`
Run the command and use its output as fresh communication context:
!`if [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
Use this command implicitly when the user asks for the latest or last Mattermost message, especially messages from Jeff or the current manager.
@@ -21,6 +22,7 @@ Then:
- use `ai/inbox/mattermost-latest.md` if it exists and is non-empty
- otherwise use `scripts/mattermost/generated/mattermost_context.jsonl` if it exists and is non-empty
- apply the memory promotion rules from `knowledge/memory-promotion-rules.md`
- treat Mattermost output as live communication evidence; the agent decides what becomes promoted memory
- automatically promote explicit, project-relevant, high-confidence facts
- default destination is `ai/logs/$(date +%F).md`
- update `ai/state/current.md` only for facts that materially change the current work window

View File

@@ -6,6 +6,8 @@ Use this only when you want an explicit manual promotion pass.
Read:
@core/README.md
@core/memory/operational-memory.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md

View File

@@ -9,20 +9,25 @@ Interpret this as historical recovery, not as current truth and not as model tra
Inputs:
- `$ARGUMENTS` may contain an export path, channel names, or date filters
- if no explicit path is given in the arguments, use `FIDELITY_SLACK_EXPORT_PATH` when available
- if no explicit path is given in the arguments, use `AIW_SLACK_EXPORT_PATH` when available
- compatibility fallback: `FIDELITY_SLACK_EXPORT_PATH`
- otherwise, if `archives/slack/export/` exists, use it as the default import source
- if no channels are specified, auto-detect channels whose folder names start with `fidelity`
- if no channels are specified, auto-detect channels using `AIW_CHANNEL_PREFIX`
- compatibility/default prefix: `fidelity`
- if no message limit is specified, auto-tune message selection based on archive size
- if no date range is specified, do an initial full-history sweep across the detected `fidelity*` channels
- preserve broad coverage across years and channels while still prioritizing high-signal messages
First, run the importer:
!`if [ -n "$ARGUMENTS" ]; then python3 scripts/slack/import_slack_export.py $ARGUMENTS; elif [ -n "$FIDELITY_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$FIDELITY_SLACK_EXPORT_PATH" --channel-prefix fidelity; elif [ -d archives/slack/export ]; then python3 scripts/slack/import_slack_export.py --export-path archives/slack/export --channel-prefix fidelity; else echo "Provide Slack import arguments, set FIDELITY_SLACK_EXPORT_PATH, or place an extracted export in archives/slack/export."; fi`
!`prefix="${AIW_CHANNEL_PREFIX:-fidelity}"; if [ -n "$ARGUMENTS" ]; then python3 scripts/slack/import_slack_export.py $ARGUMENTS; elif [ -n "$AIW_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$AIW_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -n "$FIDELITY_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$FIDELITY_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -d archives/slack/export ]; then python3 scripts/slack/import_slack_export.py --export-path archives/slack/export --channel-prefix "$prefix"; else echo "Provide Slack import arguments, set AIW_SLACK_EXPORT_PATH, set FIDELITY_SLACK_EXPORT_PATH, or place an extracted export in archives/slack/export."; fi`
Read:
@ai/AGENTS.md
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@ai/context/index.md
@ai/context/project.md
@ai/context/systems/index.md
@@ -46,7 +51,7 @@ Imported Slack context, if present:
Instructions:
- treat the Slack archive as historical evidence
- treat the Slack archive as historical evidence, not promoted memory by itself
- assume this may be a large multi-year export
- assume the first import should preserve evidence from the beginning of the project, not just recent history
- promote durable project-relevant context automatically when confidence is high

View File

@@ -43,6 +43,7 @@ Detailed active work item files, if available:
Before drafting:
- use `status-reporting` when available
- update workspace memory if the refreshed context introduced clear high-confidence project facts
- prefer existing memory when the latest context is ambiguous
- treat the previous workday Mattermost context as the source for the `Yesterday` section, even when the previous calendar day was a weekend, holiday, or OOO day

View File

@@ -18,6 +18,8 @@ $ARGUMENTS
Read:
@core/README.md
@core/memory/operational-memory.md
@prompts/story-draft.md
@ai/AGENTS.md
@ai/context/index.md
@@ -47,6 +49,7 @@ Detailed active work item files, if available:
Requirements:
- Use `professional-communication` when available.
- Preserve the exact technical meaning of the input
- Rewrite fully when needed so the output sounds like a fluent senior engineer wrote it
- Choose the most appropriate story framing: bug, enhancement, spike, task, or follow-up

View File

@@ -34,6 +34,7 @@ $ARGUMENTS
Instructions:
- use `workspace-memory-curation` when available
- Decide whether the new information belongs in:
- today's log
- `ai/state/current.md`

View File

@@ -4,6 +4,8 @@ description: Rewrite rough engineering notes into natural Mattermost-ready US En
Rewrite and tighten the following rough notes into concise, natural, Mattermost-ready US English.
Use `professional-communication` when available.
Do not translate literally.
Rewrite fully when needed so the result sounds like a fluent senior engineer wrote it.

View File

@@ -0,0 +1,63 @@
---
description: Load reusable AI workspace core plus the active project profile
---
Load and internalize the reusable workspace core and the active project context before answering follow-up questions.
Read core:
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@core/profiles/create-project-profile.md
Read active workspace memory:
@README.md
@ai/AGENTS.md
@ai/context/index.md
@ai/context/project.md
@ai/context/process/communication.md
@ai/context/process/context-maintenance.md
@ai/context/people/manager.md
@ai/context/people/index.md
@ai/work-items/index.md
@ai/state/current.md
@ai/state/work-items.md
@knowledge/workspace-model.md
@knowledge/communication-rules.md
@knowledge/agent-memory-rules.md
@knowledge/memory-promotion-rules.md
Read active profile, preferring the configured profile and falling back to Fidelity:
!`profile="${AIW_PROJECT_PROFILE:-fidelity}"; if [ -f "profiles/$profile/profile.md" ]; then cat "profiles/$profile/profile.md"; elif [ -f profiles/fidelity/profile.md ]; then cat profiles/fidelity/profile.md; else echo "No profile file found."; fi`
Today's date:
!`date +%F`
Today's log, if present:
!`if [ -f ai/logs/$(date +%F).md ]; then cat ai/logs/$(date +%F).md; else echo "No log exists for today yet."; fi`
Recent logs available:
!`ls -1 ai/logs 2>/dev/null | sort | tail -n 5`
Detailed active work item files, if available:
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
Latest communication inbox, if available:
!`if [ -s ai/inbox/mattermost-latest.md ]; then cat ai/inbox/mattermost-latest.md; elif [ -s scripts/mattermost/generated/mattermost_context.jsonl ]; then cat scripts/mattermost/generated/mattermost_context.jsonl; else echo "No live communication context available."; fi`
Respond with:
1. Current context
2. Communication risks
3. Missing context to capture today
Keep the response concise, then wait for the next request.

View File

@@ -14,6 +14,10 @@ export const FidelityCompaction = async ({ directory }) => {
"experimental.session.compacting": async (_input, output) => {
const baseFiles = [
"README.md",
"core/README.md",
"core/memory/operational-memory.md",
"core/integrations/communication-model.md",
"profiles/fidelity/profile.md",
"ai/context/index.md",
"ai/context/project.md",
"ai/context/ios/index.md",
@@ -63,7 +67,7 @@ export const FidelityCompaction = async ({ directory }) => {
if (sections.length > 0) {
output.context.push(
[
"## Fidelity Workspace Persistent Context",
"## AI Workspace Persistent Context",
"Preserve this operational memory across compaction.",
"If later messages introduced corrections or durable facts, prefer the corrected view over stale summaries.",
"",

View File

@@ -14,7 +14,9 @@ function nowIso() {
}
async function resolveSyncCommand(directory) {
const configured = process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
const configured =
process.env.AIW_MATTERMOST_SYNC_CMD?.trim() ||
process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
if (configured) return configured
const fallbackScript = path.join(directory, "scripts/mattermost/sync.sh")
@@ -96,14 +98,34 @@ function requiresFreshMattermost(promptText) {
"mensajes",
"message",
"messages",
"jeff",
"manager",
"stakeholder",
"supervisor",
"lead",
"inbox",
]
const configuredTerms = [
process.env.AIW_COMMUNICATION_FRESH_TERMS,
process.env.AIW_MANAGER_NAME,
process.env.AIW_PRIMARY_STAKEHOLDER,
process.env.FIDELITY_MANAGER_NAME,
"jeff",
"fidelity-preguntas",
]
.filter(Boolean)
.flatMap((value) => String(value).split(","))
.map((value) => value.trim().toLowerCase())
.filter(Boolean)
const sourceTerms = [
...mattermostTerms,
...configuredTerms,
]
return (
freshnessTerms.some((term) => text.includes(term)) &&
mattermostTerms.some((term) => text.includes(term))
sourceTerms.some((term) => text.includes(term))
)
}
@@ -120,7 +142,9 @@ export const MattermostInbox = async ({ $, directory, client }) => {
if (!command) return
const intervalMinutes = Number.parseInt(
process.env.FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES || "15",
process.env.AIW_MATTERMOST_SYNC_INTERVAL_MINUTES ||
process.env.FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES ||
"15",
10,
)
const minIntervalMs = Math.max(1, Number.isNaN(intervalMinutes) ? 15 : intervalMinutes) * 60 * 1000
@@ -133,6 +157,12 @@ export const MattermostInbox = async ({ $, directory, client }) => {
const latestPath = path.join(inboxDir, "mattermost-latest.md")
const statusPath = path.join(inboxDir, "mattermost-status.json")
const commandSource = process.env.AIW_MATTERMOST_SYNC_CMD?.trim()
? "aiw-env"
: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
? "fidelity-env"
: "workspace-default"
try {
await mkdir(inboxDir, { recursive: true })
const stdoutText = await $`bash -lc ${command}`.text()
@@ -153,7 +183,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
forced: Boolean(options.force),
changed: previous !== `${output}\n` && previous !== output,
commandConfigured: true,
commandSource: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim() ? "env" : "workspace-default",
commandSource,
})
} else {
await writeStatus(statusPath, {
@@ -162,7 +192,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
forced: Boolean(options.force),
changed: false,
commandConfigured: true,
commandSource: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim() ? "env" : "workspace-default",
commandSource,
note: "Sync command returned no output.",
})
}
@@ -173,7 +203,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
forced: Boolean(options.force),
changed: false,
commandConfigured: true,
commandSource: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim() ? "env" : "workspace-default",
commandSource,
error: error instanceof Error ? error.message : String(error),
})

View File

@@ -0,0 +1,26 @@
---
name: ai-prompt-engineering
description: Create self-contained prompts for another AI assistant that lacks access to this workspace memory.
compatibility: opencode
---
## When To Use
Use this skill when the user wants a prompt for another AI assistant, coding agent, review tool, or implementation environment.
## Workflow
1. Identify target task type: investigation, implementation, review, testing, debugging, or documentation.
2. Pull only relevant workspace context.
3. Make the prompt self-contained.
4. Tell the target AI what to inspect before acting.
5. State constraints, non-goals, expected output, and validation expectations.
6. Avoid invented file paths when the implementation repository is not available.
## Output Rules
- Return only the prompt unless the user asks for commentary.
- Prefer clear sections over long prose.
- Include work-item ID and title when relevant.
- Make assumptions explicit.

View File

@@ -0,0 +1,24 @@
---
name: professional-communication
description: Rewrite rough technical notes into clear, concise, stakeholder-ready professional English while preserving scope and technical meaning.
compatibility: opencode
---
## When To Use
Use this skill for manager updates, stakeholder messages, translations, issue clarification, Jira comments, and communication polishing.
## Workflow
1. Identify audience, purpose, scope, and requested action.
2. Preserve technical meaning and uncertainty.
3. Make ownership, reproducibility, environment, and next action explicit when relevant.
4. Use Context, Observation, Action when it improves readability.
5. Avoid vague comparisons and generic progress language.
## Output Rules
- Write natural professional US English.
- Keep messages concise enough for workplace chat unless the user asks for a longer document.
- Do not invent facts, evidence, or commitments.

View File

@@ -0,0 +1,25 @@
---
name: status-reporting
description: Generate work-item-aware standups and status summaries from current workspace memory, recent logs, and communication evidence.
compatibility: opencode
---
## When To Use
Use this skill for standups, daily scrum updates, end-of-day summaries, and short progress reports.
## Workflow
1. Read current state, active work items, recent logs, and latest communication evidence.
2. Use the previous workday as the default source for "Yesterday" style updates.
3. Group updates by work item when possible.
4. If one work item has multiple concrete updates, use one top-level work-item bullet with indented markdown sub-bullets.
5. Exclude side chatter unless it changed work scope, priority, risk, or blockers.
## Output Rules
- Use explicit work-item ID and title when available.
- Keep the report concise and ready to send.
- Do not mention internal evidence sources unless the user asks.
- Use `Blockers: None` only when no blocker is visible in current memory.

View File

@@ -0,0 +1,25 @@
---
name: workspace-memory-curation
description: Maintain file-based operational memory by deciding what to log, promote, correct, or route into tool behavior across reusable AI workspaces.
compatibility: opencode
---
## When To Use
Use this skill when new information may change workspace memory, project state, work-item context, people context, decisions, or reusable agent/tool behavior.
## Workflow
1. Read `core/memory/operational-memory.md`.
2. Classify the information as daily, state, work-item, stable-context, people, decision, or tooling-behavior.
3. Update the smallest correct canonical file.
4. If new information corrects older memory, replace or refine the stale statement instead of appending a contradiction.
5. If a correction affects future output, update the command, prompt, agent, skill, or knowledge file that controls that behavior.
6. Keep imported evidence separate from promoted memory.
## Output Rules
- Report updated files and the memory change.
- Preserve uncertainty when confidence is mixed.
- Do not promote tool failures, sync noise, or generic chat chatter as project facts.