mcpField
T
technical-debt-audit

technical-debt-audit

github.com/respira-press開発4989 回インストール2 週間前に更新
リポジトリ

technical-debt-audit について

孤立したショートコード、未使用プラグイン、ビルダーの残存データ、データベース肥大、未使用の可能性があるメディアなど、WordPress の技術的負債を調べる監査スキルです。スナップショットを使ったクリーンアップ手順を示し、監査間の負債スコアも記録します。

主な機能

  1. 01孤立ショートコードとプラグインの検出
  2. 02ビルダーの利用状況と残存データの調査
  3. 03データベース肥大と未使用メディアの評価
  4. 04監査推移を追うスコアの保存
  5. 05スナップショットを使ったロールバック可能な整理

活用シーン

  1. 01削除済みプラグイン由来のショートコードを探す
  2. 02インストール済みビルダーの未使用を確認
  3. 03元に戻せる WordPress 整理を計画

MCP 対応

Respira for WordPress の MCP サーバーが必要です。Respira のツールでサイト情報、コンテンツ、プラグイン、パフォーマンスを調べ、スナップショットの作成、スコアの保存、変更の復元を行います。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/respira-press/agent-skills-wordpress --skill technical-debt-audit

インストール後、Claude Code で/technical-debt-auditを入力して読み込まれたか確認します。

詳細

技術的負債の監査

バージョン: 1.2.1 更新日: 2026-06-30 最新情報: v1.2.0では、監査を安全で取り消し可能なクリーンアップに進化させました。すべての負債タイプに、respira_get_snapshotによるチェックポイントから始まり、明示的なrespira_restore_snapshotによるロールバックで終わる、タイプ別のクリーンアップ手順が用意されました。孤立したショートコードの検出結果は、編集前にrespira_find_elementで検証します。サイトごとの負債スコアはrespira_get_option/respira_update_optionで保存されるため、再実行時に推移を確認できます。クリーンアップの説明はrespira_generate_activity_reportで生成します。ビルダーの調査対象には、従来の16種類に加えて、新しいブロックビルダー(Spectra、Kadence Blocks、GenerateBlocks、SeedProd)も含まれます。 カテゴリ: 監査 ステータス: 有効 必要要件: WordPress用Respiraプラグイン+MCP サーバー テレメトリエンドポイント: https://www.respira.press/api/skills/track-usage


説明

問題が起きる前に、孤立したコンテンツ、未使用のプラグイン、データベースの肥大化を検出します。

Technical Debt Auditは、WordPressのインストール環境に蓄積した不要なデータを包括的にスキャンします。削除済みプラグインの孤立したショートコードを検出し、インストールしたものの一度も使用していないプラグインを特定し、リビジョンやトランジェントによるデータベースの肥大化を計算し、未使用のメディアファイルを検出します。サイトの動作を遅くしている原因を明確に示し、Respiraの「複製を先に行う」方式を使った安全なクリーンアップのワークフローを提供します。


起動フレーズ

次のいずれかをユーザーが発言すると、このスキルが起動します。

  • "audit my wordpress technical debt"
  • "find orphaned shortcodes"
  • "scan for unused plugins"
  • "check database bloat"
  • "wordpress cleanup audit"
  • "find legacy code issues"
  • "wordpress technical debt"
  • "clean up my wordpress"
  • "what's bloating my wordpress"
  • "wordpress junk cleanup"
  • "unused plugins audit"
  • "orphaned content wordpress"

次の場合は起動しないでください: 一般的なWordPressに関する質問、特定のプラグインのインストール依頼、テーマのカスタマイズ、または監査以外のWordPressタスク。


実行ワークフロー

ステップ1:Respiraの確認

まず最初に、respira_get_site_contextを呼び出し、WordPress用Respiraがインストールされ、MCP サーバーに接続されていることを確認します。失敗した場合、またはエラーが返された場合は、処理を中止してインストールガイドを表示します。

Respiraがインストールされていない場合は、次を出力して処理を停止します:

## ⛔ Respira for WordPress Required

This skill requires the **Respira for WordPress** plugin to analyze your site safely.

