@guiho/xdocs 0.3.0-alpha.1 → 0.3.0-alpha.2
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/CHANGELOG.md +7 -0
- package/DOCS.md +17 -14
- package/README.md +8 -8
- package/jsr.json +1 -1
- package/library/agents.d.ts +13 -7
- package/library/agents.d.ts.map +1 -1
- package/library/agents.js +65 -20
- package/library/commands/agents.js +4 -1
- package/library/commands/init.js +3 -3
- package/library/embedded-resources.js +1 -1
- package/library/guiho-xdocs.d.ts +1 -1
- package/library/guiho-xdocs.d.ts.map +1 -1
- package/library/guiho-xdocs.js +1 -1
- package/library/help.js +5 -5
- package/library/types.d.ts +5 -2
- package/library/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/{guiho-as-xdocs → guiho-s-xdocs}/SKILL.md +9 -8
- package/skills/skills.xdocs.md +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# GUIHO XDocs Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0-alpha.2
|
|
4
|
+
|
|
5
|
+
- Rename the bundled xdocs agent skill from `guiho-as-xdocs` to `guiho-s-xdocs` and add a frontmatter `version` field.
|
|
6
|
+
- Refresh installed skills from the bundled package copy, removing legacy `guiho-as-xdocs` skill directories and replacing stale `guiho-s-xdocs` installs when version or content differs.
|
|
7
|
+
- Keep `[agents].auto_skill_install` defaulted to `true` and run global skill refresh during config-gated command automation.
|
|
8
|
+
- Update the TypeScript API, tests, help text, README, architecture notes, AGENTS guidance, and canonical `DOCS.md` for the renamed skill behavior.
|
|
9
|
+
|
|
3
10
|
## 0.3.0-alpha.1
|
|
4
11
|
|
|
5
12
|
- Remove external parser dependencies (`smol-toml`, `yaml`) and use Bun-native `Bun.TOML.parse` and `Bun.YAML.parse` instead.
|
package/DOCS.md
CHANGED
|
@@ -156,8 +156,8 @@ Initializes XDocs in a project. It:
|
|
|
156
156
|
|
|
157
157
|
- Creates `xdocs.config.toml` with defaults (skips if it already exists).
|
|
158
158
|
- Creates the root `XDOCS.md` (skips if it already exists).
|
|
159
|
-
- Updates `AGENTS.md` with the xdocs section that points AI agents at the `guiho-
|
|
160
|
-
- Installs the `guiho-
|
|
159
|
+
- Updates `AGENTS.md` with the xdocs section that points AI agents at the `guiho-s-xdocs` skill (creates `AGENTS.md` if absent; refreshes the section in place if present).
|
|
160
|
+
- Installs or refreshes the `guiho-s-xdocs` skill to the standard `.agents/skills` location, removing legacy `guiho-as-xdocs` installs when present.
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
xdocs init
|
|
@@ -245,7 +245,7 @@ Both `--name=value` and `--name value` forms are supported.
|
|
|
245
245
|
|
|
246
246
|
### `xdocs agents`
|
|
247
247
|
|
|
248
|
-
Installs the `guiho-
|
|
248
|
+
Installs the `guiho-s-xdocs` agent skill and maintains the `AGENTS.md` instruction section.
|
|
249
249
|
|
|
250
250
|
```bash
|
|
251
251
|
xdocs agents install local # install under the project (.agents/skills)
|
|
@@ -327,22 +327,24 @@ Optional. When present, must be `1`.
|
|
|
327
327
|
Agent settings control skill installation and the automation that runs on data commands.
|
|
328
328
|
|
|
329
329
|
- `auto_agents_md`: Keep the `AGENTS.md` xdocs section fresh on normal commands when `AGENTS.md` already exists. Default: `true`.
|
|
330
|
-
- `auto_skill_install`: Install the
|
|
330
|
+
- `auto_skill_install`: Install or refresh the configured skill globally from the bundled package copy. Default: `true`.
|
|
331
331
|
- `skill_tool`: Default target for auto-install. Supported values are `agents` (standard) and `claude`. Default: `agents`.
|
|
332
332
|
|
|
333
333
|
## Agent Skills and Automation
|
|
334
334
|
|
|
335
|
-
XDocs ships the `guiho-
|
|
335
|
+
XDocs ships the `guiho-s-xdocs` skill inside the package at `skills/guiho-s-xdocs/SKILL.md`. The skill is a large, on-demand instruction document with a `version` field in its frontmatter; a small section in `AGENTS.md` tells an agent to load it.
|
|
336
336
|
|
|
337
337
|
Installation is standard-first:
|
|
338
338
|
|
|
339
339
|
| Target | Skill location | When installed |
|
|
340
340
|
| ------------------------- | ------------------------------------------- | --------------------------------------------------------------- |
|
|
341
|
-
| `agents` (standard) | `.agents/skills/guiho-
|
|
342
|
-
| `claude` (non-standard) | `.claude/skills/guiho-
|
|
341
|
+
| `agents` (standard) | `.agents/skills/guiho-s-xdocs/SKILL.md` | Always (default). Read by OpenCode, Codex, Jules, and any AGENTS.md tool. |
|
|
342
|
+
| `claude` (non-standard) | `.claude/skills/guiho-s-xdocs/SKILL.md` | Only when requested via `--tool`, or detected (a `.claude/` directory or `CLAUDE.md`). |
|
|
343
343
|
|
|
344
344
|
`local` scope installs under the project root; `global` scope installs under the user home directory (`~/.agents/skills/...`).
|
|
345
345
|
|
|
346
|
+
Skill installation treats the bundled package skill as the source of truth. It removes legacy `guiho-as-xdocs` skill directories for the selected target, compares the installed `guiho-s-xdocs` version/content with the bundled copy, and replaces the installed skill whenever the version or content differs.
|
|
347
|
+
|
|
346
348
|
The rule is: default to the standard target. Only write non-standard files (`.claude`, `CLAUDE.md`, etc.) when the user asks for them or when those files already exist.
|
|
347
349
|
|
|
348
350
|
### Automation
|
|
@@ -350,7 +352,7 @@ The rule is: default to the standard target. Only write non-standard files (`.cl
|
|
|
350
352
|
When an `xdocs.config.toml` is present, the data commands (`scan`, `generate`, `merge`, `tree`, `list`) run config-gated agent automation before executing:
|
|
351
353
|
|
|
352
354
|
- If `auto_agents_md` is true and `AGENTS.md` exists, the xdocs section is kept fresh.
|
|
353
|
-
- If `auto_skill_install` is true
|
|
355
|
+
- If `auto_skill_install` is true, XDocs ensures the configured global skill is current from the bundled package copy, removing legacy skill names and printing a one-line notice to stderr when it installs or refreshes anything.
|
|
354
356
|
|
|
355
357
|
Automation does nothing outside an xdocs project (no config discovered). `init` and `agents` do not run this automation; they manage agent files explicitly.
|
|
356
358
|
|
|
@@ -394,11 +396,12 @@ import { extractFrontmatter, parseXDocsFile, validateMetadata } from '@guiho/xdo
|
|
|
394
396
|
Agent skill and AGENTS.md automation:
|
|
395
397
|
|
|
396
398
|
```ts
|
|
397
|
-
import { installSkill, ensureAgentsInstructions, runAgentAutomation } from '@guiho/xdocs'
|
|
399
|
+
import { installSkill, ensureAgentsInstructions, runAgentAutomation, xdocsSkillVersion } from '@guiho/xdocs'
|
|
398
400
|
|
|
399
401
|
await installSkill('agents', 'local', { cwd: process.cwd() })
|
|
400
402
|
await ensureAgentsInstructions(process.cwd(), true)
|
|
401
403
|
await runAgentAutomation({ cwd: process.cwd(), format: 'text', verbose: false })
|
|
404
|
+
console.log(xdocsSkillVersion)
|
|
402
405
|
```
|
|
403
406
|
|
|
404
407
|
Configuration:
|
|
@@ -425,10 +428,10 @@ The API uses the same configuration discovery and validation as the CLI.
|
|
|
425
428
|
- `source/flags.ts`: argument/flag parsing utilities.
|
|
426
429
|
- `source/errors.ts`: `XDocsError` with stable exit codes and the `invariant` helper.
|
|
427
430
|
- `source/types.ts`: public and internal TypeScript types.
|
|
428
|
-
- `source/agents.ts`: agent skill installation (standard/claude, local/global), AGENTS.md section management, detection, and config-gated automation. Reads `skills/guiho-
|
|
431
|
+
- `source/agents.ts`: agent skill installation (standard/claude, local/global), legacy skill-name removal, version/content refresh, AGENTS.md section management, detection, and config-gated automation. Reads `skills/guiho-s-xdocs/SKILL.md` from disk at runtime relative to `import.meta.url`.
|
|
429
432
|
- `source/commands/*.ts`: one file per CLI command (`init`, `scan`, `generate`, `prompt`, `merge`, `tree`, `list`, `agents`).
|
|
430
433
|
- `prompts/*.md`: prompt templates embedded at build time.
|
|
431
|
-
- `skills/guiho-
|
|
434
|
+
- `skills/guiho-s-xdocs/SKILL.md`: bundled versioned AI-agent skill installed by `xdocs agents` commands.
|
|
432
435
|
|
|
433
436
|
## Development Workflow
|
|
434
437
|
|
|
@@ -504,7 +507,7 @@ Supported release asset matrix:
|
|
|
504
507
|
|
|
505
508
|
Windows arm64 is intentionally not published until Bun's compilation support is reliable enough for this project. Unsupported platforms should use a documented manual path: install Bun and run from source, or download a compatible release asset manually.
|
|
506
509
|
|
|
507
|
-
The package-manager install path downloads a native binary to `bin/xdocs.exe` during `postinstall`, and the `xdocs` bin entry points to that native binary. The native binary entrypoint embeds prompt templates, the `guiho-
|
|
510
|
+
The package-manager install path downloads a native binary to `bin/xdocs.exe` during `postinstall`, and the `xdocs` bin entry points to that native binary. The native binary entrypoint embeds prompt templates, the `guiho-s-xdocs` skill, and package version metadata before importing the CLI, so installed binaries do not need adjacent prompt or skill files at runtime.
|
|
508
511
|
|
|
509
512
|
## Documentation Requirement Before Publishing
|
|
510
513
|
|
|
@@ -550,9 +553,9 @@ Run `xdocs tree --verbose`. Resolve duplicate `subject` values, orphaned modules
|
|
|
550
553
|
|
|
551
554
|
The standard target is `.agents/skills` (or `~/.agents/skills` for `--global`). The Claude target (`.claude/skills`) is only used with `--tool claude`/`all` or when a `.claude/` directory or `CLAUDE.md` is detected. Use `XDOCS_AGENT_HOME` to redirect the global home in tests.
|
|
552
555
|
|
|
553
|
-
### A normal command modified AGENTS.md or installed a global skill unexpectedly
|
|
556
|
+
### A normal command modified AGENTS.md or installed/refreshed a global skill unexpectedly
|
|
554
557
|
|
|
555
|
-
That is the config-gated automation. Set `[agents].auto_agents_md = false` to stop AGENTS.md edits, and `[agents].auto_skill_install = false` to stop global skill installation.
|
|
558
|
+
That is the config-gated automation. Set `[agents].auto_agents_md = false` to stop AGENTS.md edits, and `[agents].auto_skill_install = false` to stop global skill installation and refresh.
|
|
556
559
|
|
|
557
560
|
### Prompt not found
|
|
558
561
|
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ This creates:
|
|
|
50
50
|
- `XDOCS.md` -- the single frontmatter-less repository index listing packages/applications
|
|
51
51
|
- `xdocs.config.toml` -- configuration with sensible defaults
|
|
52
52
|
- Updates `AGENTS.md` with instructions for AI agents
|
|
53
|
-
- Installs the `guiho-
|
|
53
|
+
- Installs the `guiho-s-xdocs` agent skill (standard `.agents/skills`)
|
|
54
54
|
|
|
55
55
|
### Typical Workflow
|
|
56
56
|
|
|
@@ -146,7 +146,7 @@ The CLI validates tree integrity: no orphan subjects, no missing parents, no cyc
|
|
|
146
146
|
|
|
147
147
|
#### `xdocs init`
|
|
148
148
|
|
|
149
|
-
Initializes xdocs in a project. Creates the root `XDOCS.md`, the `xdocs.config.toml` configuration, updates `AGENTS.md`, and installs the `guiho-
|
|
149
|
+
Initializes xdocs in a project. Creates the root `XDOCS.md`, the `xdocs.config.toml` configuration, updates `AGENTS.md`, and installs or refreshes the `guiho-s-xdocs` skill to the standard `.agents/skills` location.
|
|
150
150
|
|
|
151
151
|
#### `xdocs scan`
|
|
152
152
|
|
|
@@ -207,7 +207,7 @@ xdocs list ./src/auth
|
|
|
207
207
|
|
|
208
208
|
#### `xdocs agents`
|
|
209
209
|
|
|
210
|
-
Installs the `guiho-
|
|
210
|
+
Installs the `guiho-s-xdocs` agent skill and maintains the `AGENTS.md` section.
|
|
211
211
|
|
|
212
212
|
```bash
|
|
213
213
|
xdocs agents install local # install the skill under the project (.agents/skills)
|
|
@@ -261,7 +261,7 @@ name = "my-project"
|
|
|
261
261
|
[agents]
|
|
262
262
|
# Keep the xdocs section in AGENTS.md fresh on normal commands. Default: true
|
|
263
263
|
auto_agents_md = true
|
|
264
|
-
# Install the standard skill globally
|
|
264
|
+
# Install or refresh the standard skill globally from the bundled copy. Default: true
|
|
265
265
|
auto_skill_install = true
|
|
266
266
|
# Default target for skill auto-install: "agents" (standard) or "claude". Default: "agents"
|
|
267
267
|
skill_tool = "agents"
|
|
@@ -269,14 +269,14 @@ skill_tool = "agents"
|
|
|
269
269
|
|
|
270
270
|
### Agent Skills
|
|
271
271
|
|
|
272
|
-
xdocs ships the `guiho-
|
|
272
|
+
xdocs ships the `guiho-s-xdocs` agent skill that teaches AI tools how to work with xdocs -- when to create, update, or regenerate documentation, how to use the CLI, and how to respect the configured AI behavior mode. The skill is versioned in its frontmatter, large, and loaded on demand; a small section in `AGENTS.md` points the agent at it.
|
|
273
273
|
|
|
274
274
|
Installation is **standard-first**:
|
|
275
275
|
|
|
276
276
|
| Target | Location | When installed |
|
|
277
277
|
| ------------------------- | --------------------------------------------------- | --------------------------------------------------------------- |
|
|
278
|
-
| **agents** (standard) | `.agents/skills/guiho-
|
|
279
|
-
| **claude** (non-standard) | `.claude/skills/guiho-
|
|
278
|
+
| **agents** (standard) | `.agents/skills/guiho-s-xdocs/SKILL.md` | Always (default). Read by OpenCode, Codex, Jules, and any AGENTS.md tool. |
|
|
279
|
+
| **claude** (non-standard) | `.claude/skills/guiho-s-xdocs/SKILL.md` | When `--tool claude` is given, or a `.claude/` dir or `CLAUDE.md` is detected. |
|
|
280
280
|
|
|
281
281
|
```bash
|
|
282
282
|
xdocs agents install local # standard target, under the project
|
|
@@ -284,7 +284,7 @@ xdocs agents install global # standard target, under ~/.agents/skills
|
|
|
284
284
|
xdocs agents instructions # insert/refresh the AGENTS.md section
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
`xdocs init` runs this automatically for the standard target (`local` scope). `local` scope installs under the project; `global` installs under your home directory. The default is always the standard target -- non-standard files are written only when you ask (`--tool`) or when they are already present.
|
|
287
|
+
`xdocs init` runs this automatically for the standard target (`local` scope). `local` scope installs under the project; `global` installs under your home directory. The default is always the standard target -- non-standard files are written only when you ask (`--tool`) or when they are already present. Installation removes legacy `guiho-as-xdocs` skill directories and replaces `guiho-s-xdocs` when the bundled version or content differs.
|
|
288
288
|
|
|
289
289
|
---
|
|
290
290
|
|
package/jsr.json
CHANGED
package/library/agents.d.ts
CHANGED
|
@@ -5,17 +5,21 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Two distinct things live here:
|
|
7
7
|
* 1. The small AGENTS.md section that tells any AI agent that xdocs structured
|
|
8
|
-
* documentation exists and that it should load the guiho-
|
|
9
|
-
* 2. The large guiho-
|
|
8
|
+
* documentation exists and that it should load the guiho-s-xdocs skill.
|
|
9
|
+
* 2. The large guiho-s-xdocs skill file, installed (local or global) into the
|
|
10
10
|
* skills directory of one or more AI tools.
|
|
11
11
|
*/
|
|
12
12
|
import type { XDocsAgentAutomationResult, XDocsAgentSettings, XDocsAgentTool, XDocsAgentsInstructionsResult, XDocsCliOptions, XDocsSkillInstallResult, XDocsSkillScope } from './types.js';
|
|
13
13
|
/** Canonical name of the xdocs agent skill. */
|
|
14
|
-
export declare const xdocsSkillName = "guiho-
|
|
15
|
-
/**
|
|
14
|
+
export declare const xdocsSkillName = "guiho-s-xdocs";
|
|
15
|
+
/** Previous skill names that should be removed during install/refresh. */
|
|
16
|
+
export declare const legacyXdocsSkillNames: readonly string[];
|
|
17
|
+
/** Raw contents of the bundled guiho-s-xdocs/SKILL.md, read from disk at
|
|
16
18
|
* runtime (relative to this module) so the compiled library works under both
|
|
17
19
|
* Node and Bun. The file ships with the package in `skills/`. */
|
|
18
20
|
export declare const xdocsSkillContent: string;
|
|
21
|
+
/** Version declared by the bundled skill frontmatter. */
|
|
22
|
+
export declare const xdocsSkillVersion: string | undefined;
|
|
19
23
|
/** All AI tools the skill can be installed for. `agents` is the standard. */
|
|
20
24
|
export declare const xdocsAgentTools: readonly XDocsAgentTool[];
|
|
21
25
|
/** The standard, always-default skill target (AGENTS.md + .agents/skills). */
|
|
@@ -34,7 +38,7 @@ export declare const detectAgentTools: (cwd: string) => XDocsAgentTool[];
|
|
|
34
38
|
*/
|
|
35
39
|
export declare const resolveInstallTools: (cwd: string, toolFlag: string | undefined) => XDocsAgentTool[];
|
|
36
40
|
/** The small AGENTS.md section announcing xdocs and pointing to the skill. */
|
|
37
|
-
export declare const xdocsAgentsSection = "<!-- BEGIN XDOCS \u2014 DO NOT EDIT THIS SECTION -->\n## XDocs Structured Documentation\n\nThis project uses **xdocs** (`@guiho/xdocs`) for structured, machine-readable\ndocumentation. The repository has one root `XDOCS.md` index (no frontmatter),\nand each package/application has a root `.xdocs.md` file. Each module carries a\n`.docs.md` / `.xdocs.md` file with YAML frontmatter (`subject`, `description`,\n`parent`, `children`, `files`).\n\n**Load the `guiho-
|
|
41
|
+
export declare const xdocsAgentsSection = "<!-- BEGIN XDOCS \u2014 DO NOT EDIT THIS SECTION -->\n## XDocs Structured Documentation\n\nThis project uses **xdocs** (`@guiho/xdocs`) for structured, machine-readable\ndocumentation. The repository has one root `XDOCS.md` index (no frontmatter),\nand each package/application has a root `.xdocs.md` file. Each module carries a\n`.docs.md` / `.xdocs.md` file with YAML frontmatter (`subject`, `description`,\n`parent`, `children`, `files`).\n\n**Load the `guiho-s-xdocs` agent skill** for any documentation work:\ncreating, updating, regenerating, scanning, merging, or navigating xdocs files.\nThe skill holds the full workflow, metadata schema, and CLI reference.\n\nBefore changing documentation, read `xdocs.config.toml` and respect `[ai].mode`:\n\n- **prompt** \u2014 announce which xdocs files need updating and wait for confirmation.\n- **auto** \u2014 update the relevant xdocs files immediately.\n\nUse the xdocs CLI for operations: `xdocs scan`, `xdocs tree`, `xdocs generate`,\n`xdocs list`, `xdocs merge`.\n<!-- END XDOCS -->";
|
|
38
42
|
type SkillPathOptions = {
|
|
39
43
|
cwd?: string;
|
|
40
44
|
homeDirectory?: string;
|
|
@@ -68,9 +72,11 @@ export declare const resolveAgentSettings: (options: XDocsCliOptions) => Promise
|
|
|
68
72
|
/**
|
|
69
73
|
* Config-gated automation run by normal commands. Does nothing outside an xdocs
|
|
70
74
|
* project (no config discovered). When enabled, it keeps the AGENTS.md section
|
|
71
|
-
* fresh (only if AGENTS.md already exists) and
|
|
72
|
-
* configured tool
|
|
75
|
+
* fresh (only if AGENTS.md already exists) and refreshes the global skill for
|
|
76
|
+
* the configured tool from the bundled package copy.
|
|
73
77
|
*/
|
|
74
78
|
export declare const runAgentAutomation: (options: AgentAutomationOptions, notify?: (message: string) => void) => Promise<XDocsAgentAutomationResult>;
|
|
79
|
+
/** Read a skill version from SKILL.md YAML frontmatter. */
|
|
80
|
+
export declare function readSkillVersion(content: string): string | undefined;
|
|
75
81
|
export {};
|
|
76
82
|
//# sourceMappingURL=agents.d.ts.map
|
package/library/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../source/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,6BAA6B,EAC7B,eAAe,EACf,uBAAuB,EACvB,eAAe,EAChB,MAAM,YAAY,CAAA;AAInB,+CAA+C;AAC/C,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../source/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,6BAA6B,EAC7B,eAAe,EACf,uBAAuB,EACvB,eAAe,EAChB,MAAM,YAAY,CAAA;AAInB,+CAA+C;AAC/C,eAAO,MAAM,cAAc,kBAAkB,CAAA;AAE7C,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAuB,CAAA;AAE1E;;iEAEiE;AACjE,eAAO,MAAM,iBAAiB,EAAE,MAS5B,CAAA;AAEJ,yDAAyD;AACzD,eAAO,MAAM,iBAAiB,oBAAsC,CAAA;AAEpE,6EAA6E;AAC7E,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAAyB,CAAA;AAE9E,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,EAAE,cAAyB,CAAA;AAEzD,2FAA2F;AAC3F,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,cAAc,EAKzE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,cAAc,EAK5D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,KAAG,cAAc,EAChC,CAAA;AAkB9D,8EAA8E;AAC9E,eAAO,MAAM,kB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AK,IAAe,KAC3C,OAAO,CAAC,0BAA0B,CAmBpC,CAAA;AAED,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE"}
|
package/library/agents.js
CHANGED
|
@@ -5,19 +5,21 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Two distinct things live here:
|
|
7
7
|
* 1. The small AGENTS.md section that tells any AI agent that xdocs structured
|
|
8
|
-
* documentation exists and that it should load the guiho-
|
|
9
|
-
* 2. The large guiho-
|
|
8
|
+
* documentation exists and that it should load the guiho-s-xdocs skill.
|
|
9
|
+
* 2. The large guiho-s-xdocs skill file, installed (local or global) into the
|
|
10
10
|
* skills directory of one or more AI tools.
|
|
11
11
|
*/
|
|
12
12
|
import { existsSync, readFileSync } from 'node:fs';
|
|
13
|
-
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
13
|
+
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
14
14
|
import { homedir } from 'node:os';
|
|
15
15
|
import { dirname, isAbsolute, resolve } from 'node:path';
|
|
16
16
|
import { discoverConfig, normalizeAgentSettings } from './config.js';
|
|
17
17
|
import { XDocsError } from './errors.js';
|
|
18
18
|
/** Canonical name of the xdocs agent skill. */
|
|
19
|
-
export const xdocsSkillName = 'guiho-
|
|
20
|
-
/**
|
|
19
|
+
export const xdocsSkillName = 'guiho-s-xdocs';
|
|
20
|
+
/** Previous skill names that should be removed during install/refresh. */
|
|
21
|
+
export const legacyXdocsSkillNames = ['guiho-as-xdocs'];
|
|
22
|
+
/** Raw contents of the bundled guiho-s-xdocs/SKILL.md, read from disk at
|
|
21
23
|
* runtime (relative to this module) so the compiled library works under both
|
|
22
24
|
* Node and Bun. The file ships with the package in `skills/`. */
|
|
23
25
|
export const xdocsSkillContent = (() => {
|
|
@@ -25,12 +27,14 @@ export const xdocsSkillContent = (() => {
|
|
|
25
27
|
if (embedded)
|
|
26
28
|
return embedded;
|
|
27
29
|
try {
|
|
28
|
-
return readFileSync(new URL('../skills/guiho-
|
|
30
|
+
return readFileSync(new URL('../skills/guiho-s-xdocs/SKILL.md', import.meta.url), 'utf8');
|
|
29
31
|
}
|
|
30
32
|
catch {
|
|
31
33
|
return '';
|
|
32
34
|
}
|
|
33
35
|
})();
|
|
36
|
+
/** Version declared by the bundled skill frontmatter. */
|
|
37
|
+
export const xdocsSkillVersion = readSkillVersion(xdocsSkillContent);
|
|
34
38
|
/** All AI tools the skill can be installed for. `agents` is the standard. */
|
|
35
39
|
export const xdocsAgentTools = ['agents', 'claude'];
|
|
36
40
|
/** The standard, always-default skill target (AGENTS.md + .agents/skills). */
|
|
@@ -65,7 +69,7 @@ export const resolveInstallTools = (cwd, toolFlag) => toolFlag ? parseAgentTools
|
|
|
65
69
|
/**
|
|
66
70
|
* Skill directory for each tool, relative to the scope root (project root for
|
|
67
71
|
* `local`, home directory for `global`). The skill is written to
|
|
68
|
-
* `<root>/<dir>/guiho-
|
|
72
|
+
* `<root>/<dir>/guiho-s-xdocs/SKILL.md`.
|
|
69
73
|
*
|
|
70
74
|
* `agents` is the cross-tool standard (OpenCode, Codex, Jules, and any AGENTS.md
|
|
71
75
|
* tool read it). `claude` is the non-standard Claude Code location.
|
|
@@ -99,9 +103,10 @@ Use the xdocs CLI for operations: \`xdocs scan\`, \`xdocs tree\`, \`xdocs genera
|
|
|
99
103
|
\`xdocs list\`, \`xdocs merge\`.
|
|
100
104
|
${AGENTS_END_MARKER}`;
|
|
101
105
|
/** Resolve the on-disk path of the skill file for a tool and scope. */
|
|
102
|
-
export const resolveSkillPath = (tool, scope, options = {}) =>
|
|
106
|
+
export const resolveSkillPath = (tool, scope, options = {}) => resolveNamedSkillPath(tool, scope, xdocsSkillName, options);
|
|
107
|
+
const resolveNamedSkillPath = (tool, scope, skillName, options = {}) => {
|
|
103
108
|
const root = scope === 'local' ? resolve(options.cwd ?? process.cwd()) : resolveAgentHome(options.homeDirectory);
|
|
104
|
-
return resolve(root, skillDirectories[tool],
|
|
109
|
+
return resolve(root, skillDirectories[tool], skillName, 'SKILL.md');
|
|
105
110
|
};
|
|
106
111
|
/** Whether the skill is already installed for a tool and scope. */
|
|
107
112
|
export const isSkillInstalled = (tool, scope, options = {}) => existsSync(resolveSkillPath(tool, scope, options));
|
|
@@ -109,14 +114,28 @@ export const isSkillInstalled = (tool, scope, options = {}) => existsSync(resolv
|
|
|
109
114
|
export const installSkill = async (tool, scope, options = {}) => {
|
|
110
115
|
const path = resolveSkillPath(tool, scope, options);
|
|
111
116
|
const exists = existsSync(path);
|
|
112
|
-
if (exists && options.overwrite === false)
|
|
113
|
-
return { tool, scope, path, installed: false, updated: false };
|
|
114
117
|
const current = exists ? await readFile(path, 'utf8') : undefined;
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
const previousVersion = current ? readSkillVersion(current) : undefined;
|
|
119
|
+
const bundledVersion = xdocsSkillVersion;
|
|
120
|
+
if (exists && options.overwrite === false) {
|
|
121
|
+
return { tool, scope, path, installed: false, updated: false, removedLegacyPaths: [], previousVersion, bundledVersion };
|
|
122
|
+
}
|
|
123
|
+
const removedLegacyPaths = [];
|
|
124
|
+
for (const legacyName of legacyXdocsSkillNames) {
|
|
125
|
+
const legacyPath = resolveNamedSkillPath(tool, scope, legacyName, options);
|
|
126
|
+
if (!existsSync(legacyPath))
|
|
127
|
+
continue;
|
|
128
|
+
await rm(dirname(legacyPath), { recursive: true, force: true });
|
|
129
|
+
removedLegacyPaths.push(legacyPath);
|
|
130
|
+
}
|
|
131
|
+
if (current === xdocsSkillContent) {
|
|
132
|
+
return { tool, scope, path, installed: false, updated: false, removedLegacyPaths, previousVersion, bundledVersion };
|
|
133
|
+
}
|
|
134
|
+
if (exists)
|
|
135
|
+
await rm(dirname(path), { recursive: true, force: true });
|
|
117
136
|
await mkdir(dirname(path), { recursive: true });
|
|
118
137
|
await writeFile(path, xdocsSkillContent, 'utf8');
|
|
119
|
-
return { tool, scope, path, installed: !exists, updated: exists };
|
|
138
|
+
return { tool, scope, path, installed: !exists, updated: exists, removedLegacyPaths, previousVersion, bundledVersion };
|
|
120
139
|
};
|
|
121
140
|
/** Install the skill for several tools at once. */
|
|
122
141
|
export const installSkills = async (tools, scope, options = {}) => {
|
|
@@ -191,8 +210,8 @@ export const resolveAgentSettings = async (options) => {
|
|
|
191
210
|
/**
|
|
192
211
|
* Config-gated automation run by normal commands. Does nothing outside an xdocs
|
|
193
212
|
* project (no config discovered). When enabled, it keeps the AGENTS.md section
|
|
194
|
-
* fresh (only if AGENTS.md already exists) and
|
|
195
|
-
* configured tool
|
|
213
|
+
* fresh (only if AGENTS.md already exists) and refreshes the global skill for
|
|
214
|
+
* the configured tool from the bundled package copy.
|
|
196
215
|
*/
|
|
197
216
|
export const runAgentAutomation = async (options, notify = () => { }) => {
|
|
198
217
|
const cwd = resolve(options.cwd);
|
|
@@ -203,13 +222,39 @@ export const runAgentAutomation = async (options, notify = () => { }) => {
|
|
|
203
222
|
const result = { settings };
|
|
204
223
|
if (settings.autoAgentsMd)
|
|
205
224
|
result.agentsMd = await ensureAgentsInstructions(cwd, false);
|
|
206
|
-
if (settings.autoSkillInstall
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
225
|
+
if (settings.autoSkillInstall) {
|
|
226
|
+
const globalSkill = await installSkill(settings.skillTool, 'global', { cwd, homeDirectory: options.homeDirectory });
|
|
227
|
+
const changed = globalSkill.installed || globalSkill.updated || globalSkill.removedLegacyPaths.length > 0;
|
|
228
|
+
if (changed)
|
|
229
|
+
notify(`notice: ${xdocsSkillName} skill refreshed globally at ${globalSkill.path}`);
|
|
230
|
+
result.globalSkill = globalSkill;
|
|
210
231
|
}
|
|
211
232
|
return result;
|
|
212
233
|
};
|
|
234
|
+
/** Read a skill version from SKILL.md YAML frontmatter. */
|
|
235
|
+
export function readSkillVersion(content) {
|
|
236
|
+
return readSkillFrontmatterValue(content, 'version');
|
|
237
|
+
}
|
|
238
|
+
function readSkillFrontmatterValue(content, key) {
|
|
239
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
240
|
+
if (!match)
|
|
241
|
+
return undefined;
|
|
242
|
+
const frontmatter = match[1];
|
|
243
|
+
if (frontmatter === undefined)
|
|
244
|
+
return undefined;
|
|
245
|
+
for (const line of frontmatter.split(/\r?\n/)) {
|
|
246
|
+
const separator = line.indexOf(':');
|
|
247
|
+
if (separator === -1)
|
|
248
|
+
continue;
|
|
249
|
+
if (line.slice(0, separator).trim() !== key)
|
|
250
|
+
continue;
|
|
251
|
+
const value = line.slice(separator + 1).trim();
|
|
252
|
+
if (!value)
|
|
253
|
+
return undefined;
|
|
254
|
+
return value.replace(/^['"]|['"]$/g, '');
|
|
255
|
+
}
|
|
256
|
+
return undefined;
|
|
257
|
+
}
|
|
213
258
|
const resolveAgentHome = (homeDirectory) => {
|
|
214
259
|
const value = homeDirectory ?? process.env['XDOCS_AGENT_HOME'] ?? homedir();
|
|
215
260
|
return isAbsolute(value) ? value : resolve(process.cwd(), value);
|
|
@@ -22,7 +22,7 @@ export const runAgents = async (options, parsed) => {
|
|
|
22
22
|
throw new XDocsError(`Missing agents subcommand.\n\n${USAGE}`);
|
|
23
23
|
throw new XDocsError(`Unknown agents subcommand: "${sub}"\n\n${USAGE}`);
|
|
24
24
|
};
|
|
25
|
-
/** Install the guiho-
|
|
25
|
+
/** Install the guiho-s-xdocs skill for one or more tools. */
|
|
26
26
|
const runInstall = async (options, parsed) => {
|
|
27
27
|
const scope = parseScope(parsed.positionals[1]);
|
|
28
28
|
const tools = resolveInstallTools(options.cwd, stringFlag(parsed.flags, 'tool'));
|
|
@@ -60,5 +60,8 @@ const formatInstall = (result) => [
|
|
|
60
60
|
`path: ${result.path}`,
|
|
61
61
|
`installed: ${result.installed}`,
|
|
62
62
|
`updated: ${result.updated}`,
|
|
63
|
+
`bundled_version: ${result.bundledVersion ?? ''}`,
|
|
64
|
+
`previous_version: ${result.previousVersion ?? ''}`,
|
|
65
|
+
`removed_legacy: ${result.removedLegacyPaths.join(', ')}`,
|
|
63
66
|
'',
|
|
64
67
|
].join('\n');
|
package/library/commands/init.js
CHANGED
|
@@ -46,7 +46,7 @@ export const runInit = async (options, parsed) => {
|
|
|
46
46
|
await writeFile(xdocsPath, createRootXDocsContent(basename(cwd)), 'utf8');
|
|
47
47
|
process.stdout.write(`created: XDOCS.md\n`);
|
|
48
48
|
}
|
|
49
|
-
// 3. Update AGENTS.md (announce xdocs + point AI at the guiho-
|
|
49
|
+
// 3. Update AGENTS.md (announce xdocs + point AI at the guiho-s-xdocs skill)
|
|
50
50
|
const agentsExisted = findAgentsFile(cwd) !== undefined;
|
|
51
51
|
const agentsResult = await ensureAgentsInstructions(cwd, true);
|
|
52
52
|
if (!agentsExisted) {
|
|
@@ -58,7 +58,7 @@ export const runInit = async (options, parsed) => {
|
|
|
58
58
|
else {
|
|
59
59
|
process.stdout.write(`exists: AGENTS.md (xdocs section already present)\n`);
|
|
60
60
|
}
|
|
61
|
-
// 4. Install the guiho-
|
|
61
|
+
// 4. Install the guiho-s-xdocs agent skill (standard by default; non-standard
|
|
62
62
|
// tools only when explicitly requested via --tool or detected in the project)
|
|
63
63
|
const scope = booleanFlag(parsed.flags, 'global') ? 'global' : 'local';
|
|
64
64
|
const tools = resolveInstallTools(cwd, stringFlag(parsed.flags, 'tool'));
|
|
@@ -68,7 +68,7 @@ export const runInit = async (options, parsed) => {
|
|
|
68
68
|
if (result.installed) {
|
|
69
69
|
process.stdout.write(`installed: ${xdocsSkillName} skill (${tool}, ${scope}) -> ${where}\n`);
|
|
70
70
|
}
|
|
71
|
-
else if (result.updated) {
|
|
71
|
+
else if (result.updated || result.removedLegacyPaths.length > 0) {
|
|
72
72
|
process.stdout.write(`updated: ${xdocsSkillName} skill (${tool}, ${scope})\n`);
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
@@ -13,7 +13,7 @@ import agentsPrompt from '../prompts/agents.md' with { type: 'text' };
|
|
|
13
13
|
// @ts-expect-error -- Bun text import for native binary embedding.
|
|
14
14
|
import generatePrompt from '../prompts/generate.md' with { type: 'text' };
|
|
15
15
|
// @ts-expect-error -- Bun text import for native binary embedding.
|
|
16
|
-
import xdocsSkill from '../skills/guiho-
|
|
16
|
+
import xdocsSkill from '../skills/guiho-s-xdocs/SKILL.md' with { type: 'text' };
|
|
17
17
|
import packageJson from '../package.json' with { type: 'json' };
|
|
18
18
|
/** Register prompt/skill/package resources for a native compiled binary. */
|
|
19
19
|
export const registerEmbeddedResources = () => {
|
package/library/guiho-xdocs.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export { extractFrontmatter, parseXDocsFile, validateMetadata } from './metadata
|
|
|
10
10
|
export { buildTree, renderTree, renderTreeMarkdown, validateTree } from './tree.js';
|
|
11
11
|
export { readPackageVersion, showCommandHelp, showHelp, showVersion } from './help.js';
|
|
12
12
|
export { getPrompt, getPromptNames, prompts } from './prompts.js';
|
|
13
|
-
export { detectAgentTools, ensureAgentsInstructions, findAgentsFile, installSkill, installSkills, isSkillInstalled, parseAgentTools, resolveAgentSettings, resolveInstallTools, resolveSkillPath, runAgentAutomation, standardAgentTool, xdocsAgentsSection, xdocsAgentTools, xdocsSkillContent, xdocsSkillName, } from './agents.js';
|
|
13
|
+
export { detectAgentTools, ensureAgentsInstructions, findAgentsFile, installSkill, installSkills, isSkillInstalled, legacyXdocsSkillNames, parseAgentTools, readSkillVersion, resolveAgentSettings, resolveInstallTools, resolveSkillPath, runAgentAutomation, standardAgentTool, xdocsAgentsSection, xdocsAgentTools, xdocsSkillContent, xdocsSkillName, xdocsSkillVersion, } from './agents.js';
|
|
14
14
|
export { runCli, runCliWithErrorHandling } from './cli.js';
|
|
15
15
|
//# sourceMappingURL=guiho-xdocs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guiho-xdocs.d.ts","sourceRoot":"","sources":["../source/guiho-xdocs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,SAAS,EA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gB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA"}
|
package/library/guiho-xdocs.js
CHANGED
|
@@ -18,6 +18,6 @@ export { readPackageVersion, showCommandHelp, showHelp, showVersion } from './he
|
|
|
18
18
|
// Prompts
|
|
19
19
|
export { getPrompt, getPromptNames, prompts } from './prompts.js';
|
|
20
20
|
// Agents
|
|
21
|
-
export { detectAgentTools, ensureAgentsInstructions, findAgentsFile, installSkill, installSkills, isSkillInstalled, parseAgentTools, resolveAgentSettings, resolveInstallTools, resolveSkillPath, runAgentAutomation, standardAgentTool, xdocsAgentsSection, xdocsAgentTools, xdocsSkillContent, xdocsSkillName, } from './agents.js';
|
|
21
|
+
export { detectAgentTools, ensureAgentsInstructions, findAgentsFile, installSkill, installSkills, isSkillInstalled, legacyXdocsSkillNames, parseAgentTools, readSkillVersion, resolveAgentSettings, resolveInstallTools, resolveSkillPath, runAgentAutomation, standardAgentTool, xdocsAgentsSection, xdocsAgentTools, xdocsSkillContent, xdocsSkillName, xdocsSkillVersion, } from './agents.js';
|
|
22
22
|
// CLI
|
|
23
23
|
export { runCli, runCliWithErrorHandling } from './cli.js';
|
package/library/help.js
CHANGED
|
@@ -32,7 +32,7 @@ Commands:
|
|
|
32
32
|
merge [path] Merge xdocs files from a directory into one file
|
|
33
33
|
tree Display the project hierarchy tree
|
|
34
34
|
list [path] List files with descriptions
|
|
35
|
-
agents Install the guiho-
|
|
35
|
+
agents Install the guiho-s-xdocs skill and AGENTS.md instructions
|
|
36
36
|
|
|
37
37
|
Global Flags:
|
|
38
38
|
-h, --help Show help for a command
|
|
@@ -69,7 +69,7 @@ Creates:
|
|
|
69
69
|
- XDOCS.md Root documentation file
|
|
70
70
|
- xdocs.config.toml Configuration with defaults
|
|
71
71
|
- Updates AGENTS.md Adds the xdocs section pointing AI at the skill
|
|
72
|
-
- Installs the skill guiho-
|
|
72
|
+
- Installs the skill guiho-s-xdocs into .agents/skills (standard, local)
|
|
73
73
|
|
|
74
74
|
By default the skill is installed for the standard target (AGENTS.md +
|
|
75
75
|
.agents/skills). The non-standard claude target (.claude/skills) is added only
|
|
@@ -175,7 +175,7 @@ Flags:
|
|
|
175
175
|
--verbose Show detailed output
|
|
176
176
|
`.trim(),
|
|
177
177
|
agents: `
|
|
178
|
-
xdocs agents - Install the guiho-
|
|
178
|
+
xdocs agents - Install the guiho-s-xdocs skill and AGENTS.md instructions
|
|
179
179
|
|
|
180
180
|
Usage:
|
|
181
181
|
xdocs agents install <local|global> [--tool <tool>]
|
|
@@ -187,8 +187,8 @@ Subcommands:
|
|
|
187
187
|
instructions Insert or refresh the xdocs section in AGENTS.md
|
|
188
188
|
|
|
189
189
|
Skill locations:
|
|
190
|
-
agents (standard) <root>/.agents/skills/guiho-
|
|
191
|
-
claude (non-standard) <root>/.claude/skills/guiho-
|
|
190
|
+
agents (standard) <root>/.agents/skills/guiho-s-xdocs/SKILL.md
|
|
191
|
+
claude (non-standard) <root>/.claude/skills/guiho-s-xdocs/SKILL.md
|
|
192
192
|
|
|
193
193
|
<root> is the project for local scope, or the user home directory for global.
|
|
194
194
|
Without --tool, the standard agents target is installed, plus claude when a
|
package/library/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type XDocsFormat = 'text' | 'json' | 'markdown';
|
|
|
7
7
|
export type XDocsAiMode = 'prompt' | 'auto';
|
|
8
8
|
/** Command names recognized by the CLI. */
|
|
9
9
|
export type XDocsCommand = 'init' | 'scan' | 'generate' | 'prompt' | 'merge' | 'tree' | 'list' | 'agents';
|
|
10
|
-
/** AI tools the guiho-
|
|
10
|
+
/** AI tools the guiho-s-xdocs skill can be installed for.
|
|
11
11
|
*
|
|
12
12
|
* `agents` is the standard target (AGENTS.md + .agents/skills) and the default.
|
|
13
13
|
* `claude` is a non-standard target (.claude/skills) used only when explicitly
|
|
@@ -125,13 +125,16 @@ export type XDocsPrompt = {
|
|
|
125
125
|
description: string;
|
|
126
126
|
body: string;
|
|
127
127
|
};
|
|
128
|
-
/** Result of installing the guiho-
|
|
128
|
+
/** Result of installing the guiho-s-xdocs skill for one tool/scope. */
|
|
129
129
|
export type XDocsSkillInstallResult = {
|
|
130
130
|
tool: XDocsAgentTool;
|
|
131
131
|
scope: XDocsSkillScope;
|
|
132
132
|
path: string;
|
|
133
133
|
installed: boolean;
|
|
134
134
|
updated: boolean;
|
|
135
|
+
removedLegacyPaths: string[];
|
|
136
|
+
previousVersion?: string;
|
|
137
|
+
bundledVersion?: string;
|
|
135
138
|
};
|
|
136
139
|
/** Result of ensuring the xdocs section exists in AGENTS.md. */
|
|
137
140
|
export type XDocsAgentsInstructionsResult = {
|
package/library/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../source/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iDAAiD;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;AAEtD,kDAAkD;AAClD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE3C,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEzG;;;;iCAIiC;AACjC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEhD,4CAA4C;AAC5C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEhD,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,MAAM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AAoB,EAAE,MAAM,CAAA;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,sDAAsD;AACtD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAA;AAExE,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,uEAAuE;AACvE,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,cAAc,CAAA;IACpB,KAAK,EAAE,eAAe,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,gFAAgF;AAChF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,QAAQ,CAAC,EAAE,6BAA6B,CAAA;IACxC,WAAW,CAAC,EAAE,uBAAuB,CAAA;CACtC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiho/xdocs",
|
|
3
3
|
"description": "Structured documentation system for codebases. Helps AI make sense of projects.",
|
|
4
|
-
"version": "0.3.0-alpha.
|
|
4
|
+
"version": "0.3.0-alpha.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./library/guiho-xdocs.js",
|
|
7
7
|
"types": "./library/guiho-xdocs.d.ts",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: guiho-
|
|
2
|
+
name: guiho-s-xdocs
|
|
3
|
+
version: 0.3.0-alpha.2
|
|
3
4
|
description: Use this skill whenever the user works with xdocs (`@guiho/xdocs`) structured documentation, AND proactively whenever you create a new module or subdirectory or add/change/remove files in a directory of an xdocs project, so you create or update that directory's `.xdocs.md` as part of the change. This includes creating, updating, or regenerating `.docs.md` / `.xdocs.md` files, the root `XDOCS.md`, the project tree, scanning documentation coverage, merging docs, or maintaining xdocs metadata and AGENTS.md guidance, even when the user only says "document this module", "update the docs", or "what does this folder do" without naming xdocs.
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -178,11 +179,11 @@ name = "my-project"
|
|
|
178
179
|
|
|
179
180
|
[agents]
|
|
180
181
|
auto_agents_md = true # keep the xdocs section in AGENTS.md up to date on normal commands
|
|
181
|
-
auto_skill_install = true # install the guiho-
|
|
182
|
+
auto_skill_install = true # install or refresh the guiho-s-xdocs skill globally
|
|
182
183
|
skill_tool = "agents" # default tool for auto-install: agents (standard) or claude
|
|
183
184
|
```
|
|
184
185
|
|
|
185
|
-
Agent automation options default to true. Set `auto_agents_md = false` to stop xdocs from touching AGENTS.md, and `auto_skill_install = false` to stop xdocs from installing `guiho-
|
|
186
|
+
Agent automation options default to true. Set `auto_agents_md = false` to stop xdocs from touching AGENTS.md, and `auto_skill_install = false` to stop xdocs from installing or refreshing `guiho-s-xdocs` globally.
|
|
186
187
|
|
|
187
188
|
## CLI Reference
|
|
188
189
|
|
|
@@ -194,8 +195,8 @@ xdocs list <path> # list files in a scope with descriptions
|
|
|
194
195
|
xdocs generate [path] # draft documentation for a directory or the whole project
|
|
195
196
|
xdocs merge [path] # merge a directory's xdocs files into one document
|
|
196
197
|
xdocs prompt --name=<name> # print a ready-made AI prompt (write|update|agents|generate)
|
|
197
|
-
xdocs agents install local # install guiho-
|
|
198
|
-
xdocs agents install global # install guiho-
|
|
198
|
+
xdocs agents install local # install guiho-s-xdocs into this project (.agents/skills/...)
|
|
199
|
+
xdocs agents install global # install guiho-s-xdocs into the user home skills directory
|
|
199
200
|
xdocs agents instructions # insert/refresh the xdocs section in AGENTS.md
|
|
200
201
|
```
|
|
201
202
|
|
|
@@ -203,7 +204,7 @@ Global flags: `--help`, `--version`, `--cwd <path>`, `--config <path>`, `--forma
|
|
|
203
204
|
|
|
204
205
|
## Agent Skill Installation
|
|
205
206
|
|
|
206
|
-
xdocs ships this `guiho-
|
|
207
|
+
xdocs ships this `guiho-s-xdocs` skill. The **standard** target is `AGENTS.md`
|
|
207
208
|
plus `.agents/skills`, which OpenCode, Codex, Jules, and any AGENTS.md-aware tool
|
|
208
209
|
read. A **non-standard** Claude Code target exists and is used only when it is
|
|
209
210
|
explicitly requested (`--tool claude`) or detected (a `.claude` directory or
|
|
@@ -211,8 +212,8 @@ explicitly requested (`--tool claude`) or detected (a `.claude` directory or
|
|
|
211
212
|
|
|
212
213
|
| Target | Skill location (local) |
|
|
213
214
|
| ----------------------- | ------------------------------------------- |
|
|
214
|
-
| **agents** (standard) | `.agents/skills/guiho-
|
|
215
|
-
| **claude** (non-standard) | `.claude/skills/guiho-
|
|
215
|
+
| **agents** (standard) | `.agents/skills/guiho-s-xdocs/SKILL.md` |
|
|
216
|
+
| **claude** (non-standard) | `.claude/skills/guiho-s-xdocs/SKILL.md` |
|
|
216
217
|
|
|
217
218
|
`local` scope installs under the current project; `global` scope installs under
|
|
218
219
|
the user home directory (`~/.agents/skills/...`). The small section in `AGENTS.md`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
subject: xdocs-skills
|
|
3
|
+
description: Bundled AI-agent skills shipped with @guiho/xdocs and installed by the xdocs agents commands.
|
|
4
|
+
parent: xdocs-package
|
|
5
|
+
children: []
|
|
6
|
+
files:
|
|
7
|
+
guiho-s-xdocs/SKILL.md: Versioned xdocs workflow skill installed into .agents/skills or .claude/skills; replaces legacy guiho-as-xdocs installs when refreshed.
|
|
8
|
+
tags:
|
|
9
|
+
- skills
|
|
10
|
+
- agents
|
|
11
|
+
- documentation
|
|
12
|
+
flags: []
|
|
13
|
+
status: stable
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
The `skills/` directory contains the bundled `guiho-s-xdocs` agent skill. The
|
|
17
|
+
installer treats this packaged skill as the current source of truth, removes
|
|
18
|
+
legacy `guiho-as-xdocs` install directories, and refreshes installed copies when
|
|
19
|
+
their frontmatter version or content differs from the bundled file.
|