Cfn expert update

From masharratt/claude-flow-novice · View interactive version

Cfn expert update is an AI agent skill from the GitHub repository masharratt/claude-flow-novice. Update CFN system expert agent knowledge with relevant git commits and project changes. Use after notable CFN changes to keep expert agent current.

How to use this skill

Skill file

CFN Expert Update Skill

Purpose

Updates the CFN system expert agent's knowledge base with relevant git commits and project changes. This skill analyzes recent commits, determines their relevance to the CFN system, and injects new knowledge into the expert agent to keep it up-to-date with the latest system changes.

Usage

# Basic usage (scan last 10 commits or since last update)
bash .claude/skills/cfn-expert-update/update-expert.sh  # portability-ok: repo-root-only; $HOME path breaks find_project_root

# Dry run to see what would be updated
bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run  # portability-ok: repo-root-only; $HOME path breaks find_project_root

# Scan commits since specific hash
bash .claude/skills/cfn-expert-update/update-expert.sh --since=<commit_hash>  # portability-ok: repo-root-only; $HOME path breaks find_project_root

# Force update even if no changes detected
bash .claude/skills/cfn-expert-update/update-expert.sh --force  # portability-ok: repo-root-only; $HOME path breaks find_project_root

# Combine options
bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run --since=HEAD~5 --force  # portability-ok: repo-root-only; $HOME path breaks find_project_root

Options

Relevance Scoring

The skill classifies commits into three relevance levels:

High Priority (always included)

Medium Priority (usually included)

Low Priority (sometimes included)

Update Process

  1. Commit Analysis: Scans git commits since last update or specified hash
  2. Relevance Detection: Classifies each commit based on file patterns and messages
  3. Knowledge Extraction: Generates structured knowledge blocks for relevant commits
  4. Backup Creation: Creates timestamped backup of current expert agent
  5. Knowledge Injection: Inserts new knowledge before the closing --- in the agent file
  6. State Tracking: Updates last processed commit hash

Output Structure

Each relevant commit generates a knowledge block like:

# HIGH PRIORITY UPDATE
Commit: <hash>
Message: <commit message>

## System Changes
<diff summary>

## Impact
This commit contains critical system updates that affect CFN Loop methodology...

Requirements

Troubleshooting

"Not in a git repository"

Ensure you're running the script from within a git repository.

"CFN system expert agent not found"

Check that the expert agent exists at the expected location. The skill looks for:

.claude/agents/custom/cfn-system-expert.md

"Missing required commands"

Install the missing commands listed in the error message.

Script exits with no output

Permission errors

The skill creates directories and files in .claude/state and .claude/backups. Ensure you have write permissions.

Integration with CFN Workflow

This skill is typically run:

The skill maintains state in .claude/state/cfn-expert-last-commit to track the last processed commit, avoiding duplicate updates.

Examples

Check for updates without applying them

bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run  # portability-ok: repo-root-only; $HOME path breaks find_project_root

Update from a specific commit

bash .claude/skills/cfn-expert-update/update-expert.sh --since=abc123  # portability-ok: repo-root-only; $HOME path breaks find_project_root

Force full rescan of recent history

bash .claude/skills/cfn-expert-update/update-expert.sh --force  # portability-ok: repo-root-only; $HOME path breaks find_project_root

See what would be updated from last 5 commits

bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run --since=HEAD~5  # portability-ok: repo-root-only; $HOME path breaks find_project_root

Limitations

Knowledge blocks injected into the agent file are not pruned automatically. If the agent file grows beyond 500 lines, manually trim older knowledge blocks to prevent context bloat.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.