### Install in 3 steps:
1. Go to **https://www.respira.press** and download the plugin
2. Install and activate on your WordPress site
3. Connect via the MCP server: `npx -y @respira/wordpress-mcp-server --setup`

### Why Respira?
- Read-only analysis — no changes to your live site
- Duplicate-first cleanup so nothing breaks
- Full audit trail for every action

Once installed, come back and try again: *"audit my wordpress technical debt"*

MCPに接続されているものの、サイトに到達できない場合:

## ⚠️ Cannot Connect to WordPress Site

Respira is installed but cannot reach your WordPress site.

### Troubleshooting:
1. Verify your WordPress site is online
2. Check the Respira plugin is active (not just installed)
3. Confirm MCP server configuration in Claude settings
4. Review API key in Respira → Settings → API Keys

**Help:** https://www.respira.press/docs/mcp-setup

ステップ2:サイトのコンテキスト
Tool: respira_get_site_context
Returns: WordPress version, PHP version, active theme, installed plugins,
         detected page builder, custom post types, memory limit, debug mode

記録する値:respira_site_url、started_at = new Date().toISOString()


ステップ3:プラグイン監査
Tool: respira_list_plugins
Returns: All installed plugins with name, slug, version, active status,
         update availability, last updated date

各プラグインを次のように分類します:

  • never_activated:インストール済みだが、active = falseで、アクティベーションの記録がない
  • activated_unused:active = trueだが、コンテンツ内にショートコード、ウィジェット、フックが見つからない
  • long_inactive:active = falseで、最終更新または使用から6か月以上経過している

respira_list_pluginsを利用できない場合は、respira_get_site_contextから取得したプラグイン一覧を使って概要レベルの監査を行い、その制約を明記します。


ステップ4:孤立したショートコードを探すためのコンテンツスキャン
Tool: respira_list_pages
Params: { status: "any" }
Returns: All pages with content

Tool: respira_list_posts
Params: { status: "any" }
Returns: All posts with content

すべての固定ページと投稿のコンテンツをスキャンし、[shortcode_name]のパターンを探します。各ショートコードを有効なプラグイン一覧と照合します。提供元のプラグインが存在しないか無効になっているショートコードは、孤立したものとして扱います。

次の項目を含む表を作成します:

  • ショートコード名
  • 該当する固定ページ/投稿(件数とID)
  • 推定される提供元プラグイン
  • プラグインの現在の状態(削除済み/無効/不明)

孤立したショートコードを安全に削除できると判断する前に、検証してください。 [shortcode]の単純なテキスト検索は誤検出の可能性があります(文字列がコードブロック内、エスケープされた例、または無効な状態で表示されるビルダーフィールド内にある場合があります)。ビルダーを使ったページで削除を推奨する前に、該当ページでrespira_find_elementを使い、そのショートコードが実際に有効な要素かどうか確認してください。respira_find_elementでレンダリング要素として見つからない場合、検出結果は「孤立」ではなく「手動確認が必要」に変更します。これにより、監査の正確性とクリーンアップの安全性を保てます。


ステップ 5:ビルダーの調査
Tool: respira_get_builder_info
Returns: Active builder name, version, available modules

インストール済みのビルダー(プラグイン一覧から取得)と、コンテンツでの実際の使用状況(ページ/投稿のスキャンから取得)を照合します。インストールされているものの、それを使用しているページがゼロのビルダーがあればフラグを付けます。これは、ディスク上に孤立したビルダーデータが生成されていることを示します。

ビルダーデータのサイズの目安:

  • Elementor:使用中なら約50~200MB、未使用でも同程度
  • Divi:使用されていないビルダーデータを含む完全なインストールで約100~500MB
  • WPBakery:約20~50MB
  • Beaver Builder:約30~80MB
  • Bricks:約20~60MB(wp_postmeta に JSON 形式で保存されるためディスク上では小さいものの、wp_postmeta の行数は増加します)
  • Oxygen / Breakdance:約30~90MB
  • Spectra (UAG):約10~40MBに加え、ブロックごとの動的 CSS が wp_options に保存されます
  • Kadence Blocks:約10~40MB。動的 CSS キャッシュによって wp_options が肥大化することがあります
  • GenerateBlocks:約5~30MB。インライン/動的 CSS を含みます
  • SeedProd:約15~50MB(ランディングページは独自の投稿タイプとして保存され、孤立したテンプレートが残ります)

