Skip to content
Skills Library
Programming · Research

troth-memory

/troth-memory

Use this skill when starting any code task in a project that has a troth substrate. It mandates a query-first workflow — load prior verified work and unresolved page-handles before editing, instead of re-deriving from scratch.

Author
xgre1 ↗
Repository
troth ↗
Licence
AGPL-3.0
Last repository change
09.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 09.09.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What it does and when to use it

Use this skill when starting any code task in a project that has a troth substrate. It mandates a query-first workflow — load prior verified work and unresolved page-handles before editing, instead of re-deriving from scratch.

Original author description

Use this skill when starting any code task in a project that has a troth substrate. It mandates a query-first workflow — load prior verified work and unresolved page-handles before editing, instead of re-deriving from scratch.

How it works

  1. Step 1 — Discover prior verified work
  2. Step 2 — Resolve any page-handles you can see
  3. Step 3 — Search for class-level patterns
  4. Step 4 — Only then act
  5. Why this matters
  6. Anti-patterns to avoid
  7. Tool routing (both topologies)
Original SKILL.md headings · 88 lines, 489 words
SKILL.md preview
---
name: troth-memory
description: Use this skill when starting any code task in a project that has a troth substrate. It mandates a query-first workflow — load prior verified work and unresolved page-handles before editing, instead of re-deriving from scratch.
---

# Query-first memory protocol

When a code task begins (or whenever you see a `<troth:page:UUID>` marker
in your context), follow this protocol BEFORE issuing any Edit / Write /
MultiEdit tool call.

## Step 1 — Discover prior verified work

Call `troth_query_actions` to see what was previously built and verified
in this project:

```
troth_query_actions({
  filter: { type: "edit", cwd: "<your current working directory>" },
  limit: 5,
  order: "desc"
})
```

Read the returned records. If any of them touch the file you're about to
edit, fetch the full content and respect the prior pattern:

```
troth_fetch_action({ id: "<uuid from query>" })
```

This is cheaper than re-reading the file plus deriving the edit shape
again from scratch. The substrate has the verified diff, the format
(hashline / str_replace / apply_patch), and the AST-validation result.

## Step 2 — Resolve any page-handles you can see

If your context contains `<troth:page:UUID>` markers — these are
substrate-evicted records — load them BEFORE proceeding:

```
troth_fault_in({ handle: "<troth:page:UUID>" })
```

A handle without a fault-in is wasted context: the marker takes ~40
tokens and gives you nothing actionable until you fault.

## Step 3 — Search for class-level patterns

If the task is a class of bug you might have seen before (null guard,
auth check, etc.), search the substrate's full-text index:

```
troth_search_actions({ query: "null check guard", limit: 5 })
```

Returns prior lessons + verified edits that matched the same pattern.

## Step 4 — Only then act

After steps 1–3, you have the project's verified context loaded into
your working memory. Now apply the user's request.

## Why this matters

- Re-deriving costs ~10× more tokens than fetching a verified record.
- Your context window is bounded; the substrate is not. Keep the window
  for the current task; pull history only when relevant.
- Prior verified edits are AST-checked and outcome-tracked. Trusting
  them is structurally safer than guessing.

## Anti-patterns to avoid

- Reading a file with the built-in Read tool when a `<troth:page:...>`
  marker for that exact record exists in your context. Use `fault_in`.
- Editing a file in a class you've seen 5× before without first calling
  `troth_query_actions`. The substrate already knows the pattern.
- Ignoring `troth_search_actions` because "I'll just figure it out".
  The lesson rows are how you avoid repeating mistakes.

## Tool routing (both topologies)
The substrate tools this skill uses may be DIRECT in your tool list (names like
`troth_engram_record`, `troth_recall`, `troth_dialogue_recent`) OR behind the
troth-router gateway (app installs wire only: troth-router, troth-bash,
troth-cache, troth-hashline). If a named tool is NOT in your tool list, do NOT
conclude the substrate is down and do NOT fall back to file-based memory.
Route it through the router instead:
  1. `mcp_list({server: "troth-substrate"})` (or `"troth-memory"`) to see names.
  2. `mcp_call({server: "troth-substrate", tool: "<same troth_* name>", args: {...same args...}})`.
Substrate lives on server `troth-substrate` (engrams, recall, dialogue, slash);
mind/actions on `troth-memory`. Same tools, same args, one hop through mcp_call.

Versions

The database has no other skills named troth-memory.

Database snapshot: 13.11.2026 · package version 077b9f1d3c0d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

No similar skills in the database.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.