Logo: Aiwg Regenerate Claude

Aiwg Regenerate Claude

Communautéit
jmagly
aiwg-regenerate-claude

Regenerate CLAUDE.md for Claude Code with hook file architecture

Iwwersiicht

Editeurjmagly
Repositoryaiwg
Skill-Nummaiwg-regenerate-claude
Stären
225
Forks
34
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    jmagly huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Aiwg Regenerate Claude an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/aiwg-utils/skills/aiwg-regenerate-claude
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jmagly/aiwg.git /tmp/aiwg
mkdir -p .claude/skills
cp -r /tmp/aiwg/agentic/code/addons/aiwg-utils/skills/aiwg-regenerate-claude .claude/skills/aiwg-regenerate-claude
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Aiwg Regenerate Claude an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Aiwg Regenerate Claude automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Aiwg Regenerate Claude net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Skill access pattern (post-kernel-pivot, 2026.5+)

Skill names referenced in this document's narrative are AIWG skills, not slash commands. Most are not kernel-listed and cannot be invoked as /skill-name by the platform. Reach them via:

bash
aiwg discover "<capability>"
aiwg show skill <name> --body

Only kernel-listed skills (aiwg-doctor, aiwg-refresh, aiwg-status, aiwg-help, use, steward) are directly invokable as slash commands. See skill-discovery rule.

Exception: The "Available Slash Commands (Claude Code)" template block below is generated output destined for end-user CLAUDE.md files, where Claude Code's slash-command syntax applies. Slash prefixes in that block are preserved intentionally.

Regenerate CLAUDE.md

Regenerate the CLAUDE.md file for Claude Code integration. This command performs an intelligent merge — analyzing the current project state while preserving team-written content.

Hook file architecture (default): Generates AIWG.md with all AIWG context, and adds a single @AIWG.md directive to CLAUDE.md. This keeps CLAUDE.md minimal and user-owned.

Full injection (--full-inject): Legacy mode — injects full AIWG content directly into CLAUDE.md (useful for platforms that do not support @-link loading, or user preference).

Vendor-specific filtering: This command includes ONLY Claude Code slash commands and agents, reducing context pollution. Other vendor content is referenced but not inlined.

Core Principle

Team content is preserved. AIWG content is updated. Only Claude-specific content is inlined.

The agent must distinguish between:

  • Team content: Project rules, conventions, requirements, decisions written by humans
  • AIWG content: Framework integration, agent definitions, reference links generated by AIWG
  • Claude-specific: Slash commands, Claude agents, Claude settings
  • Other vendors: Copilot, Cursor, Warp commands (reference only)

Parameters

FlagDescription
--no-backupSkip creating backup file
--dry-runPreview changes without writing
--fullFull regeneration - replaces everything (destructive)
--full-injectInject AIWG content directly into CLAUDE.md (legacy/compatibility mode)
--migrateMigrate existing full-injection to hook file approach (runs /migrate-hook --provider claude)

Hook File Architecture (Default)

When running without --full-inject:

  1. Generate AIWG.md — assembles AIWG context from installed framework manifests
  2. Update CLAUDE.md — minimal: user content + @AIWG.md directive
markdown
# CLAUDE.md

## Repository Purpose
[your project description]

@AIWG.md

## Project-Specific Notes
[your team conventions here]

To revert to inline injection: /aiwg-regenerate-claude --full-inject

To disable context temporarily: aiwg hook-disable

Execution Steps

Step 1: Create Backup

Unless --no-backup specified:

  1. Check if CLAUDE.md exists
  2. If exists, copy to CLAUDE.md.backup-{YYYYMMDD-HHMMSS}
  3. Report: Backup created: CLAUDE.md.backup-20260113-152233

If no existing file, skip backup and note: No existing CLAUDE.md found, generating fresh.

Step 2: Analyze Existing Content

If existing CLAUDE.md present (and not --full):

Read the file and intelligently categorize each section:

Team Content (PRESERVE):

  • Project-specific coding standards and conventions
  • API guidelines and architectural decisions
  • Security policies and compliance requirements
  • Team workflows and processes
  • Business rules and constraints
  • Definition of Done criteria
  • Historical context and rationale
  • Any content that reflects human decisions about the project

AIWG Content (UPDATE):

  • AIWG Integration sections
  • Agent definitions and listings
  • Command listings
  • @-mention reference tables
  • Orchestration instructions
  • Framework version information
  • Auto-detected project info (tech stack, commands)

