@g3nomaly/g3n-skills 0.1.3 → 0.1.5

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.
Files changed (62) hide show
  1. package/.claude-plugin/marketplace.json +18 -4
  2. package/README.md +9 -2
  3. package/package.json +2 -2
  4. package/skills/coding/.claude-plugin/plugin.json +2 -2
  5. package/skills/coding/code/SKILL.md +4 -1
  6. package/skills/coding/code/references/cpp.md +43 -0
  7. package/skills/coding/code/references/python.md +28 -0
  8. package/skills/coding/code/references/rust.md +26 -0
  9. package/skills/coding/document/SKILL.md +10 -0
  10. package/skills/coding/document/hooks/install-highlighting.ts +136 -0
  11. package/skills/coding/document/references/cpp.md +105 -0
  12. package/skills/coding/document/references/python.md +95 -0
  13. package/skills/coding/document/references/rust.md +122 -0
  14. package/skills/coding/document/vscode/package.json +28 -0
  15. package/skills/coding/document/vscode/syntaxes/python.json +56 -0
  16. package/skills/coding/document/vscode/syntaxes/rust.json +25 -0
  17. package/skills/coding/vocabulary/SKILL.md +47 -0
  18. package/skills/coding/vocabulary/agents/openai.yaml +5 -0
  19. package/skills/task-manager/.claude-plugin/plugin.json +1 -2
  20. package/skills/task-manager/task-manager/hooks/get-entry.ts +4 -4
  21. package/skills/task-manager/task-manager/hooks/guard-tree.ts +2 -2
  22. package/skills/task-manager/task-manager/hooks/next-entry.ts +3 -3
  23. package/skills/task-manager/task-manager/references/hooks.md +1 -1
  24. package/skills/task-manager/task-manager/references/tree.md +0 -1
  25. package/skills/task-manager/task-manager/src/hooks/cli.ts +11 -1
  26. package/skills/task-manager/task-manager/src/hooks/index.ts +1 -1
  27. package/skills/task-manager/task-manager/src/schemas/index.ts +2 -2
  28. package/skills/task-manager/task-manager/src/schemas/term.ts +9 -22
  29. package/skills/task-manager/task-manager/src/vocabulary/file.ts +40 -84
  30. package/skills/task-manager/task-manager/src/vocabulary/index.ts +3 -3
  31. package/skills/task-manager/task-manager/src/vocabulary/match.ts +3 -34
  32. package/skills/teach/.claude-plugin/plugin.json +7 -0
  33. package/skills/teach/architecture/SKILL.md +19 -0
  34. package/skills/teach/architecture/agents/openai.yaml +5 -0
  35. package/skills/teach/architecture/references/examples.md +16 -0
  36. package/skills/teach/deep-dive/SKILL.md +19 -0
  37. package/skills/teach/deep-dive/agents/openai.yaml +5 -0
  38. package/skills/teach/deep-dive/references/examples.md +15 -0
  39. package/skills/teach/explain/SKILL.md +19 -0
  40. package/skills/teach/explain/agents/openai.yaml +5 -0
  41. package/skills/teach/explain/references/examples.md +9 -0
  42. package/skills/teach/guided-debugging/SKILL.md +25 -0
  43. package/skills/teach/guided-debugging/agents/openai.yaml +5 -0
  44. package/skills/teach/guided-debugging/references/debugging-loop.md +18 -0
  45. package/skills/teach/guided-debugging/references/examples.md +24 -0
  46. package/skills/teach/guided-review/SKILL.md +20 -0
  47. package/skills/teach/guided-review/agents/openai.yaml +5 -0
  48. package/skills/teach/guided-review/references/examples.md +18 -0
  49. package/skills/teach/learn-by-building/SKILL.md +19 -0
  50. package/skills/teach/learn-by-building/agents/openai.yaml +5 -0
  51. package/skills/teach/learn-by-building/references/examples.md +15 -0
  52. package/skills/teach/teaching/SKILL.md +22 -0
  53. package/skills/teach/teaching/agents/openai.yaml +5 -0
  54. package/skills/teach/teaching/references/learning-model.md +24 -0
  55. package/skills/task-manager/vocabulary/SKILL.md +0 -42
  56. package/skills/task-manager/vocabulary/agents/openai.yaml +0 -5
  57. package/skills/task-manager/vocabulary/hooks/get-term.ts +0 -18
  58. package/skills/task-manager/vocabulary/hooks/list-terms.ts +0 -12
  59. package/skills/task-manager/vocabulary/hooks/remove-term.ts +0 -22
  60. package/skills/task-manager/vocabulary/hooks/set-term.ts +0 -37
  61. package/skills/task-manager/vocabulary/references/usage.md +0 -26
  62. package/skills/task-manager/vocabulary/tsconfig.json +0 -7
