Tw ghost

From SDiamante13/dotfiles · View interactive version

Tw ghost is an AI agent skill from the GitHub repository SDiamante13/dotfiles. Create a language-agnostic ghost package (spec + portable tests) from an existing repo by extracting SPEC.md, exhaustive tests.yaml (operations and/or scenarios), INSTALL.md, README.md, VERIFY.md, and upstream LICENSE files with provenance and regeneration instructions. Use when prompts say "/tw-gho

How to use this skill

Skill file

ghost

Overview

Generate a ghost package (spec + tests + install prompt) from an existing repo.

Preserve behavior, not prose:

The output is language-agnostic so it can be implemented in any target language or harness.

Scenario testing frame (for agentic systems / tool loops):

Fit / limitations

This approach works best when the system’s behavior can be expressed as deterministic data:

It also works for agentic systems when behavior can be expressed as controlled, replayable scenarios:

It also works for layered interface-heavy agentic systems when the source exposes named runtime seams that must survive extraction:

It gets harder (but is still possible) when the contract depends on time, randomness, IO, concurrency, global state, or platform details. In those cases, make assumptions explicit in SPEC.md + VERIFY.md, and normalize nondeterminism into explicit inputs/outputs.

Hard rules (MUST / MUST NOT)

Conformance profiles (required)

Profile usage rules:

Inputs

For scenario-heavy (agentic) extractions, also collect:

For layered_agentic extractions, also collect:

Conventions

Operation ids

tests.yaml organizes cases by operation ids (stable identifiers for public API entries). Use a naming scheme that survives translation across languages:

Avoid language-specific spellings in ids (e.g., avoid snake_case vs camelCase wars). Prefer the canonical name used by the source library’s docs.

For agentic scenario suites, operation ids SHOULD match tool names as the agent sees them (e.g. orders.lookup, tickets.create).

Scenario ids

When using scenario testing, keep scenario ids stable and descriptive:

Case ids

Every executable case SHOULD carry a stable case_id and use it as the primary key across evidence artifacts.

Contract shape

Pick one schema and stay consistent:

`tests.yaml` version

tests.yaml MUST include a source version identifier that ties cases to upstream evidence.

Workflow (tests-first)

0) Define scope and contract

For agentic systems, define success criteria as:

1) Scope the source

For agentic systems:

For layered_agentic systems:

2) Harvest behavior evidence

For scenario suites, also harvest:

For layered_agentic suites, also harvest:

3) Write `SPEC.md` (strict, language-agnostic)

4) Generate `tests.yaml` (exhaustive)

5) Add `INSTALL.md` + `README.md` + `VERIFY.md` + `LICENSE*`

6) Verify fidelity (must do)

Reproducibility and regen policy

Output

Produce only these artifacts in the ghost repo:

Notes

Zig notes

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.