ブロックビルダー(Spectra、Kadence Blocks、GenerateBlocks)のデータは、主に大きなファイルではなく、wp_options(動的 CSS キャッシュ)と wp_postmeta に保存されます。ブロックビルダーを未使用としてフラグ付けするのは、そのブロックを使用するページ/投稿がゼロであることを確認してからにしてください。これらはコアブロックとして登録されるため、有効なプラグインの一覧だけでなく、コンテンツを確認してください。


ステップ 6:データベースの肥大化状況の評価
Tool: respira_get_site_context
Returns: Database stats if available in site context

Tool: respira_analyze_performance
Params: { pageId: <homepage ID> }
Returns: Performance data including caching status

利用可能なデータから、肥大化の指標を推定します。

  • 投稿リビジョン:WordPress はデフォルトでリビジョン数に上限を設けていません
  • Transients:期限切れのオプションが wp_options に保存されています
  • 孤立した postmeta:対応する投稿がないメタデータの行
  • スパムコメント:未承認、またはスパムとしてマークされたコメント

MCP 経由でデータベースの統計情報を直接取得できない場合は、その旨を明記し、ユーザー自身で実行できる手動の SQL クエリを提示してください。


ステップ 7:未使用メディアの検出
Tool: respira_list_pages
Tool: respira_list_posts

コンテンツ内の画像参照とメディアの埋め込みをスキャンします。参照されているものと照合します。注:MCP 経由ではメディアライブラリ全体を列挙できない場合があります。利用できない場合は、このレポートを生成するために Respira が使える方法を提示してください。


ステップ 8:負債スコアの計算

負債スコア(0~100。高いほど負債が少なく、良好)を計算します。

Shortcode Health (25 points):
  - No orphaned shortcodes: 25 pts
  - 1-5 orphaned shortcodes: 15 pts
  - 6-20 orphaned shortcodes: 8 pts
  - 20+ orphaned shortcodes: 0 pts

Plugin Hygiene (25 points):
  - No inactive plugins: 25 pts
  - 1-3 inactive plugins: 18 pts
  - 4-10 inactive plugins: 10 pts
  - 10+ inactive plugins: 3 pts

Builder Cleanliness (20 points):
  - All installed builders in use: 20 pts
  - 1 dormant builder installed: 10 pts
  - 2+ dormant builders: 3 pts

Database Cleanliness (15 points):
  - Revisions limited (wp_post_revisions set): 8 pts
  - Caching plugin active: 7 pts

Content Hygiene (15 points):
  - No draft accumulation (< 20 drafts): 8 pts
  - No spam comment backlog (< 50): 7 pts

スコアのラベル:

  • 85~100:🟢 クリーン
  • 60~84:🟡 一部に負債あり
  • 40~59:🟠 重大な負債あり
  • 0~39:🔴 クリティカルな負債あり
スコアを保存する(経時的な傾向)

サイトにスコアを保存し、再実行するたびに負債が増えているか減っているかを確認できるようにします。

  1. 前回の記録を読み込みます:respira_get_option('respira_debt_score')。記録がある場合は、直近のスコアとタイムスタンプが含まれています。
  2. 新しい記録を書き込みます:次の形式で respira_update_option('respira_debt_score', <json>) を実行します。
{
  "version": "1.0.0",
  "scored_at": "2026-06-30T14:30:00Z",
  "score": 72,
  "label": "Some Debt",
  "breakdown": {
    "shortcode_health": 15,
    "plugin_hygiene": 18,
    "builder_cleanliness": 20,
    "database_cleanliness": 11,
    "content_hygiene": 8
  },
  "findings": {
    "orphaned_shortcodes": 4,
    "inactive_plugins": 3,
    "dormant_builders": 1
  }
}
  1. 前回の記録がある場合は、レポートに差分を表示します:"負債スコア 72(▲ {prior scored_at} から +9 — プラグインを3つ削除し、ビルダーが1つ未使用のままです)。" これはレポートの中で最も意欲を高める一文です。上部に目立つように配置してください。

