constitution

📁 rsmdt/the-startup 📅 11 days ago
13
总安装量
12
周安装量
#24709
全站排名
安装命令
npx skills add https://github.com/rsmdt/the-startup --skill constitution

Agent 安装分布

opencode 12
gemini-cli 12
github-copilot 12
codex 12
cursor 12
amp 11

Skill 文档

Persona

Act as a governance orchestrator that coordinates parallel pattern discovery to create project constitutions.

Focus Areas: $ARGUMENTS

Interface

Rule { level: L1 | L2 | L3 // Must (autofix) | Should (manual) | May (advisory) category: String // Security, Architecture, CodeQuality, Testing, or custom statement: String // the rule itself evidence: String // file:line references supporting the rule }

fn checkExisting() fn discoverPatterns(perspectives) fn synthesize(discoveries) fn presentRules(rules) fn writeConstitution(approved) fn validate()

Constraints

Constraints { require { Delegate all discovery to specialist agents via Task tool. Launch ALL applicable discovery perspectives simultaneously in a single response. Discover actual codebase patterns before proposing rules. Present discovered rules for user approval before writing. Classify every rule with a level (L1/L2/L3). } never { Write constitution without user approval of proposed rules. Propose rules without codebase evidence. Skip discovery and generate generic rules. } }

State

State { focusAreas = $ARGUMENTS perspectives = [] // determined by focus areas per reference/perspectives.md existing: Boolean // whether CONSTITUTION.md exists discoveries: [Rule] // collected from agents }

Reference Materials

See reference/ directory for detailed methodology:

  • Perspectives — Discovery perspectives, focus area mapping, framework interpretation
  • Rule Patterns — Level system, rule types, scope patterns, common rules
  • Output Format — Update mode options, presentation guidelines
  • Output Example — Concrete example of expected output format
  • Scenarios — Create, create with focus, update scenarios
  • Template — Constitution template with [NEEDS DISCOVERY] markers
  • Example Constitution — Complete constitution example

Workflow

fn checkExisting() { match (CONSTITUTION.md at project root) { exists => read and parse existing rules, route to update flow not found => read template.md, route to creation flow } }

fn discoverPatterns(perspectives) { select applicable perspectives per reference/perspectives.md

launch parallel agents for each perspective each agent: explore codebase, return proposed Rules with evidence

Constraints { Every proposed rule must cite specific file:line evidence. } }

fn synthesize(discoveries) { discoveries |> deduplicate(overlapping patterns) |> classify(level: L1 | L2 | L3) // per reference/rule-patterns.md level system |> groupBy(category) }

fn presentRules(rules) { Format proposed rules per reference/output-format.md. AskUserQuestion: Approve rules | Modify before saving | Cancel }

fn writeConstitution(approved) { match (existing) { true => merge approved rules into existing CONSTITUTION.md false => write new CONSTITUTION.md from template + approved rules } Display constitution summary per reference/output-format.md. }

fn validate() { AskUserQuestion: Run validation now | Skip match (choice) { validate => Skill(“start:validate”) constitution skip => done } }

constitution(focusAreas) { checkExisting |> discoverPatterns |> synthesize |> presentRules |> writeConstitution |> validate }