ワンクリックで
m2m
M2M compression scan, compile, promote, batch, and benchmark for 0102 documentation optimization
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
M2M compression scan, compile, promote, batch, and benchmark for 0102 documentation optimization
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Parse natural-language coding requests into structured tasks for FoundUps worker handoff. Use when the user describes code work but intent is unstructured.
Tiny text-only skill to verify AI Edge Gallery loaded a FoundUps worker skill. Say LOAD_OK if the user says ping.
Validate parser, scope, packet, and result JSON objects against FoundUps mobile worker v1 shapes before handoff to 0102. Use when pasting pipeline outputs or a pipeline envelope.
Summarize raw test output, logs, or diffs into a compact worker-friendly report for FoundUps handoff. Use after execution upstream returns artifacts.
Narrow ambiguous coding work to the smallest safe scope for FoundUps worker handoff. Use after foundups-code-task-parser or when scope is broad.
Convert a scoped coding task into a strict machine-readable task packet for upstream FoundUps execution. Use after scope is locked.
| name | m2m |
| description | M2M compression scan, compile, promote, batch, and benchmark for 0102 documentation optimization |
| version | 1.0.0 |
| author | 66 |
| agents | [66] |
| domain | documentation_optimization |
| intent_type | COMPRESSION |
| promotion_state | production |
| user_invocable | true |
| category | workflow |
| evals | [] |
Self-service M2M (machine-to-machine) documentation compression for 0102.
Parse the argument after /m2m to determine the subcommand:
/m2m or /m2m scanRun M2M compression scan on the full repo. Show candidates with action levels.
from pathlib import Path
from modules.ai_intelligence.ai_overseer.src.m2m_compression_sentinel import M2MCompressionSentinel
sentinel = M2MCompressionSentinel(Path('.'))
result = sentinel.check(force=True)
# Report summary
print(f"Files scanned: {result['files_scanned']}")
print(f"Candidates: {result['candidates_found']}")
print(f"Auto-apply: {result['auto_apply_count']}")
print(f"Stage-promote: {result['stage_promote_count']}")
print(f"Stage-review: {result['stage_review_count']}")
print(f"Savings: {result['total_estimated_savings_percent']:.1f}%")
# Show staged status
staged = sentinel.list_staged()
print(f"Currently staged: {staged['total_staged']}")
/m2m compile <path>Compile a specific file to M2M format and save to .m2m/staged/.
sentinel = M2MCompressionSentinel(Path('.'))
result = sentinel.compile_to_staged("<path>", use_qwen=False)
# Report: success, reduction_percent, m2m_lines, staged_path
If no path given, compile all unstaged auto_apply candidates.
/m2m promote <staged_path>Promote a staged M2M file to live documentation. Creates backup automatically.
sentinel = M2MCompressionSentinel(Path('.'))
result = sentinel.promote_staged("<staged_path>")
# Report: success, target_path, backup_path
/m2m rollback <target_path>Rollback a promoted file to its original from backup.
sentinel = M2MCompressionSentinel(Path('.'))
result = sentinel.rollback("<target_path>")
# Report: success, backup_used
/m2m batch <n>Stage the next N unstaged auto_apply files (smallest first). Default: 10.
sentinel = M2MCompressionSentinel(Path('.'))
# Get all auto_apply candidates
candidates_paths = sentinel._collect_candidate_files()
analyses = []
for fp in candidates_paths:
a = sentinel._analyze_file(fp)
if a and a.prose_density > 0.3 and a.action == 'auto_apply':
analyses.append(a)
# Sort smallest first, filter already staged
analyses.sort(key=lambda a: a.line_count)
staged = sentinel.list_staged()
staged_names = {f['original_name'].strip() for f in staged['files']}
unstaged = [a for a in analyses if a.filename not in staged_names]
# Compile batch
batch = unstaged[:N]
for a in batch:
result = sentinel.compile_to_staged(a.path, use_qwen=False)
# Report each: path, reduction, lines
/m2m benchmarkRun performance benchmarks on the M2M compression pipeline.
Execute the benchmark test suite:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest modules/ai_intelligence/ai_overseer/tests/test_m2m_compression_sentinel.py::TestBenchmarks -v -s
/m2m evalEvaluate M2M quality by comparing staged files against originals using HoloIndex embedding model.
sentinel = M2MCompressionSentinel(Path('.'))
result = sentinel.evaluate_staged()
# Report: pairs_evaluated, avg_cosine_similarity, verdict, per-file details
# Verdict: excellent (0.6+), acceptable (0.4-0.6), needs_improvement (<0.4)
/m2m statusShow current staged files and their status.
sentinel = M2MCompressionSentinel(Path('.'))
staged = sentinel.list_staged()
# Show: total, by_module breakdown, file details
When invoked, run the appropriate Python code inline using the Bash tool. Report results in a compact table format. All operations are local and reversible.