Identification Heuristics:

  • Team content often uses first-person ("we", "our team")
  • Team content references specific business/domain terms
  • Team content contains opinions, preferences, rationale
  • AIWG content references ~/.local/share/ai-writing-guide
  • AIWG content has structured @-mention tables
  • AIWG content lists agents, commands, frameworks

Step 3: Analyze Project

Detect Languages & Package Managers:

Use Glob to find package files:

package.json → Node.js/npm
pyproject.toml / requirements.txt → Python
go.mod → Go
Cargo.toml → Rust
pom.xml / build.gradle → Java
composer.json → PHP
Gemfile → Ruby

Extract Development Commands:

From package.json:

json
{
  "scripts": {
    "build": "tsc",
    "test": "vitest",
    "lint": "eslint ."
  }
}

From Makefile:

makefile
build:
    go build ./...

test:
    go test ./...

Detect Test Framework:

File PatternFramework
jest.config.*Jest
vitest.config.*Vitest
pytest.ini, conftest.pyPytest
*_test.goGo testing
.rspecRSpec
phpunit.xmlPHPUnit

Detect CI/CD:

PathPlatform
.github/workflows/*.ymlGitHub Actions
.gitlab-ci.ymlGitLab CI
JenkinsfileJenkins
.circleci/config.ymlCircleCI
azure-pipelines.ymlAzure DevOps

Extract Project Description:

Read first meaningful paragraph from README.md or description from package.json.

Analyze Directory Structure:

src/ or lib/ → Source code
test/ or tests/ or __tests__/ → Tests
docs/ → Documentation
scripts/ or tools/ → Tooling
.github/ → GitHub configuration

Step 4: Detect AIWG State

Check for installed frameworks:

  1. Read .aiwg/frameworks/registry.json if exists
  2. Scan .claude/agents/ for deployed agents (Claude-specific)
  3. Scan .claude/commands/ for deployed commands (Claude-specific)
  4. Read ~/.local/share/ai-writing-guide/registry.json for global state

Identify active frameworks:

  • Count agent files matching sdlc-complete patterns
  • Count command files matching sdlc-complete patterns
  • Detect aiwg-utils presence
  • Detect media-marketing-kit presence

Check Claude-specific config:

Read .claude/settings.local.json if exists for:

  • Allowed read paths
  • Allowed write paths
  • Allowed bash commands

Step 5: Generate CLAUDE.md

Document Structure:

markdown
# CLAUDE.md

This file provides guidance to Claude Code when working with this codebase.

## Repository Purpose

{First paragraph from README.md or package.json description}

## Tech Stack

- **Languages**: {detected languages}
- **Runtime**: {Node.js version, Python version, etc.}
- **Package Manager**: {npm, yarn, pip, etc.}
- **Framework**: {React, FastAPI, etc. if detected}
- **Database**: {if detected from dependencies}

## Development Commands

```bash
# {grouped by purpose}
{extracted commands with descriptions}

Testing

  • Framework: {detected framework}
  • Run tests: {test command}
  • Coverage: {coverage command if found}
  • Location: {test directory}

Architecture

{Description based on directory structure}

Directory Structure

{key directories with descriptions}

Important Files

  • {file} - {purpose} {repeat for key files}

Configuration

{List of config files and their purpose}


{INSERT ALL TEAM CONTENT HERE - EXACTLY AS FOUND}

{If team content exists, preserve it verbatim in its original location/order}


Project Artifacts

{If .aiwg/ directory exists, wire up project-specific docs:}

CategoryLocation
Requirements@.aiwg/requirements/
Architecture@.aiwg/architecture/
Planning@.aiwg/planning/
Testing@.aiwg/testing/
Security@.aiwg/security/

{Only include rows for directories that exist}

{ENHANCEMENT: Add @-mentions below team sections to link with AIWG resources} {Example: If team has "Security Requirements" section, add below it:} {Related: @.aiwg/security/, /flow-security-review-cycle, /flow-compliance-validation}


AIWG Integration

AIWG is installed at: ~/.local/share/ai-writing-guide

Installed Components

ComponentTypeCount
{table of installed frameworks, addons - only if any installed}

Available Slash Commands (Claude Code)

ONLY Claude Code slash commands are listed here. For full documentation, see references below.

Commands are invoked with /command-name:

Intake & Planning:

  • /intake-wizard - Generate project intake forms interactively
  • /intake-from-codebase - Analyze codebase to generate intake
  • /project-status - Check current project phase and status
  • /project-health-check - Comprehensive project health assessment

Phase Transitions:

  • /flow-inception-to-elaboration - Transition to Elaboration phase
  • /flow-elaboration-to-construction - Transition to Construction phase
  • /flow-construction-to-transition - Transition to Transition phase
  • /flow-gate-check - Validate phase gate criteria

Continuous Workflows:

  • /flow-security-review-cycle - Security validation workflow
  • /flow-test-strategy-execution - Test execution workflow
  • /flow-risk-management-cycle - Risk management workflow
  • /flow-retrospective-cycle - Retrospective analysis

Development:

  • /flow-guided-implementation - Step-by-step implementation guidance
  • /generate-tests - Generate test suite for implementation
  • /setup-tdd - Set up test-driven development workflow
  • /pr-review - Perform comprehensive pull request review

Regeneration & Setup:

  • /aiwg-regenerate-claude - Regenerate this CLAUDE.md file
  • /aiwg-setup-project - Set up AIWG for new project
  • /aiwg-kb - AIWG knowledge base queries

{Note: List only ~15-20 most commonly used commands}

Full command catalog (52 commands): @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/commands/

Available Agents (Claude Code)

Agents are markdown files in .claude/agents/:

Architecture & Design:

  • architecture-designer - System architecture and technical decisions
  • database-architect - Database design and optimization
  • api-designer - RESTful/GraphQL API design

Development & Implementation:

  • software-implementer - Test-first development (TDD)
  • integrator - Component integration and build management
  • test-engineer - Comprehensive test suite creation
  • test-architect - Test strategy and framework design

Quality & Operations:

  • code-reviewer - Code quality and security review
  • security-architect - Security design and threat modeling
  • devops-engineer - CI/CD and deployment automation

Management & Coordination:

  • project-manager - Project planning and tracking
  • product-owner - Product vision and requirements
  • scrum-master - Agile process facilitation

{Note: List only deployed agents, ~10-15 most relevant}

Full agent catalog: @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/agents/

Orchestration

You are the Core Orchestrator. When users request workflows:

  1. Interpret natural language requests
  2. Map to appropriate flow commands or agents
  3. Coordinate multi-agent workflows
  4. Report progress with clear indicators

Natural language mappings:

User says...Maps to...
"transition to elaboration"/flow-inception-to-elaboration
"run security review"/flow-security-review-cycle
"check status"/project-status
"start iteration 2"/flow-iteration-dual-track
"generate tests"/generate-tests
"review this PR"/pr-review

Full natural language guide: @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/docs/simple-language-translations.md


Full Reference

AIWG Installation: ~/.local/share/ai-writing-guide/

Framework Documentation:

  • SDLC Complete: @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/README.md
  • All Commands (52): @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/commands/
  • All Agents (54): @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/agents/
  • Orchestration Guide: @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/docs/orchestrator-architecture.md

Core References:

  • Orchestrator Prompt: @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/core/orchestrator.md
  • Agent Design Rules: @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/agents/design-rules.md
  • Error Recovery: @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/reliability/resilience.md

Multi-vendor setup?

  • GitHub Copilot: .github/copilot-instructions.md
  • Cursor: .cursorrules
  • Windsurf: .windsurfrules
  • Warp: WARP.md
  • Other platforms: AGENTS.md


### Step 6: Write Output

**If `--dry-run`:**
Display the generated content, do not write.

**Otherwise:**
1. Write generated content to `CLAUDE.md`
2. Verify write succeeded
3. Report summary

**Hook file approach (default)**:

CLAUDE.md Regenerated

Backup: CLAUDE.md.backup-20260113-152233

Hook File: ✓ AIWG.md generated (312 lines) - Frameworks: sdlc-complete v2.1.0, aiwg-utils v1.5.0 - Includes: orchestrator context, RULES-INDEX, 47 commands, 12 agents

CLAUDE.md Updated: ✓ Team content preserved (46 lines) ✓ @AIWG.md directive added

Output: CLAUDE.md (49 lines), AIWG.md (312 lines)

To disable AIWG context: aiwg hook-disable To regenerate hook only: aiwg hook-regenerate


**Full inject mode (`--full-inject`)**:

CLAUDE.md Regenerated

Backup: CLAUDE.md.backup-20260113-152233

Team Content Preserved: ✓ Team Conventions (18 lines) ✓ Definition of Done (9 lines) ✓ Security Requirements (7 lines) ✓ API Guidelines (12 lines)

AIWG Content Updated: ✓ Tech Stack (TypeScript, Node.js 18+) ✓ Development Commands (12 scripts) ✓ Testing (Vitest) ✓ AIWG Integration (387 lines inline)

Output: CLAUDE.md (433 lines, 18,244 bytes) Note: Using legacy full-inject mode. Run without --full-inject to use hook file approach.


## Content Enhancement

When preserving team content, the agent MAY add helpful @-mentions and links below team sections **without modifying the team's words**.

**Example:**

Team wrote:
```markdown
## Security Requirements

- Must comply with SOC2
- All data encrypted at rest
- Quarterly penetration testing

Agent enhances:

markdown
## Security Requirements

- Must comply with SOC2
- All data encrypted at rest
- Quarterly penetration testing

Related: /flow-security-review-cycle, /flow-compliance-validation, @.aiwg/security/

The team's content is untouched. Links are added below.

Vendor-Specific Filtering Rules

INCLUDE (inline in CLAUDE.md):

  • Claude Code slash commands from .claude/commands/
  • Claude-specific agent definitions from .claude/agents/
  • Claude settings and tool configurations
  • @-mention references to project files
  • Natural language mappings for Claude

EXCLUDE (reference only, don't inline):

  • Copilot YAML agent definitions
  • Cursor rule syntax and patterns
  • Factory droid configurations
  • Windsurf-specific instructions
  • Warp terminal-specific commands (unless WARP.md also present)
  • Codex skill definitions

REFERENCE (link to, don't detail):

  • Full command catalog (all 52 commands)
  • Full agent catalog (all 54 agents)
  • Other vendor context files
  • Framework documentation

Target size: 300-450 lines (excluding team content)

Updating Outdated Information

The agent MAY update genuinely outdated information:

  • Version numbers that are clearly stale
  • References to files that no longer exist
  • Deprecated patterns with official replacements

The agent MUST NOT change:

  • Team opinions or preferences
  • Architectural decisions (even if the agent disagrees)
  • Business requirements
  • Process decisions

Examples

bash
# Regenerate CLAUDE.md with intelligent preservation and vendor filtering
/aiwg-regenerate-claude

# Preview without writing
/aiwg-regenerate-claude --dry-run

# Full regeneration (replaces everything)
/aiwg-regenerate-claude --full

# Skip backup (use carefully)
/aiwg-regenerate-claude --no-backup

Error Handling

ConditionAction
No CLAUDE.md existsGenerate fresh document
Backup failsAbort, report error
Read errorReport error, suggest --full
No AIWG detectedGenerate project-only content, warn
No package filesGenerate minimal structure, warn
Ambiguous contentPreserve it (err on side of caution)

Related Commands

CommandRegenerates
/aiwg-regenerate-claudeCLAUDE.md (Claude Code)
/aiwg-regenerate-copilotcopilot-instructions.md (GitHub Copilot)
/aiwg-regenerate-cursorrules.cursorrules (Cursor)
/aiwg-regenerate-windsurfrules.windsurfrules (Windsurf)
/aiwg-regenerate-warpWARP.md (Warp Terminal)
/aiwg-regenerate-factory.factory/README.md (Factory AI)
/aiwg-regenerate-agentsAGENTS.md (Multi-vendor)
/aiwg-regenerateAuto-detect vendor

References

  • Base Template: @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/templates/regenerate-base.md
  • Vendor Detection: @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/docs/vendor-detection.md
  • @implements @.aiwg/requirements/use-cases/UC-019-regenerate-vendor-specific.md

Heefeg gestallte Froen

Wat mécht de KI-Skill Aiwg Regenerate Claude?

Regenerate CLAUDE.md for Claude Code with hook file architecture

Firwat Aiwg Regenerate Claude op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Aiwg Regenerate Claude besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Aiwg Regenerate Claude an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/aiwg-utils/skills/aiwg-regenerate-claude an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Aiwg Regenerate Claude benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Aiwg Regenerate Claude benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Aiwg Regenerate Claude domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Aiwg Regenerate Claude gratis?

Jo. jmagly huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