How this command is triggered — by the user, by Claude, or both
Slash command
/virtualboard:Architect-Generate_Technical_Debt_Reportagents/architect/The summary Claude sees in its command listing — used to decide when to auto-load this command
# Generate Technical Debt Report (GTD) **Trigger Phrases:** - "Generate Technical Debt Report" - "GTD" - "Analyze technical debt" - "Technical debt analysis" **Action:** When the Architect agent receives this command, it should: ## 1. Scan Codebase for Technical Debt - Identify code smells and anti-patterns - Review TODO/FIXME/HACK comments in code - Analyze code complexity metrics (cyclomatic complexity, cognitive complexity) - Check for outdated dependencies and deprecated APIs - Identify duplicated code - Review test coverage gaps - Check for commented-out code - Identify overly long ...
Trigger Phrases:
Action: When the Architect agent receives this command, it should:
For each debt item, evaluate:
Create report at .virtualboard/architecture/technical-debt/TD-{YYYY-MM-DD}.md:
# Technical Debt Report
**Generated:** {YYYY-MM-DD}
**Architect:** {Name/Team}
**Project:** {Project Name}
---
## Executive Summary
**Total Debt Items:** {X}
**High Priority:** {X} | **Medium Priority:** {X} | **Low Priority:** {X}
**Estimated Effort to Address All:** {X} developer-weeks
**Debt Trend:** 📈 Increasing | 📊 Stable | 📉 Decreasing
**Critical Findings:**
- {Key finding 1}
- {Key finding 2}
- {Key finding 3}
---
## Debt by Category
| Category | Count | High | Medium | Low | Estimated Effort |
|----------------|-------|------|--------|-----|------------------|
| Code Quality | {X} | {X} | {X} | {X} | {X} days |
| Architecture | {X} | {X} | {X} | {X} | {X} days |
| Testing | {X} | {X} | {X} | {X} | {X} days |
| Dependencies | {X} | {X} | {X} | {X} | {X} days |
| Performance | {X} | {X} | {X} | {X} | {X} days |
| Security | {X} | {X} | {X} | {X} | {X} days |
| Documentation | {X} | {X} | {X} | {X} | {X} days |
| **Total** | **{X}** | **{X}** | **{X}** | **{X}** | **{X} days** |
---
## High Priority Technical Debt
### TD-001: {Debt Item Title}
**Category:** {Code Quality/Architecture/etc.}
**Severity:** 🔴 Critical | 🟡 High | 🟠 Medium | 🟢 Low
**Location:** `{file_path}:{line_numbers}` or `{module/component}`
**Description:**
{Detailed description of the technical debt issue}
**Business Impact:**
- {How this affects users, performance, or development}
- {Concrete examples of problems caused}
**Technical Details:**
```{language}
// Example of problematic code or pattern
{code snippet}
Recommended Solution:
Estimated Effort: {X} hours/days Risk if Not Addressed: {Description of what could go wrong} Dependencies: {Related debt items or features} Owner: {Team/Person responsible} Target Date: {YYYY-MM-DD}
{Repeat structure}
Category: {Category} Severity: 🟠 Medium
Location: {file_path}
Description: {Brief description}
Impact: {Impact description}
Effort: {Estimate}
Recommendation: {Fix suggestion}
Category: {Category} Severity: 🟢 Low
Location: {file_path}
Description: {Brief description}
Recommendation: {Fix suggestion}
| Metric | Threshold | Current | Status |
|---|---|---|---|
| Average Cyclomatic Complexity | < 10 | {X} | ✅/⚠️/❌ |
| Max Cyclomatic Complexity | < 20 | {X} | ✅/⚠️/❌ |
| Cognitive Complexity | < 15 | {X} | ✅/⚠️/❌ |
| Function Length (avg) | < 50 lines | {X} | ✅/⚠️/❌ |
{file_path}| Package | Current | Latest | Type | Security Issues |
|---|---|---|---|---|
| {name} | {ver} | {ver} | {prod/dev} | {count} |
{deprecated_api_1} - Used in {X} places - Replace with: {alternative}{deprecated_api_2} - Used in {X} places - Replace with: {alternative}{file_path}{location} - Impact: {X}ms average{table}.{column}{location}| Severity | Count | Examples |
|---|---|---|
| Critical | {X} | {CVE-####} |
| High | {X} | {CVE-####} |
| Medium | {X} | {List} |
| Low | {X} | {List} |
{location}{location}{location}{endpoints}{components}{complex_modules}{doc_name} - Last updated: {date} (code changed: {date})Focus: Critical security and stability issues
Expected Impact: {Description} Effort: {X} developer-days
Focus: High-impact architectural improvements
Expected Impact: {Description} Effort: {X} developer-days
Focus: Code quality and test coverage
{module}Expected Impact: {Description} Effort: {X} developer-weeks
ROI of Addressing Top 10 Items: {X}% reduction in bug rate, {X}% faster development
Next Review: {YYYY-MM-DD} Last Updated: {YYYY-MM-DD}
### 5. Create Directory if Needed
- Ensure `.virtualboard/architecture/technical-debt/` exists
- Use `mkdir -p` to create if necessary
### 6. Announce Completion
- Inform the user that the technical debt report has been created
- Provide the file path
- Highlight total debt count by priority
- Recommend top 3-5 immediate actions
- Provide summary of estimated effort and ROI
---
## Optional: Generate Branded HTML Report
If the user appends `--html`, says "as HTML"/"branded HTML", or sets
`format: html`, also produce an HTML rendering. **Additive** — the Markdown
report is always written first.
1. Load `templates/reports/html/architect-tech-debt.html`. The comment block at the top of
that file lists every placeholder this command must compute, with the same
names used in the Markdown report.
2. Inline `{INCLUDE: _partials/<name>.html}` directives by reading and
pasting the referenced files; iterate until no `{INCLUDE:` markers remain.
3. Substitute `{BRAND_LOGO_DATAURI}` with the contents of
`templates/reports/html/_partials/astucia-logo.b64.txt`, **stripping leading
and trailing whitespace** (the file may end in a newline that must not
appear inside `src="…"`).
4. Substitute `{BRAND_NAME}` (default `Astucia`) and `{BRAND_TAGLINE}`
(default `AI Development Studio`) unless the user provided overrides.
5. Substitute the cross-cutting placeholders (`REPORT_TITLE`,
`REPORT_TITLE_HTML`, `REPORT_SUBTITLE`, `EYEBROW`, `GENERATED_DATE`,
`GENERATED_DATETIME`, `AUTHOR_AGENT`, `CLASSIFICATION`, `PROJECT_NAME`,
`NAV_LINKS`, `FOOTER_PRIMARY_LINE`, `FOOTER_SECONDARY_LINE`,
`FOOTER_NOTE_BLOCK`, `EXTRA_SCRIPTS`).
6. Substitute the per-template scalar placeholders:
`EXECUTIVE_SUMMARY_HTML`, `KPI_TOTAL`, `KPI_HIGH`, `KPI_MEDIUM`, `KPI_LOW`, `EFFORT_TOTAL_WEEKS`, `DEBT_TREND`, `DEBT_TREND_CLASS`, `METRICS_HTML`, `DEPENDENCIES_HTML`, `ARCHITECTURE_DEBT_HTML`, `PERFORMANCE_HTML`, `SECURITY_HTML`, `DOCUMENTATION_HTML`, `COST_BENEFIT_HTML`, `NEXT_REVIEW_DATE`.
7. Expand each `{#NAME}…{/NAME}` list block once per item using the
per-template list placeholders: `HERO_META_CELLS`, `DEBT_BY_CATEGORY`, `HIGH_DEBT`, `MEDIUM_DEBT`, `LOW_DEBT`, `SPRINT_1_ITEMS`, `SPRINT_2_3_ITEMS`, `QUARTER_ITEMS`. The per-item field names are
documented in the template's top comment.
8. For each list, set the matching `LIST_EMPTY_<NAME>` scalar to `""` if the
list has items, or to a small italic note (e.g.
`<p class="empty-note">No items.</p>`) if the list is empty.
9. Write the rendered HTML next to the Markdown:
`.virtualboard/architecture/technical-debt/TD-{YYYY-MM-DD}.html`.
10. **Verify before reporting completion.** Search the rendered output for any
literal `{` — there must be none. Resolve leftovers (or substitute the
empty string for known-optional slots) before continuing.
11. In your final reply, list **both** file paths.
A filled-in reference example lives at
`templates/reports/examples/architect-tech-debt.example.html`.
npx claudepluginhub virtualboard/template-base --plugin virtualboard