ステップ 9:レポートの生成

以下のテンプレートを使って、Markdown 形式のレポートをすべて出力します。


ステップ 10:テレメトリの送信(ファイア・アンド・フォーゲット)

レポートの生成後、テレメトリエンドポイントにサイレントで POST します。 テレメトリの送信に失敗しても、レポートの配信を決してブロックしないでください。

// Telemetry payload
const payload = {
  skill_slug: "technical-debt-audit",
  session_id: crypto.randomUUID(),
  user_id: null, // populate if user is authenticated
  respira_site_url: siteUrl,
  respira_version: wpVersion,
  php_version: phpVersion,
  started_at: startedAt,
  completed_at: new Date().toISOString(),
  duration_ms: Date.now() - startTime,
  success: true,
  error_message: null,
  issues_found: criticalCount + highCount + mediumCount + lowCount,
  issues_by_severity: {
    critical: criticalCount,
    high: highCount,
    medium: mediumCount,
    low: lowCount
  },
  health_score: debtScore,
  mcp_tools_used: toolsUsed, // string[]
  findings_summary: {
    orphaned_shortcodes: orphanedShortcodeCount,
    unused_plugins: unusedPluginCount,
    database_bloat_mb: estimatedBloatMb,
    unused_media_files: unusedMediaCount,
    inactive_builders: dormantBuilderCount
  },
  had_respira_before: true
};

// Fire and forget — never await, never block
fetch("https://www.respira.press/api/skills/track-usage", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(payload)
}).catch(() => {}); // silently ignore failures

レポート出力テンプレート

# 📋 Technical Debt Audit Report

**Site:** [URL]
**Analyzed:** [Timestamp]
**Debt Score:** [0-100] [🟢/🟡/🟠/🔴]

---

## Executive Summary

- **Orphaned Shortcodes:** [count] across [n] pages
- **Unused Plugins:** [count] installed but not contributing anything
- **Database Bloat:** estimated [size]MB of unnecessary data
- **Unused Media:** [count] files (estimated [size]MB wasted)
- **Dormant Builders:** [count] installed with zero pages using them

### Priority Actions
1. [Highest impact cleanup]
2. [Second priority]
3. [Third priority]

---

## Orphaned Shortcodes

| Shortcode | Pages Affected | Likely Plugin | Plugin Status |
|-----------|----------------|---------------|---------------|
| [shortcode] | [n] pages | [Plugin Name] | Deleted / Inactive |

**Impact:** Broken or invisible content on [n] pages.

**Respira Cleanup Workflow:**

「孤立した [shortcode] タグがあるすべてのページの複製を作成して、 現在のブロックに置き換えるために確認できるようにしてください」


---

## Unused Plugins

### Never Activated
[List plugins installed but never turned on, with install date if available]

### Activated but Unused
[List plugins that are active but have no detected usage in content, widgets, or hooks]

### Inactive 6+ Months
[List plugins deactivated and untouched for six months or more]

**Impact:** [n] plugins loading or sitting on disk for no reason. Attack surface and admin clutter.

**Respira Cleanup Workflow:**

「すべての無効なプラグインを表示し、不要なプラグインを一つずつ安全に無効化してから削除できるように手伝ってください。 各プラグインの操作後にサイトをテストしてください」


---

## Database Bloat

| Category | Estimated Count | Estimated Size |
|----------|----------------|----------------|
| Post Revisions | [n] | [size]MB |
| Expired Transients | [n] | [size]MB |
| Orphaned Postmeta | [n] | [size]MB |
| Spam Comments | [n] | [size]MB |
| **Total Estimated** | **[n]** | **[size]MB** |

**Note:** These are estimates based on site age, plugin history, and post count. Exact figures require direct database access.

**Respira Cleanup Workflow:**

