musememory 3.2.0 → 3.4.0
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/.agents/artifacts/2026-10-26-dashboard-rehaul-rashin-research-and-wave-23-tickets.md +2 -0
- package/.agents/artifacts/README.md +21 -0
- package/.agents/artifacts/TECHNICAL_DEBT-wave24-25.md +12 -0
- package/.agents/artifacts/TECHNICAL_DEBT-wave26.md +11 -0
- package/.agents/artifacts/TECHNICAL_DEBT-wave27.md +13 -0
- package/.agents/artifacts/gauntlet-wave23-pr1/ACCEPTANCE_PACKET.md +85 -0
- package/.agents/artifacts/gauntlet-wave23-pr1/GAUNTLET_JOB_CONTRACT.md +50 -0
- package/.agents/artifacts/gauntlet-wave23-pr1/ITERATION_LEDGER.md +131 -0
- package/.agents/artifacts/gauntlet-wave23-pr1/TECHNICAL_DEBT.md +28 -0
- package/.agents/artifacts/gauntlet-wave23-pr456/ACCEPTANCE_PACKET.md +22 -0
- package/.agents/artifacts/gauntlet-wave23-pr456/GAUNTLET_JOB_CONTRACT.md +41 -0
- package/.agents/artifacts/gauntlet-wave23-pr456/ITERATION_LEDGER.md +36 -0
- package/.agents/artifacts/gauntlet-wave24-25/ACCEPTANCE_PACKET.md +13 -0
- package/.agents/artifacts/gauntlet-wave24-25/ITERATION_LEDGER.md +28 -0
- package/.agents/artifacts/gauntlet-wave25-wiring/ACCEPTANCE_PACKET.md +7 -0
- package/.agents/artifacts/gauntlet-wave25-wiring/ITERATION_LEDGER.md +27 -0
- package/.agents/artifacts/gauntlet-wave27/ACCEPTANCE_PACKET.md +7 -0
- package/.agents/artifacts/gauntlet-wave27/ITERATION_LEDGER.md +36 -0
- package/.agents/artifacts/outcome-study-2026-11/README.md +64 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/bytes.test.ts +12 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/clone.test.ts +26 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/csv.test.ts +11 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/duration.test.ts +12 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/isodate.test.ts +7 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/money.test.ts +11 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/percent.test.ts +11 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/semver.test.ts +12 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/slug.test.ts +12 -0
- package/.agents/artifacts/outcome-study-2026-11/graders/truncate.test.ts +10 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/bytes.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/clone.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/csv.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/duration.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/isodate.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/money.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/percent.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/semver.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/slug.md +3 -0
- package/.agents/artifacts/outcome-study-2026-11/tasks/truncate.md +3 -0
- package/.agents/context/architecture.md +7 -7
- package/.agents/context/current.md +216 -8
- package/.agents/context/decisions.md +8 -0
- package/.agents/context/deep-research-agentic-memory-evolution.md +1 -1
- package/.agents/context/evidence-ledger.md +99 -0
- package/.agents/context/index.md +1 -1
- package/.agents/context/product.md +4 -0
- package/.agents/context/roadmap.md +19 -16
- package/.agents/context/ticket-plan.md +147 -47
- package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-design.md +1 -1
- package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-plan.md +1 -1
- package/.agents/standards/README.md +6 -1
- package/.agents/standards/anti-patterns.md +116 -0
- package/.agents/standards/boundary-governance.md +52 -0
- package/.agents/standards/frontend-astro.md +3 -1
- package/.agents/standards/language-policy.md +115 -0
- package/.agents/standards/memory-context.md +1 -1
- package/.agents/standards/security-vibeguard.md +1 -1
- package/.agents/standards/test-failure-audit.md +46 -0
- package/.agents/standards/visual-inspection.md +31 -0
- package/README.md +7 -4
- package/claims.json +5 -5
- package/dist/index.js +12530 -7037
- package/docs/agent-reference.md +10 -1
- package/docs/cli-reference.md +32 -8
- package/docs/mcp-tool-matrix.json +12 -1
- package/package.json +2 -1
- package/schema.json +1 -0
- package/.agents/artifacts/2026-10-20-lifeos-memory-distillation-plan.md +0 -865
- package/.agents/artifacts/2026-10-26-wave-29-code-review-audit.md +0 -52
- package/.agents/artifacts/2026-10-26-wave-29-gauntlet-acceptance-packet.md +0 -48
- package/.agents/artifacts/2026-10-26-wave-29-muse-security-audit.md +0 -71
- package/.agents/artifacts/2026-10-26-wave-29-sovereign-lifeos-migration-plan.md +0 -88
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# 🚫 Negative Constraints & Architectural Anti-Patterns
|
|
2
|
+
|
|
3
|
+
> **Operating Invariant**: Negative constraints are as critical as positive rules. Preventing known architectural failure modes and speculative complexity cuts agent hallucinations and regressions by over 90%.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Universal Agent Anti-Patterns
|
|
8
|
+
|
|
9
|
+
| Anti-Pattern | Why It Fails | Strict Invariant |
|
|
10
|
+
| :--- | :--- | :--- |
|
|
11
|
+
| **Speculative Architecture** | Agents create unused folders, abstractions, or "future-proofing" files that add maintenance debt. | Implement strictly what is currently requested. **Current Needs > Future Possibilities (YAGNI)**. |
|
|
12
|
+
| **Rogue Package Installation** | Casually running `npm install <pkg>` for minor utilities that modern runtimes provide natively. | All production dependencies are declared and reviewed; this repository ships three (`@modelcontextprotocol/sdk`, `ajv`, `js-yaml`). Never install Axios, Lodash, or Moment. Verify with the `updateagents` skill's `--stack-guard` check against the Golden Stack Fence. |
|
|
13
|
+
| **Silent Error Swallowing** | Using empty `catch {}` blocks or returning default mocks when APIs fail. | Fail fast and loud. Log structured error details and exit cleanly with diagnostic codes. |
|
|
14
|
+
| **Synthetic Artifact Leakage** | Leaving proprietary IDE markers (`ORCA_RICH_MD`, Cursor, Windsurf wrappers) in commits. | Always unwrap and decode to raw markdown; backtick template tokens (`<issue-id>`). |
|
|
15
|
+
| **Context Window Overload** | Ingesting massive directories or entire logs into LLM context instead of surgical lookups. | Use targeted search/read tools to extract minimal verifiable evidence. Prefer `rg`/`fd`/`jq` where installed; fall back to the harness's grep/glob tools, which need no install. |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 2. Frontend & UI Anti-Patterns
|
|
20
|
+
|
|
21
|
+
- ❌ **`useEffect` Data Fetching**: Never use raw `useEffect` hooks for remote data fetching in React 19 / modern Next.js. Use Server Components, Actions, or TanStack Query.
|
|
22
|
+
- ❌ **Cumulative Layout Shifts (CLS)**: Never render remote images or dynamic banners without explicit aspect-ratio or dimensions.
|
|
23
|
+
- ❌ **Inline CSS Magic Numbers**: Avoid arbitrary pixel values (e.g. `margin: 17px`). Use locked DTCG spacing tokens (`space-4`, `space-6`) and OKLCH palettes.
|
|
24
|
+
- ❌ **Client-Side Secret Ingestion**: Never import environment variables prefixed with database URLs or private keys into client components.
|
|
25
|
+
|
|
26
|
+
### 🎭 Anti-Delta: Client-Side Data Fetching vs Server Component
|
|
27
|
+
```tsx
|
|
28
|
+
// ❌ DON'T: Client-side useEffect data fetching (Race conditions & waterfalls)
|
|
29
|
+
function UserList() {
|
|
30
|
+
const [users, setUsers] = useState([]);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
fetch("/api/users").then((res) => res.json()).then(setUsers);
|
|
33
|
+
}, []);
|
|
34
|
+
return <div>{users.map((u) => <div key={u.id}>{u.name}</div>)}</div>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ✅ DO: React Server Component (Direct, type-safe, zero client JS waterfall)
|
|
38
|
+
async function UserList() {
|
|
39
|
+
const users = await db.query.users.findMany();
|
|
40
|
+
return <div>{users.map((u) => <div key={u.id}>{u.name}</div>)}</div>;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 🖼️ Anti-Delta: Unsized Image vs Layout-Stable Media
|
|
45
|
+
```tsx
|
|
46
|
+
// ❌ DON'T: Unsized remote images causing layout jumps (CLS)
|
|
47
|
+
<img src={heroUrl} alt="Hero banner" className="w-full" />
|
|
48
|
+
|
|
49
|
+
// ✅ DO: Explicit dimensions, aspect ratio, and priority hints
|
|
50
|
+
<Image
|
|
51
|
+
src={heroUrl}
|
|
52
|
+
alt="Hero banner"
|
|
53
|
+
width={1200}
|
|
54
|
+
height={630}
|
|
55
|
+
priority
|
|
56
|
+
className="w-full aspect-[1200/630] object-cover"
|
|
57
|
+
/>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 3. Backend & API Anti-Patterns
|
|
63
|
+
|
|
64
|
+
- ❌ **Unvalidated Request Payloads**: Never process `req.body` or query params without a validating Zod schema.
|
|
65
|
+
- ❌ **N+1 Database Queries**: Avoid executing database queries inside map loops. Use batch queries or join loaders.
|
|
66
|
+
- ❌ **Raw SQL String Interpolation**: Always use parameterized queries or type-safe ORM drivers (Drizzle, Kysely, Prisma).
|
|
67
|
+
- ❌ **Inconsistent Error Envelopes**: APIs must return predictable envelopes: `{ success: false, error: { code, message } }`.
|
|
68
|
+
|
|
69
|
+
### 🛡️ Anti-Delta: Unvalidated Payload vs Structured Zod Envelope
|
|
70
|
+
```ts
|
|
71
|
+
// ❌ DON'T: Unvalidated request parsing & silent mock fallback
|
|
72
|
+
export async function POST(req: Request) {
|
|
73
|
+
try {
|
|
74
|
+
const data = await req.json();
|
|
75
|
+
return Response.json({ ok: true, data });
|
|
76
|
+
} catch {
|
|
77
|
+
return Response.json({ ok: false }); // Swallowed error, untyped payload
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ✅ DO: Strict Zod validation & predictable envelope
|
|
82
|
+
const PayloadSchema = z.object({
|
|
83
|
+
email: z.string().email(),
|
|
84
|
+
plan: z.enum(["starter", "pro"]),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export async function POST(req: Request) {
|
|
88
|
+
const parsed = PayloadSchema.safeParse(await req.json());
|
|
89
|
+
if (!parsed.success) {
|
|
90
|
+
return Response.json(
|
|
91
|
+
{ success: false, error: { code: "VALIDATION_FAILED", details: parsed.error.flatten() } },
|
|
92
|
+
{ status: 400 },
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
const result = await provisionAccount(parsed.data);
|
|
96
|
+
return Response.json({ success: true, data: result }, { status: 201 });
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 🗄️ Anti-Delta: SQL Injection vs Parameterized Queries
|
|
101
|
+
```ts
|
|
102
|
+
// ❌ DON'T: Raw SQL string interpolation (SQL Injection vulnerability)
|
|
103
|
+
const user = await db.execute(`SELECT * FROM users WHERE id = '${userId}'`);
|
|
104
|
+
|
|
105
|
+
// ✅ DO: Parameterized queries or type-safe ORM schema
|
|
106
|
+
const user = await db.query.users.findFirst({ where: eq(users.id, userId) });
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 4. Verification Gate Before Commit
|
|
112
|
+
|
|
113
|
+
Before claiming any task complete:
|
|
114
|
+
1. Did you add an unapproved dependency? Production dependencies are `@modelcontextprotocol/sdk`, `ajv` and `js-yaml` only — anything else is a stack change, not a fix. Run the `updateagents` skill's `--stack-guard` to check the Golden Stack Fence.
|
|
115
|
+
2. Are the gates passing? Run `bun test`, `bunx tsc --noEmit`, `bun run claims:check` and `bun run docs:check` — the same set CI runs. There is no `lint` script; do not invent one.
|
|
116
|
+
3. Are there any plaintext secrets or tokens exposed? Run `memory scan-secrets .`. It reports a non-zero count on this repository because 56 test fixtures deliberately embed fake credentials — treat a **new** finding in non-test code as a real leak.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 🛡️ Boundary Governance & Quality Assurance Standard
|
|
2
|
+
|
|
3
|
+
> **Nexus Head Gate**: Mandatory verification protocol for all agency deliverables, code changes, and infrastructure mutations.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. The 5 Boundary Checkpoints
|
|
8
|
+
|
|
9
|
+
Before any branch is merged, deliverable signed off, or change deployed, the reviewing agent must verify each checkpoint:
|
|
10
|
+
|
|
11
|
+
```mermaid
|
|
12
|
+
flowchart LR
|
|
13
|
+
CP1[1. Goal] --> CP2[2. Facts]
|
|
14
|
+
CP2 --> CP3[3. Method]
|
|
15
|
+
CP3 --> CP4[4. Proof]
|
|
16
|
+
CP4 --> CP5[5. Boundaries]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Checkpoint 1: Clear Intent & Scoped Goal
|
|
20
|
+
- What exact outcome is expected?
|
|
21
|
+
- Does the change directly serve the user's explicit request without scope creep?
|
|
22
|
+
- Refuse unsolicited refactoring or aesthetic redesigns.
|
|
23
|
+
|
|
24
|
+
### Checkpoint 2: Grounded Facts & Evidence
|
|
25
|
+
- What are the verified facts of the current system state?
|
|
26
|
+
- Are assumptions backed by real file contents, CLI outputs, and logs?
|
|
27
|
+
- Never rely on assumptions or hallucinated APIs.
|
|
28
|
+
|
|
29
|
+
### Checkpoint 3: Minimal & Intentional Method
|
|
30
|
+
- Is this the minimum viable change required to achieve the goal?
|
|
31
|
+
- Does it respect established patterns in the repository?
|
|
32
|
+
- Does it preserve backward compatibility and existing configuration?
|
|
33
|
+
|
|
34
|
+
### Checkpoint 4: Overwhelming Proof
|
|
35
|
+
- Do tests pass completely (`bun test`, test runner output)?
|
|
36
|
+
- Does the static type-checker report zero errors (`bunx tsc --noEmit`)? There is no `lint` script in this repository — do not invent one.
|
|
37
|
+
- Has evidence been recorded in commit verification notes?
|
|
38
|
+
|
|
39
|
+
### Checkpoint 5: Strict Boundaries & Blast Radius
|
|
40
|
+
- Tenant isolation: Ensure no cross-client data leakage.
|
|
41
|
+
- Secret protection: Guarantee zero API keys, tokens, or environment values are exposed.
|
|
42
|
+
- Path portability: Ensure paths use `$HOME`, `~`, or relative project roots; no hardcoded host paths.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 2. Rejection Criteria
|
|
47
|
+
|
|
48
|
+
Changes failing ANY of the following must be immediately rejected:
|
|
49
|
+
1. Hardcoded host or local developer paths in templates or shipped files.
|
|
50
|
+
2. Committed secrets, unmasked environment variables, or private tokens.
|
|
51
|
+
3. Failing automated tests or unhandled runtime promises.
|
|
52
|
+
4. Monolithic multi-feature diffs combining unrelated functional changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🚀 Astro Frontend Engineering Standards
|
|
2
2
|
|
|
3
|
-
> **Runtime Target**: Astro v7.
|
|
3
|
+
> **Runtime Target**: Astro v7.4.7 · Bun / Node runtime · TypeScript Strict
|
|
4
4
|
> **Applies to**: `apps/website/` — the Muse Memory marketing and documentation site.
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -130,3 +130,5 @@ bun run --cwd apps/website scripts/audit-visual.ts
|
|
|
130
130
|
bun test # the whole repository suite
|
|
131
131
|
bunx tsc --noEmit # type check
|
|
132
132
|
```
|
|
133
|
+
|
|
134
|
+
> Build note: the site runs the Astro CLI through Node (`apps/website/scripts/astro.mjs`); Bun’s CJS/ESM interop rejects Astro’s `cookie` import.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Language Policy — Universal English Working Language & Script Guard
|
|
2
|
+
|
|
3
|
+
> **Scope:** every agent working in this repository, and every project scaffolded from this template.
|
|
4
|
+
> **Authority:** mandatory, not optional background reading. Routed from `AGENTS.md` (Working rules → Evidence and language).
|
|
5
|
+
|
|
6
|
+
## 1. The Working Language Rule
|
|
7
|
+
|
|
8
|
+
English is the universal working language across all projects and agents:
|
|
9
|
+
|
|
10
|
+
- **Universal scope**: Agent responses, internal chain-of-thought/reasoning, code, identifiers, comments, commits, pull requests, specifications, and documentation are strictly written in English; **narration between tool calls counts as output**.
|
|
11
|
+
- **An English final answer does not excuse non-English narration earlier in the same turn.** A model that treats only its closing summary as "the answer" will narrate in the source language and believe it complied.
|
|
12
|
+
- **Input language never changes output language**: A reference site, documentation page, screenshot, PDF, video, audio file, chat message, or media asset may be provided in Japanese, Chinese, Korean, Arabic, Hindi, Cyrillic, Hebrew, Thai, Devanagari, or any other script. Read it, extract what is needed, translate the information, and respond and code in English.
|
|
13
|
+
- **Translate, never mirror**: Quote non-English source material only when the exact original wording matters, and always provide the English translation immediately beside it.
|
|
14
|
+
- **Never switch language to match the user**: Never switch languages to match the conversational language of the user or prompt, including informal chat, short replies, single words, greetings, or acknowledgments.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 2. Site-Content Carve-Out
|
|
19
|
+
|
|
20
|
+
- **Public copy**: Public site copy, user interfaces, and marketing copy remain in English unless the user explicitly approves a localized locale or multilingual target in project specifications.
|
|
21
|
+
- **Proper nouns & cultural terms**: Proper nouns (people, places, brands), specific culinary dish names, and localized prices with native currency symbols may retain their original script where semantically and culturally appropriate.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 3. Why a Written Rule Is Not Enough
|
|
26
|
+
|
|
27
|
+
A language model reading a non-English reference can inadvertently mirror or carry non-English script into replies, comments, and committed files without noticing. Prompt instructions alone cannot eliminate attention bias or accidental script leakage.
|
|
28
|
+
|
|
29
|
+
Because instructions alone cannot prevent this failure mode, this policy is paired with an automated mechanical guard.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 4. Enforcement Pattern (Stack-Agnostic)
|
|
34
|
+
|
|
35
|
+
Enforcement runs through **the project's own test runner** (e.g. `bun test`, `npm test`, `pytest`, `cargo test`, `go test`), not a specific vendor tool:
|
|
36
|
+
|
|
37
|
+
- **Scan scope**: The guard scans all tracked source code, configuration files, and documentation.
|
|
38
|
+
- **Detected scripts**: The guard checks for non-English scripts, including:
|
|
39
|
+
- CJK Unified Ideographs (Chinese, Japanese Kanji)
|
|
40
|
+
- Japanese Hiragana & Katakana
|
|
41
|
+
- Korean Hangul
|
|
42
|
+
- Cyrillic
|
|
43
|
+
- Arabic
|
|
44
|
+
- Hebrew
|
|
45
|
+
- Thai
|
|
46
|
+
- Devanagari
|
|
47
|
+
- Fullwidth ASCII and punctuation characters
|
|
48
|
+
- **Failure output**: On encountering unlisted non-English script, the test runner fails with the exact `file`, `line number`, and `script name`.
|
|
49
|
+
|
|
50
|
+
### Contract self-check assertions
|
|
51
|
+
|
|
52
|
+
Each project's test runner should assert the policy contract itself, not only scan source files. At minimum, assert that:
|
|
53
|
+
|
|
54
|
+
- `AGENTS.md` contains the policy heading and the phrase `narration between tool calls` (case-insensitive).
|
|
55
|
+
- `AGENTS.md` contains an input-language clause (phrase: `input language never changes`, case-insensitive).
|
|
56
|
+
- This standard contains a `Known limit` heading.
|
|
57
|
+
- This standard states that narration counts as output.
|
|
58
|
+
|
|
59
|
+
### Hook Note
|
|
60
|
+
|
|
61
|
+
Where the project has a pre-commit hook (or CI workflow), it runs the same guard before commits are accepted so that a language policy violation cannot enter version history.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Known limit
|
|
66
|
+
|
|
67
|
+
The guard reads files. It cannot see an agent's streaming narration between tool calls, so a non-English sentence in chat passes every automated check while still breaking the policy. Only the rule text covers that surface, which is why the narration clause is stated explicitly rather than assumed to follow from "output is English".
|
|
68
|
+
|
|
69
|
+
Do not describe the guard as complete enforcement. Claiming coverage it does not have is worse than the gap itself, because it stops anyone from looking.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## If you catch yourself narrating in another language
|
|
74
|
+
|
|
75
|
+
Switch to English on the next sentence and continue. Do not restate the previous sentence in English — the reader already saw it, and repeating it draws more attention to the slip than moving on. Do not silently translate the remainder of a paragraph; start the thought again in English.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 5. Explicit Allowlist
|
|
80
|
+
|
|
81
|
+
The mechanical guard respects an explicit allowlist for legitimate non-ASCII usage in English text:
|
|
82
|
+
|
|
83
|
+
1. **Typography and mathematical symbols**:
|
|
84
|
+
- Em dashes (`—`) and en dashes (`–`)
|
|
85
|
+
- Curly quotes and apostrophes (`“`, `”`, `‘`, `’`)
|
|
86
|
+
- Middle dots (`·`), bullets, and section signs (`§`)
|
|
87
|
+
- Arrows (`→`, `←`, `↑`, `↓`, `↔`)
|
|
88
|
+
- Comparison and math operators (`≥`, `≤`, `×`, `÷`, `°`, `±`, `≠`, `≈`)
|
|
89
|
+
- Currency symbols (`$`, `€`, `£`, `₹`, `¥`)
|
|
90
|
+
- Box-drawing characters and approved diagrams
|
|
91
|
+
- Standard Unicode emoji where permitted by project style
|
|
92
|
+
2. **Accented Latin for genuine English usage**:
|
|
93
|
+
- Common loanwords with diacritics (e.g., `café`, `naïve`, `résumé`, `cliché`)
|
|
94
|
+
- Accented proper nouns and geographic names (e.g., `São Paulo`, `München`, `Beyoncé`)
|
|
95
|
+
3. **Byte-identical vendor tokens & protocol fixtures**:
|
|
96
|
+
- Vendor token markers, cryptographic digests, protocol payload signatures, or upstream API mock fixtures that must stay byte-identical to an external specification.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 6. If the Guard Fails
|
|
101
|
+
|
|
102
|
+
When the test runner or pre-commit hook reports a language violation:
|
|
103
|
+
|
|
104
|
+
1. **Read the report**: Note the reported file, line number, and script name.
|
|
105
|
+
2. **Translate**: Read the offending line and translate the non-English characters to English.
|
|
106
|
+
3. **Evaluate necessity**: Retain the original script only if it represents an approved proper noun, culturally specific dish name, or byte-identical vendor token.
|
|
107
|
+
4. **Allowlist with documentation**: If the token must be preserved, add that token or file path to the project guard's allowlist accompanied by a comment explaining why its exact bytes matter.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## See Also
|
|
112
|
+
|
|
113
|
+
- `AGENTS.md` — Working rules (Rule 6: Evidence and language).
|
|
114
|
+
- `.agents/standards/anti-patterns.md` — Negative constraints and anti-patterns.
|
|
115
|
+
- `.agents/standards/execution-kernel.md` — Refactoring discipline and verification gates.
|
|
@@ -36,7 +36,7 @@ The `./.memory` directory at the project root is the local persistent memory sto
|
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## 3. Creed Native Context & Canonical
|
|
39
|
+
## 3. Creed Native Context & Canonical Memory Sources
|
|
40
40
|
|
|
41
41
|
Agents reference these canonical sovereign Muse Memory sources:
|
|
42
42
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Test-Failure Audit — Self-Triage on Repeated Red
|
|
2
|
+
|
|
3
|
+
> **Scope:** every agent working in this repository, and every project scaffolded from this template.
|
|
4
|
+
> **Authority:** routed from `AGENTS.md` (Working rules → Test-Failure Audit).
|
|
5
|
+
|
|
6
|
+
## The failure this rule exists to prevent
|
|
7
|
+
|
|
8
|
+
An agent ran the same failing test three times, each time applying a
|
|
9
|
+
symptom-level tweak, and reported "still investigating" without ever
|
|
10
|
+
checking whether its own previous change had landed, whether the test was
|
|
11
|
+
even exercising the new code, or whether the failure was a pre-existing
|
|
12
|
+
flaky/environment issue. The root cause is that repeated red was treated as
|
|
13
|
+
"try again" instead of as a signal to audit the agent's own outputs.
|
|
14
|
+
|
|
15
|
+
## The rule
|
|
16
|
+
|
|
17
|
+
When **the same test (or the same failure signature) fails on two or more
|
|
18
|
+
consecutive runs** during one task:
|
|
19
|
+
|
|
20
|
+
1. **Stop changing code.** No further edits until the audit below completes.
|
|
21
|
+
2. **Run the self-audit** over the agent's own outputs for this task:
|
|
22
|
+
- Did the previous edit actually land on disk? (`git diff`, `git show --stat HEAD`)
|
|
23
|
+
- Is the test even exercising the changed code path? (trace the call site)
|
|
24
|
+
- Is the failure pre-existing on the clean tree? (`git stash` → run test → `git stash pop`)
|
|
25
|
+
- Is it environment/flaky (timeout, network, sandbox)? Check exit codes and logs.
|
|
26
|
+
- Did a guard get widened or a test get weakened? (re-read the test as the spec)
|
|
27
|
+
3. **Triage** the root cause into one of: (a) my change broke a contract,
|
|
28
|
+
(b) pre-existing/inherited failure, (c) flaky/environment, (d) wrong
|
|
29
|
+
assumption about the input. Record the triage verdict in the report.
|
|
30
|
+
4. **Only then** apply a fix targeted at the triaged root cause, and re-run
|
|
31
|
+
the full suite (not just the one test).
|
|
32
|
+
5. **Report** the audit: the runs attempted, the triage verdict, the fix, and
|
|
33
|
+
the final verification command + exit code.
|
|
34
|
+
|
|
35
|
+
## Verdict names
|
|
36
|
+
|
|
37
|
+
- `SELF-AUDIT COMPLETE` — audit ran, triage recorded, fix applied, suite green.
|
|
38
|
+
- `SELF-AUDIT PENDING` — red persists; no fix applied yet; do not claim progress.
|
|
39
|
+
|
|
40
|
+
Never report "still investigating" without the audit above.
|
|
41
|
+
|
|
42
|
+
## See also
|
|
43
|
+
|
|
44
|
+
- `AGENTS.md` — Working rules (Test-Failure Audit entry).
|
|
45
|
+
- `.agents/standards/execution-kernel.md` — systematic root-cause discipline.
|
|
46
|
+
- `.agents/standards/workflows.md` — the verification gates this audit re-enters.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 👁️ Visual Context & Multimodal UI Verification
|
|
2
|
+
|
|
3
|
+
> **Operating Invariant**: For UI, styling, and design work, verbal claims of completion are insufficient. Agents must verify rendered DOM appearance, responsiveness, and contrast using visual artifacts or layout assertions.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Visual Verification Protocol
|
|
8
|
+
|
|
9
|
+
When creating or modifying frontend components, landing pages, or user interfaces:
|
|
10
|
+
1. **Rendered Layout Verification**:
|
|
11
|
+
- Verify layout stability and responsive behavior across viewport breakpoints:
|
|
12
|
+
- Mobile: `390px` (iPhone baseline)
|
|
13
|
+
- Tablet: `768px` (iPad baseline)
|
|
14
|
+
- Desktop: `1280px` (Standard desktop)
|
|
15
|
+
2. **Contrast & Accessibility (A11y)**:
|
|
16
|
+
- All body text must maintain a minimum WCAG AA contrast ratio of **4.5:1** against backgrounds.
|
|
17
|
+
- Large headers (>24px) must maintain at least **3:1** contrast.
|
|
18
|
+
- Interactive elements must possess clear `:focus-visible` outlines with at least 2px offset.
|
|
19
|
+
3. **Screenshot Storage Invariant**:
|
|
20
|
+
- Verified UI screenshots, component mocks, and visual error captures live strictly inside `./.agents/brand/screenshots/`.
|
|
21
|
+
- Never commit raw uncompressed images to the root repository or documentation tree.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Multimodal Debugging Workflow
|
|
26
|
+
|
|
27
|
+
If an agent encounters a layout bug, visual regression, or misaligned element:
|
|
28
|
+
1. **Capture**: Save the rendered viewport or error capture to `./.agents/brand/screenshots/[name]-[timestamp].png`.
|
|
29
|
+
2. **Inspect**: Ingest the image file into multimodal context or analyze computed CSS properties.
|
|
30
|
+
3. **Remediate**: Address the specific box-model or flex/grid constraint causing the alignment flaw.
|
|
31
|
+
4. **Re-Verify**: Confirm that zero layout shifts or visual clipping remain.
|
package/README.md
CHANGED
|
@@ -439,10 +439,13 @@ curl -fsSL https://raw.githubusercontent.com/harshsinghmp/musememory/main/script
|
|
|
439
439
|
```
|
|
440
440
|
|
|
441
441
|
#### What `memory upgrade` automatically handles:
|
|
442
|
-
1. **Package Manager Auto-Detection**: Detects whether your workstation runs `bun`, `npm`, `pnpm`, or `yarn` and
|
|
443
|
-
2. **
|
|
444
|
-
|
|
445
|
-
|
|
442
|
+
1. **Package Manager Auto-Detection**: Detects whether your workstation runs `bun`, `npm`, `pnpm`, or `yarn` and updates to the latest release without redundant downgrades.
|
|
443
|
+
2. **Global vs. Per-Project Scoping**:
|
|
444
|
+
- **Per-Project (`memory upgrade`)**: Operates on `./.memory/`. Repairs local constraints (`CURRENT.md`), project user persona overrides (`USER.md`), re-indexes AST code symbols via CodeGraph/Graphify, and installs Git pre-commit transcript harvesting hooks.
|
|
445
|
+
- **Global (`memory upgrade --global`)**: Operates on `~/.memory/`. Re-aligns sovereign master profiles (`USER.md`), validates machine-wide constraints, updates global SQLite schemas, heals `~/.local/bin` symlinks, and auto-wires all detected agent platforms workstation-wide.
|
|
446
|
+
3. **Self-Healing Storage Repair**: Recovers missing `.memory/`, `CURRENT.md` constraints, or `USER.md` persona files if corrupted or deleted.
|
|
447
|
+
4. **Coding Agent Re-Discovery**: Scans for newly installed coding agents (Cursor, Claude Code, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, and the rest of the mainstream field) and auto-wires them with zero permissions.
|
|
448
|
+
5. **AST Symbol Graph Re-Indexing**: Re-synchronizes CodeGraph/Graphify symbol caches under `.memory/graph-symbols.json`.
|
|
446
449
|
|
|
447
450
|
---
|
|
448
451
|
|
package/claims.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "Generated by scripts/generate-claims.ts. Do not hand-edit: test/marketing_claims.test.ts re-derives every value from src/ and fails on drift.",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"mcpTools":
|
|
3
|
+
"version": "3.4.0",
|
|
4
|
+
"mcpTools": 126,
|
|
5
5
|
"mcpProfiles": 7,
|
|
6
6
|
"agentPlatforms": 52,
|
|
7
7
|
"migratorProviders": 30,
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"networkMillis": 300
|
|
15
15
|
},
|
|
16
16
|
"tests": {
|
|
17
|
-
"count":
|
|
18
|
-
"assertions":
|
|
19
|
-
"files":
|
|
17
|
+
"count": 1592,
|
|
18
|
+
"assertions": 7597,
|
|
19
|
+
"files": 252
|
|
20
20
|
}
|
|
21
21
|
}
|