chore: prune unused Truthmark surfaces (#10)

Co-authored-by: MerlinH <merlinh221@gmail.com>
This commit is contained in:
Merlin's Cat
2026-05-28 22:12:15 +10:00
committed by GitHub
co-authored by MerlinH
parent fcfd5f7adc
commit e5a586a420
28 changed files with 220 additions and 199 deletions
+49 -1
View File
@@ -194,6 +194,7 @@ Wenn der Agent funktionalen Code ändert, wirkt Truth Sync als Abschlusskontroll
| Local-first-Betrieb | Benötigt keinen gehosteten Dienst, Daemon, keine Datenbank und keinen MCP-Server. |
| Sicherere Schreibgrenzen | Trennt code-first, doc-first, read-only und doc-only Workflows. |
| Validierung | Meldet Probleme bei Routing, Autorität, Frontmatter, Links, generierten Oberflächen, Branch-Scope, Freshness und Coverage. |
| Optionales Portal | Erzeugt eine festgeschriebene statische HTML-Präsentationssite aus Markdown-Truth-Dokumenten, wenn es ausdrücklich aktiviert und angefragt wird. |
## Visueller Überblick
@@ -326,6 +327,7 @@ Sie werden von Agenten oder Agenten-Hosts während der Repository-Arbeit genutzt
| Truth Preview | read-only | Der Agent vor Änderungen wahrscheinliches Routing einschätzen muss. | Liest nur. Autorisiert keine Schreibzugriffe. |
| Truth Realize | doc-first | Produkt- oder Architektur-Truth-Dokumente führen und Code daran angepasst werden soll. | Aktualisiert nur Code. Der Agent darf die Truth-Dokumente, die er realisiert, nicht bearbeiten. |
| Truth Check | audit-first | Ein Reviewer oder Agent die Gesundheit der Repository-Wahrheit auditieren muss. | Auditiert und berichtet. |
| Truthmark Portal | presentation-only | Ein Mensch ausdrücklich eine durchsuchbare statische HTML-Portalansicht über Repository-Truth-Dokumente anfordert. | Schreibt generierte nicht-kanonische statische Dateien nur unter dem konfigurierten Portal-Ausgabeverzeichnis. |
### Wichtige Unterscheidung
@@ -437,6 +439,35 @@ Sie sind keine Quellen der Wahrheit.
Strukturierte Ausgabe ist mit `--json` verfügbar, wo sie unterstützt wird.
## Truthmark Portal
Truthmark Portal ist ein optionaler Präsentations-Workflow für Teams, die eine menschenlesbare Site über ihren festgeschriebenen Truth-Dokumenten möchten.
Er ist bewusst vom Kern-Truth-Workflow getrennt:
- Markdown-Truth-Dokumente bleiben kanonisch.
- Generiertes Portal-HTML dient nur der Präsentation.
- Portal wird nur manuell ausgeführt; es läuft nicht als Completion-Gate, Truth-Sync-Schritt, `truthmark check`-Schritt oder automatischer Post-Change-Hook.
- Portal-Schreibzugriffe bleiben im konfigurierten Ausgabeverzeichnis, sofern der Nutzer den Scope nicht ausdrücklich ändert.
- Generierte Seiten sollten lokale Assets, Quellen-Provenance und einen sichtbaren Markdown-ist-kanonisch-Hinweis verwenden.
Aktiviere es mit dem namespaced Config-Block:
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
Dann erneut ausführen:
```bash
truthmark init
```
Wenn aktiviert, installiert Truthmark host-native Portal-Workflow-Oberflächen für die konfigurierten Plattformen, etwa `/truthmark-portal` oder `/truthmark:portal` je nach Agenten-Host.
## Konfiguration
Truthmark ist config-first.
@@ -471,6 +502,7 @@ Wichtige Config-Bereiche sind:
| `docs.routing.area_files_root` | Verzeichnis für delegierte untergeordnete Routendateien. |
| `docs.routing.default_area` | Dateiname des initial erzeugten untergeordneten Routings ohne Erweiterung. |
| `docs.routing.max_delegation_depth` | Aktuelle maximale Routing-Delegationstiefe. |
| `truthmark-portal` | Optionale manuelle Präsentations-Workflow-Einstellungen: `enabled`, `output` und `template`. |
| `authority` | Geordnete kanonische Dokumente und Globs, die als Repository-Truth-Autorität dienen. |
| `instruction_targets` | Dateien, die gemeinsam verwaltete Instruktionsblöcke erhalten, etwa `AGENTS.md`. |
| `frontmatter.required` | Metadatenfelder, die bei Fehlen Error-Diagnostik erzeugen. |
@@ -632,6 +664,21 @@ truthmark impact --base main
truthmark context --workflow truth-sync --base main --format markdown
```
### Optionalen Portal-Workflow aktivieren
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
```bash
truthmark init
```
Bitte den Agenten-Host anschließend ausdrücklich, den installierten Portal-Workflow auszuführen, wenn die statische Präsentationssite erzeugt oder aktualisiert werden soll.
## Projektstatus
Truthmark V1 bietet derzeit:
@@ -650,6 +697,7 @@ Truthmark V1 bietet derzeit:
- generierte Truth-Preview-Workflow-Oberflächen
- generierte Truth-Realize-Workflow-Oberflächen
- generierte Truth-Check-Workflow-Oberflächen
- optionale generierte Truthmark-Portal-Workflow-Oberflächen
- Diagnostik für Route, Autorität, Entscheidungsstruktur, Frontmatter, Links, Freshness, generierte Oberflächen und Coverage
- abgeleitete RepoIndex-, RouteMap-, ImpactSet- und ContextPack-Artefakte
- host-spezifische Oberflächen für Codex, Claude Code, GitHub Copilot, OpenCode und Gemini CLI
@@ -712,7 +760,7 @@ Es ist nicht:
- ein gehosteter Dienst
- ein MCP-Server
- eine Vektordatenbank
- ein Generator für Dokumentations-Websites
- ein kanonischer Dokumentations-Website-Generator oder eine gehostete Docs-Plattform
- ein CI- oder PR-Enforcement-Produkt
- ein Ersatz für Tests, Code Review oder technische Führung
- eine autonome Code-Rewrite-Engine
+49 -1
View File
@@ -194,6 +194,7 @@ Cuando el agente cambia código funcional, Truth Sync actúa como guarda de cier
| Operación local-first | No requiere servicio alojado, demonio, base de datos ni servidor MCP. |
| Límites de escritura más seguros | Separa flujos code-first, doc-first, read-only y doc-only. |
| Validación | Reporta problemas de rutas, autoridad, frontmatter, enlaces, superficies generadas, alcance de rama, frescura y cobertura. |
| Portal opcional | Genera un sitio HTML estático confirmado desde documentos de verdad Markdown cuando se habilita y solicita explícitamente. |
## Resumen visual
@@ -326,6 +327,7 @@ Los usan agentes o hosts de agentes durante el trabajo en el repositorio. No son
| Truth Preview | read-only | El agente necesita previsualizar rutas probables antes de editar. | Solo lee. No autoriza escrituras. |
| Truth Realize | doc-first | Documentos de verdad de producto o arquitectura lideran y el código debe actualizarse para coincidir. | Actualiza solo código. El agente no debe editar los documentos de verdad que está realizando. |
| Truth Check | audit-first | Un revisor o agente necesita auditar la salud de la verdad del repositorio. | Audita e informa. |
| Truthmark Portal | presentation-only | Una persona pide explícitamente un Portal HTML estático navegable sobre los documentos de verdad del repositorio. | Escribe solo archivos estáticos generados no canónicos bajo el directorio de salida Portal configurado. |
### Distinción importante
@@ -437,6 +439,35 @@ No son fuentes de verdad.
La salida estructurada está disponible con `--json` donde se admite.
## Truthmark Portal
Truthmark Portal es un flujo opcional de presentación para equipos que quieren un sitio legible por personas sobre sus documentos de verdad confirmados.
Está separado deliberadamente del flujo central de verdad:
- Los documentos de verdad Markdown siguen siendo canónicos.
- El HTML Portal generado es solo presentación.
- Portal se ejecuta solo manualmente; no se ejecuta como puerta de finalización, paso de Truth Sync, paso de `truthmark check` ni hook automático post-change.
- Las escrituras de Portal permanecen dentro del directorio de salida configurado salvo que la persona cambie el alcance explícitamente.
- Las páginas generadas deben usar assets locales, procedencia de fuentes y un aviso visible de que Markdown es canónico.
Habilítalo con el bloque de configuración con espacio de nombres:
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
Luego vuelve a ejecutar:
```bash
truthmark init
```
Cuando está habilitado, Truthmark instala superficies Portal host-native para las plataformas configuradas, como `/truthmark-portal` o `/truthmark:portal` según el host de agente.
## Configuración
Truthmark es config-first.
@@ -471,6 +502,7 @@ Las áreas importantes de configuración incluyen:
| `docs.routing.area_files_root` | Directorio para archivos de rutas secundarias delegadas. |
| `docs.routing.default_area` | Nombre base de la ruta secundaria inicial generada. |
| `docs.routing.max_delegation_depth` | Profundidad máxima actual de delegación de rutas. |
| `truthmark-portal` | Ajustes opcionales del flujo manual de presentación: `enabled`, `output` y `template`. |
| `authority` | Documentos canónicos y globs ordenados usados como autoridad de verdad del repositorio. |
| `instruction_targets` | Archivos que reciben bloques de instrucciones administrados compartidos, como `AGENTS.md`. |
| `frontmatter.required` | Campos de metadatos que producen diagnósticos de error cuando faltan. |
@@ -632,6 +664,21 @@ truthmark impact --base main
truthmark context --workflow truth-sync --base main --format markdown
```
### Habilitar el flujo Portal opcional
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
```bash
truthmark init
```
Luego pide explícitamente al host de agente que ejecute el flujo Portal instalado cuando quieras generar o refrescar el sitio estático de presentación.
## Estado del proyecto
Truthmark V1 actualmente proporciona:
@@ -650,6 +697,7 @@ Truthmark V1 actualmente proporciona:
- superficies generadas de flujo Truth Preview
- superficies generadas de flujo Truth Realize
- superficies generadas de flujo Truth Check
- superficies generadas opcionales de flujo Truthmark Portal
- diagnósticos de rutas, autoridad, estructura de decisiones, frontmatter, enlaces, frescura, superficies generadas y cobertura
- artefactos derivados RepoIndex, RouteMap, ImpactSet y ContextPack
- superficies específicas de host para Codex, Claude Code, GitHub Copilot, OpenCode y Gemini CLI
@@ -712,7 +760,7 @@ No es:
- un servicio alojado
- un servidor MCP
- una base de datos vectorial
- un generador de sitios de documentación
- un generador canónico de sitios de documentación o plataforma de docs alojada
- un producto de enforcement para CI o PR
- un reemplazo de pruebas, revisión de código o liderazgo técnico
- un motor autónomo de reescritura de código
+49 -1
View File
@@ -194,6 +194,7 @@ truthmark check
| Local-first работа | Не требует размещенного сервиса, daemon, базы данных или MCP-сервера. |
| Более безопасные границы записи | Разделяет code-first, doc-first, read-only и doc-only workflows. |
| Валидация | Сообщает о проблемах маршрутизации, authority, frontmatter, ссылок, generated surfaces, branch scope, freshness и coverage. |
| Опциональный Portal | Генерирует зафиксированный статический HTML-сайт презентации из Markdown-документов истины, когда он явно включен и запрошен. |
## Визуальный обзор
@@ -326,6 +327,7 @@ truthmark init
| Truth Preview | read-only | Агенту нужно предварительно понять вероятный routing перед правками. | Только чтение. Не авторизует записи. |
| Truth Realize | doc-first | Продуктовые или архитектурные документы истины ведут, и код нужно обновить под них. | Обновляет только код. Агент не должен редактировать документы истины, которые реализует. |
| Truth Check | audit-first | Ревьюеру или агенту нужно проверить здоровье истины репозитория. | Аудитирует и сообщает. |
| Truthmark Portal | presentation-only | Человек явно просит доступный для просмотра статический HTML Portal по документам истины репозитория. | Пишет только сгенерированные неканонические статические файлы в настроенную директорию вывода Portal. |
### Важное различие
@@ -437,6 +439,35 @@ truthmark check
Структурированный вывод доступен с `--json` там, где поддерживается.
## Truthmark Portal
Truthmark Portal — опциональный презентационный workflow для команд, которым нужен человекочитаемый сайт поверх зафиксированных документов истины.
Он намеренно отделен от основного workflow истины:
- Markdown-документы истины остаются каноническими.
- Сгенерированный HTML Portal предназначен только для презентации.
- Portal запускается только вручную; он не выполняется как completion gate, шаг Truth Sync, шаг `truthmark check` или автоматический post-change hook.
- Записи Portal остаются внутри настроенной директории вывода, если пользователь явно не меняет scope.
- Сгенерированные страницы должны использовать локальные assets, provenance источников и видимое уведомление, что Markdown является каноническим источником.
Включите его namespaced config-блоком:
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
Затем запустите снова:
```bash
truthmark init
```
Когда Portal включен, Truthmark устанавливает host-native Portal workflow surfaces для настроенных платформ, например `/truthmark-portal` или `/truthmark:portal` в зависимости от agent host.
## Конфигурация
Truthmark работает config-first.
@@ -471,6 +502,7 @@ truthmark init
| `docs.routing.area_files_root` | Директория для делегированных дочерних файлов маршрутов. |
| `docs.routing.default_area` | Базовое имя начального scaffolded дочернего маршрута. |
| `docs.routing.max_delegation_depth` | Текущая максимальная глубина делегирования routing. |
| `truthmark-portal` | Опциональные настройки ручного презентационного workflow: `enabled`, `output` и `template`. |
| `authority` | Упорядоченные канонические docs и globs, используемые как authority истины репозитория. |
| `instruction_targets` | Файлы, которые получают общие управляемые блоки инструкций, например `AGENTS.md`. |
| `frontmatter.required` | Поля metadata, которые создают error diagnostics при отсутствии. |
@@ -632,6 +664,21 @@ truthmark impact --base main
truthmark context --workflow truth-sync --base main --format markdown
```
### Включить опциональный Portal workflow
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
```bash
truthmark init
```
Затем явно попросите agent host выполнить установленный Portal workflow, когда нужно сгенерировать или обновить статический презентационный сайт.
## Статус проекта
Truthmark V1 сейчас предоставляет:
@@ -650,6 +697,7 @@ Truthmark V1 сейчас предоставляет:
- сгенерированные поверхности workflow Truth Preview
- сгенерированные поверхности workflow Truth Realize
- сгенерированные поверхности workflow Truth Check
- опциональные сгенерированные поверхности workflow Truthmark Portal
- diagnostics для route, authority, decision-structure, frontmatter, links, freshness, generated-surface и coverage
- производные артефакты RepoIndex, RouteMap, ImpactSet и ContextPack
- host-specific поверхности для Codex, Claude Code, GitHub Copilot, OpenCode и Gemini CLI
@@ -712,7 +760,7 @@ Truthmark намеренно небольшой.
- размещенным сервисом
- MCP-сервером
- векторной базой данных
- генератором сайтов документации
- каноническим генератором сайтов документации или hosted docs platform
- CI- или PR-enforcement продуктом
- заменой tests, code review или technical leadership
- автономным движком переписывания кода
+49 -1
View File
@@ -196,6 +196,7 @@ truthmark check
| 本地优先运行 | 不需要托管服务、守护进程、数据库或 MCP 服务器。 |
| 更安全的写入边界 | 区分 code-first、doc-first、read-only 和 doc-only 工作流。 |
| 验证 | 报告路由、权限边界、frontmatter、链接、生成表面、分支范围、freshness 和覆盖率问题。 |
| 可选 Portal | 在明确启用并请求时,从 Markdown 事实文档生成已提交的静态 HTML 展示站点。 |
## 视觉概览
@@ -328,6 +329,7 @@ truthmark init
| Truth Preview | read-only | 代理需要在编辑前预览可能的路由。 | 只读。不授权写入。 |
| Truth Realize | doc-first | 产品或架构事实文档在前,代码应更新以匹配它们。 | 只更新代码。代理不能编辑它正在实现的事实文档。 |
| Truth Check | audit-first | 审查者或代理需要审计仓库事实健康状况。 | 审计并报告。 |
| Truthmark Portal | presentation-only | 人类明确要求为仓库事实文档生成可浏览的静态 HTML Portal。 | 只在配置的 Portal 输出目录下写入生成的非规范静态文件。 |
### 重要区别
@@ -439,6 +441,35 @@ truthmark check
受支持位置可使用 `--json` 获取结构化输出。
## Truthmark Portal
Truthmark Portal 是一个可选的展示工作流,适合想要基于已提交 truth 文档生成面向人的可读站点的团队。
它有意与核心 truth 工作流分离:
- Markdown truth 文档仍然是规范来源。
- 生成的 Portal HTML 仅用于展示。
- Portal 只能手动运行;它不会作为完成门禁、Truth Sync 步骤、`truthmark check` 步骤或自动 post-change hook 运行。
- 除非用户明确改变范围,Portal 写入必须留在配置的输出目录内。
- 生成页面应使用本地 assets、来源 provenance,并显示 Markdown 规范来源免责声明。
用这个命名空间配置块启用它:
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
然后重新运行:
```bash
truthmark init
```
启用后,Truthmark 会为已配置平台安装宿主原生 Portal 工作流表面,例如 `/truthmark-portal``/truthmark:portal`,具体取决于代理宿主。
## 配置
Truthmark 是 config-first。
@@ -473,6 +504,7 @@ truthmark init
| `docs.routing.area_files_root` | 委托子路由文件目录。 |
| `docs.routing.default_area` | 初始脚手架子路由 basename。 |
| `docs.routing.max_delegation_depth` | 当前最大路由委托深度。 |
| `truthmark-portal` | 可选手动展示工作流设置:`enabled``output``template`。 |
| `authority` | 用作仓库事实权威的有序规范文档和 glob。 |
| `instruction_targets` | 接收共享受管说明块的文件,例如 `AGENTS.md`。 |
| `frontmatter.required` | 缺失时产生错误诊断的元数据字段。 |
@@ -634,6 +666,21 @@ truthmark impact --base main
truthmark context --workflow truth-sync --base main --format markdown
```
### 启用可选 Portal 工作流
```yaml
truthmark-portal:
enabled: true
output: docs/truthmark-portal
template: default
```
```bash
truthmark init
```
当你想生成或刷新静态展示站点时,再明确要求代理宿主运行已安装的 Portal 工作流。
## 项目状态
Truthmark V1 目前提供:
@@ -652,6 +699,7 @@ Truthmark V1 目前提供:
- 生成的 Truth Preview 工作流表面
- 生成的 Truth Realize 工作流表面
- 生成的 Truth Check 工作流表面
- 可选生成的 Truthmark Portal 工作流表面
- 路由、权限边界、决策结构、frontmatter、链接、freshness、生成表面和覆盖率诊断
- 派生的 RepoIndex、RouteMap、ImpactSet 和 ContextPack 产物
- 面向 Codex、Claude Code、GitHub Copilot、OpenCode 和 Gemini CLI 的宿主专属表面
@@ -714,7 +762,7 @@ Truthmark 有意保持小而清晰。
- 托管服务
- MCP 服务器
- 向量数据库
- 文档网站生成器
- 规范文档网站生成器或托管文档平台
- CI 或 PR 强制执行产品
- 测试、代码审查或技术领导力的替代品
- 自主代码重写引擎
-70
View File
@@ -26,7 +26,6 @@
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@types/mdast": "^4.0.4",
"@types/node": "^24.9.1",
"eslint": "^9.39.4",
"prettier": "^3.8.3",
@@ -1027,9 +1026,6 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1047,9 +1043,6 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1067,9 +1060,6 @@
"ppc64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1087,9 +1077,6 @@
"s390x"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1107,9 +1094,6 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1127,9 +1111,6 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1308,9 +1289,6 @@
"arm"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1325,9 +1303,6 @@
"arm"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1342,9 +1317,6 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1359,9 +1331,6 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1376,9 +1345,6 @@
"loong64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1393,9 +1359,6 @@
"loong64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1410,9 +1373,6 @@
"ppc64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1427,9 +1387,6 @@
"ppc64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1444,9 +1401,6 @@
"riscv64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1461,9 +1415,6 @@
"riscv64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1478,9 +1429,6 @@
"s390x"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1495,9 +1443,6 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -1512,9 +1457,6 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -3402,9 +3344,6 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -3426,9 +3365,6 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -3450,9 +3386,6 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -3474,9 +3407,6 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MPL-2.0",
"optional": true,
"os": [
-1
View File
@@ -57,7 +57,6 @@
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@types/mdast": "^4.0.4",
"@types/node": "^24.9.1",
"eslint": "^9.39.4",
"prettier": "^3.8.3",
-8
View File
@@ -42,11 +42,3 @@ ${renderMarkdownExample(
}),
)}`;
};
export const renderTruthRealizeInstructions = (): string => {
return `### Manual Truth Realize
Only run when the user explicitly asks to realize truth docs into code. This is a manual installed instruction or skill, not a dedicated CLI command.
Invocations: OpenCode /skill truthmark-realize; Codex /truthmark-realize or $truthmark-realize; Claude Code /truthmark-realize; GitHub Copilot /truthmark-realize; Gemini CLI /truthmark:realize.
Doc first: read truth docs, routing, and relevant code; repository-intelligence artifacts are optional derived context and never grant write scope; block before writing code if source truth is broad, mixed-owner, index-like, unrouteable, stale, or conflicts with implementation evidence; write functional code only; do not edit truth docs or truth routing.
Report truth docs used, code updated, and verification.`;
};
-6
View File
@@ -3,12 +3,6 @@ import type { TruthmarkConfig } from "../config/schema.js";
import { resolveTruthDocsRoot } from "../truth/docs.js";
export { resolveTruthDocsRoot } from "../truth/docs.js";
export type {
AuditEvidenceConfidence,
AuditEvidenceItem,
ClaimEvidenceItem,
ClaimEvidenceResult,
} from "../truth/evidence.js";
export {
renderAuditEvidenceCheckedSection,
renderClaimEvidenceCheckedSection,
+1 -1
View File
@@ -21,7 +21,7 @@ const renderMarkdownExample = (content: string): string => {
export const TRUTH_CHECK_EXPLICIT_INVOCATIONS =
"OpenCode /skill truthmark-check; Codex /truthmark-check or $truthmark-check; Claude Code /truthmark-check; GitHub Copilot /truthmark-check; Gemini CLI /truthmark:check.";
export const renderTruthCheckReportExample = (
const renderTruthCheckReportExample = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
const rootRouteIndex = config.docs.routing.rootIndex;
+1 -1
View File
@@ -15,7 +15,7 @@ const renderMarkdownExample = (content: string): string => {
export const TRUTH_PREVIEW_EXPLICIT_INVOCATIONS =
"OpenCode /skill truthmark-preview; Codex /truthmark-preview or $truthmark-preview; Claude Code /truthmark-preview; GitHub Copilot /truthmark-preview; Gemini CLI /truthmark:preview.";
export const renderTruthPreviewReportExample = (
const renderTruthPreviewReportExample = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
const truthDocsRoot = resolveTruthDocsRoot(config);
+1 -5
View File
@@ -14,11 +14,7 @@ export type TruthmarkReadOnlySubagentId =
| "truth_claim_verifier"
| "truth_doc_reviewer";
export type TruthmarkWriteSubagentId = "truth_doc_writer";
export type TruthmarkSubagentId =
| TruthmarkReadOnlySubagentId
| TruthmarkWriteSubagentId;
export type TruthmarkWorkflowHelperCommand = {
type TruthmarkWorkflowHelperCommand = {
argv: string[];
};
+2 -5
View File
@@ -19,9 +19,6 @@ export const TRUTHMARK_WRITE_WORKER_REPORT_FIELDS = [
"notes",
] as const;
export type TruthmarkWriteWorkerReportField =
(typeof TRUTHMARK_WRITE_WORKER_REPORT_FIELDS)[number];
export type TruthmarkWriteLease = {
workflow: TruthmarkWorkflowId;
worker: TruthmarkWriteSubagentId;
@@ -44,7 +41,7 @@ export type TruthmarkWriteLeaseChangeValidation = {
export type TruthmarkWriteWorkerReport = Record<string, unknown>;
export type TruthmarkWriteWorkerAcceptanceReasonCode =
type TruthmarkWriteWorkerAcceptanceReasonCode =
| "missing-report-field"
| "invalid-report-field"
| "invalid-report-status"
@@ -56,7 +53,7 @@ export type TruthmarkWriteWorkerAcceptanceReasonCode =
| "completed-with-blockers"
| "blocked-without-blockers";
export type TruthmarkWriteWorkerAcceptanceReason = {
type TruthmarkWriteWorkerAcceptanceReason = {
code: TruthmarkWriteWorkerAcceptanceReasonCode;
message: string;
field?: string;
+2 -2
View File
@@ -16,7 +16,7 @@ export type BranchScopeData = {
relevantFileHashes: Record<string, string>;
};
export class BranchScopeFileError extends Error {
class BranchScopeFileError extends Error {
file: string;
constructor(file: string, message: string) {
@@ -40,7 +40,7 @@ const toBranchIdentity = (branchName: string | null, headSha: string | null): st
return headSha ? `detached:${headSha}` : "detached:unknown";
};
export const createBranchScopeData = (
const createBranchScopeData = (
repository: {
repositoryRoot: string;
worktreePath: string;
+1 -1
View File
@@ -16,7 +16,7 @@ export const DEFAULT_DOCS_HIERARCHY = {
},
} as const;
export const DEFAULT_AUTHORITY = [
const DEFAULT_AUTHORITY = [
DEFAULT_DOCS_HIERARCHY.routing.root_index,
`${DEFAULT_DOCS_HIERARCHY.routing.area_files_root}/**/*.md`,
`${DEFAULT_DOCS_HIERARCHY.roots.ai}/**/*.md`,
+5 -5
View File
@@ -1,6 +1,6 @@
import type { JSONSchemaType } from "ajv";
export const SUPPORTED_PLATFORMS = [
const SUPPORTED_PLATFORMS = [
"codex",
"opencode",
"claude-code",
@@ -19,7 +19,7 @@ export const DEFAULT_PLATFORMS = [
] as const satisfies
readonly TruthmarkPlatform[];
export type RawDocsHierarchyConfig = {
type RawDocsHierarchyConfig = {
layout: "hierarchical";
roots: Record<string, string>;
routing: {
@@ -30,7 +30,7 @@ export type RawDocsHierarchyConfig = {
};
};
export type DocsHierarchyConfig = {
type DocsHierarchyConfig = {
layout: "hierarchical";
roots: Record<string, string>;
routing: {
@@ -41,13 +41,13 @@ export type DocsHierarchyConfig = {
};
};
export type RawTruthmarkPortalConfig = {
type RawTruthmarkPortalConfig = {
enabled?: boolean;
output?: string;
template?: string;
};
export type TruthmarkPortalConfig = {
type TruthmarkPortalConfig = {
enabled: boolean;
output: string;
template: string;
+1 -1
View File
@@ -2,7 +2,7 @@ import path from "node:path";
import fs from "node:fs/promises";
export type FileWriteStatus = "created" | "updated" | "unchanged";
type FileWriteStatus = "created" | "updated" | "unchanged";
export type FileWriteResult = {
path: string;
+2 -2
View File
@@ -2,9 +2,9 @@ export const CONTENT_PROMPT_IDS = ["truth-doc-update"] as const;
export type ContentPromptId = (typeof CONTENT_PROMPT_IDS)[number];
export type OutputSchemaId = "truth-doc-update-draft";
type OutputSchemaId = "truth-doc-update-draft";
export type EvidenceSnippet = {
type EvidenceSnippet = {
id: string;
path: string;
startLine: number;
+1 -1
View File
@@ -17,7 +17,7 @@ export const DIAGNOSTIC_CATEGORIES = [
export type DiagnosticCategory = (typeof DIAGNOSTIC_CATEGORIES)[number];
export type DiagnosticSeverity = "info" | "action" | "review" | "error";
type DiagnosticSeverity = "info" | "action" | "review" | "error";
export type Diagnostic = {
category: DiagnosticCategory;
-23
View File
@@ -1,23 +0,0 @@
export const REPO_INDEX_SCHEMA_VERSION = "repo-index/v0" as const;
export const ROUTE_MAP_SCHEMA_VERSION = "route-map/v0" as const;
export const repoIndexSchema = {
schemaVersion: REPO_INDEX_SCHEMA_VERSION,
required: [
"schemaVersion",
"repository",
"packages",
"files",
"docs",
"tests",
"imports",
"exports",
"publicSymbols",
"routeMap",
],
} as const;
export const routeMapSchema = {
schemaVersion: ROUTE_MAP_SCHEMA_VERSION,
required: ["schemaVersion", "routes"],
} as const;
+1 -1
View File
@@ -17,7 +17,7 @@ export type AreaRoutingConfig = {
truthDocsRoot?: string;
};
export type ResolvedTruthArea = TruthArea & {
type ResolvedTruthArea = TruthArea & {
sourcePath: string;
parentName?: string;
};
+1 -1
View File
@@ -37,7 +37,7 @@ export type TruthAreaReference = {
truthDocumentEntries: TruthDocumentEntry[];
};
export type TruthAreaFileReference = {
type TruthAreaFileReference = {
id: string;
name: string;
key: string;
-6
View File
@@ -14,12 +14,6 @@ export const TRUTH_SYNC_REPORT_TEMPLATE = {
blocked: ["Reason", "Files requiring manual review", "Next action"],
} as const;
export type TruthSyncReportTemplate = typeof TRUTH_SYNC_REPORT_TEMPLATE;
export const TRUTH_SYNC_CONTEXT_NOTES = [
"Code verification is parent-owned; optional validation commands do not select verification for the agent.",
] as const;
export const TRUTH_SYNC_BOUNDARIES = {
read: [
"changed functional code files",
+1 -1
View File
@@ -6,7 +6,7 @@ import type { UncommittedChange } from "../git/changes.js";
import { getGitRepository, resolveWorktreePath } from "../git/repository.js";
import { classifyPath } from "./classify.js";
export type ChangedSurfaceSegment = {
type ChangedSurfaceSegment = {
startLine: number;
endLine: number;
content: string;
-8
View File
@@ -5,14 +5,6 @@ import { TRUTHMARK_VERSION } from "../version.js";
export const TRUTHMARK_BLOCK_START = "<!-- truthmark:start -->";
export const TRUTHMARK_BLOCK_END = "<!-- truthmark:end -->";
export const renderInstructionPreamble = (): string => {
return [
"Follow repository instruction files that are present in this checkout; do not assume optional policy docs exist.",
"Read the configured Truthmark routing files when choosing or updating canonical docs.",
"Use repository onboarding or docs-map files only when present and needed for unclear or cross-area routing.",
].join("\n");
};
const renderCompactHierarchySummary = (config: TruthmarkConfig): string => {
const truthRoot = resolveTruthDocsRoot(config);
return `Hierarchy hints: config .truthmark/config.yml when present; routes ${config.docs.routing.rootIndex} and ${config.docs.routing.areaFilesRoot}/**/*.md when present; Truth docs: ${truthRoot}/**/*.md when present.`;
-42
View File
@@ -1236,14 +1236,6 @@ export const renderTruthmarkDocumentClaudeSkill = (
});
};
export const renderTruthmarkDocumentOpenCodeSkill = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
return renderTruthDocumentSkillBody(config, {
includeOpenCodeSubagentMode: true,
});
};
export const renderTruthmarkDocumentSkillMetadata = (): string => {
const workflow = getTruthmarkWorkflow("truthmark-document");
@@ -1279,14 +1271,6 @@ export const renderTruthmarkSyncClaudeSkill = (
return renderTruthSyncSkillBody(config, { includeClaudeSubagentMode: true });
};
export const renderTruthmarkSyncOpenCodeSkill = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
return renderTruthSyncSkillBody(config, {
includeOpenCodeSubagentMode: true,
});
};
export const renderTruthmarkSyncSkillMetadata = (): string => {
const workflow = getTruthmarkWorkflow("truthmark-sync");
@@ -1374,12 +1358,6 @@ export const renderTruthmarkRealizeSkill = (
return renderTruthmarkRealizeSkillBody(config);
};
export const renderTruthmarkRealizeLocalSkill = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
return renderTruthmarkRealizeSkillBody(config);
};
export const renderTruthmarkRealizeSkillMetadata = (): string => {
const workflow = getTruthmarkWorkflow("truthmark-realize");
@@ -1409,18 +1387,6 @@ export const renderTruthmarkPreviewLocalSkill = (
return renderTruthPreviewSkillBody(config);
};
export const renderTruthmarkPreviewClaudeSkill = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
return renderTruthPreviewSkillBody(config);
};
export const renderTruthmarkPreviewOpenCodeSkill = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
return renderTruthPreviewSkillBody(config);
};
export const renderTruthmarkPreviewSkillMetadata = (): string => {
const workflow = getTruthmarkWorkflow("truthmark-preview");
@@ -1456,14 +1422,6 @@ export const renderTruthmarkCheckClaudeSkill = (
return renderTruthCheckSkillBody(config, { includeClaudeSubagentMode: true });
};
export const renderTruthmarkCheckOpenCodeSkill = (
config: TruthmarkConfig = defaultAgentConfig(),
): string => {
return renderTruthCheckSkillBody(config, {
includeOpenCodeSubagentMode: true,
});
};
export const renderTruthmarkCheckSkillMetadata = (): string => {
const workflow = getTruthmarkWorkflow("truthmark-check");
+1 -1
View File
@@ -1,7 +1,7 @@
import { DEFAULT_DOCS_HIERARCHY } from "../config/defaults.js";
import type { TruthmarkConfig } from "../config/schema.js";
export const DEFAULT_TRUTH_DOCS_ROOT = DEFAULT_DOCS_HIERARCHY.roots.truth;
const DEFAULT_TRUTH_DOCS_ROOT = DEFAULT_DOCS_HIERARCHY.roots.truth;
export const resolveTruthDocsRoot = (config: Pick<TruthmarkConfig, "docs">): string => {
return config.docs.roots.truth ?? DEFAULT_TRUTH_DOCS_ROOT;
+2 -2
View File
@@ -6,9 +6,9 @@ export type ClaimEvidenceItem = {
result: ClaimEvidenceResult;
};
export type AuditEvidenceConfidence = "high" | "medium" | "low";
type AuditEvidenceConfidence = "high" | "medium" | "low";
export type AuditEvidenceItem = {
type AuditEvidenceItem = {
finding: string;
evidence: string[];
suggestedFix: string;
+1 -1
View File
@@ -10,7 +10,7 @@ type GitCommandResult = {
exitCode: number;
};
export type WorktreeCheckout = {
type WorktreeCheckout = {
rootDir: string;
runGit: (args: string[]) => Promise<GitCommandResult>;
writeFile: (relativePath: string, content: string) => Promise<void>;