SuperAPI AI Directory

madspec-policy-engine

General & other

View repository

Updated 10-15 21:05

About this skill

madspec-policy-engine

When to use

Use this skill when the user asks to:

  • show the current project rules
  • propose or change a project rule
  • retire an outdated rule
  • explain why a rule affects the process
  • check the branch state via madspec policy validate

Language and style

  • In Russian-language responses, do not mix Russian and English without explicit necessity.
  • Use English only for command names, paths, files, APIs, and other exact identifiers.
  • Before finishing, be sure to reread the response and remove inappropriate anglicisms, calques, and mixed constructions.

Canonical workflow

  1. Read the current state via madspec policy show --json-output.
  2. If you need to change the rules, first create a proposal via madspec policy propose.
  3. Show the user a preliminary comparison and warnings.
  4. Apply the change only via madspec policy apply or madspec policy set.
  5. After applying the change, if necessary, run madspec policy validate.

Source of truth

  • .madspec/system/policy/state.json
  • .madspec/system/policy/proposals.jsonl
  • .madspec/system/policy/history.jsonl

policy.md and the rule sections inside the branch's derived artifacts are derived representations.

Constraints E1

  • The rules layer is shared across the entire project and does not support local overrides at the branch level
  • Only supported process invariants are enforced
  • Unsupported ruleType is automatically normalized into a recommendation with mode guideline
  • System rules are read-only and must not be changed through the user process

Useful commands

madspec policy show --json-output
madspec policy propose --policy-id ... --title ... --description ...
madspec policy apply --proposal-id ...
madspec policy deprecate --policy-id ...
madspec policy validate --stage mvp.plan --toon-output
madspec policy explain --policy-id ... --json-output