Skip to content

Commit 80b4048

Browse files
clawplaysclaude
andcommitted
Release 1.9.7 durable, token-lean archive knowledge
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3aef2aa commit 80b4048

26 files changed

Lines changed: 1113 additions & 40 deletions

SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Do not hand-write an approximation of `ospec init`. Do not assume a web stack, a
2626
For an initialized project, read in this order:
2727

2828
1. `.skillrc` for layout, language, workflow policy, plugins, and model profiles.
29-
2. `SKILL.index.json` and `docs/project/feature-index.md` as routers.
29+
2. `ospec index query <keyword...>` as the router into `SKILL.index.json` and `docs/project/feature-index.md`; never read the whole index file — it grows without bound as changes archive.
3030
3. The current session brief, bootstrap, dispatch, review, or repair packet.
3131
4. Only the indexed project documents, change files, and target files named by that packet.
3232

assets/for-ai/ar/change-protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## السياق
66

7-
في البداية اقرأ `.skillrc` والعناصر ذات الصلة من `SKILL.index.json` و`proposal.md` و`tasks.md` و`state.json` فقط. اقرأ `verification.md` عند التحقق و`review.md` عند closeout. اقرأ `ai-guide.md` أو `execution-protocol.md` الكامل فقط عند غياب هذا الملف أو تفعيل plugin حاجب أو وجود قاعدة محددة غامضة.
7+
في البداية اقرأ `.skillrc` و`proposal.md` و`tasks.md` و`state.json` فقط؛ واسترجع عناصر الفهرس ذات الصلة عبر `ospec index query <كلمات...>` بدلاً من قراءة `SKILL.index.json` كاملاً. اقرأ `verification.md` عند التحقق و`review.md` عند closeout. اقرأ `ai-guide.md` أو `execution-protocol.md` الكامل فقط عند غياب هذا الملف أو تفعيل plugin حاجب أو وجود قاعدة محددة غامضة.
88

99
## دورة الحياة
1010

assets/for-ai/en-US/change-protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use this compact protocol when the user selected an OSpec change. Profile select
44

55
## Context
66

7-
At start, read `.skillrc`, the relevant `SKILL.index.json` entries, `proposal.md`, `tasks.md`, and `state.json`. Read `verification.md` when entering verification and `review.md` during closeout. Read the full `ai-guide.md` or `execution-protocol.md` only when this compact file is missing, a blocking plugin is active, or a specific ambiguous rule requires it.
7+
At start, read `.skillrc`, `proposal.md`, `tasks.md`, and `state.json`, and use `ospec index query <keyword...>` for relevant index entries instead of reading the whole `SKILL.index.json`. Read `verification.md` when entering verification and `review.md` during closeout. Read the full `ai-guide.md` or `execution-protocol.md` only when this compact file is missing, a blocking plugin is active, or a specific ambiguous rule requires it.
88

99
## Lifecycle
1010

assets/for-ai/ja-JP/change-protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## コンテキスト
66

7-
開始時は `.skillrc``SKILL.index.json` の関連項目、`proposal.md``tasks.md``state.json` だけを読みます。検証時に `verification.md`、closeout 時に `review.md` を読みます。本ファイルがない、blocking plugin が有効、または特定ルールが曖昧な場合だけ完全な `ai-guide.md``execution-protocol.md` を読みます。
7+
開始時は `.skillrc``proposal.md``tasks.md``state.json` だけを読みます。index の関連項目は `ospec index query <キーワード...>` で必要な分だけ取得し、`SKILL.index.json` 全体を読まないでください。検証時に `verification.md`、closeout 時に `review.md` を読みます。本ファイルがない、blocking plugin が有効、または特定ルールが曖昧な場合だけ完全な `ai-guide.md``execution-protocol.md` を読みます。
88

99
## ライフサイクル
1010

assets/for-ai/zh-CN/change-protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## 上下文
66

7-
开始时只读 `.skillrc``SKILL.index.json` 的相关条目、`proposal.md``tasks.md``state.json`。进入验证时再读 `verification.md`,收口时再读 `review.md`。只有缺少本文件、启用了阻塞插件或某条规则确实有歧义时,才读取完整 `ai-guide.md``execution-protocol.md`
7+
开始时只读 `.skillrc``proposal.md``tasks.md``state.json`;索引条目用 `ospec index query <关键词...>` 按需检索,不要通读整个 `SKILL.index.json`。进入验证时再读 `verification.md`,收口时再读 `review.md`。只有缺少本文件、启用了阻塞插件或某条规则确实有歧义时,才读取完整 `ai-guide.md``execution-protocol.md`
88

