agentleFS
fernandoxavier02fernandoxavier02/engineering-context/skills/validate-context/SKILL.md

validate-context

Skill0 starsChanged 7 months agoMITView on GitHub

This skill should be used when the user asks to 'validate context', 'check engineering rules', 'verify context system', 'test context setup', or 'run context validation'. Generates and runs validation tests for the engineering context system.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. andrefigueira/.context★ 253same name
    2. albertomarturelo/sii★ 19same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Check that all 4 rules exist:

    line 14
  2. Distinctive:

    Check that vault engineering cards exist:

    line 30
  3. Distinctive:

    After running tests, produce:

    line 110
  4. Very specific:

    Run after generate-rules to verify the complete system.

    line 131

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Validate Context

Generate and run validation tests for the engineering context system.

What to Validate

Rule Existence

Check that all 4 rules exist:

  • .claude/rules/50-architecture-contract.md
  • .claude/rules/51-engineering-principles.md
  • .claude/rules/52-testing-strategy.md
  • .claude/rules/53-anti-patterns.md

Rule Structure

Each rule MUST have:

  1. YAML frontmatter with description field
  2. NO paths: frontmatter (always-loaded, no path filtering)
  3. ⛔ NUNCA section at top (compactation-safe)
  4. Vault trigger references (SE [situation] -> vault:engineering/...)

Vault Cards

Check that vault engineering cards exist:

  • vault/engineering/adr-*.md
  • vault/engineering/layer-contract.md
  • vault/engineering/pattern-*.md
  • vault/engineering/testing-strategy-*.md

Test Generation

Generate a test file adapted to the project's test framework.

Python (pytest)

# src/tests/test_context_engineering.py
from pathlib import Path

RULES_DIR = Path(".claude/rules")
VAULT_DIR = Path("vault/engineering")

class TestEngineeringContext:
    def test_rule_50_exists(self):
        assert (RULES_DIR / "50-architecture-contract.md").exists()

    def test_rule_has_nunca_section(self):
        for i in range(50, 54):
            matches = list(RULES_DIR.glob(f"{i}-*.md"))
            assert matches, f"Rule {i} not found"
            content = matches[0].read_text(encoding="utf-8")
            assert "NUNCA" in content, f"Rule {i} missing NUNCA section"

    def test_rule_has_no_paths_frontmatter(self):
        for rule in RULES_DIR.glob("5[0-3]-*.md"):
            content = rule.read_text()
            assert "paths:" not in content, f"{rule.name} has paths frontmatter"

    def test_vault_cards_exist(self):
        assert VAULT_DIR.exists()
        assert len(list(VAULT_DIR.glob("*.md"))) >= 3

TypeScript (Jest/Vitest)

import { existsSync, readFileSync } from 'fs';
import { globSync } from 'glob';

describe('Engineering Context', () => {
  test('rule 50 exists', () => {
    expect(existsSync('.claude/rules/50-architecture-contract.md')).toBe(true);
  });

  test('rules have NUNCA section', () => {
    const rules = globSync('.claude/rules/5[0-3]-*.md');
    rules.forEach(rule => {
      const content = readFileSync(rule, 'utf-8');
      expect(content).toContain('NUNCA');
    });
  });
});

Go (go test)

package context_test

import (
    "os"
    "testing"
)

func TestRule50Exists(t *testing.T) {
    if _, err := os.Stat(".claude/rules/50-architecture-contract.md"); os.IsNotExist(err) {
        t.Error("Rule 50 does not exist")
    }
}

Validation Report

After running tests, produce:

## Context Validation Report

| Check | Status |
|-------|--------|
| Rule 50 (architecture contract) exists | ✅/❌ |
| Rule 51 (engineering principles) exists | ✅/❌ |
| Rule 52 (testing strategy) exists | ✅/❌ |
| Rule 53 (anti-patterns) exists | ✅/❌ |
| Rules have NUNCA section | ✅/❌ |
| Rules have no paths frontmatter | ✅/❌ |
| Rules have vault triggers | ✅/❌ |
| Vault cards exist | ✅/❌ |

**Result:** [N]/[total] PASSED -> GO / NO-GO

Integration

Run after generate-rules to verify the complete system. Re-run after any rule changes.

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.