ワンクリックで
smoke-test
Run a smoke test of all gnapsis MCP tools to verify the system works end-to-end.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run a smoke test of all gnapsis MCP tools to verify the system works end-to-end.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | smoke-test |
| description | Run a smoke test of all gnapsis MCP tools to verify the system works end-to-end. |
Run through every gnapsis MCP tool to verify the system is functional. This skill exercises the full feature set: project setup, taxonomy, entity CRUD, references, search, subgraph queries, document analysis, validation, and multi-source support.
just db-upcargo install --path ./mcpRun each phase sequentially. If any step fails, jump to Phase 10 (Cleanup) to restore the original config before reporting the failure. Track entity IDs, reference IDs, and category IDs created during the test for cleanup.
The smoke test uses a separate project name (gnapsis_smoke_test) so it gets its own
graph and does not interfere with the real project data.
0.1 Backup the real config:
cp .gnapsis.toml .gnapsis.toml.bak
0.2 Overwrite .gnapsis.toml with the smoke test config:
# Force local database — overrides global ~/.config/gnapsis/config.toml
[postgres]
uri = "postgresql://postgres:postgres@localhost:5432/gnapsis_dev"
[embedding]
provider = "fastembed"
model = "BAAI/bge-small-en-v1.5"
dimensions = 384
[project]
name = "smoke_test"
[[project.sources]]
id = "default"
path = "<absolute path to this repo>"
[[project.sources]]
id = "vault"
path = "<absolute path to vault source from the backup>"
Copy the source paths from the backup file. The key differences are:
[postgres] and [embedding] force the local Docker database (overrides global config)name = "smoke_test" creates graph gnapsis_smoke_test instead of gnapsis_gnapsis0.3 Reconnect the MCP server so it picks up the new config: /mcp
1.1 Drop the smoke test graph so init starts fresh:
just db-reset
just db-up
Wait for the database to be ready before proceeding.
1.2 Run init_project (force: true) and verify:
db_version and graph_versionapplied_db_migrations is non-emptyapplied_graph_migrations is non-emptywas_initialized is false (fresh graph)1.3 Run init_project again (force: false) and verify:
was_initialized is trueapplied_db_migrations is empty (no new migrations)applied_graph_migrations is empty2.1 Run project_overview with no optional params and verify:
categories contains 17 categories across 5 scopes (Domain, Feature, Namespace, Component, Unit)stats.domains is 0stats.features is 0stats.namespaces is 0stats.components is 0stats.units is 0stats.references is 02.2 Run project_overview with include_descriptions: true and verify:
2.3 Run project_overview with output_format: "toon" and verify:
2.4 Note down the category IDs needed for entity creation:
DOMAIN_CAT_IDFEATURE_CAT_IDCOMPONENT_CAT_IDUNIT_CAT_ID3.1 Run create_category with name "smoke-test", scope "Feature", description "Temporary category for smoke testing"
SMOKE_CAT_ID3.2 Run project_overview and verify:
4A.1 Run analyze_document on src/config.rs with source_id: "default" to discover symbols
untracked list contains symbols (e.g., "Config", "ProjectConfig", "Source")4B.1 Create a Domain entity:
name: "Smoke Test Domain"description: "Temporary domain for smoke testing gnapsis"category_ids: [DOMAIN_CAT_ID]commands: [Add code reference to src/config.rs, lsp_symbol "Config", source_id "default"]DOMAIN_ID), has_embedding is trueexecuted contains the Add command result with reference ID (save as DOMAIN_REF_ID)failed is null, skipped is empty4B.2 Create a Feature entity with parent:
name: "Smoke Test Feature"description: "Temporary feature for smoke testing"category_ids: [FEATURE_CAT_ID]parent_ids: [DOMAIN_ID]commands: [Add code reference to src/config.rs, lsp_symbol "ProjectConfig", source_id "default"]FEATURE_ID), parent relationship establishedexecuted contains Add result with reference ID (save as FEATURE_REF_ID)4B.3 Create a Component entity (child of Feature):
name: "Smoke Test Component"description: "Temporary component for smoke testing"category_ids: [COMPONENT_CAT_ID]parent_ids: [FEATURE_ID]commands: [Add code reference to src/config.rs, lsp_symbol "Source", source_id "default"]COMPONENT_ID)4C.1 Attempt to create entity with empty category_ids:
4C.2 Attempt to create entity with a non-existent category ID:
4C.3 Attempt to create entity with a non-existent parent ID:
4D.1 Update the Feature entity description:
entity_id: FEATURE_IDdescription: "Updated smoke test feature description"embedding_updated is true4D.2 Update entity with Relate command:
entity_id: COMPONENT_IDcommands: [Relate to DOMAIN_ID with note "smoke test relationship"]executed contains the Relate result4D.3 Update entity with Unrelate command:
entity_id: COMPONENT_IDcommands: [Unrelate from DOMAIN_ID]4D.4 Update entity name only:
entity_id: COMPONENT_IDname: "Renamed Smoke Component"embedding_updated is false (description unchanged)4D.5 Update entity categories (replace semantics):
entity_id: COMPONENT_IDcategory_ids: [COMPONENT_CAT_ID] (same category, verifies replace works)4E.1 Run get_entity on DOMAIN_ID:
4F.1 Attempt to delete Domain entity (has children):
entity_id: DOMAIN_ID4G.1 Delete the Component entity (leaf node):
entity_id: COMPONENT_IDdeleted is true5.1 Create a Feature entity with a vault text reference:
name: "Smoke Vault Feature"description: "Feature referencing vault documentation"category_ids: [FEATURE_CAT_ID]parent_ids: [DOMAIN_ID]commands: [Add text reference: source_id "vault", document_path "designs/005-ontology-improvements.md", start_line 1, end_line 30, anchor "# DES-005: Ontology Improvements"]VAULT_FEATURE_ID)executed contains Add with reference (save as VAULT_REF_ID)5.2 Run get_entity on VAULT_FEATURE_ID:
source_id: "vault"5.3 Create another entity with a code reference using default source_id:
commands: [Add code reference without specifying source_id, document_path "src/config.rs", lsp_symbol "default_source_id"]6A.1 Search with target "entities":
query: "smoke test domain"target: "entities"references array is empty (target is entities-only)6A.2 Search with target "references":
query: "configuration"target: "references"entities array is empty (target is references-only)6A.3 Search with target "all" (default):
query: "smoke testing"6A.4 Search with scope filter:
query: "smoke"scope: "Domain"6A.5 Search with min_score filter:
query: "smoke"min_score: 0.96A.6 Search with limit:
query: "smoke"limit: 16A.7 Search with output_format "toon":
query: "smoke"output_format: "toon"6B.1 Query with entity_id:
entity_id: DOMAIN_IDnodes array contains the domain entity and connected entitiesedges array shows BELONGS_TO and HAS_REFERENCE relationshipsstats includes estimated_tokens and nodes_pruned6B.2 Query with semantic_query only:
semantic_query: "smoke test configuration"6B.3 Query with both entity_id and semantic_query:
entity_id: DOMAIN_IDsemantic_query: "configuration management"6B.4 Query with neither entity_id nor semantic_query:
6B.5 Query with max_tokens limit:
entity_id: DOMAIN_IDmax_tokens: 500stats.estimated_tokens is within budget6B.6 Query with max_nodes limit:
entity_id: DOMAIN_IDmax_nodes: 26B.7 Query with scoring_strategy "branch_penalty":
entity_id: DOMAIN_IDscoring_strategy: "branch_penalty"6B.8 Query with relationship_types filter:
entity_id: DOMAIN_IDrelationship_types: ["BELONGS_TO"]6B.9 Query with output_format "toon":
entity_id: DOMAIN_IDoutput_format: "toon"6C.1 Find by scope:
scope: "Domain"6C.2 Find by category:
category: "core"6C.3 Find by parent_id:
parent_id: DOMAIN_ID6C.4 Find with limit:
scope: "Feature"limit: 16C.5 Find with no filters:
6D.1 Get entities for "src/config.rs" with source_id "default":
6D.2 Get entities for a vault document:
document_path: "designs/005-ontology-improvements.md"source_id: "vault"7.1 Run analyze_document on src/config.rs with source_id "default", all options enabled:
include_tracked: trueinclude_untracked: trueinclude_diffs: truetracked references appear (from Phase 4)untracked symbols are listedsource_id is "default" in responsedocument_type is "code"summary has correct counts7.2 Run analyze_document with only tracked references:
include_tracked: trueinclude_untracked: falseinclude_diffs: falseuntracked is empty, diff_hunks is emptytracked is populated7.3 Run analyze_document with only untracked symbols:
include_tracked: falseinclude_untracked: trueinclude_diffs: falsetracked is emptyuntracked is populated7.4 Run analyze_document with explicit LSP symbols:
lsp_symbols array with at least one symbol (e.g., name "Config", kind 23, start_line and end_line from Phase 4A)7.5 Run analyze_document with output_format "toon":
7.6 Run analyze_document on a vault document:
document_path: "designs/005-ontology-improvements.md"source_id: "vault"document_type is "text"8A.1 Run get_changed_files with no params:
8A.2 Run get_changed_files with from_sha and to_sha (use HEAD~1 and HEAD):
8B.1 Run alter_references with an Update command on FEATURE_REF_ID:
start_line to a new value (e.g., 10)end_line to a new value (e.g., 50)8B.2 Run alter_references with Update on text reference VAULT_REF_ID:
anchor to "# Updated Anchor"8C.1 Attempt to delete a reference that is attached to an entity:
alter_references with Delete on FEATURE_REF_ID8C.2 To test delete success: first create a standalone reference, detach it, then delete:
update_entity with Unattach command to detach the referencealter_references with Delete on the detached reference8D.1 Run lsp_refresh on src/config.rs with source_id "default":
updated_count shows how many references were refreshedupdated array shows old and new line numbers for changed refsunmatched_count shows symbols with no matching reference9.1 Run validate_graph with all checks enabled:
check_orphans: truecheck_cycles: truecheck_scope_violations: truecheck_unclassified: truecheck_no_references: truevalid is true or only has expected issues from test dataissue_count matches the sum of all issue arrays9.2 Run validate_graph with only orphan check:
check_orphans: truecheck_cycles: falsecheck_scope_violations: falsecheck_unclassified: falsecheck_no_references: falseorphans array may have entries, all others are empty9.3 Run validate_graph with only cycle check:
check_cycles: true, all others falsecycles is empty (no cycles in test data)9.4 Run validate_graph with only scope violations check:
check_scope_violations: true, all others falseThis phase MUST run even if a previous phase failed — it restores the original config.
10.1 Delete entities in reverse dependency order:
VAULT_FEATURE_ID (and any temp entities from Phase 8C)FEATURE_IDDOMAIN_ID10.2 Run project_overview and verify:
stats.domains is 0stats.features is 0stats.components is 0stats.references is 010.3 Drop the smoke test graph to leave no residue:
# The graph gnapsis_smoke_test can be dropped via psql or left for next run
# init_project with force:true will recreate it anyway
10.4 Restore the original config:
mv .gnapsis.toml.bak .gnapsis.toml
10.5 Reconnect the MCP server to restore the real project config: /mcp
10.6 Report: "Smoke test PASSED - all 10 phases completed successfully"
If any phase fails:
.gnapsis.toml under [[project.sources]]gnapsis_<project_name>source_id to track which source they belong to