99
## 生命周期
1010

assets/global-skills/codex/ospec-change/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The user owns profile selection. Once the user chooses a change, keep it on the
2525
## Read Order
2626

2727
1. `.skillrc`
28-
2. Relevant entries from `.ospec/SKILL.index.json` for nested projects, or root `SKILL.index.json` for legacy classic projects
28+
2. `ospec index query <keyword...>` for the relevant `.ospec/SKILL.index.json` entries (root `SKILL.index.json` for legacy classic projects); never read the whole index file — it grows without bound as changes archive
2929
3. `.ospec/for-ai/change-protocol.md` for nested projects, or legacy `for-ai/change-protocol.md`
3030
4. `.ospec/changes/active/<change>/proposal.md`, `tasks.md`, and `state.json` for nested projects, or their legacy classic paths
3131
5. Read `verification.md` only when entering verification

assets/global-skills/codex/ospec-goal/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Use `ospec-change` for small routine changes that only need the classic fast flo
5050
## Read Order
5151

5252
1. `.skillrc`
53-
2. `.ospec/SKILL.index.json` for nested projects, or root `SKILL.index.json`
53+
2. `ospec index query <keyword...>` for the relevant `.ospec/SKILL.index.json` entries (root `SKILL.index.json` for legacy classic projects); never read the whole index file — it grows without bound as changes archive
5454
3. `.ospec/session-brief.md` and `ospec execute status [goal] --brief`
5555
4. the current dispatch, review, decision, or verification packet for the next action
5656
5. target files and only the project or archived-feature docs routed by `SKILL.index.json` and `docs/project/feature-index.md`

dist/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const VerifyCommand_1 = require("./commands/VerifyCommand");
6262
const WorkflowCommand_1 = require("./commands/WorkflowCommand");
6363
const LayoutCommand_1 = require("./commands/LayoutCommand");
6464
const services_1 = require("./services");
65-
const CLI_VERSION = '1.9.6';
65+
const CLI_VERSION = '1.9.7';
6666
function showInitUsage() {
6767
console.log('Usage: ospec init [root-dir] [--summary "..."] [--tech-stack node,react] [--architecture "..."] [--document-language en-US|zh-CN|ja-JP|ar]');
6868
}
@@ -497,7 +497,7 @@ async function main() {
497497
}
498498
case 'index': {
499499
const indexCmd = new IndexCommand_1.IndexCommand();
500-
await indexCmd.execute(commandArgs[0] || 'check', commandArgs[1]);
500+
await indexCmd.execute(commandArgs[0] || 'check', commandArgs[0] === 'query' ? undefined : commandArgs[1], commandArgs.slice(1));
501501
break;
502502
}
503503
case 'plugins': {

dist/commands/ArchiveCommand.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class ArchiveCommand extends BaseCommand_1.BaseCommand {
117117
const goalReviewSummary = isGoalWorkflow
118118
? await (0, ReviewArtifacts_1.analyzeGoalReviewSummary)(services_1.services.fileService, targetPath)
119119
: null;
120+
const evidenceTracking = services_1.services.projectService.assessArchiveEvidenceTracking(targetPath);
120121
const result = await ArchiveGate_1.archiveGate.checkArchiveReadiness(featureState, archiveConfig, {
121122
activatedSteps,
122123
tasksOptionalSteps,
@@ -128,6 +129,14 @@ class ArchiveCommand extends BaseCommand_1.BaseCommand {
128129
goalReviewSummaryAligned: goalReviewSummary ? goalReviewSummary.aligned : null,
129130
goalReviewSummaryMessage: goalReviewSummary?.message ?? null,
130131
});
132+
if (evidenceTracking.level === 'block' && evidenceTracking.message) {
133+
result.blockers.push(evidenceTracking.message);
134+
result.checks.push({
135+
name: 'Archive Evidence Tracking',
136+
passed: false,
137+
message: evidenceTracking.message,
138+
});
139+
}
131140
if (classicStatus) {
132141
for (const check of classicStatus.checks) {
133142
if (check.name === 'archive.pending')

dist/commands/IndexCommand.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import { BaseCommand } from './BaseCommand';
22
export declare class IndexCommand extends BaseCommand {
3-
execute(action?: string, projectPath?: string): Promise<void>;
3+
execute(action?: string, projectPath?: string, rawArgs?: string[]): Promise<void>;
4+
/**
5+
* Token-bounded index retrieval: return only the entries matching the
6+
* given keywords so AI sessions never need to read the whole
7+
* SKILL.index.json (which grows without bound as changes are archived).
8+
*/
9+
private query;
410
}

0 commit comments

Comments
 (0)