valent-pipeline 0.1.11 → 0.1.12
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/package.json
CHANGED
|
@@ -36,13 +36,11 @@ Read all files in `{curated_files_path}`. Build in-memory index of file names, s
|
|
|
36
36
|
### Step 3: Connect to Knowledge Database (Conditional)
|
|
37
37
|
|
|
38
38
|
**If `{knowledge_mode}` is `sqlite`:**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
If database missing or empty, operate in curated-only mode.
|
|
39
|
+
Verify the database is accessible by running:
|
|
40
|
+
```bash
|
|
41
|
+
npx tsx .valent-pipeline/scripts/query-kb.ts --stories
|
|
42
|
+
```
|
|
43
|
+
If it returns results or "No stories in database", the DB is accessible. If the command fails, operate in curated-only mode.
|
|
46
44
|
|
|
47
45
|
**If `{knowledge_mode}` is `local-docker` or `connect-to-existing` (legacy):**
|
|
48
46
|
Verify ChromaDB at `{chromadb_host}` using v2 API. Base path: `{chromadb_host}/api/v2/tenants/default_tenant/databases/default_database`. If connection fails, operate in curated-only mode.
|
|
@@ -54,7 +52,14 @@ Verify ChromaDB at `{chromadb_host}` using v2 API. Base path: `{chromadb_host}/a
|
|
|
54
52
|
For each incoming query:
|
|
55
53
|
1. Search correction directives for relevant entries
|
|
56
54
|
2. Search curated knowledge files for matching sections
|
|
57
|
-
3. If database connected
|
|
55
|
+
3. If database connected (SQLite mode): query using the CLI tool and read stdout for results:
|
|
56
|
+
- Fetch a specific artifact: `npx tsx .valent-pipeline/scripts/query-kb.ts --artifact --story KANBAN-001 --type reqs-brief`
|
|
57
|
+
- Fetch directives for an agent: `npx tsx .valent-pipeline/scripts/query-kb.ts --directives --agent BEND`
|
|
58
|
+
- Full-text search: `npx tsx .valent-pipeline/scripts/query-kb.ts --search "acceptance criteria"`
|
|
59
|
+
- List artifacts for a story: `npx tsx .valent-pipeline/scripts/query-kb.ts --list --story KANBAN-001`
|
|
60
|
+
- List all stories: `npx tsx .valent-pipeline/scripts/query-kb.ts --stories`
|
|
61
|
+
- Cross-story bug search: `npx tsx .valent-pipeline/scripts/query-kb.ts --bugs-since 2026-03-01`
|
|
62
|
+
If ChromaDB mode: use collection query (ChromaDB)
|
|
58
63
|
4. Compose response: targeted, SHORT (aim ~200 tokens, max 500)
|
|
59
64
|
5. Include source reference: `Source: curated/{file}#section` or `Source: sqlite:artifacts/{story_id}/{type}` or `Source: correction-directives#{directive-id}`
|
|
60
65
|
|
package/pipeline/prompts/lead.md
CHANGED
|
@@ -144,6 +144,12 @@ Before validating story inputs, read `{backlog_path}` and check whether the curr
|
|
|
144
144
|
|
|
145
145
|
For `bug` type items (no story input directory), skip Steps 1-3 of kick-off. Instead, read the bug's `description`, `file_ref`, and `source_story` from the backlog. Spawn a targeted agent subset (BEND + CRITIC + QA-B) to fix and verify the bug. After the fix ships, mark the bug `shipped` in the backlog and return to next-item selection.
|
|
146
146
|
|
|
147
|
+
### Step 0b: Verify Knowledge Database
|
|
148
|
+
|
|
149
|
+
If `{knowledge_mode}` is `sqlite`, check that `.valent-pipeline/pipeline.db` exists. If it does not exist:
|
|
150
|
+
1. Escalate to user: "Knowledge database not found. Run `/valent-setup-backlog` to initialize the knowledge base and create the database."
|
|
151
|
+
2. Do NOT proceed with story execution until the database exists.
|
|
152
|
+
|
|
147
153
|
### Step 1: Validate Story Input
|
|
148
154
|
|
|
149
155
|
Read story input files from `{story_input_dir}`. Validate against the input contract:
|
|
@@ -170,6 +170,13 @@ All three agents run in parallel using `model: "haiku"` to minimize cost. Collec
|
|
|
170
170
|
|
|
171
171
|
If the repo is empty or brand new (no source code yet), skip the subagents and create minimal placeholder files noting "No existing code detected — Knowledge Agent will update these as stories ship."
|
|
172
172
|
|
|
173
|
+
### Step 7b: Initialize and Populate Knowledge Database
|
|
174
|
+
|
|
175
|
+
After writing the curated knowledge files:
|
|
176
|
+
1. Run `valent-pipeline db init` to create the SQLite database if it doesn't exist
|
|
177
|
+
2. Run `npx tsx .valent-pipeline/scripts/embed-sqlite.ts --rebuild --db-path .valent-pipeline/pipeline.db --stories-dir ./stories` to index any existing story artifacts
|
|
178
|
+
3. The database is now ready for the Knowledge Agent to query during story execution
|
|
179
|
+
|
|
173
180
|
## Step 8: Report
|
|
174
181
|
|
|
175
182
|
After writing all files, summarize:
|