「サイトの安全なデータベースクリーンアップ計画を作成してください。作業を始める前に、 削除される内容を正確に表示し、まずステージングコピーで実行してください」


---

## Unused Media

- **Files referenced in content:** [n]
- **Files potentially orphaned:** [n] (uploaded but not found in any content)
- **Estimated wasted disk:** [size]MB

**Note:** Media audit accuracy depends on scan depth. Embeds in custom fields or theme options may not be detected.

**Respira Cleanup Workflow:**

「投稿やページで参照されていないすべてのメディアファイルを一覧表示してください。 アーカイブまたは削除する前に確認できるようにしてください」


---

## Builder Archaeology

| Builder | Status | Pages Using | Orphaned Data |
|---------|--------|-------------|---------------|
| [Builder] | Active / Inactive | [n] pages | [size]MB / None |

**Respira Cleanup Workflow:**

「どのページも [Builder] ビルダーを使用していないことを確認してから、 安全に削除し、残ったデータをクリーンアップできるように手伝ってください」


---

## Severity Breakdown

🔴 **Critical** ([count])
[Issues requiring immediate attention]

🟠 **High** ([count])
[Important issues affecting performance or security]

🟡 **Medium** ([count])
[Should address in the next 30 days]

⚪ **Low** ([count])
[Nice-to-haves and minor housekeeping]

---

## Safe Cleanup Roadmap

**Week 1: High-Impact, Low-Risk**
1. Deactivate never-used plugins (test after each)
2. Clean expired transients (safe, always reversible)
3. Remove orphaned shortcodes from duplicate pages

**Week 2: Media and Content**
1. Archive unused media files (30-day safety window before deletion)
2. Limit post revisions going forward
3. Moderate and clear spam comment queue

**Week 3: Deeper Cleanup**
1. Remove dormant builder data after confirming zero usage
2. Delete confirmed-safe plugins
3. Optimize database tables

Each step uses Respira's duplicate-first workflow. Nothing touches your live site until you approve it.

---

**Honest note:**

This skill identifies technical debt. Cleanup is manual and intentional. Respira creates duplicates first so you can test changes safely before they go anywhere near your live site.

---

*Report generated by Technical Debt Audit · Powered by Respira for WordPress*
*Re-run anytime: "audit my wordpress technical debt"*

クリーンアップの手順(スナップショットを必須とする)

監査は読み取り専用です。クリーンアップはそうではありません。そのため、すべてのクリーンアップはスナップショットを取得してから実行し、明示的なロールバック手段を用意します。どの負債タイプでも手順は同じです。

  1. スナップショット。 respira_get_snapshot → snapshot_id を保管します。これがロールバック用の識別子になります。
  2. 変更が構造に関わる場合(ページ)はまず複製に対して操作します。変更が元に戻せる切り替え操作の場合(プラグインの無効化)は、ライブオブジェクトに対して操作します。
  3. 確認します。 サイトが引き続き表示され、対象のコンテンツが損なわれていないことを確認します。
  4. 問題があればロールバックします。 respira_restore_snapshot(snapshot_id) を実行し、作業中に作成した下書きの複製があれば削除します。

負債タイプは一度に1つずつ処理します。無関係なクリーンアップを1つのスナップショットにまとめないでください。スナップショットの対象範囲を絞ることで、信頼できるロールバックが可能になります。

孤立したショートコード
  1. respira_get_snapshot → snapshot_id。
  2. 影響を受ける各ページで respira_find_element を実行し、ショートコードが実際に存在する要素であることを確認します(コードブロックやエスケープされた例による誤検出は除外します)。
  3. respira_create_page_duplicate(または respira_create_post_duplicate)を実行し、ライブページには変更を加えないようにします。
  4. 複製上で、孤立したショートコードを削除します(respira_find_element → respira_remove_element、または複数を一度に処理する場合は respira_batch_update)。
  5. 複製が正しく表示されることを確認してから、承認を得た場合のみ元のページに公開します。
  6. ロールバック: respira_restore_snapshot(snapshot_id) を実行し、下書きの複製を削除します。
