straymark-new
Create StrayMark documentation. Analyzes context to suggest document type or accepts explicit type parameter. Always confirms before creating.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create StrayMark documentation. Analyzes context to suggest document type or accepts explicit type parameter. Always confirms before creating.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create an ADR (Architecture Decision Record) for significant architectural decisions. Requires human review.
Create an AIDEC (AI Decision) document to record a technical decision with alternatives considered.
Create an AILOG (AI Action Log) document for the current changes. Quick shortcut for the most common document type.
Execute an external audit of a Charter inside an auditor-side CLI (gemini-cli, claude-cli, copilot-cli, codex-cli). Reads the resolved audit prompt from the canonical location, audits with tool use, writes the report. Operator invokes one instance per CLI.
Generate the unified audit prompt for a Charter at the canonical filesystem location. The operator then opens N auditor-side CLIs (gemini-cli, claude-cli, copilot-cli, etc.) and invokes /straymark-audit-execute in each — no copy/paste. Counterpart of /straymark-audit-review.
Consolidate N external auditor reports into a critical review document with verdicts, remediation plan, and auditor ratings. Then merge the external_audit YAML block into the Charter telemetry. Counterpart of /straymark-audit-prompt and /straymark-audit-execute.
| name | straymark-new |
| description | Create StrayMark documentation. Analyzes context to suggest document type or accepts explicit type parameter. Always confirms before creating. |
Create StrayMark documentation based on recent changes.
When invoked, follow these steps:
If the user specified a document type (e.g., /straymark-new ailog), skip to step 4 using that type.
Valid types: ailog, aidec, adr, eth, req, tes, inc, tde, sec, mcard, sbom, dpia
Charter is not a
straymark newtype. Charters are bounded units of work (filenameNN-slug.md, sequential prefix) and have their own command. If the user asks for a Charter (/straymark-new charter, "create a Charter", "declare a Charter"), redirect to/straymark-charter-new.
Gather information about recent changes:
# Get current date
date +%Y-%m-%d
# Get modified files (staged and unstaged)
git status --porcelain
# Get recent changes summary
git diff --stat HEAD~1 2>/dev/null || git diff --stat
# Count lines changed
git diff --numstat HEAD~1 2>/dev/null || git diff --numstat
# Check code complexity (primary method for AILOG trigger)
straymark analyze --output json 2>/dev/null
# If CLI unavailable, fall back to line count heuristic in step 3
Based on the analysis, suggest a document type:
| Pattern | Suggested Type |
|---|---|
Complex code (straymark analyze above_threshold > 0; fallback: >20 lines) | AILOG |
| Multiple implementation alternatives discussed | AIDEC |
| Structural/architectural changes, new modules | ADR |
Files with auth, user, privacy, gdpr | ETH (draft) |
Test files (*.test.*, *.spec.*) | TES |
| Bug fixes, hotfixes | INC |
TODO, FIXME, HACK comments added | TDE (code-smell trigger) |
| Transversal debt — heritage from prior Charter, applies to multiple modules, requires dedicated Charter, or needs human prioritization | TDE (architectural trigger — distinct from per-Charter R<N>; see AGENT-RULES.md §3) |
| Requirements or spec files | REQ |
| Multi-session implementation block (>1 day, >5 tasks, multi-phase) | Charter — redirect to /straymark-charter-new (Charters use straymark charter new, not straymark new) |
Always display this confirmation before creating:
╔══════════════════════════════════════════════════════════════════╗
║ StrayMark New ║
╠══════════════════════════════════════════════════════════════════╣
║ ║
║ 📊 Analysis: ║
║ • Files modified: [N] ║
║ • Lines changed: [+X / -Y] ║
║ • Area: [detected area or "general"] ║
║ ║
║ 🎯 Suggested type: [TYPE] ([Full Name]) ║
║ Reason: [Brief explanation] ║
║ ║
║ 📝 Proposed filename: ║
║ [TYPE]-YYYY-MM-DD-NNN-[description].md ║
║ ║
╚══════════════════════════════════════════════════════════════════╝
Confirm creation? [Y/n/other type]:
Wait for user confirmation before proceeding.
Read .straymark/config.yml to determine language:
language: en # or es
Use template path based on language:
en (default): .straymark/templates/TEMPLATE-[TYPE].mdes: .straymark/templates/i18n/es/TEMPLATE-[TYPE].mdDetermine the next sequence number:
# Find existing documents of this type for today
ls .straymark/*/[TYPE]-$(date +%Y-%m-%d)-*.md 2>/dev/null | wc -l
ID format: [TYPE]-YYYY-MM-DD-NNN
YYYY-MM-DD → Current dateNNN → Sequence number (001, 002, etc.)[agent-name-v1.0] → gemini-cli-v1.0| Type | Location |
|---|---|
| AILOG | .straymark/07-ai-audit/agent-logs/ |
| AIDEC | .straymark/07-ai-audit/decisions/ |
| ETH | .straymark/07-ai-audit/ethical-reviews/ |
| ADR | .straymark/02-design/decisions/ |
| REQ | .straymark/01-requirements/ |
| TES | .straymark/04-testing/ |
| INC | .straymark/05-operations/incidents/ |
| TDE | .straymark/06-evolution/technical-debt/ |
| SEC | .straymark/08-security/ |
| MCARD | .straymark/09-ai-models/ |
| SBOM | .straymark/07-ai-audit/ |
| DPIA | .straymark/07-ai-audit/ethical-reviews/ |
Before saving, apply these validation rules to the frontmatter:
risk_level is high or critical: set review_required: trueeu_ai_act_risk is high: set review_required: truereview_required: trueThese rules align with the CLI validation rules CROSS-001, CROSS-002, and CROSS-003.
After creation, display:
✅ StrayMark document created:
.straymark/[path]/[TYPE]-YYYY-MM-DD-NNN-description.md
Review required: [yes/no]
Risk level: [low/medium/high/critical]
| Type | Full Name | Purpose |
|---|---|---|
ailog | AI Action Log | Record what the AI agent did |
aidec | AI Decision | Document a technical decision with alternatives |
adr | Architecture Decision Record | Major architectural decisions |
eth | Ethical Review | Privacy, bias, responsible AI concerns |
req | Requirement | System requirements |
tes | Test Plan | Test strategies and plans |
inc | Incident Post-mortem | Incident analysis |
tde | Technical Debt | Identified technical debt |
sec | Security Assessment | Threat modeling and security controls |
mcard | Model/System Card | AI model documentation |
sbom | Software Bill of Materials | AI component inventory |
dpia | Data Protection Impact Assessment | Privacy impact analysis |