Kb ingest

From SteveGJones/ai-first-sdlc-practices · View interactive version

Kb ingest is an AI agent skill from the GitHub repository SteveGJones/ai-first-sdlc-practices. Integrate a new source into the project knowledge base. Wraps the agent-knowledge-updater agent. Source can be a local file path, a URL, or pasted content. The updater reads the source, classifies it, identifies which existing library files it touches, makes surgical updates or creates new files, re

How to use this skill

Skill file

Knowledge Base Ingest

Take a new source and integrate it into the project's knowledge base. This is the ingest operation in the three-operations model (ingest / query / lint).

Argument

A source. Can be:

Preflight

Steps

1. Resolve the source

If the argument is a file path: verify the file exists and is readable.

If the argument is a URL: prepare for WebFetch (the agent will fetch).

If the argument is pasted text: capture it for the agent.

If the source is a URL or a path outside library/raw/, recommend (but don't require) saving a local copy to library/raw/ for provenance:

Source is at <url>. Recommended: save a local copy to library/raw/<descriptive-name>.md before ingesting so provenance is preserved. Continue with direct fetch? (y/N)

If the user accepts, proceed with WebFetch in the agent. If they want to save locally first, pause and let them.

2. Invoke the agent-knowledge-updater

Dispatch the agent-knowledge-updater agent with the source as input. The agent's workflow:

  1. Read the source
  2. Classify it (does it belong in the knowledge base?)
  3. Read the shelf-index to find existing files this source touches
  4. Make surgical updates or create new files
  5. Rebuild the shelf-index (incremental)
  6. Append to log.md

The updater is opinionated about what belongs in the knowledge base. If it determines the source belongs elsewhere (operational knowledge → CONTRIBUTING.md, ADRs, project tracker, auto-memory), it will say so and not ingest. Respect that decision.

3. Report the result

Print the agent's summary:

Ingest complete: <source>

  Files updated: N
  Files created: M
  Findings extracted: K
  Citations added: J

  Index rebuilt: yes
  Log entry: yes (or skipped if no log.md)

Next steps (if any): <e.g., "Review the new file X for accuracy">

If the agent declined to ingest, print its rationale and the recommended destination if it provided one.

What this skill does NOT do

Examples

Ingest a local academic paper:

/sdlc-knowledge-base:kb-ingest library/raw/forsgren-2024-cycle-time-update.md

Ingest from a URL:

/sdlc-knowledge-base:kb-ingest https://cloud.google.com/devops/state-of-devops/2024

Ingest pasted text (e.g., a conversation excerpt with research findings):

/sdlc-knowledge-base:kb-ingest "<paste the excerpt here>"

Errors

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.