chore: vrification flow fix and translation rule

This commit is contained in:
MerlinH
2026-05-09 19:39:39 +10:00
parent 23c22a1595
commit 3438b1f123
8 changed files with 85 additions and 17 deletions
+11 -3
View File
@@ -66,7 +66,17 @@ Das ist das Kernversprechen: Agentenkontext wird zu festgeschriebenem Repository
## Erste Schritte
Wenn du Truthmark zunächst gegen ein anderes lokales Repository ausprobieren willst, bevor das Paket anderswo veröffentlicht ist:
Installiere Truthmark in dem Repository, das du initialisieren möchtest:
```bash
cd /path/to/your-repo
npm install -D truthmark
npx truthmark config
npx truthmark init
npx truthmark check
```
Wenn du stattdessen unveröffentlichte Änderungen aus einem Source-Checkout ausprobieren möchtest:
```bash
cd /path/to/truthmark
@@ -194,8 +204,6 @@ V1 bietet derzeit:
- Branch-Scope-Metadaten
- Diagnostik für Konfiguration, Autorität, Routing, Entscheidungsstruktur, Frontmatter, Links und polyglotte Abdeckung
Es wird nicht angenommen, dass das ungescopte Paket `truthmark` bereits veröffentlicht ist.
## Dokumentation
Die Root-README ist für Menschen gedacht, die das Paket evaluieren und ausprobieren. Detaillierte funktionale und geschäftliche Spezifikationen liegen unter `docs/`:
+11 -3
View File
@@ -66,7 +66,17 @@ Esta es la promesa central: el contexto del agente pasa a ser estado confirmado
## Primeros pasos
Para probar Truthmark contra otro repositorio local antes de que el paquete se publique en otro lugar:
Instala Truthmark en el repositorio que quieras inicializar:
```bash
cd /path/to/your-repo
npm install -D truthmark
npx truthmark config
npx truthmark init
npx truthmark check
```
Si quieres probar cambios aún no publicados desde un checkout del código fuente:
```bash
cd /path/to/truthmark
@@ -194,8 +204,6 @@ V1 actualmente ofrece:
- metadatos de alcance de rama
- diagnósticos de configuración, autoridad, enrutamiento, estructura de decisiones, frontmatter, enlaces y cobertura políglota
No se debe asumir que el paquete sin scope `truthmark` ya está publicado.
## Documentación
El README raíz es para personas que evalúan y prueban el paquete. Las especificaciones funcionales y de negocio detalladas viven en `docs/`:
+11 -1
View File
@@ -72,7 +72,17 @@ This is the core promise: agent context becomes committed repository state inste
## Get started
To try Truthmark from a source checkout instead of the published npm package:
Install Truthmark in the repository you want to initialize:
```bash
cd /path/to/your-repo
npm install -D truthmark
npx truthmark config
npx truthmark init
npx truthmark check
```
If you want to try unreleased changes from a source checkout instead:
```bash
cd /path/to/truthmark
+11 -3
View File
@@ -66,7 +66,17 @@ Truthmark превращает истину репозитория в явную
## Начало работы
Чтобы попробовать Truthmark на другом локальном репозитории до публикации пакета где-либо еще:
Установите Truthmark в репозитории, который хотите инициализировать:
```bash
cd /path/to/your-repo
npm install -D truthmark
npx truthmark config
npx truthmark init
npx truthmark check
```
Если вы хотите попробовать еще не выпущенные изменения из исходного checkout:
```bash
cd /path/to/truthmark
@@ -194,8 +204,6 @@ V1 сейчас предоставляет:
- метаданные области ветки
- диагностика конфигурации, полномочий, маршрутизации, структуры решений, frontmatter, ссылок и полиглотного покрытия
Не следует считать, что пакет `truthmark` без scope уже опубликован.
## Документация
Корневой README предназначен для людей, которые оценивают и пробуют пакет. Подробные функциональные и бизнес-спецификации находятся в `docs/`:
+11 -3
View File
@@ -66,7 +66,17 @@ Truthmark 把仓库事实变成代理可见的显式工作流载体:
## 快速开始
如果想在包发布到其他地方之前,先在另一个本地仓库试用 Truthmark
在你想初始化的仓库中安装 Truthmark
```bash
cd /path/to/your-repo
npm install -D truthmark
npx truthmark config
npx truthmark init
npx truthmark check
```
如果你想从源码检出中试用尚未发布的变更:
```bash
cd /path/to/truthmark
@@ -194,8 +204,6 @@ V1 目前提供:
- 分支范围元数据
- 配置、权限边界、路由、决策结构、frontmatter、链接和多语言覆盖率诊断
不要假定未带 scope 的 `truthmark` 包已经发布。
## 文档
根 README 面向评估和试用这个包的人。详细的功能和业务规范位于 `docs/` 下:
+1
View File
@@ -97,6 +97,7 @@ Current product boundaries:
7. **Docs change with behavior**
- If a behavior, contract, workflow, or completion rule changes, update the nearest canonical doc in the same working change.
- For major product, onboarding, install, command, positioning, or workflow changes, review the root [README.md](../../README.md) in the same working change and update stale user-facing claims, examples, or command sequences.
- When the root README changes materially, update the localized README variants in the same working change or explicitly confirm why they remain intentionally different.
8. **Keep onboarding honest**
- The root README is not the canonical behavior spec, but it is the human entry point. It must not lag behind major product changes that affect how people understand, install, or use Truthmark.
@@ -78,6 +78,7 @@ Do not create separate timestamped ADR folders, planning tickets, or historical
- Behavior changes and truth-doc updates should land in the same working change when possible.
- Major product, onboarding, install, command, positioning, or workflow changes should include a root README review in the same working change. Update the README when its human-facing claims, examples, or command sequences are stale.
- When the root README has localized variants, keep them aligned with the English README for materially changed install, command, positioning, and workflow guidance in the same working change, or explicitly document why a variant intentionally differs.
- When routing changes, update `docs/truthmark/areas.md` and any affected canonical docs together.
- When routing is broad, overloaded, or catch-all, run Truth Structure before adding more generic feature docs.
- When a document stops being canonical, supersede or demote it explicitly.
+28 -4
View File
@@ -26,6 +26,22 @@ type PackFile = {
mode: number;
};
const parsePackOutput = (
stdout: string,
): Array<{
files: PackFile[];
}> => {
const jsonStartIndex = stdout.search(/^\s*\[\s*\{\s*$/m);
if (jsonStartIndex === -1) {
throw new SyntaxError("npm pack output did not include a JSON array");
}
return JSON.parse(stdout.slice(jsonStartIndex)) as Array<{
files: PackFile[];
}>;
};
const readPackageJson = async (): Promise<{
scripts?: Record<string, string>;
}> => {
@@ -46,10 +62,7 @@ const readPackFiles = async (): Promise<PackFile[]> => {
cwd: repoRoot,
},
);
const jsonStartIndex = stdout.indexOf("[");
const packOutput = JSON.parse(stdout.slice(jsonStartIndex)) as Array<{
files: PackFile[];
}>;
const packOutput = parsePackOutput(stdout);
return packOutput[0]?.files ?? [];
};
@@ -96,4 +109,15 @@ describe("package and release integrity", () => {
"release:check": expect.any(String),
});
});
it("parses npm pack JSON after bracketed build output", () => {
const packOutput = parsePackOutput(`build [1/2]
[
{
"files": []
}
]`);
expect(packOutput).toEqual([{ files: [] }]);
});
});