persona-harness 0.8.34 → 0.8.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context-profile/team-profile-v2-model.d.ts +30 -0
- package/dist/context-profile/team-profile-v2-model.js +118 -0
- package/dist/context-profile/team-profile-v2-model.js.map +1 -0
- package/dist/context-profile/team-profile-v2-store.d.ts +16 -0
- package/dist/context-profile/team-profile-v2-store.js +32 -0
- package/dist/context-profile/team-profile-v2-store.js.map +1 -0
- package/docs/current/README.md +1 -0
- package/docs/current/canonical-docs-index.md +1 -0
- package/docs/current/context-program-status.md +24 -17
- package/docs/current/context-team-profile-v2.md +86 -0
- package/docs/current/docs-inventory.md +3 -2
- package/docs/current/release/consumer-authority-current-acceptance.json +1 -1
- package/docs/current/release/v0.8.35-release-notes.md +33 -0
- package/package.json +3 -2
- package/packages/shared-skills/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ContextRule } from "../context-core/rule-types.js";
|
|
2
|
+
export declare const TEAM_PROFILE_V2_SCHEMA: "persona-context-team-profile.2";
|
|
3
|
+
export type TeamProfileV2Relevance = {
|
|
4
|
+
readonly fileRoles?: readonly string[];
|
|
5
|
+
readonly languages?: readonly string[];
|
|
6
|
+
readonly skillIds?: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
export type TeamProfileV2Rule = {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly topic: string;
|
|
11
|
+
readonly text: string;
|
|
12
|
+
readonly status: "active" | "pending" | "superseded";
|
|
13
|
+
readonly relevance?: TeamProfileV2Relevance;
|
|
14
|
+
};
|
|
15
|
+
export type TeamProfileV2 = {
|
|
16
|
+
readonly schemaVersion: typeof TEAM_PROFILE_V2_SCHEMA;
|
|
17
|
+
readonly teamKey: string;
|
|
18
|
+
readonly rules: readonly TeamProfileV2Rule[];
|
|
19
|
+
};
|
|
20
|
+
export type TeamContextLayerV2 = {
|
|
21
|
+
readonly teamKey: string;
|
|
22
|
+
readonly teamContracts: readonly ContextRule[];
|
|
23
|
+
};
|
|
24
|
+
export type TeamProfileV2ValidationCode = "team-profile-v2-invalid-schema" | "team-profile-v2-unsafe-content";
|
|
25
|
+
export declare class TeamProfileV2ValidationError extends Error {
|
|
26
|
+
readonly code: TeamProfileV2ValidationCode;
|
|
27
|
+
constructor(code: TeamProfileV2ValidationCode);
|
|
28
|
+
}
|
|
29
|
+
export declare function parseTeamProfileV2(value: unknown): TeamProfileV2;
|
|
30
|
+
export declare function toTeamContextLayerV2(profile: TeamProfileV2): TeamContextLayerV2;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export const TEAM_PROFILE_V2_SCHEMA = "persona-context-team-profile.2";
|
|
2
|
+
export class TeamProfileV2ValidationError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
constructor(code) {
|
|
5
|
+
super(code);
|
|
6
|
+
this.name = "TeamProfileV2ValidationError";
|
|
7
|
+
this.code = code;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const PROFILE_KEYS = ["rules", "schemaVersion", "teamKey"];
|
|
11
|
+
const RULE_KEYS = ["id", "relevance", "status", "text", "topic"];
|
|
12
|
+
const RELEVANCE_KEYS = ["fileRoles", "languages", "skillIds"];
|
|
13
|
+
const MAX_RULES = 64;
|
|
14
|
+
const MAX_RULE_TEXT_CHARS = 600;
|
|
15
|
+
const MAX_SELECTOR_VALUES = 16;
|
|
16
|
+
export function parseTeamProfileV2(value) {
|
|
17
|
+
if (!isRecord(value) || !hasExactKeys(value, PROFILE_KEYS) || value.schemaVersion !== TEAM_PROFILE_V2_SCHEMA || !isSafeIdentifier(value.teamKey)) {
|
|
18
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-invalid-schema");
|
|
19
|
+
}
|
|
20
|
+
if (!Array.isArray(value.rules) || value.rules.length > MAX_RULES) {
|
|
21
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-invalid-schema");
|
|
22
|
+
}
|
|
23
|
+
const rules = value.rules.map(parseRule);
|
|
24
|
+
if (hasDuplicate(rules.map((rule) => rule.id)) || hasActiveTopicConflict(rules)) {
|
|
25
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-invalid-schema");
|
|
26
|
+
}
|
|
27
|
+
return { rules, schemaVersion: TEAM_PROFILE_V2_SCHEMA, teamKey: value.teamKey };
|
|
28
|
+
}
|
|
29
|
+
export function toTeamContextLayerV2(profile) {
|
|
30
|
+
return {
|
|
31
|
+
teamContracts: profile.rules.map((rule) => ({
|
|
32
|
+
fileRoles: rule.relevance?.fileRoles,
|
|
33
|
+
id: rule.id,
|
|
34
|
+
languages: rule.relevance?.languages,
|
|
35
|
+
rule: rule.text,
|
|
36
|
+
scope: { key: profile.teamKey, kind: "team" },
|
|
37
|
+
skillIds: rule.relevance?.skillIds,
|
|
38
|
+
status: rule.status,
|
|
39
|
+
topic: rule.topic,
|
|
40
|
+
})),
|
|
41
|
+
teamKey: profile.teamKey,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function parseRule(value) {
|
|
45
|
+
if (!isRecord(value) || !hasRequiredKnownKeys(value, RULE_KEYS, ["id", "status", "text", "topic"])) {
|
|
46
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-invalid-schema");
|
|
47
|
+
}
|
|
48
|
+
if (!isSafeIdentifier(value.id) || !isSafeIdentifier(value.topic) || !isSafeRuleText(value.text)) {
|
|
49
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-unsafe-content");
|
|
50
|
+
}
|
|
51
|
+
if (value.status !== "active" && value.status !== "pending" && value.status !== "superseded") {
|
|
52
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-invalid-schema");
|
|
53
|
+
}
|
|
54
|
+
const relevance = parseRelevance(value.relevance);
|
|
55
|
+
if (value.relevance !== undefined && relevance === undefined) {
|
|
56
|
+
throw new TeamProfileV2ValidationError("team-profile-v2-invalid-schema");
|
|
57
|
+
}
|
|
58
|
+
return { id: value.id, relevance, status: value.status, text: value.text, topic: value.topic };
|
|
59
|
+
}
|
|
60
|
+
function parseRelevance(value) {
|
|
61
|
+
if (value === undefined)
|
|
62
|
+
return undefined;
|
|
63
|
+
if (!isRecord(value) || !hasKnownKeys(value, RELEVANCE_KEYS) || Object.keys(value).length === 0)
|
|
64
|
+
return undefined;
|
|
65
|
+
if (!isSafeSelector(value.fileRoles) || !isSafeSelector(value.languages) || !isSafeSelector(value.skillIds))
|
|
66
|
+
return undefined;
|
|
67
|
+
return { fileRoles: value.fileRoles, languages: value.languages, skillIds: value.skillIds };
|
|
68
|
+
}
|
|
69
|
+
function hasActiveTopicConflict(rules) {
|
|
70
|
+
const activeTopics = new Set();
|
|
71
|
+
for (const rule of rules) {
|
|
72
|
+
if (rule.status !== "active")
|
|
73
|
+
continue;
|
|
74
|
+
if (activeTopics.has(rule.topic))
|
|
75
|
+
return true;
|
|
76
|
+
activeTopics.add(rule.topic);
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
function hasDuplicate(values) {
|
|
81
|
+
return new Set(values).size !== values.length;
|
|
82
|
+
}
|
|
83
|
+
function isRecord(value) {
|
|
84
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
85
|
+
}
|
|
86
|
+
function hasExactKeys(value, keys) {
|
|
87
|
+
return Object.keys(value).length === keys.length && hasKnownKeys(value, keys);
|
|
88
|
+
}
|
|
89
|
+
function hasRequiredKnownKeys(value, knownKeys, requiredKeys) {
|
|
90
|
+
return hasKnownKeys(value, knownKeys) && requiredKeys.every((key) => Object.hasOwn(value, key));
|
|
91
|
+
}
|
|
92
|
+
function hasKnownKeys(value, keys) {
|
|
93
|
+
const expected = new Set(keys);
|
|
94
|
+
return Object.keys(value).every((key) => expected.has(key));
|
|
95
|
+
}
|
|
96
|
+
function isSafeSelector(value) {
|
|
97
|
+
return value === undefined || (Array.isArray(value)
|
|
98
|
+
&& value.length > 0
|
|
99
|
+
&& value.length <= MAX_SELECTOR_VALUES
|
|
100
|
+
&& value.every(isSafeIdentifier)
|
|
101
|
+
&& !hasDuplicate(value));
|
|
102
|
+
}
|
|
103
|
+
function isSafeIdentifier(value) {
|
|
104
|
+
return typeof value === "string" && value.length > 0 && value.length <= 120 && !/[\u0000-\u001f\u007f]/u.test(value)
|
|
105
|
+
&& !/^(?:[A-Za-z]:[\\/]|[\\/]{1,2}|https?:\/\/)/u.test(value);
|
|
106
|
+
}
|
|
107
|
+
function isSafeRuleText(value) {
|
|
108
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_RULE_TEXT_CHARS
|
|
109
|
+
&& !/[\u0000-\u001f\u007f]/u.test(value)
|
|
110
|
+
&& !/(?:https?|ssh):\/\/|git@/iu.test(value)
|
|
111
|
+
&& !/(?:api[_-]?key|access[_-]?token|token|credential|password|secret|authorization|private\s+key)\s*[:=]/iu.test(value)
|
|
112
|
+
&& !/\bbearer\s+[A-Za-z0-9._-]+/iu.test(value)
|
|
113
|
+
&& !/(?:^|\s)(?:[A-Za-z]:[\\/]|[\\/]{1,2})[^\s]*/u.test(value)
|
|
114
|
+
&& !/(?:^|\s)(?:curl|wget|git\s+(?:clone|fetch|pull)|npm\s+(?:install|exec|run)|npx\s|node\s|python(?:3)?\s|gradle(?:w)?\s|mvn(?:w)?\s|maven\s|java\s|make\s|go\s+(?:test|build|run)\s|cargo\s|deno\s|ruby\s|php\s|perl\s|dotnet\s|bash\s|sh\s|zsh\s|pwsh\s|powershell\s|cmd(?:\.exe)?\s|\.\/)[^\s]*/iu.test(value)
|
|
115
|
+
&& !/\b(?:disable|bypass|override|weaken|turn\s+off)\b.{0,80}\b(?:authority|authentication|evidence|guard|permission|policy|security|verification)\b/iu.test(value)
|
|
116
|
+
&& !/\b(?:my\s+(?:personal|private)\s+(?:preference|profile|rule|setting)|personal\s+(?:preference|profile|setting))\b|(?:나의|개인)\s*(?:선호|취향|정보)/iu.test(value);
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=team-profile-v2-model.js.map
|
|
@@ -0,0 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AC3C,CAAC,8CAA8C,CAAC,IAAI,CAAC,KAAK,CAAC;WAC3D,CAAC,mSAAmS,CAAC,IAAI,CAAC,KAAK,CAAC;WAChT,CAAC,mJAAmJ,CAAC,IAAI,CAAC,KAAK,CAAC;WAChK,CAAC,8IAA8I,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAClK,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type TeamProfileV2, type TeamProfileV2ValidationCode } from "./team-profile-v2-model.js";
|
|
2
|
+
export { toTeamContextLayerV2, type TeamContextLayerV2 } from "./team-profile-v2-model.js";
|
|
3
|
+
export declare const TEAM_PROFILE_V2_PATH: ".persona/team-profile.jsonc";
|
|
4
|
+
export type TeamProfileV2Diagnostic = TeamProfileV2ValidationCode | "team-profile-v2-invalid-json" | "team-profile-v2-unsafe-path" | "team-profile-v2-unreadable";
|
|
5
|
+
export type TeamProfileV2LoadResult = {
|
|
6
|
+
readonly status: "missing";
|
|
7
|
+
readonly diagnostics: readonly [];
|
|
8
|
+
} | {
|
|
9
|
+
readonly status: "invalid";
|
|
10
|
+
readonly diagnostics: readonly [TeamProfileV2Diagnostic];
|
|
11
|
+
} | {
|
|
12
|
+
readonly status: "available";
|
|
13
|
+
readonly diagnostics: readonly [];
|
|
14
|
+
readonly profile: TeamProfileV2;
|
|
15
|
+
};
|
|
16
|
+
export declare function loadTeamProfileV2(projectDir: string): TeamProfileV2LoadResult;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { stripJsonComments } from "../config/jsonc.js";
|
|
2
|
+
import { readNoFollowProjectFile } from "../io/no-follow-file.js";
|
|
3
|
+
import { parseTeamProfileV2, TeamProfileV2ValidationError, } from "./team-profile-v2-model.js";
|
|
4
|
+
export { toTeamContextLayerV2 } from "./team-profile-v2-model.js";
|
|
5
|
+
export const TEAM_PROFILE_V2_PATH = ".persona/team-profile.jsonc";
|
|
6
|
+
const MAX_TEAM_PROFILE_V2_BYTES = 64 * 1_024;
|
|
7
|
+
export function loadTeamProfileV2(projectDir) {
|
|
8
|
+
const read = readNoFollowProjectFile(projectDir, TEAM_PROFILE_V2_PATH, MAX_TEAM_PROFILE_V2_BYTES);
|
|
9
|
+
if (read.kind === "absent")
|
|
10
|
+
return { diagnostics: [], status: "missing" };
|
|
11
|
+
if (read.kind === "blocked") {
|
|
12
|
+
return {
|
|
13
|
+
diagnostics: [read.code === "unsafe" || read.code === "replaced" ? "team-profile-v2-unsafe-path" : "team-profile-v2-unreadable"],
|
|
14
|
+
status: "invalid",
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
let parsed;
|
|
18
|
+
try {
|
|
19
|
+
parsed = JSON.parse(stripJsonComments(read.value.bytes.toString("utf8")));
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return { diagnostics: ["team-profile-v2-invalid-json"], status: "invalid" };
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
return { diagnostics: [], profile: parseTeamProfileV2(parsed), status: "available" };
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
const code = error instanceof TeamProfileV2ValidationError ? error.code : "team-profile-v2-invalid-schema";
|
|
29
|
+
return { diagnostics: [code], status: "invalid" };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=team-profile-v2-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-profile-v2-store.js","sourceRoot":"","sources":["../../src/context-profile/team-profile-v2-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,EACL,kBAAkB,EAClB,4BAA4B,GAG7B,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,oBAAoB,EAA2B,MAAM,4BAA4B,CAAA;AAE1F,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAAsC,CAAA;A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;IACnD,CAAC;AACH,CAAC"}
|
package/docs/current/README.md
CHANGED
|
@@ -23,6 +23,7 @@ history but do not become a current product or release claim.
|
|
|
23
23
|
| Use the portable shared-skill or product-discovery guidance | [Persona Shared Skills Core](persona-shared-skills-core.md) |
|
|
24
24
|
| Maintain a local personalization profile | [Personalization Profile V1](personalization-profile-v1.md) |
|
|
25
25
|
| Follow the Context Personalization program | [Context Personalization Program Status](context-program-status.md) |
|
|
26
|
+
| Define safe project-shareable team conventions | [Team Profile V2](context-team-profile-v2.md) |
|
|
26
27
|
| Understand claims and measurement limits | [Measurement scorecard](measurement-scorecard.md) |
|
|
27
28
|
| Review Finish or external authority boundaries | [Consumer Authority V1 decision](consumer-authority-v1-decision.md); the repository-only external-attested walkthrough supplies the full procedure |
|
|
28
29
|
| Ship or audit a release | [Release operations](release/README.md) and [versioned release docs](../releases/README.md) |
|
|
@@ -16,6 +16,7 @@ Start with [Current Docs](README.md) unless you need a specific decision.
|
|
|
16
16
|
| Portable shared-skill and product-discovery contract | `docs/current/persona-shared-skills-core.md` | Catalog ownership, interview approval, explicit handoffs, host boundary, and packaged surface. |
|
|
17
17
|
| Personalization profile store | `docs/current/personalization-profile-v1.md` | Versioned local profile records, append-only lifecycle, privacy, and fail-closed storage. |
|
|
18
18
|
| Context Personalization program | `docs/current/context-program-status.md` | Canonical P0 audit, isolated OpenCode delivery boundary, separation invariants, and claim status. |
|
|
19
|
+
| Team Profile V2 boundary | `docs/current/context-team-profile-v2.md` | Read-only project-shareable v2 Team Profile schema, v1 separation, shared-text safety, and pure resolver bridge. |
|
|
19
20
|
| External environment procedure | `docs/current/external-environment-verification.md` | A bounded packaged-install check on a separate machine. |
|
|
20
21
|
| External-attested Finish walkthrough | `docs/current/external-attested-finish-walkthrough.md` | Source-checkout-only enrolled/fetch/Finish/replay procedure and its limits. |
|
|
21
22
|
| Consumer Authority V1 decision | `docs/current/consumer-authority-v1-decision.md` | The explicit cooperative assurance boundary. |
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
Status: current canonical program record.
|
|
4
4
|
|
|
5
5
|
Last reconciled: 2026-08-29
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
P0 implementation release baseline: `9b80a45070be10659150095cf701a6f375bc6600`
|
|
7
|
+
P0 implementation package: [`persona-harness@0.8.33`](https://www.npmjs.com/package/persona-harness/v/0.8.33)
|
|
8
|
+
P0 implementation lineage: [#414](https://github.com/jyt6640/persona-harness/issues/414) delivered through [#437](https://github.com/jyt6640/persona-harness/pull/437)
|
|
9
|
+
Current comparison release: `19c397e4fed5b1cce7d024fbcc51350e9676105f`
|
|
10
|
+
Current comparison package: [`persona-harness@0.8.34`](https://www.npmjs.com/package/persona-harness/v/0.8.34)
|
|
11
|
+
Current comparison lineage: [#411](https://github.com/jyt6640/persona-harness/issues/411) delivered through [#439](https://github.com/jyt6640/persona-harness/pull/439)
|
|
9
12
|
Historical pre-integration audit source: `f677a635040ad55d8b7d25abab280c5703a153ea`
|
|
10
13
|
Program issue: [#389](https://github.com/jyt6640/persona-harness/issues/389)
|
|
11
14
|
Remaining bounded work: [#410](https://github.com/jyt6640/persona-harness/issues/410), [#412](https://github.com/jyt6640/persona-harness/issues/412), and [#421](https://github.com/jyt6640/persona-harness/issues/421)
|
|
@@ -115,14 +118,14 @@ evidence rather than a description of current protected main.
|
|
|
115
118
|
| --- | --- | --- | --- |
|
|
116
119
|
| M1 | delivered via #413 | Workflow Integrity and Context Personalization are named as distinct tracks in public help and README. | Preserve the separate product boundary. |
|
|
117
120
|
| M2 | delivered via #413 | `ph context` provides explicit, default-off local Context inspection and enablement. | Preserve no-overwrite initialization and non-activating inspection. |
|
|
118
|
-
| M3 | delivered via #413; v2
|
|
121
|
+
| M3 | delivered via #413; v2 source candidate locally validated | A safe Team Profile v1 is resolved as a separate, local Context layer. | #421 adds a separate semantic v2 schema and explicit resolver bridge without silently upgrading v1 files; package and hosted gates remain separate. |
|
|
119
122
|
| M4 | delivered via #413 | Pure Core resolves the seven precedence layers and produces a deterministic `persona-context-envelope.v1`. | Keep Core host-neutral. |
|
|
120
123
|
| M5 | implementation delivered; hosted residual | Core has no OpenCode or Java runtime import; the isolated OpenCode adapter is locally covered. | #410 may observe the real transform only after its own named Delivery Control predicate. |
|
|
121
124
|
| M6 | implementation delivered; hosted residual | Context resolution, rendering, and delivery are separated from legacy workflow/authority behavior. | Preserve the isolated adapter boundary during #410. |
|
|
122
125
|
| M7 | open | Historical version checks remain a maintenance concern. | #412 owns the generic Context compatibility manifest and runner. |
|
|
123
126
|
| M8 | delivered via #413 | `npm test` now selects focused source evidence and installed packages receive a separate smoke. | Keep full protected verification separate. |
|
|
124
127
|
| M9 | implementation delivered; hosted residual | Context CLI and doctor report bounded local state without claiming host delivery. | #410 remains the sole real-host observation route after #414. |
|
|
125
|
-
| M10 | delivered
|
|
128
|
+
| M10 | delivered and released via #411/#439 | #411 provides a versioned three-arm protocol, strict ten-fixture manifest, and deterministic evaluator for Context OFF, legacy broad compatibility, and targeted layered envelopes. | Keep model, host, and operational measurements unavailable until a separately authorized observation; every local product verdict remains `INCONCLUSIVE`. |
|
|
126
129
|
| M11 | open | Historical version-specific checks still need a version-neutral Context compatibility boundary. | #412 owns the manifest/runner work. |
|
|
127
130
|
| M12 | verified-existing | CI critical-path optimization is already measured and active. | Preserve it and add only bounded Context checks to the correct lane. |
|
|
128
131
|
|
|
@@ -146,11 +149,14 @@ evidence rather than a description of current protected main.
|
|
|
146
149
|
|
|
147
150
|
1. **Merged P0 implementation:** #390 through #403 merged and closed through
|
|
148
151
|
#413 on `a562331f9db321845b05da1e16edc4b83bf78ece`.
|
|
149
|
-
2. **
|
|
150
|
-
its immutable package/source binding remains historical
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
2. **P0 implementation release:** #414 is delivered as stable `v0.8.33`
|
|
153
|
+
through #437; its immutable package/source binding remains historical
|
|
154
|
+
release evidence.
|
|
155
|
+
3. **Deterministic comparison release:** #411 is delivered as stable
|
|
156
|
+
`v0.8.34` through #439 on
|
|
157
|
+
`19c397e4fed5b1cce7d024fbcc51350e9676105f`. It provides the fixture-only
|
|
158
|
+
three-arm protocol below, does not initiate a host, model, workflow, or
|
|
159
|
+
authority action, and cannot establish product value.
|
|
154
160
|
4. **Remaining independent work:** #410 owns the sole real OpenCode-host
|
|
155
161
|
observation route; #421 owns Team Profile v2 and #412 owns the generic
|
|
156
162
|
installed-package compatibility boundary.
|
|
@@ -183,8 +189,9 @@ not assert direct closure causality.
|
|
|
183
189
|
| #401 | closed via #413 | Bare `ph context init` remains a no-write preview. Explicit `ph context init --enable` uses no-follow exclusive creation to write only a minimal `.persona/harness.jsonc` Context configuration in a fresh safe project. Existing regular config files, unsafe paths, and malformed arguments return finite errors without rewriting any configuration. It does not alter legacy feature flags, activate a host, or create completion state. Focused init/status/routing tests and the isolated tarball smoke cover the public surface. |
|
|
184
190
|
| #402 | closed via #413 | `ph context doctor` now reuses the safe status readers instead of emitting fixed placeholder state. It reports bounded config/enablement/mode/budget/Team Profile diagnostics and explicitly distinguishes available local Core/CLI inspection from unavailable host delivery. It does not load personal rule content, write state, activate a host, or use network/shell/process/completion behavior. Focused doctor/status/routing tests and the isolated tarball smoke cover the public surface. |
|
|
185
191
|
| #403 | closed via #413 | The isolated OpenCode adapter captures only safe observed targets, uses the local Context preview/envelope boundary, suppresses duplicate digests until session compaction/deletion, and mutates only the next matching user message. `context.enabled` is its sole feature switch; it does not inherit `runtimeInjection`. Adapter, actual plugin composition, status/doctor wording, type compatibility, and fail-closed target cases have focused RED-to-GREEN coverage. A real `experimental.chat.messages.transform` host observation remains separate. |
|
|
186
|
-
| #411 | delivered
|
|
187
|
-
| #414 | delivered through #437 | Stable `v0.8.33` binds
|
|
192
|
+
| #411 | delivered through #439 | Stable `v0.8.34` binds the deterministic three-arm comparison source at `19c397e4fed5b1cce7d024fbcc51350e9676105f`. `persona-context-comparison-manifest.1` fixes ten P0 fixtures and compares `off`, `legacy-broad`, and `targeted-layered` through `persona-context-comparison-result.1`. The repository runner requires an explicit candidate commit and package version, rejects a local identity mismatch before evaluation, and produces 30 deterministic records. It emits only rule ids/layers and digests; model/host/operational fields remain `null` and every local product verdict is `INCONCLUSIVE`. |
|
|
193
|
+
| #414 | delivered through #437 | Stable `v0.8.33` binds the P0 implementation package/source release lineage. It is immutable historical release evidence and does not authorize #410, a host session, or any Context product claim by itself. |
|
|
194
|
+
| #421 | local source candidate | `persona-context-team-profile.2` adds a separate JSONC loader and explicit pure-resolver team layer. It rejects unknown fields, unsafe shared text, duplicate ids, active topic conflicts, malformed JSONC, and symlinked files without reading personal state or activating a host. Local source tests, typecheck, build, docs/scope checks, and package smoke pass. | Package acceptance, protected integration, CLI delivery, adapter delivery, runtime activation, and external effectiveness remain unstarted. |
|
|
188
195
|
|
|
189
196
|
The heavy `test:installed-package-contract` and full protected repository suite
|
|
190
197
|
remain unchanged. The generic package smoke is version-neutral and does not
|
|
@@ -211,7 +218,7 @@ or hosted action:
|
|
|
211
218
|
a hosted-only residual. Local composition and type tests do not establish
|
|
212
219
|
that a host session received Context.
|
|
213
220
|
|
|
214
|
-
##
|
|
221
|
+
## Historical 0.8.33 Audit And Current Residuals
|
|
215
222
|
|
|
216
223
|
The current audit used a clean detached worktree at
|
|
217
224
|
`9b80a45070be10659150095cf701a6f375bc6600`; the original developer worktree
|
|
@@ -230,10 +237,10 @@ was not modified.
|
|
|
230
237
|
| Boundary | Current state | Residual |
|
|
231
238
|
| --- | --- | --- |
|
|
232
239
|
| P0 implementation | #413 merged at `a562331f9db321845b05da1e16edc4b83bf78ece`; #390 through #403 are observed closed after that merge. | No integration PR remains. |
|
|
233
|
-
|
|
|
234
|
-
|
|
|
235
|
-
|
|
|
236
|
-
| Other follow-ups | #421
|
|
240
|
+
| P0 implementation release lineage | #414 delivered stable `v0.8.33` through #437. Its immutable tag, GitHub Release, npm `latest`, canonical tar, and provenance bind to `9b80a45070be10659150095cf701a6f375bc6600`. | Historical P0 implementation release evidence does not prove live host delivery. |
|
|
241
|
+
| Deterministic comparison release lineage | #411 delivered stable `v0.8.34` through #439. Its immutable tag, GitHub Release, npm `latest`, canonical tar, and provenance bind to `19c397e4fed5b1cce7d024fbcc51350e9676105f`. | It records only deterministic technical results; host/model/operational values remain unavailable and product verdicts remain `INCONCLUSIVE`. |
|
|
242
|
+
| Hosted Context delivery | The current published comparison package contains the merged #403 adapter boundary, but no package/release record substitutes for the #410 start predicate. | #410 still needs its own named Delivery Control start predicate and one bounded real OpenCode observation. |
|
|
243
|
+
| Other follow-ups | #421 has a local Team Profile v2 source candidate and #412 owns the generic Context compatibility runner. | #421 package and protected hosted gates remain unstarted; neither item may manufacture host or user-value evidence. |
|
|
237
244
|
|
|
238
245
|
Product-value verdict remains **INCONCLUSIVE**. Local composition, package,
|
|
239
246
|
release, and CI evidence do not establish host-session delivery or user benefit.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Team Profile V2
|
|
2
|
+
|
|
3
|
+
Status: current source boundary. Team Profile V2 is repository-local,
|
|
4
|
+
read-only configuration. It does not enable host delivery or runtime injection.
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Team Profile V2 keeps project-shareable conventions separate from a person's
|
|
9
|
+
local philosophy store. It produces an explicit team layer for the pure Context
|
|
10
|
+
resolver; it does not read a personal store, choose a host adapter, or invoke a
|
|
11
|
+
workflow.
|
|
12
|
+
|
|
13
|
+
## File and schema
|
|
14
|
+
|
|
15
|
+
Store the v2 document at:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
.persona/team-profile.jsonc
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The required schema version is `persona-context-team-profile.2`.
|
|
22
|
+
JSONC comments are accepted; after comments are removed, the document must be
|
|
23
|
+
valid JSON. Unknown fields and unsupported schema versions are rejected.
|
|
24
|
+
|
|
25
|
+
```jsonc
|
|
26
|
+
{
|
|
27
|
+
"schemaVersion": "persona-context-team-profile.2",
|
|
28
|
+
"teamKey": "platform",
|
|
29
|
+
"rules": [
|
|
30
|
+
{
|
|
31
|
+
"id": "team-boundaries",
|
|
32
|
+
"topic": "architecture",
|
|
33
|
+
"text": "Keep module boundaries explicit.",
|
|
34
|
+
"status": "active",
|
|
35
|
+
"relevance": {
|
|
36
|
+
"fileRoles": ["service"],
|
|
37
|
+
"languages": ["typescript"],
|
|
38
|
+
"skillIds": ["programming"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`id`, `topic`, `text`, and `status` are required for every rule. `relevance`
|
|
46
|
+
is optional and may contain only `fileRoles`, `languages`, and `skillIds`.
|
|
47
|
+
The loader bounds a profile to 64 rules, text to 600 characters, identifiers to
|
|
48
|
+
120 characters, and each selector list to 16 unique identifiers.
|
|
49
|
+
|
|
50
|
+
## Compatibility
|
|
51
|
+
|
|
52
|
+
The existing v1 document remains unchanged at:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
.persona/team-profile.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Its schema is `persona-team-profile.v1`. The v1 and v2 loaders are separate:
|
|
59
|
+
a v1 document is never upgraded, copied, or silently interpreted as v2.
|
|
60
|
+
|
|
61
|
+
## Safety and resolution
|
|
62
|
+
|
|
63
|
+
The v2 loader rejects, rather than rewrites, malformed or unsafe shared text.
|
|
64
|
+
This includes control characters, credential-shaped values, private absolute
|
|
65
|
+
paths, external URLs, remote-fetch or shell/process instructions, authority or
|
|
66
|
+
security-weakening instructions, and personal-preference-shaped content. It
|
|
67
|
+
also rejects duplicate rule IDs and two active rules at the same topic.
|
|
68
|
+
|
|
69
|
+
`toTeamContextLayerV2` converts a valid document to explicit `teamContracts`
|
|
70
|
+
for the pure resolver. The resolver keeps its fixed precedence:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
product invariants > task > project > team > personal > language > common
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The loader never opens a personal store and does not call the resolver by
|
|
77
|
+
itself. Missing, malformed, unreadable, or symlinked files return only fixed
|
|
78
|
+
diagnostics without creating project state or reflecting the rejected content.
|
|
79
|
+
|
|
80
|
+
## Current limits
|
|
81
|
+
|
|
82
|
+
This boundary adds no public CLI command, preview, explain, doctor expansion,
|
|
83
|
+
OpenCode adapter or hook delivery, runtime default-on change, workflow/evidence
|
|
84
|
+
or authority behavior, network/process action, profile sync, release claim, or
|
|
85
|
+
product-effectiveness claim. Package acceptance, protected hosted checks, and
|
|
86
|
+
external validation remain separate decisions.
|
|
@@ -14,7 +14,7 @@ This inventory classifies every file under `docs/**` as of the docs taxonomy cle
|
|
|
14
14
|
## Classification Counts
|
|
15
15
|
|
|
16
16
|
- archived historical: 4
|
|
17
|
-
- current active pointer/status:
|
|
17
|
+
- current active pointer/status: 45
|
|
18
18
|
- current compatibility doc: 21
|
|
19
19
|
- current index: 1
|
|
20
20
|
- current or historical decision/status: 15
|
|
@@ -28,7 +28,7 @@ This inventory classifies every file under `docs/**` as of the docs taxonomy cle
|
|
|
28
28
|
- version-specific release note: 59
|
|
29
29
|
- versioned durable: 26
|
|
30
30
|
|
|
31
|
-
Total indexed files:
|
|
31
|
+
Total indexed files: 342
|
|
32
32
|
|
|
33
33
|
## File Inventory
|
|
34
34
|
|
|
@@ -60,6 +60,7 @@ Total indexed files: 341
|
|
|
60
60
|
| `docs/current/consumer-authority-v1-decision.md` | current active pointer/status | - | Issue #108 V1 decision: the only enabled authority behavior is explicit `workflow finish implement --assurance cooperative` within the same Finish invocation after fixed local verification and one-time in-memory consumption; it is non-persistent, status/fetch/later closure remain blocked, and default/external boundaries remain blocked. |
|
|
61
61
|
| `docs/current/context-comparison-manifest.json` | current test fixture manifest | - | Exact ten-fixture source-only corpus for the Context OFF, legacy broad compatibility, and targeted layered comparison protocol. |
|
|
62
62
|
| `docs/current/context-program-status.md` | current active pointer/status | - | Canonical P0 audit and isolated OpenCode delivery status for the default-off Context Personalization track and its separation from Workflow Integrity. |
|
|
63
|
+
| `docs/current/context-team-profile-v2.md` | current active pointer/status | - | Read-only project-shareable Team Profile v2 schema, safety boundary, v1 separation, and pure resolver bridge. |
|
|
63
64
|
| `docs/current/desktop-test-artifacts-index.md` | current compatibility doc | - | Compatibility/current-era doc retained in place; migrate by summary and pointer before moving. |
|
|
64
65
|
| `docs/current/diff-rules-classification.md` | current active pointer/status | - | T6 classification table for all `references/diff-rules` files; docs-only scope fixture for future T8/T7 decisions. |
|
|
65
66
|
| `docs/current/diff-rules-distribution-retirement-acceptance-record.md` | current active pointer/status | - | Item 12 exact-main package/init diff-rules retirement, legacy advisory, and claim boundary record. |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# v0.8.35 Release Notes
|
|
2
|
+
|
|
3
|
+
## Team Profile V2
|
|
4
|
+
|
|
5
|
+
This release adds a separate, repository-local Team Profile v2 source at
|
|
6
|
+
`.persona/team-profile.jsonc`. It accepts JSONC comments, validates the exact
|
|
7
|
+
`persona-context-team-profile.2` schema, and converts valid shared rules only
|
|
8
|
+
into an explicit team layer for the pure Context resolver.
|
|
9
|
+
|
|
10
|
+
The existing v1 profile remains at `.persona/team-profile.json`. v1 and v2 are
|
|
11
|
+
separate readers: a v1 document is never upgraded, copied, or silently treated
|
|
12
|
+
as v2.
|
|
13
|
+
|
|
14
|
+
## Safety And Scope Boundaries
|
|
15
|
+
|
|
16
|
+
- Unknown fields, unsupported versions, malformed JSONC, duplicate rule ids,
|
|
17
|
+
active same-topic conflicts, oversized input, and symlinked files fail closed
|
|
18
|
+
with fixed nonreflective diagnostics.
|
|
19
|
+
- Shared text rejects control characters, credential-shaped data, private
|
|
20
|
+
absolute paths, external URLs, remote-fetch or shell/process instructions,
|
|
21
|
+
authority or security-weakening instructions, and personal-profile-shaped
|
|
22
|
+
content before it reaches the resolver.
|
|
23
|
+
- Valid v2 data is read-only and preserves the fixed resolver precedence:
|
|
24
|
+
`product invariants > task > project > team > personal > language > common`.
|
|
25
|
+
- This release adds no CLI command, OpenCode adapter delivery, runtime default,
|
|
26
|
+
workflow, evidence, authority, network, process, or personal-store behavior.
|
|
27
|
+
|
|
28
|
+
## Verification
|
|
29
|
+
|
|
30
|
+
The release path verifies v1/v2 separation, bounded nonreflective parsing,
|
|
31
|
+
project > team > personal precedence through a temporary project fixture,
|
|
32
|
+
source import boundaries, type safety, documentation, package installation,
|
|
33
|
+
protected CI, canonical tar identity, and registry provenance.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "persona-harness",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.35",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@10.8.2",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"docs/current/v0.3.0-alpha-publish-readiness.md",
|
|
63
63
|
"docs/current/persona-harness-detailed-usage.md",
|
|
64
64
|
"docs/current/context-program-status.md",
|
|
65
|
+
"docs/current/context-team-profile-v2.md",
|
|
65
66
|
"docs/current/README.md",
|
|
66
67
|
"docs/current/personalization-profile-v1.md",
|
|
67
68
|
"docs/current/canonical-docs-index.md",
|
|
@@ -343,7 +344,7 @@
|
|
|
343
344
|
"test": "node scripts/run-default-test.mjs",
|
|
344
345
|
"test:fast": "npm run test:unit && npm run test:integration",
|
|
345
346
|
"test:unit": "vitest run --testTimeout=15000 tests/npm-test-contract.test.ts tests/context-config.test.ts tests/context-comparison.test.ts tests/context-comparison-runner.test.ts tests/context-core-import-boundary.test.ts tests/context-envelope-builder.test.ts tests/effective-context-v2.test.ts tests/effective-profile-resolution.test.ts tests/phase0-harness-config.test.ts tests/opencode-skill-adapter.test.ts",
|
|
346
|
-
"test:integration": "vitest run --testTimeout=15000 tests/context-command-routing.test.ts tests/context-doctor.test.ts tests/context-init.test.ts tests/context-preview.test.ts tests/context-explain.test.ts tests/context-status.test.ts tests/opencode-context-delivery.test.ts tests/personalization-profile-store.test.ts tests/team-profile-store.test.ts tests/phase0-runtime-context-delivery.test.ts tests/personalization-profile-package-contract.test.ts",
|
|
347
|
+
"test:integration": "vitest run --testTimeout=15000 tests/context-command-routing.test.ts tests/context-doctor.test.ts tests/context-init.test.ts tests/context-preview.test.ts tests/context-explain.test.ts tests/context-status.test.ts tests/opencode-context-delivery.test.ts tests/personalization-profile-store.test.ts tests/team-profile-store.test.ts tests/team-profile-v2-store.test.ts tests/phase0-runtime-context-delivery.test.ts tests/personalization-profile-package-contract.test.ts",
|
|
347
348
|
"test:smoke": "npm run build && node dist/cli/index.js --help",
|
|
348
349
|
"test:full": "npm run test:repository",
|
|
349
350
|
"test:package": "node scripts/test-package-smoke.mjs",
|