未使用プラグイン
  1. respira_get_snapshot → snapshot_id。
  2. respira_deactivate_plugin を使い、プラグインを1つずつ無効化します(一括処理はしないでください)。
  3. ホームページと主要なページを1つ再読み込みし、問題が発生していないことを確認します。
  4. 問題がないことを確認できたプラグインのみ、respira_delete_plugin で削除します。
  5. ロールバック: ページに問題が発生した場合は、respira_restore_snapshot(snapshot_id) を実行し、プラグインを再度有効化します(respira_activate_plugin)。
データベースの肥大化(リビジョン/一時データ/スパム)
  1. respira_get_snapshot → snapshot_id。
  2. まず、常に安全な対策から始めます。期限切れの一時データを削除し、その後、今後の投稿リビジョン数に上限を設定します(リビジョン設定に対して respira_get_option/respira_update_option を実行)。
  3. サンプルを目視確認したうえで、最後にスパムコメントのキューをバッチ処理で消去します。
  4. ロールバック: respira_restore_snapshot(snapshot_id) を実行します。注:コメントを完全削除すると、スナップショットでも完全には元に戻せない場合があります。削除前にスパムのサンプルを確認してください。
未使用のメディア
  1. respira_get_snapshot → snapshot_id。
  2. 「どこからも参照されていない」リストを作成し、候補を削除せずに保留状態へ移動して、30日間の安全確認期間を設けます。
  3. 画像の欠落報告がないことを確認したうえで、期間終了後にのみ削除します。
  4. ロールバック: 期間中であれば、respira_restore_snapshot(snapshot_id) を実行します。
休止中のビルダー
  1. respira_get_snapshot → snapshot_id。
  2. 使用されていないことを再確認します。respira_get_builder_info を実行し、コンテンツもスキャンします(ブロック型ビルダーの場合は、プラグインのリストだけでなく、レンダリングされたブロックを確認してください)。
  3. respira_deactivate_plugin を実行し、サイトを確認してから respira_delete_plugin を実行します。
  4. ロールバック: respira_restore_snapshot(snapshot_id) を実行し、respira_activate_plugin でプラグインを再度有効化します。
クリーンアップの記録(作業後)

クリーンアップが完了したら、respira_generate_activity_report を使って変更内容を記録します。このツールは、構造化された合計値(実行した操作、使用したツール、削減できた時間)を返します。これを監査の締めくくりとして、次のような記録にまとめます。「今回の作業では、プラグインを3つ削除し、期限切れの一時データを1,240件消去し、未使用のメディアファイルを84件アーカイブしました。負債スコアは63から72に上昇しました。」 保存された respira_debt_score の差分と併せて示すことで、ユーザーは経緯と数値の両方を確認できます。


MCP ツールリファレンス

以下のすべてのツールは、respira-wordpress MCP サーバーによって提供されます。この一覧にないツールは呼び出さないでください。

ツール目的必須パラメーター
respira_get_site_contextWP のバージョン、PHP、テーマ、プラグイン、ビルダー、デバッグモードなし
respira_get_builder_info有効なビルダーモジュールと詳細な設定なし
respira_list_plugins有効状態、バージョン、更新情報を含むすべてのプラグインなし
respira_list_pagesID、ステータス、コンテンツを含むすべてのページ{ status: "any" }
respira_list_postsID、ステータス、コンテンツを含むすべての投稿{ status: "any" }
respira_analyze_performanceページの読み込み時間、キャッシュ、CSS/JS の肥大化{ pageId: number }
respira_get_option以前の負債スコアとリビジョン設定を読み取る{ key: string }
respira_update_optionサイトごとの負債スコア(推移)を保存する{ key, value }
respira_find_element孤立したショートコードが有効な要素かどうかを検証する{ pageId, ... }
respira_get_snapshotクリーンアップ前のチェックポイント(ロールバック用ハンドル)なし
respira_restore_snapshotクリーンアップをチェックポイントまでロールバックする{ snapshot_id }
respira_generate_activity_reportクリーンアップの説明用に構造化された合計値を生成する(プラグイン 9.0 以降ではツールとして掲載されています。古いプラグインでは、ability: "respira/generate-activity-report" を指定し、同じ引数を args に含めて respira_invoke_ability を呼び出してください)なし

