Inventory artefacts from internal project and external sources. Triggered by /gse:collect.
Arguments: $ARGUMENTS
| Flag / Sub-command | Description |
|---|---|
| (no args) | Run internal inventory of current project |
<path> | Scan a local directory as an external source |
<url> | Scan a GitHub repository URL as an external source |
--refresh | Re-scan and update existing inventory |
--sources | List all registered external sources |
--help | Show this command's usage summary |
Before executing, read:
.gse/status.yaml — current sprint context.gse/config.yaml — project configuration.gse/sources.yaml — existing source inventory (if any).gse/backlog.yaml — current backlog (for cross-referencing).gse/profile.yaml — user profile (apply P9 Adaptive Communication to all output)Triggered when no arguments are provided. Inventories the current project.
Recursively scan the project directory, excluding .git/, __pycache__/, node_modules/, .gse/local/.
For each file, record:
For each sprint directory in docs/sprints/:
List all files in docs/learning/:
Capture:
Read project manifest (pyproject.toml, package.json, Cargo.toml, go.mod):
Save to .gse/inventory.yaml and display summary:
Internal Inventory — 2026-01-20
───────────────────────────────
Files scanned: 47
Tracked artefacts: 32 (with frontmatter)
Untracked files: 8 (infrastructure)
Orphan files: 7 (no frontmatter, not in manifest)
Sprint S02:
Plan: ✓ complete
Requirements: ✓ 5 REQs defined
Design: ⚠ partial (2/4 components documented)
Code: ● 3 files in-progress
Tests: ✗ not started
Learning notes: 12 (2 stale)
Dependencies: 15 direct (1 outdated)
Git state: clean, 2 branches ahead of remote
Triggered when arguments contain a file path or URL.
For local paths:
.gitignore if presentFor GitHub URLs:
For each significant element in the source (files, modules, components):
Evaluate:
| Assessment | Meaning |
|---|---|
| Reusable as-is | Can be copied/referenced directly with no changes |
| Adaptable | Useful but requires modification for this project |
| Reference only | Useful to study but cannot be directly reused |
| Incompatible | Does not fit this project (wrong language, paradigm, license) |
Present each element group as a Gate decision:
External Source: github.com/example/auth-library
──────────────────────────────────────────────
SRC-001 auth/jwt.py Reusable as-is JWT token generation/validation
SRC-002 auth/oauth.py Adaptable OAuth2 flow (needs config changes)
SRC-003 auth/tests/ Reusable as-is Test suite for auth module
SRC-004 docs/api-guide.md Reference only API documentation patterns
SRC-005 auth/ldap.py Incompatible LDAP integration (not needed)
For each element, choose: [Include] / [Skip] / [Discuss]
Wait for user decision on each element (or batch approval).
Save accepted elements to .gse/sources.yaml: