@g3nomaly/g3n-skills 0.1.6 → 0.1.7
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/.claude-plugin/marketplace.json +11 -2
- package/README.md +43 -41
- package/package.json +2 -2
- package/skills/coding/.claude-plugin/plugin.json +7 -3
- package/skills/coding/code/SKILL.md +6 -6
- package/skills/coding/code/references/cpp.md +12 -12
- package/skills/coding/code/references/python.md +12 -12
- package/skills/coding/code/references/rust.md +11 -11
- package/skills/coding/code/references/typescript.md +12 -12
- package/skills/coding/document/SKILL.md +1 -1
- package/skills/coding/document/references/cpp.md +4 -0
- package/skills/coding/document/references/python.md +3 -0
- package/skills/coding/document/references/rust.md +10 -5
- package/skills/coding/document/references/typescript.md +14 -3
- package/skills/g3n/.claude-plugin/plugin.json +11 -0
- package/skills/g3n/analyze/references/api.md +32 -0
- package/skills/g3n/analyze/references/commands.md +54 -0
- package/skills/g3n/analyze/references/repository.md +13 -0
- package/skills/g3n/g3n-mods/SKILL.md +32 -0
- package/skills/g3n/g3n-mods/agents/openai.yaml +5 -0
- package/skills/g3n/g3n-skills/SKILL.md +32 -0
- package/skills/g3n/g3n-skills/agents/openai.yaml +5 -0
- package/skills/grilling/.claude-plugin/plugin.json +7 -2
- package/skills/grilling/domain-modeling/ADR-FORMAT.md +1 -1
- package/skills/grilling/domain-modeling/SKILL.md +1 -1
- package/skills/grilling/grilling/SKILL.md +1 -1
- package/skills/speech/.claude-plugin/plugin.json +7 -2
- package/skills/speech/emphasise/SKILL.md +12 -12
- package/skills/task-manager/.claude-plugin/plugin.json +1 -1
- package/skills/task-manager/decisions/SKILL.md +5 -5
- package/skills/task-manager/task-manager/SKILL.md +8 -8
- package/skills/task-manager/task-manager/references/hooks.md +10 -10
- package/skills/task-manager/task-manager/references/task-file.md +12 -12
- package/skills/teach/.claude-plugin/plugin.json +10 -2
- package/skills/teach/guided-debugging/references/debugging-loop.md +10 -10
- package/skills/teach/teaching/references/learning-model.md +6 -6
- package/skills/using-hooks/.claude-plugin/plugin.json +7 -2
- package/skills/using-hooks/hook-post-tool-use/SKILL.md +15 -3
- package/skills/using-hooks/hook-pre-tool-use/SKILL.md +10 -2
- package/skills/workflow/.claude-plugin/plugin.json +7 -3
- package/skills/workflow/orchestrator/SKILL.md +6 -6
- package/skills/workflow/plan/SKILL.md +2 -1
- package/skills/workflow/review/SKILL.md +2 -1
- package/skills/workflow/run/SKILL.md +8 -8
- package/skills/workflow/run/references/sub-agents.md +6 -6
- package/skills/workflow/sync/SKILL.md +2 -1
- package/skills/workflow/worktree/SKILL.md +5 -5
- package/skills/writing/.claude-plugin/plugin.json +6 -2
- package/skills/writing/writing-great-hooks/references/lifecycle-hook.md +17 -11
- package/skills/writing/writing-great-hooks/references/skill-hook.md +17 -2
- package/skills/writing/writing-great-tasks/SKILL.md +14 -14
- package/skills/coding/analyze/references/api.md +0 -27
- package/skills/coding/analyze/references/commands.md +0 -54
- package/skills/coding/analyze/references/repository.md +0 -13
- /package/skills/{coding → g3n}/analyze/SKILL.md +0 -0
- /package/skills/{coding → g3n}/analyze/agents/openai.yaml +0 -0
|
@@ -13,14 +13,14 @@ Hooks are scripts in a skill's `hooks/` folder, run with `bun`. `<task-manager-d
|
|
|
13
13
|
|
|
14
14
|
`bun <run-dir>/hooks/current-step.ts --phase <phase>` returns the phase's `step`:
|
|
15
15
|
|
|
16
|
-
| `step`
|
|
17
|
-
|
|
18
|
-
| `plan`
|
|
19
|
-
| `execute` | a task is `open` or `in-progress`
|
|
20
|
-
| `review`
|
|
21
|
-
| `sync`
|
|
22
|
-
| `done`
|
|
23
|
-
| `blocked` | the phase or a task in `holding` is `blocked` | nobody. Report and stop
|
|
16
|
+
| `step` | Meaning | Hand it to |
|
|
17
|
+
| --------- | --------------------------------------------- | -------------------------------------------------- |
|
|
18
|
+
| `plan` | the phase has no tasks, or is still `open` | an agent running the `/plan` skill |
|
|
19
|
+
| `execute` | a task is `open` or `in-progress` | agents running the `/execute` skill |
|
|
20
|
+
| `review` | every remaining task is `in-review` | the **reviewer** agent running the `/review` skill |
|
|
21
|
+
| `sync` | every task is `completed` | an agent running the `/sync` skill |
|
|
22
|
+
| `done` | the phase is `completed` | nobody. Report and stop |
|
|
23
|
+
| `blocked` | the phase or a task in `holding` is `blocked` | nobody. Report and stop |
|
|
24
24
|
|
|
25
25
|
The step is worked out from the statuses on disk each time, so a task the reviewer sends back puts the phase on `execute` again with nothing to reset. `holding` names the tasks keeping the phase on its step.
|
|
26
26
|
|
|
@@ -28,12 +28,12 @@ Give names, never contents. The agent reads the phase and its tasks through the
|
|
|
28
28
|
|
|
29
29
|
## Which agent per step
|
|
30
30
|
|
|
31
|
-
| Step
|
|
32
|
-
|
|
33
|
-
| `plan`
|
|
34
|
-
| `execute` | general purpose, one or several
|
|
35
|
-
| `review`
|
|
36
|
-
| `sync`
|
|
31
|
+
| Step | Agent | Can edit |
|
|
32
|
+
| --------- | ---------------------------------------------------------- | -------------------------- |
|
|
33
|
+
| `plan` | general purpose | the tree only |
|
|
34
|
+
| `execute` | general purpose, one or several | its task's worktree |
|
|
35
|
+
| `review` | **reviewer**, defined in the plugin's `agents/reviewer.md` | nothing |
|
|
36
|
+
| `sync` | general purpose | the phase branch, the tree |
|
|
37
37
|
|
|
38
38
|
Where no `reviewer` agent type is offered, which is the case after `g3n-skills add workflow`, spawn a general purpose agent for `review` and open its brief with _You change no file._
|
|
39
39
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sync
|
|
3
3
|
description: Use as the sync step of the workflow, or when every task of a phase is completed and the phase is still open.
|
|
4
|
-
registryDependencies:
|
|
4
|
+
registryDependencies:
|
|
5
|
+
[task-manager, worktree, vocabulary, decisions, run, orchestrator]
|
|
5
6
|
disable-model-invocation: false
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -8,11 +8,11 @@ Every task gets its own **worktree**, a second checkout on its own branch, so ag
|
|
|
8
8
|
|
|
9
9
|
## Names
|
|
10
10
|
|
|
11
|
-
| Thing
|
|
12
|
-
|
|
13
|
-
| Phase branch
|
|
14
|
-
| Task branch
|
|
15
|
-
| Worktree folder | `../<repo folder>.worktrees/<task id>`
|
|
11
|
+
| Thing | Pattern | Example |
|
|
12
|
+
| --------------- | ----------------------------------------------- | ------------------------------------------ |
|
|
13
|
+
| Phase branch | `<type>/<plan>-<phase>` | `feature/auth-rework-01-schema` |
|
|
14
|
+
| Task branch | `<worktree_type>/<task id>-<slug of the title>` | `feature/TASK-012-session-table-migration` |
|
|
15
|
+
| Worktree folder | `../<repo folder>.worktrees/<task id>` | `../g3n.worktrees/TASK-012` |
|
|
16
16
|
|
|
17
17
|
`worktree_type` comes from the task's frontmatter. The phase branch takes the type most of its tasks carry. The worktree folder sits beside the repository, outside it, so no search or build inside the repo walks into it.
|
|
18
18
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "writing",
|
|
3
3
|
"description": "How to write skills, hooks and tasks that an agent can follow.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"skills": [
|
|
6
|
+
"skills": [
|
|
7
|
+
"./writing-great-hooks",
|
|
8
|
+
"./writing-great-skills",
|
|
9
|
+
"./writing-great-tasks"
|
|
10
|
+
]
|
|
7
11
|
}
|
|
@@ -10,7 +10,13 @@ In a plugin's `hooks.json`, or in `settings.json`:
|
|
|
10
10
|
"PreToolUse": [
|
|
11
11
|
{
|
|
12
12
|
"matcher": "Read|Grep|Glob",
|
|
13
|
-
"hooks": [
|
|
13
|
+
"hooks": [
|
|
14
|
+
{
|
|
15
|
+
"type": "command",
|
|
16
|
+
"command": "bun \"${CLAUDE_PLUGIN_ROOT}/task-manager/hooks/guard-tree.ts\"",
|
|
17
|
+
"timeout": 10
|
|
18
|
+
}
|
|
19
|
+
]
|
|
14
20
|
}
|
|
15
21
|
]
|
|
16
22
|
}
|
|
@@ -28,19 +34,19 @@ A JSON payload on stdin with `session_id`, `transcript_path`, `cwd`, `hook_event
|
|
|
28
34
|
|
|
29
35
|
## Output
|
|
30
36
|
|
|
31
|
-
| Exit
|
|
32
|
-
|
|
33
|
-
| `0`
|
|
34
|
-
| `2`
|
|
35
|
-
| other | error shown to the user; the run continues
|
|
37
|
+
| Exit | Effect |
|
|
38
|
+
| ----- | ---------------------------------------------- |
|
|
39
|
+
| `0` | ran; stdout is read per event |
|
|
40
|
+
| `2` | blocks; stderr goes to the agent as the reason |
|
|
41
|
+
| other | error shown to the user; the run continues |
|
|
36
42
|
|
|
37
43
|
For more than a block, print JSON on stdout and exit `0`: `continue`, `stopReason`, `suppressOutput`, `systemMessage`, and the event's `hookSpecificOutput`.
|
|
38
44
|
|
|
39
45
|
## Events
|
|
40
46
|
|
|
41
|
-
| Event
|
|
42
|
-
|
|
47
|
+
| Event | Fires | Skill |
|
|
48
|
+
| ------------------ | ------------------------------- | ------------------------- |
|
|
43
49
|
| `UserPromptSubmit` | before the agent reads a prompt | `hook-user-prompt-submit` |
|
|
44
|
-
| `PreToolUse`
|
|
45
|
-
| `PostToolUse`
|
|
46
|
-
| `Stop`
|
|
50
|
+
| `PreToolUse` | before a tool runs | `hook-pre-tool-use` |
|
|
51
|
+
| `PostToolUse` | after a tool ran | `hook-post-tool-use` |
|
|
52
|
+
| `Stop` | when the agent is about to stop | `hook-stop` |
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
// packages/g3n-skills/skills/<group>/<skill>/hooks/get-term.ts
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
printJson,
|
|
21
|
+
requireFlag,
|
|
22
|
+
resolveRoot,
|
|
23
|
+
runHook,
|
|
24
|
+
} from "@task-manager/hooks";
|
|
20
25
|
|
|
21
26
|
/** Prints the term `--term` names. */
|
|
22
27
|
async function run(argv: readonly string[]): Promise<void> {
|
|
@@ -39,8 +44,18 @@ From task-manager's `src/hooks/`: `readFlag`, `requireFlag`, `hasFlag`, `oneOf`,
|
|
|
39
44
|
- **Code shared between skills** lives in the `src/` of the skill that owns it. Import it as `@<owner>/<module>`, mapped in the importing skill's `tsconfig.json`, and list the owner in `registryDependencies`:
|
|
40
45
|
|
|
41
46
|
```json
|
|
42
|
-
{
|
|
47
|
+
{
|
|
48
|
+
"compilerOptions": {
|
|
49
|
+
"paths": {
|
|
50
|
+
"@task-manager/*": [
|
|
51
|
+
"../task-manager/src/*",
|
|
52
|
+
"../../task-manager/task-manager/src/*"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
43
57
|
```
|
|
44
58
|
|
|
45
59
|
The first path is the owner installed beside the skill; the second is its folder in another group in the repo.
|
|
60
|
+
|
|
46
61
|
- **Packages** go in the owning skill's `package.json` with a pinned version and a `bun.lock`. Installers run `bun install` in that skill folder.
|
|
@@ -15,17 +15,17 @@ A task is a _brief_: one agent reads it, works alone, and is done when every box
|
|
|
15
15
|
|
|
16
16
|
## Sections
|
|
17
17
|
|
|
18
|
-
| Section
|
|
19
|
-
|
|
20
|
-
| Description
|
|
21
|
-
| Goals
|
|
22
|
-
| Non-Goals
|
|
23
|
-
| Deliverables
|
|
24
|
-
| Package Dependencies | `- [ ]` packages the task may use, each with why
|
|
25
|
-
| Contracts
|
|
26
|
-
| Requirements
|
|
27
|
-
| Findings
|
|
28
|
-
| Blockers
|
|
29
|
-
| Decisions
|
|
30
|
-
| References
|
|
31
|
-
| Amendments
|
|
18
|
+
| Section | Holds |
|
|
19
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| Description | Prose: the problem, the outcome, the context needed to start |
|
|
21
|
+
| Goals | `- [ ]` outcomes the task is judged on |
|
|
22
|
+
| Non-Goals | `- [ ]` outcomes a reasonable agent would pursue from the Description, which stay out |
|
|
23
|
+
| Deliverables | `- [ ]` one per file: **new** or **edit**, the path, a one-line contract. Files added later go in Findings |
|
|
24
|
+
| Package Dependencies | `- [ ]` packages the task may use, each with why |
|
|
25
|
+
| Contracts | Optional: a settled schema, type or signature small enough to write out |
|
|
26
|
+
| Requirements | `- [ ]` constraints on how, each checkable in the diff; a goal is never restated here |
|
|
27
|
+
| Findings | Empty; the executor appends what it discovers |
|
|
28
|
+
| Blockers | Empty; filled when the task is blocked, cleared when it is released |
|
|
29
|
+
| Decisions | ADR paths only, in the `/domain-modeling` format |
|
|
30
|
+
| References | Files, skills and task ids to read first, each with why |
|
|
31
|
+
| Amendments | Empty; whoever edits the task after creation logs what changed and which later tasks are now suspect |
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Library
|
|
2
|
-
|
|
3
|
-
`@g3nomaly/analyze` exports the queries as functions. They take the CLI options as fields, never print, and throw `OptionsError`, `QueryError` or `SourceError`.
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
import { createDocs, list, refs, search, show } from '@g3nomaly/analyze';
|
|
7
|
-
|
|
8
|
-
const repo = '/home/me/app';
|
|
9
|
-
const { hits } = await search({ repo, query: 'route price', limit: 5 });
|
|
10
|
-
const node = await show({ repo, target: hits[0].id });
|
|
11
|
-
const users = await refs({ repo, target: 'choose_route', incoming: true, edges: ['type'] });
|
|
12
|
-
const tasks = await list({ repo, kinds: ['task'] });
|
|
13
|
-
await createDocs({ repo });
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
| Field | Functions | CLI flag |
|
|
17
|
-
|---|---|---|
|
|
18
|
-
| `repo`, `skillDirs`, `docDirs`, `excludes`, `embeddings` | all | `--repo`, `--skills`, `--docs`, `--exclude`, `--no-embeddings` |
|
|
19
|
-
| `from`, `cache` | queries | `--from`, `--no-cache` |
|
|
20
|
-
| `kinds`, `section` | queries | `--kind`, `--section` |
|
|
21
|
-
| `query`, `by`, `limit` | `search` | `<query>`, `--by`, `-n` |
|
|
22
|
-
| `target` | `show`, `refs` | `<node>` |
|
|
23
|
-
| `incoming`, `outgoing`, `edges` | `refs` | `--incoming`, `--outgoing`, `--edge` |
|
|
24
|
-
| `title` | `createDocs` | `--title` |
|
|
25
|
-
| `onWarning` | all | — |
|
|
26
|
-
|
|
27
|
-
Warnings go to `onWarning` and are dropped without it.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Commands
|
|
2
|
-
|
|
3
|
-
| Command | Does |
|
|
4
|
-
|---|---|
|
|
5
|
-
| `create_docs` | Writes `analyze_out/index.html`, one offline HTML file |
|
|
6
|
-
| `search <query>` | Finds nodes by words and by meaning |
|
|
7
|
-
| `show <node>` | Prints one node in full |
|
|
8
|
-
| `refs <node>` | Lists its edges, both ways |
|
|
9
|
-
| `list` | Lists nodes in display order |
|
|
10
|
-
|
|
11
|
-
## Flags
|
|
12
|
-
|
|
13
|
-
| Flag | Commands | Does |
|
|
14
|
-
|---|---|---|
|
|
15
|
-
| `--repo <dir>` | all | Repository to read. Default: the working directory |
|
|
16
|
-
| `--skills <dir>`, `--docs <dir>` | all | Read skills or docs from this directory only. Repeatable |
|
|
17
|
-
| `--exclude <glob>` | all | Skip matching paths. Repeatable |
|
|
18
|
-
| `--no-embeddings` | all | No search by meaning |
|
|
19
|
-
| `--title <text>` | `create_docs` | Site title |
|
|
20
|
-
| `--from <file>` | queries | Query a built `index.html` instead of scanning |
|
|
21
|
-
| `--no-cache` | queries | Scan again even when nothing changed |
|
|
22
|
-
| `--json` | queries | JSON instead of text |
|
|
23
|
-
| `--kind <kind>` | queries | Only this kind. Repeatable |
|
|
24
|
-
| `--section <name>` | queries | `skills`, `docs`, `code`, `database` or `tasks` |
|
|
25
|
-
| `-n, --limit <n>` | `search`, `list` | Most results |
|
|
26
|
-
| `--by <way>` | `search` | `name`, `meaning` or `both` |
|
|
27
|
-
| `--incoming`, `--outgoing` | `refs` | One direction only |
|
|
28
|
-
| `--edge <kind>` | `refs` | Only this edge kind. Repeatable |
|
|
29
|
-
|
|
30
|
-
Each flag has an `ANALYZE_*` variable, such as `ANALYZE_REPO`. A flag wins over its variable.
|
|
31
|
-
|
|
32
|
-
## Kinds
|
|
33
|
-
|
|
34
|
-
- **Structure**: `folder`, `package`, `file`
|
|
35
|
-
- **Code**: `namespace`, `class`, `interface`, `struct`, `enum`, `trait`, `type`, `function` (methods included)
|
|
36
|
-
- **Docs and data**: `term`, `decision`, `table`, `query`
|
|
37
|
-
- **Tasks**: `plan`, `phase`, `task`
|
|
38
|
-
- **Members**, returned as their owner: `operation`, `definition`, `parameter`, `field`
|
|
39
|
-
|
|
40
|
-
The JSON of a node has its `kind` and its `type`, the finer sort, such as `method` or `api`.
|
|
41
|
-
|
|
42
|
-
## Edge kinds
|
|
43
|
-
|
|
44
|
-
| Edge | From → to |
|
|
45
|
-
|---|---|
|
|
46
|
-
| `type` | parameter or field → its type |
|
|
47
|
-
| `returns`, `throws` | function → type it returns or throws |
|
|
48
|
-
| `extends` | type → type it extends or implements |
|
|
49
|
-
| `mentions` | page or description → node it links to |
|
|
50
|
-
| `uses` | text → glossary term |
|
|
51
|
-
| `affects` | decision → node it is about |
|
|
52
|
-
| `references` | table → table of its foreign key |
|
|
53
|
-
| `reads`, `writes` | query → table |
|
|
54
|
-
| `names`, `depends` | plan, phase or task → node it names, task it waits for |
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# What analyze reads
|
|
2
|
-
|
|
3
|
-
| Shows as | Write |
|
|
4
|
-
|---|---|
|
|
5
|
-
| **Skill** | A `SKILL.md` inside an AI directory: `.claude`, `.codex`, `.cursor`, `.gemini`, `.agents`, `.windsurf`, `.opencode`. Elsewhere it is a doc |
|
|
6
|
-
| **Package** | A directory with a manifest: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `pom.xml`, `build.gradle`, `composer.json`, `.csproj`, `.gemspec`, `Gemfile`. A declared executable makes it an app |
|
|
7
|
-
| **Glossary** | A `glossary.md`. Each term is a node, and its first use in any text links to it |
|
|
8
|
-
| **Decisions** | A `decisions.md`. Each decision is a node; a link or inline code in it that names a node becomes an `affects` edge |
|
|
9
|
-
| **Code docs** | Doc comments. `@param`, `@returns`, `@throws` and `@property` attach to the parameter, return value, error and field |
|
|
10
|
-
| **Database** | `.sql` files. One with `CREATE TABLE` is a schema, any other a query |
|
|
11
|
-
| **Tasks** | The task-manager tree in `docs/task-manager`, or the directory `.g3n.config.json` names |
|
|
12
|
-
|
|
13
|
-
Inline code that names a type or function, such as `` `choose_route` ``, links to it from any text.
|
|
File without changes
|
|
File without changes
|