بنقرة واحدة
intent-layer-health
Quick health check for Intent Layer - validates nodes, checks staleness, reports coverage gaps
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Quick health check for Intent Layer - validates nodes, checks staleness, reports coverage gaps
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Set up hierarchical Intent Layer (AGENTS.md files) for codebases. Use when initializing a new project, adding context infrastructure to an existing repo, user asks to set up AGENTS.md, add intent layer, make agents understand the codebase, or scaffolding AI-friendly project documentation.
End-of-cycle learning capture and triage. Run after completing a feature, fixing a bug, or finishing any significant work. Reviews pending learnings, analyzes conversation for undocumented insights, and integrates into the Intent Layer with appropriate scope (global workflow vs local code).
Remove the Intent Layer from a repository. Deletes all child AGENTS.md files and removes the Intent Layer section from the root CLAUDE.md.
Interactive review of pending mistake reports from the learning loop. Walk through each report with the user, accepting/rejecting/discarding as appropriate.
Extract Intent Layer content from git history. Analyzes commits, PRs, and blame to discover pitfalls, contracts, architecture decisions, and entry points that should be documented in AGENTS.md files.
Use when maintaining an existing Intent Layer, during quarterly reviews, after significant code changes, when something confused you, or when user asks to audit/update CLAUDE.md or AGENTS.md files.
| name | intent-layer-health |
| description | Quick health check for Intent Layer - validates nodes, checks staleness, reports coverage gaps |
| argument-hint | [/path/to/project] [--full] |
Quick validation of Intent Layer health before starting work. Run this at session start to catch issues early.
# Quick check (default, <30 seconds)
${CLAUDE_PLUGIN_ROOT}/scripts/audit_intent_layer.sh --quick
# Full check (includes consistency analysis)
${CLAUDE_PLUGIN_ROOT}/scripts/audit_intent_layer.sh
Run by default, completes in <30 seconds:
${CLAUDE_PLUGIN_ROOT}/scripts/audit_intent_layer.sh --quick [path]
What it checks:
What it skips:
Run when user requests --full or deeper analysis:
${CLAUDE_PLUGIN_ROOT}/scripts/audit_intent_layer.sh [path]
Additional checks:
| Status | Exit Code | Meaning |
|---|---|---|
HEALTHY | 0 | No issues - good to proceed |
NEEDS_ATTENTION | 1 | Warnings only - can proceed with awareness |
CRITICAL | 2 | Failures or >50% stale nodes - address before work |
| Result | Count | Action |
|---|---|---|
| PASS | Nodes with no issues | None |
| WARN | Nodes with warnings | Review, non-blocking |
| FAIL | Nodes with errors | Fix before proceeding |
| Age | Category | Action |
|---|---|---|
| <30 days | Fresh | None |
| 30-90 days | Aging | Monitor |
| >90 days | Stale | Schedule maintenance |
/intent-layer-maintenancePresent results to user in this format:
## Intent Layer Health Check
**Status**: NEEDS_ATTENTION
### Summary
- Validation: 10 PASS, 2 WARN, 0 FAIL
- Staleness: 1 node stale (src/legacy/AGENTS.md - 142 days)
- Coverage: 85% (3 directories uncovered)
### Recommended Actions
1. Run `/intent-layer-maintenance` to address stale nodes
2. Consider adding AGENTS.md to: src/utils/, src/migrations/
Ready to proceed with current work? The warnings are informational.
Intent Layer is healthy. Good to proceed with current work.
### Recommended Actions
1. [If stale nodes] Run `/intent-layer-maintenance` to update stale nodes
2. [If low coverage] Consider adding AGENTS.md to: [list uncovered directories]
3. [If validation warnings] Review warnings: [list]
These are informational - you can proceed with current work.
### Immediate Actions Required
1. [If validation failures] Fix these nodes before proceeding:
- [node path]: [issue description]
2. [If >50% stale] Most nodes are outdated - run `/intent-layer-maintenance`
Recommend addressing these issues before starting new work.
This skill can be run proactively at session start:
For automated checks, use JSON output:
${CLAUDE_PLUGIN_ROOT}/scripts/audit_intent_layer.sh --json --quick
Exit codes enable CI pass/fail:
| Skill | Use When |
|---|---|
/intent-layer-maintenance | Status is NEEDS_ATTENTION or CRITICAL |
/intent-layer | No Intent Layer exists (state = none/partial) |
/intent-layer-query | Need to query Intent Layer for information |
| Script | Purpose |
|---|---|
audit_intent_layer.sh | Main audit script (validation, staleness, coverage, consistency) |
validate_node.sh | Single node validation (called by audit) |
detect_staleness.sh | Detailed staleness analysis |
detect_state.sh | Check if Intent Layer exists |
All paths: ${CLAUDE_PLUGIN_ROOT}/scripts/