Create Context File
Creates a structured, date-stamped context file filed by typology (findings, plans, goals, evidence, guides, follow-ups, merge-requests, tickets, decisions, notes, research) with YAML frontmatter. Use when saving a finding, writing a plan, capturing a guide, recording a decision, logging a follow-up, filing a merge-request note, capturing work as progression evidence, plus ticket write-ups.
npx skills add github:pantheon-org/tekhne --skill project-mgmt--create-context-filePersist a working artifact into the project’s context directory, filed by typology and named with a date prefix so it sorts chronologically and never collides.
When to Use
- Save an investigation write-up, plan, guide, or decision produced while working.
- Capture a follow-up, merge-request note, or ticket write-up for later.
- The user asks to “save this finding”, “create a plan”, or “write this up”.
When Not to Use
- Do NOT use for technical notes that belong inline in source — write a code comment.
- Do NOT use for permanent, long-lived docs — use the README or docs site.
- Do NOT use for issue tracking — use the issue tracker.
- Do NOT use for content the team consumes externally — use the docs system.
Principles
- Typology is the organizing axis. ALWAYS choose the folder by what the artifact is, not by how long it lives.
- One artifact, one file. ALWAYS keep a single typology per file; NEVER merge a finding with a plan.
- Deterministic names. The generator MUST own the filename and frontmatter; never hand-craft them.
- Curated growth. Extend the typology set deliberately, not per task.
Workflow
-
Choose the typology from the curated set. — Stop if: none fits and the need will not recur; reuse the closest match instead of adding a folder.
-
Inspect what already exists for that typology to avoid duplicates:
ls .context/findings/Expected result: the existing files, so you can confirm none already covers this artifact.
-
Run the generator with a specific, task-tied title. — Verify: the printed path uses the expected typology plus date.
-
Fill in the body beneath the generated heading. — Stop if: the content spans two typologies; split it into separate files.
Quick Commands
# Create a finding with tags
./scripts/create-context-file.sh --type findings --title "Auth token analysis" \
--tags "auth,oauth"
Expected result: a new dated finding file, printed as the only stdout line.
# Link a finding back to the plan it informed
./scripts/create-context-file.sh --type findings --title "Auth token analysis" \
--related "../plans/2026-03-16-auth-rollout.md"
Expected result: a dated finding file whose frontmatter includes a related:
list; when no --related is given, the key is omitted entirely rather than
written as related: [].
# Follow-up that can't start until a plan lands
./scripts/create-context-file.sh --type follow-ups --title "Wire up token refresh" \
--blocked-by "../plans/2026-03-16-auth-rollout.md"
Expected result: a dated follow-up file whose frontmatter includes a
blocked-by: list, in the same “omitted when empty” style as related. The
context-index skill’s scripts/context-ready.sh reads this field across
every context file to report which active files have zero open blockers —
set --blocks on the file being depended on, --blocked-by on the file
doing the depending, or both if the relationship is worth recording from
either side.
# Follow-up with confirmed grades (only after the user has confirmed them)
./scripts/create-context-file.sh --type follow-ups --title "Wire up token refresh" \
--severity HIGH --priority P2 --graded 2026-10-07
Expected result: a dated follow-up file whose frontmatter ends with
severity:, priority: and graded: lines, in that order, just before the
closing ---. Pass all three flags together: the generator rejects any one
alone, and rejects all three on any typology other than follow-ups.
# Multi-line body via heredoc
./scripts/create-context-file.sh --type plans --title "Retriever rollout" << 'EOF'
## Phase 1
...
EOF
Expected result: a dated plan file containing the heredoc body.
# Preview without writing
./scripts/create-context-file.sh --type merge-requests --title "PROJ-1234" --dry-run
Expected result: the target path plus full file body printed; nothing written.
# A deliberate one-off typology
./scripts/create-context-file.sh --type experiments --title "spike" --allow-new-type
Expected result: a file under a new typology folder, created knowingly.
Full option list: see the CLI reference below.
Filing a follow-up
Grade a follow-up with a severity and a priority, so that whatever lists
follow-ups can put the most pressing first. Use the
grading rubric to choose them. The user, not
the agent, must settle each grade, because grades steer what gets done next:
- Propose a
severityand apriorityfrom the rubric. Give a one-line reason drawn from each decision test. - Wait for the user to confirm or change them, or to leave the follow-up ungraded.
- Pass
--severity,--priorityand--graded(today’s date) only after that confirmation. Leave a follow-up without an answer ungraded. Never invent a--gradeddate.
Anti-Patterns
NEVER create a file without checking the typology folder first
WHY: the same artifact captured twice fragments context and breaks search.
BAD: run the generator immediately for a plan that already exists. GOOD: list the folder, confirm nothing covers it, then create.
Consequence: duplicate, drifting files that later readers cannot reconcile — a common pitfall once a repository grows.
NEVER use a generic slug like notes or todo
WHY: vague slugs collide and read as noise when sorted by date.
BAD: --title "notes" yields a notes.md that clashes across tasks.
GOOD: --title "API refactor findings" yields a specific, searchable name.
Consequence: unsearchable filenames plus silent name clashes in production repositories.
NEVER mix typologies in one file
WHY: a finding, a plan, and a follow-up have different lifecycles and readers.
BAD: one file holding analysis, a rollout plan, and open questions. GOOD: three files, one per typology, cross-referenced if needed.
Consequence: no file can be retired cleanly; each keeps stale content alive.
NEVER hand-edit the filename or frontmatter date
WHY: the date prefix plus ISO date power sorting and downstream tooling.
BAD: rename to drop the date, or set date: Jul 21st.
GOOD: let the generator produce both; keep the original date on later edits.
Consequence: broken chronological ordering plus frontmatter parse failures.
NEVER emit related: [], blocks: [], or blocked-by: [] when there is nothing to list
WHY: an empty list is noise; the field should be absent when there is nothing to link.
BAD: related: [] (or blocks: [] / blocked-by: []) in the frontmatter.
GOOD: omit the key entirely; pass --related/--blocks/--blocked-by
only when there is at least one path to list.
Consequence: frontmatter clutter that trains readers (and tooling) to ignore the field, masking the times it actually carries a link.
NEVER set blocked-by on a file whose blocker is unlikely to ever reach status: done
WHY: context-ready.sh fails closed — an unresolvable blocker path, or
one that sits at a status other than done indefinitely, keeps the
dependent file reported as blocked forever, with no automatic timeout.
BAD: pointing blocked-by at a typology whose typical lifecycle is “keep
indefinitely” or “keep while active” rather than a discrete close (see the
lifecycle column in Typologies) — e.g. a
guide or research file nobody plans to ever mark done.
GOOD: point blocked-by at a typology whose lifecycle is a real
close event (plan retiring, follow-up closing, ticket tracked to
resolution, merge-request retiring after merge) — or record the
relationship in prose instead if it isn’t really “done-or-not-done” shaped.
Consequence: a file that can never actually be reported ready, with
nothing in context-ready.sh’s output explaining that the blocker itself is
the problem rather than the work.
NEVER write severity, priority or graded the user has not confirmed
WHY: a grade steers which follow-up gets picked up next, and nothing in the file records who chose it.
BAD: passing --severity HIGH --priority P1 --graded <today> because the
rubric seemed to fit.
GOOD: propose the grades with a reason, wait for the user’s answer, then
pass the flags (or file the follow-up ungraded).
Consequence: an agent-chosen grade ranks above work a person judged more pressing, and reads as a person’s decision.
NEVER invent a new typology for a one-off
WHY: ad-hoc folders erode the curated set that makes context navigable.
BAD: create a bespoke folder for a single throwaway note.
GOOD: reuse the closest typology, or pass --allow-new-type knowingly.
Consequence: folder sprawl that defeats predictable retrieval — a slow pitfall.
References
- Typologies — the curated catalog, selection rule, and how to extend the set; load when choosing or adding a typology.
- CLI reference — full generator flags, behavior, and examples; load when you need an option beyond the Quick Commands.
- Follow-up grading — the decision test for each
severityandpriorityvalue, who sets a grade, and the sort order; load when filing a follow-up or grading a batch of them. - Frontmatter schema — the JSON Schema for
title,type,date,status,tags,related,blocks,blocked-by, and the follow-up gradesseverity,priorityandgraded; load when validating a context file’s frontmatter or wiring a lint check. Nothing runs it yet.
Explicit NEVER/WHY/consequence triplets with side-by-side bad/good examples. Generic warnings score low — concrete failure modes with real impact (security, correctness, performance) score high.
Runtime validation via eval scenarios proving the skill actually changes agent behaviour. Requires evals/ directory, instructions.json, ≥3 scenarios, and ≥80% instruction coverage in summary.json.
Appropriate rigidity for the skill type: strict rules for critical/security skills, balanced steps for process skills, flexible options for tool skills. Mismatched calibration (too rigid or too loose) reduces score.
Expert-only knowledge the AI couldn't derive on its own — domain-specific patterns, production gotchas, decision frameworks, and non-obvious tool behaviour. High scores mean <5% redundancy with what the model already knows.
A clear philosophy plus numbered step-by-step workflows with explicit entry/exit points. Should answer: what is the core principle, how to execute it, and when (and when not) to apply it.
Rich activation keywords and trigger scenarios in the description so the skill fires when needed. Best descriptions read like an exhaustive list of the tasks and concepts that should invoke this skill.
Copy-paste-ready code, complete runnable examples, real file paths and commands. Pseudocode and abstract descriptions score low — concrete, executable content scores high.
SKILL.md as a <100-line navigation hub pointing to focused references/ files. Content should be lazy-loaded on demand, not front-loaded. Includes actionable 'When to Use' conditions per reference.
Proper frontmatter, single-task focus, activation keywords, and cross-harness portability. Skills must work across 40+ agentic harnesses without hardcoded paths or agent-specific references.
Explicit NEVER/WHY/consequence triplets with side-by-side bad/good examples. Generic warnings score low — concrete failure modes with real impact (security, correctness, performance) score high.
Runtime validation via eval scenarios proving the skill actually changes agent behaviour. Requires evals/ directory, instructions.json, ≥3 scenarios, and ≥80% instruction coverage in summary.json.
Appropriate rigidity for the skill type: strict rules for critical/security skills, balanced steps for process skills, flexible options for tool skills. Mismatched calibration (too rigid or too loose) reduces score.
Expert-only knowledge the AI couldn't derive on its own — domain-specific patterns, production gotchas, decision frameworks, and non-obvious tool behaviour. High scores mean <5% redundancy with what the model already knows.
A clear philosophy plus numbered step-by-step workflows with explicit entry/exit points. Should answer: what is the core principle, how to execute it, and when (and when not) to apply it.
Rich activation keywords and trigger scenarios in the description so the skill fires when needed. Best descriptions read like an exhaustive list of the tasks and concepts that should invoke this skill.
Copy-paste-ready code, complete runnable examples, real file paths and commands. Pseudocode and abstract descriptions score low — concrete, executable content scores high.
SKILL.md as a <100-line navigation hub pointing to focused references/ files. Content should be lazy-loaded on demand, not front-loaded. Includes actionable 'When to Use' conditions per reference.
Proper frontmatter, single-task focus, activation keywords, and cross-harness portability. Skills must work across 40+ agentic harnesses without hardcoded paths or agent-specific references.
Expert-only knowledge the AI couldn't derive on its own — domain-specific patterns, production gotchas, decision frameworks, and non-obvious tool behaviour. High scores mean <5% redundancy with what the model already knows.
A clear philosophy plus numbered step-by-step workflows with explicit entry/exit points. Should answer: what is the core principle, how to execute it, and when (and when not) to apply it.
Explicit NEVER/WHY/consequence triplets with side-by-side bad/good examples. Generic warnings score low — concrete failure modes with real impact (security, correctness, performance) score high.
Proper frontmatter, single-task focus, activation keywords, and cross-harness portability. Skills must work across 40+ agentic harnesses without hardcoded paths or agent-specific references.
SKILL.md as a <100-line navigation hub pointing to focused references/ files. Content should be lazy-loaded on demand, not front-loaded. Includes actionable 'When to Use' conditions per reference.
Appropriate rigidity for the skill type: strict rules for critical/security skills, balanced steps for process skills, flexible options for tool skills. Mismatched calibration (too rigid or too loose) reduces score.
Rich activation keywords and trigger scenarios in the description so the skill fires when needed. Best descriptions read like an exhaustive list of the tasks and concepts that should invoke this skill.
Copy-paste-ready code, complete runnable examples, real file paths and commands. Pseudocode and abstract descriptions score low — concrete, executable content scores high.
Expert-only knowledge the AI couldn't derive on its own — domain-specific patterns, production gotchas, decision frameworks, and non-obvious tool behaviour. High scores mean <5% redundancy with what the model already knows.
A clear philosophy plus numbered step-by-step workflows with explicit entry/exit points. Should answer: what is the core principle, how to execute it, and when (and when not) to apply it.
Explicit NEVER/WHY/consequence triplets with side-by-side bad/good examples. Generic warnings score low — concrete failure modes with real impact (security, correctness, performance) score high.
Proper frontmatter, single-task focus, activation keywords, and cross-harness portability. Skills must work across 40+ agentic harnesses without hardcoded paths or agent-specific references.
SKILL.md as a <100-line navigation hub pointing to focused references/ files. Content should be lazy-loaded on demand, not front-loaded. Includes actionable 'When to Use' conditions per reference.
Appropriate rigidity for the skill type: strict rules for critical/security skills, balanced steps for process skills, flexible options for tool skills. Mismatched calibration (too rigid or too loose) reduces score.
Rich activation keywords and trigger scenarios in the description so the skill fires when needed. Best descriptions read like an exhaustive list of the tasks and concepts that should invoke this skill.
Copy-paste-ready code, complete runnable examples, real file paths and commands. Pseudocode and abstract descriptions score low — concrete, executable content scores high.
No eval scenarios available.
Generator CLI reference
scripts/create-context-file.sh writes a date-prefixed context file into a
typology subfolder and prints the created path.
Synopsis
scripts/create-context-file.sh --type <typology> --title "<title>" [options]
# optional body content is read from stdin
Options
| Flag | Argument | Purpose |
|---|---|---|
-t, --type |
TYPE |
Typology / subfolder (required). Validated against KNOWN_TYPES. |
-T, --title |
TITLE |
Human-readable title (required); also seeds the slug. |
-s, --slug |
SLUG |
Override the auto-derived slug. |
-g, --tags |
TAGS |
Comma-separated tags for frontmatter. |
-R, --related |
PATHS |
Comma-separated relative paths to related .context files. Omitted entirely from frontmatter when empty — never written as related: []. |
-b, --blocks |
PATHS |
Comma-separated relative paths to .context files that cannot be ready until this file is done. Same omit-when-empty rule as --related. |
-k, --blocked-by |
PATHS |
Comma-separated relative paths to .context files that must be done before this file is ready. Same omit-when-empty rule as --related. Read by the context-index skill’s scripts/context-ready.sh. |
--severity |
LEVEL |
Follow-ups only. CRITICAL, HIGH, MEDIUM or LOW (case-insensitive, written upper case). Required together with --priority and --graded. |
--priority |
LEVEL |
Follow-ups only. P1, P2 or P3 (case-insensitive, written upper case). Required together with --severity and --graded. |
--graded |
DATE |
Follow-ups only. YYYY-MM-DD, the day the user confirmed the grades. No default. |
-d, --date |
DATE |
Override the date (YYYY-MM-DD); defaults to today. |
-r, --root |
DIR |
Context root; defaults to .context. |
-A, --allow-new-type |
Permit a typology not in KNOWN_TYPES. |
|
-n, --dry-run |
Print the target path and file body; write nothing. | |
-f, --force |
Overwrite an existing target file. | |
-h, --help |
Show usage. |
Behavior
- The output path is
<root>/<typology>/<YYYY-MM-DD>-<slug>.md, where<root>is resolved against the current working directory (the consuming project). - The slug is derived from the title (lowercased, non-alphanumeric runs
collapsed to single hyphens) unless
--slugoverrides it. - The date must match
YYYY-MM-DD; other formats are rejected. - An unknown typology is rejected unless
--allow-new-typeis passed. - An existing target file is never overwritten unless
--forceis passed. --severity,--priorityand--gradedare set together: any one without the other two is an error, as is a value outside the lists above, a malformed--graded, or any of them on a typology other thanfollow-ups. They are written last in the frontmatter, just before the closing---, in the orderseverity,priority,graded. Pass them only after the user has confirmed the grades; see Follow-up grading.
Examples
# Finding with tags
scripts/create-context-file.sh --type findings --title "Auth token analysis" \
--tags "auth,oauth"
# Finding that references an existing plan
scripts/create-context-file.sh --type findings --title "Auth token analysis" \
--related "../plans/2026-03-16-auth-rollout.md"
# Follow-up that can't start until a plan is done
scripts/create-context-file.sh --type follow-ups --title "Wire up token refresh" \
--blocked-by "../plans/2026-03-16-auth-rollout.md"
# Follow-up with grades the user has confirmed
scripts/create-context-file.sh --type follow-ups --title "Wire up token refresh" \
--severity HIGH --priority P2 --graded 2026-10-07
# Plan with a heredoc body
scripts/create-context-file.sh --type plans --title "Retriever rollout" << 'EOF'
## Phase 1
...
EOF
# Preview only
scripts/create-context-file.sh --type merge-requests --title "PROJ-1234 retriever" --dry-run
Follow-up grading: severity and priority
A follow-up can carry two grades, set together with the day they were confirmed. Anything that lists follow-ups to pick the next piece of work, such as the context index’s readers, a session-start summary or the follow-up skill, can sort by them. Grades apply to follow-ups only.
The fields
severity: HIGH
priority: P2
graded: 2026-10-07
severityis what is at risk if the follow-up is never done.priorityis how soon it should be picked up.gradedis the day the user confirmed the two grades. It is never filled in automatically.
The three lines go at the end of the frontmatter, just before the closing ---, in the order severity, priority, graded. That keeps them away from the status: line that other sessions edit when they close a follow-up. They are set together: a follow-up has both grades and a graded date, or none. A follow-up with none of them is ungraded. One with only one grade, no graded date, or a value not listed below is invalid, and readers show it as written with a ?. Readers match values case-insensitively.
Severity: what is at risk if it is never done
| Value | Decision test |
|---|---|
CRITICAL |
Never doing it leaves a regulated system, participant data, a security exposure or a broken gate open. |
HIGH |
Never doing it leaves a real defect, a misleading result or a blocked workflow in place. People work around it, but the workaround costs them. |
MEDIUM |
Never doing it leaves friction or drift: slower work, a stale document, a tool that misleads now and then. |
LOW |
Never doing it changes little: a tidy-up, a nice-to-have, a note for later. |
Severity is the follow-up’s own risk. It is not inherited from its plan’s value: a follow-up of a HIGH-value plan can be LOW.
Priority: how soon it should be picked up
| Value | Decision test |
|---|---|
P1 |
It should be picked up this week, or it blocks other work now. |
P2 |
It should be picked up within about a month, or before the work it relates to next moves. |
P3 |
It can wait until someone is working in that area anyway. |
A follow-up with an open blocked-by is not P1, because it cannot be started.
Who sets a grade
- The agent proposes
severityandpriority, with a one-line reason, when it files a follow-up or during a grading batch. - The user confirms or changes them, or leaves the follow-up ungraded.
- Only then are the three lines written, with
gradedset to that day. With the generator, that means passing--severity,--priorityand--gradedonly after the user has confirmed.
Where the project has a guardrail that asks the user before any grade line is written or changed, it enforces step 2. Where it has none, this rule is the only check. A grade written without the user’s confirmation is a defect to revert, not a judgement to keep.
A file that already has a graded line is never re-proposed for grading unless the user asks, even if a reader shows no grade for it. Readers that take grades from the context index show none until the index has been regenerated with an indexer that carries them.
Changing or closing
- To regrade, the user says so and the agent rewrites the three lines with a new
gradeddate. - Closing a follow-up leaves its grades in place. Readers ignore grades on closed follow-ups.
Sort order
Graded follow-ups come first, by severity (CRITICAL before HIGH, MEDIUM, LOW), then priority (P1 before P2, P3), then newest date, then path. The ones needing a grade, ungraded or invalid, follow, newest first, and are counted.
Typology catalog
The typology is the organizing principle for context files. It maps directly to the subfolder name under the context root and is drawn from a curated set that stays mostly static but may evolve deliberately.
Curated typologies
| Typology | What it holds | Typical lifecycle |
|---|---|---|
findings |
Investigation results, analysis, research output | Keep for reference |
plans |
Implementation plans, task breakdowns | Retire when the work lands |
goals |
Session goals: a stated end state plus its items and evidence | Close when the goal is met or promoted to a plan |
evidence |
Work offered as evidence against a progression or performance framework | Close when cited in an assessment |
guides |
Reusable how-tos and reference material | Keep and maintain |
follow-ups |
Deferred work, open threads, TODO capture | Close when actioned |
merge-requests |
MR/PR notes, descriptions, review context | Retire after merge |
tickets |
Issue write-ups and refinement notes | Track with the issue |
decisions |
Decision rationale and trade-offs | Keep indefinitely |
notes |
General working notes | Prune when stale |
research |
Longer-running research logs | Keep while active |
Frontmatter type: is singular, the folder is plural
The typology above names the subfolder and is plural (plans, follow-ups,
decisions, …). The generated file’s frontmatter type: field is the
singular form (plan, follow-up, decision, …) — that’s what consuming
tooling (e.g. an index generator’s type-to-group lookup) matches against. The
script’s singular_of() holds the curated mapping; don’t assume the two
strings are interchangeable when writing or reading a context file by hand.
evidence is the exception that proves the rule: it is uncountable, so its
folder and its type: are the same word.
Selection rule
Pick the typology by what the artifact is, not by how long it will live. An
investigation write-up is findings whether or not you keep it; a rollout
checklist is plans whether it lasts a day or a month.
When none of the curated typologies fits, prefer the closest match over inventing a new folder. Introduce a new typology only when it will recur.
Extending the set
The generator validates the requested typology against KNOWN_TYPES in
scripts/create-context-file.sh. To add a permanent typology, add it to that
list and add its singular form to singular_of() in the same script — the
fallback there (strip a trailing s) is correct for every typology in the set
today, but check it holds for whatever you add. For a genuine one-off, pass
--allow-new-type instead of editing the list, which keeps the curated set
intentional.