agentleFS
egdev6egdev6/discord-project-manager/skills/discord-approval-gate/SKILL.md

discord-approval-gate

Skill4 starsChanged 5 months agoMITView on GitHub

Trigger: Discord save, write, update, remember, store, queue, ledger, publish, schedule. Gate persistent writes.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for any Discord-originated request that includes save, write, update, remember, store, queue, ledger, publish, or schedule …

    line 12
  2. Very specific:

    Treat save, write, update, remember, store, queue, ledger, publish, and schedule as write-like until proven safe.

    line 18
  3. Distinctive:

    Before explicit approval, do not call file, memory, ledger, queue, publishing, scheduling, or workspace persistence tools.

    line 19
  4. Very specific:

    If the operator replies revise: <instruction>, produce a revised proposal and ask again.

    line 23
  5. Very specific:

    If the operator replies reject, stop without persistence and summarize what did not happen.

    line 24
  6. Distinctive:

    After approval, write only the displayed target namespaces and keep publishing, scheduling, Buffer, and unrelated memory out of scope …

    line 25
  7. Distinctive:

    Do not store secrets, raw private transcripts, real exports, private payload dumps, or unredacted Discord IDs in durable project memory.

    line 26
  8. Distinctive:

    Keep the pre-approval audit trail in the response unless the runtime provides explicitly non-durable channel-local scratch state.

    line 45
  9. Very specific:

    After approve write, perform the approved write and record the final sanitized audit trail.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Activation Contract

Use this skill for any Discord-originated request that includes save, write, update, remember, store, queue, ledger, publish, or schedule intent, or otherwise may persist state.

Also use it when a route-resolved skill proposes writes to project, network, strategy, brand, content-ledger, or runtime workspace state.

Hard Rules

  • Treat save, write, update, remember, store, queue, ledger, publish, and schedule as write-like until proven safe.
  • Before explicit approval, do not call file, memory, ledger, queue, publishing, scheduling, or workspace persistence tools.
  • The first response must be proposal or approval-requested; show the exact target namespace, runtime audit namespace, and change summary.
  • User-facing proposal prose must match the current Discord message language. Keep technical tokens, namespaces, schema keys, and the exact approval phrase approve write in English.
  • Accept only the exact phrase approve write as approval. Treat silence, emoji, and unrelated replies as no approval.
  • If the operator replies revise: <instruction>, produce a revised proposal and ask again.
  • If the operator replies reject, stop without persistence and summarize what did not happen.
  • After approval, write only the displayed target namespaces and keep publishing, scheduling, Buffer, and unrelated memory out of scope unless separately approved.
  • Do not store secrets, raw private transcripts, real exports, private payload dumps, or unredacted Discord IDs in durable project memory.
  • For durable write proposals and decisions, emit a sanitized audit_record with actor role/ref, target, decision state, validation result, and rollback/restore hint.

Decision Gates

SituationResponse
Matched route + write-like requestAsk for approve write before any persistence.
Unmapped routeDo not read or write durable project memory; ask for an approved route.
Read-only questionAnswer from allowed context without proposing writes.
Approval phrase receivedPersist only the previously displayed change and displayed namespaces.
Revision or rejectionNo persistence; revise proposal or stop.

Execution Steps

  1. Resolve runtime context as discord-project-manager/runtime/discord/<guild-id>/<channel-id> without exposing raw IDs in repo artifacts.
  2. Resolve durable read candidates only when the route is matched.
  3. Classify the request as read-only or write-like.
  4. For write-like requests, return the approval prompt from docs/operations/discord-approval-responses.md.
  5. Keep the pre-approval audit trail in the response unless the runtime provides explicitly non-durable channel-local scratch state.
  6. After approve write, perform the approved write and record the final sanitized audit trail.
  7. For revise: <instruction> or reject, record only the sanitized decision metadata; do not persist the proposed private payload.

Output Contract

For write-like requests, return localized user-facing prose plus stable technical tokens:

user_message_language: <language-code>
prose_reply_language: <same-language-code>
technical_tokens_language: en
language_policy: prose-matches-current-message; technical-tokens-stay-english

<Localized heading, e.g. Proposed durable update / Propuesta de actualización durable>
Route: <project>/<network>
Runtime context: discord-project-manager/runtime/discord/<guild-id>/<channel-id>
Target namespace: <namespace-key>
Runtime audit namespace: discord-project-manager/runtime/discord/<guild-id>/<channel-id>
<Localized Change summary label>: <one-sentence summary>
<Localized Risk boundary label>: <what this does not do>
<Localized Audit record label>: <sanitized audit_record ref or inline sanitized audit summary>

<Localized approval instruction>:
- approve write
- revise: <instruction>
- reject

For Spanish Discord messages, the proposal prose must be Spanish while the option literals remain exactly approve write, revise: <instruction>, and reject.

References

  • docs/operations/discord-approval-responses.md
  • docs/operations/discord-routing.md
  • docs/architecture/discord-durable-change-audit.md
  • docs/architecture/channel-context-namespace-mapping.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.