Codex

index

Build, query, inspect dependencies, and report statistics for the searchable index of SDLC artifacts in .aiwg/

104 stars

Best use case

index is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

It is a strong fit for teams already working in Codex.

Build, query, inspect dependencies, and report statistics for the searchable index of SDLC artifacts in .aiwg/

Teams using index should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/index/SKILL.md --create-dirs "https://raw.githubusercontent.com/jmagly/aiwg/main/.agents/skills/index/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/index/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How index Compares

Feature / AgentindexStandard Approach
Platform SupportCodexLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Build, query, inspect dependencies, and report statistics for the searchable index of SDLC artifacts in .aiwg/

Which AI agents support this skill?

This skill is designed for Codex.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Artifact Index

You manage the AIWG artifact index — building or rebuilding the searchable index of all SDLC artifacts in `.aiwg/`, querying it by text, inspecting dependency graphs, and reporting index statistics.

## Triggers

Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):

- "index my artifacts" → build
- "find requirements about authentication" → query "authentication"
- "what depends on UC-001" → deps .aiwg/requirements/UC-001.md
- "how many artifacts are indexed" → stats
- "refresh the index" → build --force

## Trigger Patterns Reference

| Pattern | Example | Action |
|---------|---------|--------|
| Build index | "build the artifact index" | Run `aiwg index build` |
| Force rebuild | "rebuild the index from scratch" | Run `aiwg index build --force --verbose` |
| Text search | "search artifacts for authentication" | Run `aiwg index query "authentication"` |
| Dependency graph | "show dependencies for the SAD" | Run `aiwg index deps .aiwg/architecture/software-architecture-doc.md` |
| Statistics | "how many artifacts are indexed?" | Run `aiwg index stats` |
| JSON output | "get index stats as JSON" | Run `aiwg index stats --json` |

## Behavior

When triggered:

1. **Identify the subcommand**:
   - Is the user building, searching, inspecting dependencies, or checking stats?
   - Is a specific artifact path or query mentioned?
   - Is `--force`, `--verbose`, or `--json` appropriate?

2. **Run the appropriate command**:

   ```bash
   # Build or rebuild the index
   aiwg index build

   # Full rebuild with progress output
   aiwg index build --force --verbose

   # Semantic search across all artifacts
   aiwg index query "<text>"

   # Machine-readable search results
   aiwg index query "<text>" --json

   # Show dependency graph for an artifact
   aiwg index deps <artifact-path>

   # Machine-readable dependency graph
   aiwg index deps <artifact-path> --json

   # Show index statistics
   aiwg index stats

   # Machine-readable statistics
   aiwg index stats --json
   ```

3. **Report the result** — surface the relevant matches, dependencies, or counts.

## Examples

### Example 1: Build the index

**User**: "Build the artifact index"

**Extraction**: Build subcommand, no flags

**Action**:
```bash
aiwg index build
```

**Response**: "Index built. Indexed 47 artifacts across 8 categories in .aiwg/. Run `aiwg index query` to search."

### Example 2: Force rebuild with progress

**User**: "Rebuild the index from scratch"

**Extraction**: Build subcommand, --force --verbose

**Action**:
```bash
aiwg index build --force --verbose
```

**Response**: "Full rebuild complete. Scanned 52 files, indexed 47 artifacts (5 skipped: working/). Categories: requirements (12), architecture (8), testing (7), security (5), deployment (4), planning (6), risks (5)."

### Example 3: Text search

**User**: "Search artifacts for anything about authentication"

**Extraction**: Query subcommand, text = authentication

**Action**:
```bash
aiwg index query "authentication"
```

**Response**: "5 artifacts match 'authentication': UC-003-user-authentication.md (requirements), SAD section 4.2 (architecture), threat-model-v1.md (security), test-plan-auth.md (testing), deployment-runbook.md (deployment)."

### Example 4: Dependency inspection

**User**: "What does UC-001 depend on, and what depends on it?"

**Extraction**: Deps subcommand, artifact = .aiwg/requirements/UC-001.md

**Action**:
```bash
aiwg index deps .aiwg/requirements/UC-001.md
```

**Response**: "UC-001 (User Registration) dependencies: none (root artifact). Dependents: UC-003-user-authentication.md, test-plan-registration.md, SAD section 3.1, deployment-runbook.md."

### Example 5: Index statistics

**User**: "How many artifacts are indexed?"

**Extraction**: Stats subcommand

**Action**:
```bash
aiwg index stats
```

**Response**: "Index contains 47 artifacts. Coverage: 90% (5 unindexed files in working/). Last built: 2026-04-01T14:22:00Z. Categories with highest artifact count: requirements (12), architecture (8), testing (7)."

## Clarification Prompts

If the user's intent is ambiguous:

- "Are you looking to search for existing artifacts, or rebuild the index so new artifacts are discoverable?"
- "Do you want to see what an artifact depends on, or what other artifacts depend on it? (I can show both)"

## References

- @$AIWG_ROOT/src/cli/handlers/subcommands.ts — Index subcommand handler
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference (index section)
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC artifact structure

Related Skills

corpus-index-build

104
from jmagly/aiwg

Build graph indices (by-topic, by-year, authors, citation-network) from corpus state using definitions in .aiwg/config.yaml. Replaces manual 3-agent dispatch with a single command.

Codex

build-artifact-index

104
from jmagly/aiwg

Build or rebuild the SDLC artifact index for agent-navigable discovery

Codex

aiwg-orchestrate

104
from jmagly/aiwg

Route structured artifact work to AIWG workflows via MCP with zero parent context cost

venv-manager

104
from jmagly/aiwg

Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.

pytest-runner

104
from jmagly/aiwg

Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.

vitest-runner

104
from jmagly/aiwg

Execute JavaScript/TypeScript tests with Vitest, supporting coverage, watch mode, and parallel execution. Use for JS/TS test automation.

eslint-checker

104
from jmagly/aiwg

Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.

repo-analyzer

104
from jmagly/aiwg

Analyze GitHub repositories for structure, documentation, dependencies, and contribution patterns. Use for codebase understanding and health assessment.

pr-reviewer

104
from jmagly/aiwg

Review GitHub pull requests for code quality, security, and best practices. Use for automated PR feedback and approval workflows.

YouTube Acquisition

104
from jmagly/aiwg

yt-dlp patterns for acquiring content from YouTube and video platforms

Quality Filtering

104
from jmagly/aiwg

Accept/reject logic and quality scoring heuristics for media content

Provenance Tracking

104
from jmagly/aiwg

W3C PROV-O patterns for tracking media derivation chains and production history