---
namespace: aiwg
name: build-artifact-index-4927c4faaf6e
platforms: [all]
description: Build or rebuild the SDLC artifact index for agent-navigable discovery
commandHint:
  argumentHint: '[--force] [--verbose] [--interactive] [--guidance "text"]'
  allowedTools: 'Read, Write, Glob, Grep, Bash'
  model: haiku
  category: documentation-tracking
  modelRole: efficiency
  modelTier: economy
---

# Build Artifact Index

## Task

Build or refresh the artifact index that powers `aiwg index query`, `aiwg index deps`, and `aiwg index stats`. This is the entry point for ensuring agents can discover and navigate project artifacts efficiently.

## Behavior

### Primary: Use `aiwg index build`

```bash
# Standard rebuild (incremental)
aiwg index build

# Full rebuild (ignore cache)
aiwg index build --force

# With progress output
aiwg index build --verbose

# Build every configured graph
aiwg index build --all
```

Report what changed: new artifacts indexed, updated, unchanged, and removed counts.

If the operator explicitly asks for Fortemi Core cache refresh after a
successful build, run:

```bash
aiwg index sync
aiwg index status --json
```

Fortemi Core is the default artifact search backend after sync. Keep the
legacy local backend available behind `--backend local` during the phase-out
window.

### Archived Query Answers

The index includes files in `.aiwg/working/answers/` automatically. These are answers persisted by the `archive-answer` skill and appear in query results and dependency graphs alongside permanent artifacts. Their `status: working` frontmatter field signals they are candidates for promotion to a permanent destination (e.g., `.aiwg/architecture/`, `.aiwg/reports/`). Use the index to find stale working answers that should be promoted or discarded.

### Fallback: Manual Digest Generation

If `aiwg index build` is not available (CLI not installed), fall back to manual scanning:

1. Walk `.aiwg/` for all artifact files
2. Extract titles and short summaries from frontmatter/headings
3. Write digest files to `.aiwg/working/digests/`
4. Generate or update `_index.yaml` with paths, summaries, and timestamps

### Post-Build Verification

After building, verify the index is healthy:

```bash
aiwg index stats --json
aiwg index status --json
```

Report total artifacts indexed, coverage by phase, and any orphaned artifacts.
When a Fortemi Core cache exists, also report whether it is built, stale, and
how many items it contains.

## When to Run

- After creating new SDLC artifacts
- After modifying existing artifact references
- At the start of a new SDLC phase
- When `aiwg index query` returns stale results

## References

- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/artifact-discovery.md — Agent protocol rules
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/skills/artifact-lookup/SKILL.md — Query skill
- @$AIWG_ROOT/src/artifacts/cli.ts — CLI implementation


---
Source attribution: jmagly
Original project: https://github.com/jmagly/aiwg/blob/bc0cd4d707708593ef15781cb9d38364ea29bdd5/agentic/code/frameworks/sdlc-complete/skills/build-artifact-index/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2024 Joe Magly

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: jmagly
Original project: https://github.com/jmagly/aiwg/blob/bc0cd4d707708593ef15781cb9d38364ea29bdd5/agentic/code/frameworks/sdlc-complete/skills/build-artifact-index/SKILL.md
Attribution basis: Source repository record

Fields of work: Operations, Product Management, Project & Program Management
Roles: Business Process Analyst, Product Manager, Project Manager
Specialties: Cross Platform
Tools: Aiwg
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: d41fb54f188d97d976517e27b7fcc78b8cc69ff9f9109ad273963b98798716dd