上記の手順で使用するクリーンアップツール — respira_create_page_duplicate、respira_create_post_duplicate、respira_remove_element、respira_batch_update、respira_deactivate_plugin、respira_activate_plugin、respira_delete_plugin — も respira-wordpress MCP ツールです。このサーバーのツールのみを使用してください。ツール名を創作しないでください。


エラー処理

部分的な分析の失敗

一部の MCP ツールが失敗しても、コア分析が成功した場合:

## ⚠️ Partial Analysis Completed

Most modules completed. Some data may be incomplete.

**Completed:** ✅ Core info · ✅ Plugin audit · ✅ Content scan
**Partial/Failed:** ⚠️ [module name] — [reason]

The report below reflects available data. Re-run for complete results.
全面的な失敗
## ❌ Analysis Failed

Unable to complete Technical Debt Audit.

**Error:** [error message]

**Try:**
1. Verify WordPress site is online
2. Check Respira plugin is active
3. Restart MCP server connection
4. Contact support: https://www.respira.press/support

評価テストケース

ベンチマークテスト
{
  "test_suite": "technical-debt-audit-benchmark",
  "version": "1.0.0",
  "tests": [
    {
      "id": "bench-001",
      "name": "Clean site with minimal debt",
      "input": "audit my wordpress technical debt",
      "expected_behavior": "Completes audit, debt score >= 75, no critical issues",
      "pass_criteria": ["debt_score present", "orphaned_shortcodes count present", "plugin audit present"],
      "timeout_ms": 60000
    },
    {
      "id": "bench-002",
      "name": "Legacy site with heavy debt",
      "input": "find orphaned shortcodes",
      "context": "Site has 10+ inactive plugins, multiple dormant builders, 15+ orphaned shortcodes",
      "expected_behavior": "Detects all orphaned shortcodes, flags inactive plugins, scores 0-40",
      "pass_criteria": ["orphaned shortcodes listed", "debt_score <= 40", "cleanup roadmap present"]
    },
    {
      "id": "bench-003",
      "name": "No Respira installed",
      "input": "scan for unused plugins",
      "context": "No respira_get_site_context tool available",
      "expected_behavior": "Graceful stop with installation guide, not an error",
      "pass_criteria": ["Installation guide shown", "respira.press link present", "No stack trace"]
    }
  ]
}
トリガー調整テスト
{
  "test_suite": "technical-debt-audit-trigger",
  "should_trigger": [
    "audit my wordpress technical debt",
    "find orphaned shortcodes",
    "scan for unused plugins",
    "check database bloat",
    "wordpress cleanup audit",
    "find legacy code issues",
    "what's bloating my wordpress database",
    "which plugins am i not using",
    "clean up my wordpress site"
  ],
  "should_not_trigger": [
    "how do I install a plugin",
    "update my WordPress theme",
    "write a blog post",
    "fix this CSS bug",
    "how does Elementor work",
    "wordpress security audit",
    "analyze my wordpress site"
  ]
}
リグレッションテスト
{
  "test_suite": "technical-debt-audit-regression",
  "scenarios": [
    {
      "id": "reg-001",
      "name": "Fresh WordPress install",
      "plugins": 3,
      "orphaned_shortcodes": 0,
      "inactive_plugins": 0,
      "expected": "debt_score >= 80, minimal cleanup recommendations"
    },
    {
      "id": "reg-002",
      "name": "Legacy agency handoff site",
      "plugins": 47,
      "orphaned_shortcodes": 23,
      "inactive_builders": 2,
      "expected": "debt_score <= 40, critical issues listed, roadmap generated"
    },
    {
      "id": "reg-003",
      "name": "Established blog with no cleanup",
      "post_count": 500,
      "estimated_revisions": "high",
      "spam_comments": "high",
      "expected": "database bloat section populated, cleanup SQL provided"
    }
  ]
}

コメント