Unified atomic ingestion of CFN dependency manifests (trigger-dev, cli-mode, shared)
Not available right now: readme/CFN_LOOP_DEPENDENCY_DIAGRAM.txt was deleted in a 2025-12-08
documentation cleanup (removed as outdated archive content) and has not been recreated. Every
diagram-parsing command below fails with a clear "not found" error until the diagram exists again.
# List available manifests
bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest.sh --list-manifests
# CLI mode dependencies
bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest.sh --manifest cli-mode --inject-content --skip-validation
# Shared dependencies
bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest.sh --manifest shared --inject-content
# Filter by type (TypeScript only)
bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest.sh --manifest cli-mode --type TS --inject-content
# CLI mode from diagram
bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest.sh --diagram cli
# Docker mode from diagram
bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest.sh --diagram docker
Requires a build first: dist/ is not committed. Run bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/build.sh before using the commands below.
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js \
--manifest .claude/skills/cfn-dependency-management/lib/ingestion/manifests/cli-mode-dependencies.txt \
--inject-content
Performance Comparison:
readme/CFN_LOOP_DEPENDENCY_DIAGRAM.txt (single source of truth; currently missing, see note above)/tmp/cfn-dependency-chunks/Requires a build first: dist/ is not committed. Run bash $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/build.sh before using the commands below.
Basic ingestion with content injection:
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --inject-content
Priority-filtered ingestion:
# P0 only (critical path)
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --inject-content --priority P0
# P0 + P1 (exclude deferred)
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --inject-content --priority P0,P1
Type-filtered ingestion:
# TypeScript only
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --inject-content --type TS
# Shell scripts only
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --type SH
# Both TypeScript and shell
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --type TS,SH
Traditional Read command output:
# Output Read commands instead of injecting content
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js
Skip validation (faster, useful when files are known to exist):
node $HOME/.claude/skills/cfn-dependency-management/lib/ingestion/dist/ingest-dependencies.js --inject-content --skip-validation
Basic ingestion (all files):
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh
Priority-filtered ingestion:
# P0 only (critical path)
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --priority P0
# P0 + P1 (exclude deferred)
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --priority P0,P1
Type-filtered ingestion:
# TypeScript only
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type TS
# Shell scripts only
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type SH
# Both TypeScript and shell
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type TS,SH
The script uses grep and sed patterns to extract files:
[P0] - Critical path markers[P1] - Post-validation markers[P2] - Deferred features[TS] - TypeScript implementation[SH] - Shell script fallback[DEPRECATED] - Legacy files (excluded by default)Generates Read commands grouped by priority for easy copy-paste into Main Chat or agent profiles:
# Step 1: Read the dependency diagram
Read: readme/CFN_LOOP_DEPENDENCY_DIAGRAM.txt
# Step 2: Read P0 critical path files
Read: .claude/commands/cfn-loop-cli.md
Read: src/cli/index.ts
Read: .claude/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md
...
# Step 3: Read P1 files (post-validation)
Read: .claude/skills/cfn-loop-orchestration-v2/lib/orchestrator/src/helpers/confidence-aggregator.ts
Read: .claude/skills/cfn-loop-orchestration-v2/lib/orchestrator/src/helpers/context-lookup.ts
...
# Step 4: Read coordination layer (Redis/Shell)
Read: .claude/skills/cfn-coordination/coordination-wait.sh
...
Diagram Structure (Source of Truth):
readme/CFN_LOOP_DEPENDENCY_DIAGRAM.txt
āāā PART 1: USER TO COORDINATOR (spawning flow)
āāā PART 2: COORDINATOR TO ORCHESTRATOR (parameters)
āāā PART 3: TYPESCRIPT ORCHESTRATOR (main loop)
āāā PART 4: CRITICAL DEPENDENCIES (execution order)
āāā PART 5: TYPESCRIPT MODULE STRUCTURE (priority markers)
āāā PART 6: MODE-SPECIFIC THRESHOLDS
āāā PART 7: COORDINATION PROTOCOL (Redis patterns)
Parsing Strategy:
File Path Patterns:
.claude/commands/*.md.claude/agents/**/*.md.claude/skills/**/src/**/*.tssrc/cli/*.tstests/**/*.shThe cfn-loops-cli-expert agent MUST use this skill in Step 2 instead of hardcoded file lists:
## Step 2: Execute Dependency Ingestion
Run the dynamic ingestion script to load all CFN Loop CLI dependencies:
```bash
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh
This automatically discovers and reads all files referenced in the dependency diagram.
## Maintenance
This skill self-updates as long as `readme/CFN_LOOP_DEPENDENCY_DIAGRAM.txt` is maintained, but the
file does not currently exist (see note at top). No code changes needed once it is recreated.
**When to Update:**
- New TypeScript module added to orchestration
- New agent profile created
- File paths change
- Priority levels shift (P0 ā P1, etc.)
**How to Update:**
Simply update the dependency diagram. The parser adapts automatically.
## Success Criteria
Skill is working correctly when:
- All P0 critical path files are extracted
- Priority filtering works (--priority flag)
- Type filtering works (--type flag)
- No DEPRECATED files included (unless --include-deprecated flag set)
- Output is valid Read commands (can copy-paste directly)
- File paths are relative to project root
- No duplicate files in output (deduplication working)
- File existence validation reports missing files to stderr
- Type filters correctly exclude non-matching extensions
## Regression Testing
### Expected File Counts (as of 2025-11-20)
Use these validation commands to ensure counts match expectations:
```bash
# Total files discovered (all priorities, all types, skip validation)
# Note: 14 after deduplication (was 18 with orchestrate.ts appearing twice and other duplicates)
expected_total=14
actual=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --skip-validation 2>&1 | grep -c "^Read:")
test $actual -eq $expected_total && echo "ā Total files: $actual" || echo "ā Expected $expected_total, got $actual"
# P0 critical path files (in Step 2 section only, not including diagram in Step 1)
expected_p0=3
actual=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --priority P0 --skip-validation 2>&1 | awk '/Step 2:/,/Step 3:/' | grep -c "^Read:")
test $actual -eq $expected_p0 && echo "ā P0 files: $actual" || echo "ā Expected $expected_p0, got $actual"
# TypeScript files (includes .ts, .js, .cjs)
expected_ts=4
actual=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type TS --skip-validation 2>&1 | grep -c "^Read:")
test $actual -eq $expected_ts && echo "ā TypeScript files: $actual" || echo "ā Expected $expected_ts, got $actual"
# Shell script files (.sh)
expected_sh=3
actual=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type SH --skip-validation 2>&1 | grep "Step 5" -A 20 | grep -c "^Read:.*\.sh$")
test $actual -eq $expected_sh && echo "ā Shell files: $actual" || echo "ā Expected $expected_sh, got $actual"
Verify no file appears more than once:
# Check for duplicate Read commands
duplicates=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --skip-validation 2>&1 | grep "^Read:" | sort | uniq -d)
if [[ -z "$duplicates" ]]; then
echo "ā No duplicate files"
else
echo "ā Duplicate files found:"
echo "$duplicates"
fi
Verify missing files are reported to stderr:
# Count missing files (should be 4 as of 2025-11-20)
expected_missing=4
actual=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh 2>&1 | grep "^WARNING: File not found" | wc -l)
test $actual -eq $expected_missing && echo "ā Missing file warnings: $actual" || echo "ā Expected $expected_missing warnings, got $actual"
# Missing files should NOT appear in Read output
missing_in_output=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh 2>&1 | grep "^Read:" | while read -r line; do
file=$(echo "$line" | cut -d' ' -f2)
[[ ! -f "$file" ]] && echo "$file"
done | wc -l)
test $missing_in_output -eq 0 && echo "ā No missing files in output" || echo "ā Found $missing_in_output missing files in output"
Verify type filters work correctly:
# TypeScript filter should only return .ts/.js/.cjs files (plus diagram)
non_ts=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type TS --skip-validation 2>&1 | grep "^Read:" | grep -v "DEPENDENCY_DIAGRAM" | grep -v "\.ts$\|\.js$\|\.cjs$")
if [[ -z "$non_ts" ]]; then
echo "ā TypeScript filter working"
else
echo "ā TypeScript filter returned non-TS files:"
echo "$non_ts"
fi
# Shell filter should only return .sh files (plus diagram)
non_sh=$($HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --type SH --skip-validation 2>&1 | grep "^Read:" | grep -v "DEPENDENCY_DIAGRAM" | grep -v "\.sh$")
if [[ -z "$non_sh" ]]; then
echo "ā Shell filter working"
else
echo "ā Shell filter returned non-SH files:"
echo "$non_sh"
fi
These files are referenced in the dependency diagram but do not exist:
.claude/agents/cfn-dev-team/coordinators/cfn-cli-dependency-maintainer.md.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md.claude/commands/CFN_LOOP_TASK_MODE.mdAction: Update dependency diagram to remove references or create missing files.
When files are added/removed from the dependency diagram:
$HOME/.claude/skills/cfn-dependency-management/lib/ingestion/ingest-dependencies.sh --skip-validation| grep -c "^Read:"expected_total in regression tests abovereadme/CFN_LOOP_DEPENDENCY_DIAGRAM.txt (source of truth; not available, see note at top of this file)docs/CFN_LOOP_ARCHITECTURE.mdplanning/docker-migration/TYPESCRIPT_MIGRATION_HANDOFF.md.claude/agents/cfn-dev-team/3.1.0 (2026-05-13): Trigger.dev manifests removed
trigger-dev and trigger-mode manifests (deprecated subsystem)cli-mode, shared3.0.0 (2025-11-24): Unified ingestion script
--manifest <name> for all manifest-based ingestion--diagram <type> for diagram-based parsing2.1.0 (2025-11-20): Chunked mode for Task tool agents
/tmp/cfn-dependency-chunks/ when over 25k tokens2.0.0 (2025-11-20): TypeScript implementation with content injection mode
--inject-content flag1.1.0 (2025-11-20): Enhanced with 4 improvements
sort -u (fixes orchestrate.ts appearing twice)--skip-validation flag1.0.0 (2025-11-20): Initial release with dynamic parsing from dependency diagram