@@ -1,22 +1,11 @@
1
1
  // packages/g3n-skills/skills/task-manager/task-manager/src/vocabulary/match.ts
2
2
  import type { Term } from "../schemas/term";
3
3
 
4
- /**
5
- * Term found by `findTerm`, with how the name matched it.
6
- *
7
- * @property term - The matched term.
8
- * @property matched - `"term"` when the name is the term itself, `"avoid"` when it is one of the term's avoided words.
9
- */
10
- export interface TermMatch {
11
- term: Term;
12
- matched: "term" | "avoid";
13
- }
14
-
15
4
  /**
16
5
  * Term a text uses, with the avoided words the text used for it.
17
6
  *
18
7
  * @property term - Name of the term.
19
- * @property definition - Definition of the term, as the vocabulary file holds it.
8
+ * @property definition - Definition of the term, as the glossary holds it.
20
9
  * @property avoided - Avoided words the text uses in place of `term`.
21
10
  */
22
11
  export interface TermMention {
@@ -25,26 +14,6 @@ export interface TermMention {
25
14
  avoided: string[];
26
15
  }
27
16
 
28
- /** Tells whether two words are equal, ignoring case. */
29
- function sameWord(a: string, b: string): boolean {
30
- return a.toLowerCase() === b.toLowerCase();
31
- }
32
-
33
- /**
34
- * @brief Finds the term that answers to `name`, by its own name first and by an avoided word second.
35
- *
36
- * @param terms - Vocabulary to search.
37
- * @param name - Word to look up, compared ignoring case.
38
- * @returns The match, or `null` when no term has the name.
39
- */
40
- export function findTerm(terms: readonly Term[], name: string): TermMatch | null {
41
- const own = terms.find((term) => sameWord(term.term, name));
42
- if (own !== undefined) return { term: own, matched: "term" };
43
-
44
- const replaced = terms.find((term) => term.avoid.some((word) => sameWord(word, name)));
45
- return replaced === undefined ? null : { term: replaced, matched: "avoid" };
46
- }
47
-
48
17
  /** Tells whether `word` occurs in `text` as a whole word, ignoring case. */
49
18
  function mentions(text: string, word: string): boolean {
50
19
  const escaped = word.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -54,10 +23,10 @@ function mentions(text: string, word: string): boolean {
54
23
  /**
55
24
  * @brief Finds the terms `text` uses, by name or by an avoided word, in the order of `terms`.
56
25
  *
57
- * Used by the `get-entry` hook, which attaches each mention to its entry.
26
+ * Used by the `get-entry` and `next-entry` hooks, which attach each mention to its entry.
58
27
  *
59
28
  * @param text - Text to search, such as an entry's title, summary and body.
60
- * @param terms - Vocabulary to search.
29
+ * @param terms - Glossary to search.
61
30
  * @returns One mention per term the text uses.
62
31
  */
63
32
  export function termsMentioned(text: string, terms: readonly Term[]): TermMention[] {
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "teach",
3
+ "description": "Teach through real work: build, explain, dive deep, decide architecture, debug and review while the user learns the reasoning.",
4
+ "version": "0.1.0",
5
+ "license": "UNLICENSED",
6
+ "skills": ["./teaching", "./learn-by-building", "./explain", "./deep-dive", "./architecture", "./guided-debugging", "./guided-review"]
7
+ }
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: architecture
3
+ description: Use when the user is deciding or wants to understand an architecture choice, such as system boundaries, ownership, dependencies, state, data flow, consistency, integration or deployment.
4
+ registryDependencies: [teaching]
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ Reason from the problem to the decision, and teach the user to reason the same way. Follow the `/teaching` skill throughout. A _pattern name_ describes a solution once the forces justify it. It is never the starting point.
9
+
10
+ ## Steps
11
+
12
+ 1. **Define the decision** and its scope in neutral terms, with no pattern name. Done when the user agrees it is the question.
13
+ 2. **Gather the forces**: requirements, constraints, invariants and who owns them, failures to contain, parts that change independently, and what the team must operate. Done when each force traces to the system or the request, not to an imagined future.
14
+ 3. **List the options**: the few credible ones, always including the simplest that works. Keep logical, runtime, deployment and data boundaries apart.
15
+ 4. **Compare** the options on the forces that could change the decision. Drop an option whose cost solves a problem nobody has.
16
+ 5. **Recommend** one, with your confidence and assumptions. When evidence is weak, prefer the option easiest to reverse.
17
+ 6. **State the consequences**: new responsibilities, risks, migration cost, and the evidence that would reopen the choice. Done when the user could explain why the other options lost.
18
+
19
+ For worked cases, such as wrapping a provider SDK or splitting out a worker, read [`references/examples.md`](references/examples.md).
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Architecture"
3
+ short_description: "Reason from forces to an architecture decision and its consequences"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,16 @@
1
+ # Architecture examples
2
+
3
+ ## Call the storage SDK directly, or put a boundary in front of it?
4
+
5
+ Check whether the application has storage operations of its own, more than one provider, migration plans, special retry or authorization rules, or testing needs. For a small adapter over stable provider semantics, calling the SDK directly may be simplest. A boundary earns its place when it owns real application operations and contains provider-specific behavior. That provider replacement is _imaginable_ is no reason to add one.
6
+
7
+ ## Should this worker be a microservice?
8
+
9
+ Separate logical ownership from deployment. Independent scaling, failure isolation, runtime needs, release cadence and team ownership can justify another process. Being called a "worker" does not.
10
+
11
+ ## Failure modes
12
+
13
+ - _Hypothetical scale._ Paying permanent complexity for demand nobody has shown.
14
+ - _Boundary confusion._ Treating modules, processes, services and deployments as interchangeable.
15
+ - _Provider-shaped abstraction._ Re-exporting every provider concept through a new interface without reducing coupling.
16
+ - _Operation blindness._ Choosing a design without accounting for deployment, monitoring, recovery and team capacity.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: deep-dive
3
+ description: Use when the user asks how a runtime, protocol, database, framework, operating-system feature, network operation or other abstraction works underneath.
4
+ registryDependencies: [teaching]
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ Build a model of the layers under an abstraction the user already uses. Follow the `/teaching` skill throughout, and go only as deep as the question, decision or bug needs.
9
+
10
+ ## Steps
11
+
12
+ 1. **Name the operation** being traced and why the user needs the depth. Done when you know where to stop: the layer past which detail no longer changes what the user can predict or do.
13
+ 2. **Map the whole path** in a compact diagram before expanding any layer.
14
+ 3. **Expand one layer at a time**: its input, responsible component, state change, output and where it fails. Explain the handoff to the next layer, not only the component's name.
15
+ 4. **Label each detail** as _concept_ (stable mechanism), _implementation_ (how one system does it) or _platform_ (varies by OS, runtime, version or configuration). When the system or version is unknown, say so instead of inventing detail.
16
+ 5. **Check at each boundary** whether more depth helps, and reconnect to the original operation. Offer a deeper branch rather than forcing it in.
17
+ 6. **Finish with a compact model** the user can use to predict the behavior.
18
+
19
+ For worked cases, such as a Docker Compose connection or a `fetch()` call, read [`references/examples.md`](references/examples.md).
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Deep Dive"
3
+ short_description: "Trace the layers beneath an abstraction, only as deep as useful"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,15 @@
1
+ # Deep-dive examples
2
+
3
+ ## What happens when `api` connects to `postgres:5432` in Docker Compose?
4
+
5
+ Start with the path:
6
+
7
+ ```text
8
+ service name → Docker DNS → container-network IP → TCP connection → PostgreSQL listener
9
+ ```
10
+
11
+ Compose provides service discovery on the shared network. DNS resolves the service name to a reachable container address, and TCP connects to the process listening on port 5432. Go into Linux network namespaces afterwards, and only if the user needs to explain why `localhost` behaves differently.
12
+
13
+ ## What happens when JavaScript calls `fetch()`?
14
+
15
+ Map URL resolution, connection setup, TLS, the HTTP exchange, runtime scheduling and application handling. Expand DNS or transport internals only when they serve the user's question.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: explain
3
+ description: Use when the user asks to understand existing code, types, queries, configuration, workflows, tests, protocols or infrastructure.
4
+ registryDependencies: [teaching, deep-dive]
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ Explain why the important parts exist and how they interact, so the user can reason about the material later. Follow the `/teaching` skill throughout. Never paraphrase line by line.
9
+
10
+ ## Steps
11
+
12
+ 1. **Read the neighbors**: the callers, consumers, state and effects that give the material its meaning. Done when you can state its purpose in the larger system. Never invent an intent the evidence does not support.
13
+ 2. **Give the smallest mental model** that explains its behavior.
14
+ 3. **Trace the flow** that matters: data, control, ownership or lifecycle.
15
+ 4. **Spend attention unevenly.** Focus on what preserves information, enforces a boundary or encodes a design choice, and explain each non-obvious choice by the constraint it serves. Skip boilerplate and syntax unless it changes meaning.
16
+ 5. **Cover failure**: the invariants downstream code depends on, and how the material breaks.
17
+ 6. **Stop** when more depth no longer improves the model. If a lower layer would help, offer it through the `/deep-dive` skill.
18
+
19
+ For worked cases, such as a `readonly` array type or a multi-stage Dockerfile, read [`references/examples.md`](references/examples.md).
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Explain"
3
+ short_description: "Explain existing material through purpose, model, flow and failure"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,9 @@
1
+ # Explain examples
2
+
3
+ ## `export type QueryOutput = readonly QueryEntry[];`
4
+
5
+ Do not stop at "a readonly array". An ordered list of entries can hold duplicate keys, such as two `tag` values, which a `Record<string, string>` cannot. `readonly` tells consumers not to mutate the canonical encoded form in place.
6
+
7
+ ## A multi-stage Dockerfile
8
+
9
+ Explain the build and runtime stages as separate environments with separate jobs. Trace how dependency layers are cached, how the production artifact moves between stages, and why the build tooling is absent from the runtime image. Cover single instructions only where they affect those mechanisms.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: guided-debugging
3
+ description: Use when the user brings an error, regression, failing test, broken deployment, wrong result or other observable failure and wants to learn how to find the cause, not a list of guesses.
4
+ registryDependencies: [teaching]
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ Fix a real failure and teach a repeatable method for finding causes. Follow the `/teaching` skill throughout. Keep three levels apart:
9
+
10
+ - **Symptom**: the visible failure.
11
+ - **Cause**: the condition that directly produces it.
12
+ - **Root cause**: the deeper condition that let the cause exist or recur.
13
+
14
+ ## Steps
15
+
16
+ 1. **Capture the symptom** exactly: error text, timing, scope and how to reproduce it. Name the component that produced the evidence, which may not be the one that displayed it.
17
+ 2. **Inspect before changing.** Read the relevant state and keep the diagnostic evidence.
18
+ 3. **List a few hypotheses** drawn from the observations, each with what it predicts, ranked by likelihood, risk and what a test would tell you. Never offer a pile of unrelated fixes.
19
+ 4. **Run one small experiment** that separates the leading hypotheses: cheap, safe, reversible, one variable at a time where practical. Say beforehand what it can and cannot show.
20
+ 5. **Interpret the result**: which hypothesis gained or lost support, and why. Repeat from step 3 until evidence supports both the cause and the root cause. When the investigation spans several experiments, keep the record in [`references/debugging-loop.md`](references/debugging-loop.md).
21
+ 6. **Fix the root cause** with the smallest change that does not hide the symptom.
22
+ 7. **Verify** by reproducing the original scenario, not a convenient proxy. Done when the original path works.
23
+ 8. **Add prevention** when recurrence or impact justifies it: validation, types, tests, health checks or monitoring.
24
+
25
+ For worked cases, such as a container that cannot reach its database or a test that fails only in the full suite, read [`references/examples.md`](references/examples.md).
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Guided Debugging"
3
+ short_description: "Find a failure's root cause through hypotheses and small experiments"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,18 @@
1
+ # Debugging evidence loop
2
+
3
+ Keep this record when an investigation has several plausible hypotheses or spans several experiments.
4
+
5
+ | Field | Record |
6
+ | --- | --- |
7
+ | Exact symptom | Error, wrong result, timing and reproduction boundary |
8
+ | Producer and stage | Component that produced the evidence, and where it failed |
9
+ | Relevant state | Configuration, inputs, dependencies and environment |
10
+ | Hypothesis | A testable causal explanation |
11
+ | Prediction | The result expected if the hypothesis is right |
12
+ | Experiment | A small, safe action that tells the likely explanations apart |
13
+ | Observation | The result of the experiment, uninterpreted |
14
+ | Interpretation | Hypotheses strengthened, weakened or eliminated |
15
+
16
+ Update the hypothesis set after each experiment instead of piling up unrelated fixes.
17
+
18
+ Finish by recording the supported cause, the root cause, the fix, how the original failure path was verified, and any prevention that recurrence or impact justifies.
@@ -0,0 +1,24 @@
1
+ # Guided-debugging examples
2
+
3
+ ## A containerized API cannot connect to PostgreSQL
4
+
5
+ Before editing configuration, inspect the database host the API process actually uses, and the Compose network. If the API uses `127.0.0.1:5432`, test the hypothesis that it targets its own network namespace.
6
+
7
+ ```text
8
+ symptom: connection refused
9
+ cause: the API connects to its own loopback interface
10
+ root cause: the configuration assumes the API and database share a network namespace
11
+ ```
12
+
13
+ The fix is to use the database service name on the shared network. Prevention may be environment validation and an integration health check.
14
+
15
+ ## A test passes alone but fails in the full suite
16
+
17
+ Compare order, shared state, time and resource ownership. Prefer an experiment that changes only execution order or isolation, then use the result to tell leaked state apart from timing or resource contention.
18
+
19
+ ## Failure modes
20
+
21
+ - _Producer confusion._ Debugging the component that displayed an error instead of the one that produced it.
22
+ - _State destruction._ Changing several variables at once and losing the ability to attribute the result.
23
+ - _Symptom patching._ Suppressing the visible error while its cause stays.
24
+ - _Premature root cause._ Stopping at the immediate bad value without explaining why it was possible.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: guided-review
3
+ description: Use when the user wants feedback on code, a pull request, configuration, tests or a design and wants to learn the judgment behind the findings.
4
+ registryDependencies: [teaching]
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ Find the defects and risks that matter, and explain the principle behind each one so the judgment carries over. Follow the `/teaching` skill throughout. A few high-value findings beat an exhaustive list.
9
+
10
+ ## Steps
11
+
12
+ 1. **Establish the intent**: what the change is for, its scope, and the boundaries that carry risk.
13
+ 2. **Read beyond the diff**: the contracts, callers, state and tests around it.
14
+ 3. **Trace the risky paths**: authorization, data mutation, failure, concurrency and cleanup, as they apply.
15
+ 4. **Try to disprove each candidate finding.** Keep only those with a concrete execution path, violated invariant or reproducible condition.
16
+ 5. **Rank** by consequence and likelihood, roughly: correctness, security, data integrity, concurrency, failure handling, architecture, maintainability, testing, performance, style.
17
+ 6. **Write each finding** at the narrowest location: the observation, why it matters, the principle, the possible consequence and a recommended direction, not a rewrite. Label each one _required_, _optional_ or _open question_. A preference is never a defect.
18
+ 7. **Close with the scope**: what you could not verify, such as behavior you only read and never ran. With no confirmed findings, say so.
19
+
20
+ For a worked finding, a tenant check missing from a query, read [`references/examples.md`](references/examples.md).
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Guided Review"
3
+ short_description: "Review work by consequence and teach the principle behind each finding"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,18 @@
1
+ # Guided-review examples
2
+
3
+ ## A tenant check missing from a query
4
+
5
+ - **Observation**: `tenantId` comes from the request and scopes a query, with no check that the user belongs to that tenant.
6
+ - **Why it matters**: the tenant boundary exists only in input the client controls.
7
+ - **Principle**: enforce authorization at the protected data boundary.
8
+ - **Possible consequence**: a modified request reads another tenant's records.
9
+ - **Recommended direction**: derive the tenant from the authenticated request, or check membership before any tenant-scoped query. Naming and method extraction wait until the authorization boundary is right.
10
+
11
+ An optional finding in the same review: a repeated mapping block could be extracted. Label it _optional_ when it creates no current correctness or consistency risk.
12
+
13
+ ## Failure modes
14
+
15
+ - _Style flood._ Many low-value comments that hide the risk.
16
+ - _Scope blindness._ Reviewing a function without the contracts or boundaries that decide its correctness.
17
+ - _Severity inflation._ Urgent labels on ordinary maintainability choices.
18
+ - _Patch takeover._ Replacing the author's design instead of naming the violated principle.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: learn-by-building
3
+ description: Use when the user wants to learn a subject by building, integrating, deploying, configuring or migrating a real system, such as learning Docker by containerizing their API.
4
+ registryDependencies: [teaching, guided-debugging]
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ Finish the real task so that it leaves the user with understanding they can reuse. Follow the `/teaching` skill throughout.
9
+
10
+ ## Steps
11
+
12
+ 1. **Inspect the real system**: code, configuration, environment and constraints. Done when you can state the goal and what a successful result looks like.
13
+ 2. **Pick the few concepts** that control the outcome.
14
+ 3. **Draw the system map** and place the current step on it. Never hand over a large implementation before the map.
15
+ 4. **Take one meaningful step.** Say what it advances in the work and what it should teach.
16
+ 5. **Inspect the result** instead of assuming success, and explain what it confirms. When a step fails, debug it with the `/guided-debugging` skill, then come back.
17
+ 6. **Recap the mental model at each milestone.** Repeat from step 4. Done when the real task is complete and the user has shown they understand each concept from step 2.
18
+
19
+ For worked cases, such as learning CI/CD through a deployment or Redis through caching, read [`references/examples.md`](references/examples.md).
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Learn by Building"
3
+ short_description: "Learn a subject while completing a real task"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,15 @@
1
+ # Learn-by-building examples
2
+
3
+ ## "Teach me CI/CD while deploying this NestJS API with GitHub Actions, Docker, GHCR and a Linux VM"
4
+
5
+ Begin with the deployment map:
6
+
7
+ ```text
8
+ source → verified build → image → registry → VM → container → user
9
+ ```
10
+
11
+ Start by producing a reliable artifact, because a deployment cannot be reasoned about until the deployable unit is explicit. Connect building the image to immutability, the registry to distribution, and container startup to runtime configuration.
12
+
13
+ ## "Teach me Redis by adding caching to this endpoint"
14
+
15
+ Inspect the endpoint's correctness and where its data changes first. Teach cache key identity, freshness, invalidation and failure behavior through the actual feature, not by starting from Redis command syntax.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: teaching
3
+ description: Use when teaching the user a technical subject through real work, or when another skill needs the teaching principles.
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ Teach through the user's real work, and leave them with _mental models_ they can reason with. Sound like a competent peer: precise, direct and proportionate to the task.
8
+
9
+ ## Principles
10
+
11
+ - **Use the real system.** Teach through the user's own code, bug, deployment or design. A simplified example earns its place only when it isolates a mechanism the real system hides.
12
+ - **Teach what matters.** Sort what comes up into must-understand, useful context and trivia, and spend attention in that order. Group routine mechanics instead of lecturing on them.
13
+ - **Explain causality.** Say "A causes B because C", never "it is best practice". Each non-trivial recommendation names its force: an invariant, failure mode, cost, boundary or operational need.
14
+ - **Cover the trade-offs that can change the decision**, and when another choice would win. Skip the rest.
15
+ - **Build models, not rules.** "Never use localhost between containers" breaks in the next case. "Each container has its own network namespace" lets the user derive the answer. Use an analogy only to lighten the load, then return to the mechanism.
16
+ - **Adapt per concept, not per person.** Reduce support for each concept as evidence of understanding grows. Read [`references/learning-model.md`](references/learning-model.md) when deciding how much to explain.
17
+ - **Treat results as evidence.** After a success, explain the mechanism it confirms. After an error, find the exact error, what produced it, the stage and the failed assumption before changing anything. Say what a result confirms and what it does not.
18
+ - **Ask few questions.** Ask only when the answer changes the path or exercises reasoning worth practicing. Ask for a prediction to test a model, never to make the user rediscover a fact.
19
+ - **Recap the model at milestones**: what the user can now distinguish or predict, not which commands ran.
20
+ - **State uncertainty.** Keep observation apart from inference, and requirement apart from advice.
21
+
22
+ Never withhold information, split trivial work or hide a solution to simulate discovery. Leave out praise, hype, motivational filler and labels such as _beginner_ or _junior_.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Teaching"
3
+ short_description: "Teach through real work: causality, mental models, guidance per concept"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,24 @@
1
+ # Learning model
2
+
3
+ Track understanding per concept, never as one level for the whole person. A user may have demonstrated TypeScript generics and still show no evidence yet for Linux namespaces.
4
+
5
+ | State | Evidence | Guidance |
6
+ | --- | --- | --- |
7
+ | Unknown | None yet. Unobserved, not incapable | Explain directly, and demonstrate before expecting independent use |
8
+ | Partial | Part of the model, with a gap or misconception | Keep what is right and repair only the missing connection |
9
+ | Understood | Explains or reasons correctly with some support | Stop re-explaining; let the user reason through the next decision worth practicing |
10
+ | Demonstrated | Applies it alone in real work and reads the result correctly | Step back; step in only for risk, new constraints or contradicting evidence |
11
+
12
+ ## Evidence
13
+
14
+ A state is a working hypothesis, and it moves either way as evidence comes in. Count:
15
+
16
+ - a correct prediction with causal reasoning
17
+ - an implementation choice and its explanation
18
+ - a diagnostic hypothesis drawn from observations
19
+ - a concept carried into a new context
20
+ - a misconception recognized and corrected
21
+
22
+ A finished task proves nothing when you made every decision. A wrong answer points at a specific gap, not at the user.
23
+
24
+ Infer states from the work already happening; never quiz the user to assign one. Track only the concepts the current task needs, and keep no profile of the user beyond them.
@@ -1,42 +0,0 @@
1
- ---
2
- name: vocabulary
3
- description: Use when about to name a domain concept in code, a task or a doc, when the user corrects a word, when two words are in use for one thing, or when another skill needs a term looked up or recorded.
4
- registryDependencies: [task-manager, domain-modeling]
5
- disable-model-invocation: false
6
- ---
7
-
8
- Every session starts without the last one's words, so names _drift_: the _phase_ of Monday is the _stage_ of Tuesday, and by Friday the code has both. The vocabulary is the one list that stops it. Each **term** carries a definition and the **avoided words** it replaces.
9
-
10
- Its hooks are scripts in its own `hooks/` folder, run as `bun <vocabulary-dir>/hooks/<hook>.ts`, where `<vocabulary-dir>` is this skill's base directory: the folder holding this `SKILL.md`.
11
-
12
- The terms live in `vocabulary.md` at the tree root. **Reach them through the hooks only.** `guard-tree` denies a direct read, and a hand edit is overwritten by the next `set-term`.
13
-
14
- | Hook | Does | Use it when |
15
- |---|---|---|
16
- | `get-term` | Returns one term, found by its name or by an avoided word | about to use a word for a domain concept |
17
- | `list-terms` | Returns every term, sorted by name | starting work in an unfamiliar area |
18
- | `set-term` | Adds a term, or replaces its definition and avoided words. **Writes.** | a concept got a name, or a name got sharper |
19
- | `remove-term` | Deletes one term. **Writes.** | the concept left the project |
20
-
21
- Copy each invocation from [`references/usage.md`](references/usage.md).
22
-
23
- They share `--project`, `--root` and `--pretty` with the task-manager hooks. `get-term` and `remove-term` exit `1` when nothing answers to the name. `list-terms` prints `[]` for an empty vocabulary.
24
-
25
- ## Reading an answer
26
-
27
- `get-term` reports how it found the term in `matched`:
28
-
29
- - **`"term"`** means the word is the right one. Use it as spelled.
30
- - **`"avoid"`** means the word is a retired synonym. Use the returned `term` instead, in prose and in identifiers alike.
31
-
32
- `get-entry` and `next-entry` attach a `vocabulary` array to every plan, phase and task they return. It lists each term the entry mentions, and under `avoided` the retired words the entry still uses. Treat a non-empty `avoided` as a defect in the entry and write the term in whatever you produce from it.
33
-
34
- ## Recording a term
35
-
36
- **Record on the second sighting.** One use of a word is prose. The same concept named twice, or named differently by two people, is a term. A correction from the user is always a term.
37
-
38
- - **Definition.** One or two sentences saying what the thing _is_. Leave out how it is built.
39
- - **`--avoid`.** The synonyms actually seen, comma-separated. `set-term` refuses a word another term already owns, which is how two terms are kept from claiming one meaning.
40
- - **`set-term` replaces.** Pass the full definition and the full avoid list every time, since flags left out are cleared.
41
-
42
- A term whose meaning is still contested is sharpened with the `/domain-modeling` skill first, then stored here.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Vocabulary"
3
- short_description: "One word per concept across sessions, kept in the task-manager tree through hooks"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,18 +0,0 @@
1
- // packages/g3n-skills/skills/task-manager/vocabulary/hooks/get-term.ts
2
- import { findTerm, readVocabulary } from "@task-manager/vocabulary";
3
- import { printJson, requireFlag, resolveRoot, runHook } from "@task-manager/hooks";
4
-
5
- /** Prints the term `--term` names, found by its name or by one of its avoided words. */
6
- async function run(argv: readonly string[]): Promise<void> {
7
- const root = await resolveRoot(argv);
8
- const name = requireFlag(argv, "--term", "phase");
9
-
10
- const match = findTerm(await readVocabulary(root), name);
11
- if (match === null) {
12
- throw new Error(`"${name}" is not in the vocabulary, as a term or as an avoided word`);
13
- }
14
-
15
- printJson({ ...match.term, matched: match.matched }, argv);
16
- }
17
-
18
- runHook(() => run(process.argv.slice(2)));
@@ -1,12 +0,0 @@
1
- // packages/g3n-skills/skills/task-manager/vocabulary/hooks/list-terms.ts
2
- import { readVocabulary } from "@task-manager/vocabulary";
3
- import { printJson, resolveRoot, runHook } from "@task-manager/hooks";
4
-
5
- /** Prints every term in the vocabulary. */
6
- async function run(argv: readonly string[]): Promise<void> {
7
- const root = await resolveRoot(argv);
8
-
9
- printJson(await readVocabulary(root), argv);
10
- }
11
-
12
- runHook(() => run(process.argv.slice(2)));
@@ -1,22 +0,0 @@
1
- // packages/g3n-skills/skills/task-manager/vocabulary/hooks/remove-term.ts
2
- import { findTerm, readVocabulary, vocabularyPathFor, writeVocabulary } from "@task-manager/vocabulary";
3
- import { printJson, requireFlag, resolveRoot, runHook } from "@task-manager/hooks";
4
-
5
- /** Removes the term named by `--term` from the vocabulary and prints it. */
6
- async function run(argv: readonly string[]): Promise<void> {
7
- const root = await resolveRoot(argv);
8
- const name = requireFlag(argv, "--term", "phase");
9
-
10
- const terms = await readVocabulary(root);
11
- const match = findTerm(terms, name);
12
-
13
- if (match === null || match.matched !== "term") {
14
- throw new Error(`"${name}" is not a term in the vocabulary`);
15
- }
16
-
17
- await writeVocabulary(root, terms.filter((term) => term !== match.term));
18
-
19
- printJson({ file: vocabularyPathFor(root), removed: match.term }, argv);
20
- }
21
-
22
- runHook(() => run(process.argv.slice(2)));
@@ -1,37 +0,0 @@
1
- // packages/g3n-skills/skills/task-manager/vocabulary/hooks/set-term.ts
2
- import { findTerm, readVocabulary, vocabularyPathFor, writeVocabulary } from "@task-manager/vocabulary";
3
- import { printJson, readFlag, requireFlag, resolveRoot, runHook } from "@task-manager/hooks";
4
-
5
- /** Splits a comma-separated `--avoid` value into trimmed words; empty when the flag is absent. */
6
- function splitWords(list: string | undefined): string[] {
7
- return list === undefined ? [] : list.split(",").map((word) => word.trim()).filter((word) => word !== "");
8
- }
9
-
10
- /** Adds the term `--term` or replaces its definition and avoided words, and prints the result. */
11
- async function run(argv: readonly string[]): Promise<void> {
12
- const root = await resolveRoot(argv);
13
-
14
- const name = requireFlag(argv, "--term", "phase");
15
- const definition = requireFlag(argv, "--definition", '"One step of a plan."');
16
- const avoid = splitWords(readFlag(argv, "--avoid"));
17
-
18
- const terms = await readVocabulary(root);
19
- const existing = findTerm(terms, name);
20
-
21
- if (existing?.matched === "avoid") {
22
- throw new Error(`"${name}" is an avoided word of "${existing.term.term}"; define that term instead`);
23
- }
24
- for (const word of avoid) {
25
- const owner = findTerm(terms, word);
26
- if (owner !== null && owner.term !== existing?.term) {
27
- throw new Error(`cannot avoid "${word}": it already belongs to the term "${owner.term.term}"`);
28
- }
29
- }
30
-
31
- const term = { term: existing?.term.term ?? name, definition, avoid };
32
- await writeVocabulary(root, [...terms.filter((t) => t !== existing?.term), term]);
33
-
34
- printJson({ file: vocabularyPathFor(root), created: existing === null, ...term }, argv);
35
- }
36
-
37
- runHook(() => run(process.argv.slice(2)));
@@ -1,26 +0,0 @@
1
- # Term hooks — usage
2
-
3
- How each hook is called, and what the file they write looks like. This is the disclosed reference for the [`vocabulary`](../SKILL.md) skill.
4
-
5
- ## Invocations
6
-
7
- ```bash
8
- bun <vocabulary-dir>/hooks/get-term.ts --term stage
9
- bun <vocabulary-dir>/hooks/list-terms.ts --pretty
10
- bun <vocabulary-dir>/hooks/set-term.ts --term Phase --definition "One step of a plan, holding tasks." --avoid "stage, milestone"
11
- bun <vocabulary-dir>/hooks/remove-term.ts --term Phase
12
- ```
13
-
14
- ## The file
15
-
16
- `set-term` and `remove-term` rewrite `vocabulary.md` whole, terms sorted by name:
17
-
18
- ```md
19
- # Vocabulary
20
-
21
- ## Phase
22
-
23
- One step of a plan, holding tasks.
24
-
25
- _Avoid_: stage, milestone
26
- ```
@@ -1,7 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "paths": {
4
- "@task-manager/*": ["../task-manager/src/*"]
5
- }
6
- }
7
- }