### Install indexion Source: https://github.com/trkbt10/indexion-skills/blob/main/README.md Install the indexion tool by downloading and executing the installation script. Ensure indexion is available in your PATH. ```bash curl -fsSL https://raw.githubusercontent.com/trkbt10/indexion/main/install.sh | bash ``` -------------------------------- ### Install indexion-skills Plugin Source: https://github.com/trkbt10/indexion-skills/blob/main/README.md Add the marketplace and install the indexion-skills plugin using Claude CLI commands. ```bash claude marketplace add trkbt10/indexion-skills claude plugin install indexion-skills ``` -------------------------------- ### Verify Indexion Installation and KGF Specs Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Before starting an SDD run, verify that 'indexion' is installed and functional within the project directory. These commands check the version and ensure KGF specs are accessible. ```bash indexion --version ``` ```bash indexion kgf edges # should show edges, not errors ``` -------------------------------- ### Doc.json Configuration Example Source: https://context7.com/trkbt10/indexion-skills/llms.txt An example JSON configuration file for the `indexion-documentation` and `indexion-readme` modules. ```json { "$schema": "./schemas/doc-config.schema.json", "version": "1.0", "spec": "moonbit", "output": { "format": "markdown", "filename": "README.md" }, "packages": [ { "path": "cmd/mycommand", "title": "mycommand", "include_in_root": true, "sections": ["overview", "usage"] } ], "root": { "output": "README.md", "sections": [ { "type": "static", "file": "docs/intro.md" }, { "type": "toc", "title": "Commands" }, { "type": "packages", "filter": "cmd/**" }, { "type": "static", "file": "docs/installation.md" } ] } } ``` -------------------------------- ### Install Indexion Skills Plugin and CLI Source: https://context7.com/trkbt10/indexion-skills/llms.txt Steps to install the Claude Code plugin and the indexion CLI. Ensure the indexion binary is in your system's PATH. ```bash claude marketplace add trkbt10/indexion-skills claude plugin install indexion-skills curl -fsSL https://raw.githubusercontent.com/trkbt10/indexion/main/install.sh | bash indexion agent orient --help ``` -------------------------------- ### Install a Single KGF Spec Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-kgf/SKILL.md Installs a specific KGF specification by its name. Replace `` with the desired spec. ```bash indexion kgf add ``` -------------------------------- ### List Installed KGF Specs Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-kgf/SKILL.md Use this command to see all the KGF specifications currently installed on your system. ```bash indexion kgf list ``` -------------------------------- ### Build Wiki Index Source: https://context7.com/trkbt10/indexion-skills/llms.txt Builds the index for the project wiki, which is the starting point for navigating the wiki. ```bash # Navigate the wiki — always start with the index indexion wiki index build --wiki-dir=.indexion/wiki ``` -------------------------------- ### Get Quick API Coverage Overview Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-documentation/SKILL.md Use this command to get a quick overview of how much of the public API is documented. It provides an overall coverage percentage and a breakdown per package. ```bash indexion plan documentation --style=coverage . ``` -------------------------------- ### Moonbit code examples for `plan unwrap` detection Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Illustrates Moonbit code snippets that are detected as trivial delegations (default) and those excluded by default. ```moonbit // Detected (default) — trivial delegation fn matches_pattern(text : String, pat : String) -> Bool { @glob.glob_match(text, pat) } // Excluded by default (use --all to include) fn length(self : MyList) -> Int { self.items.length() // self-delegation (encapsulation) } fn emit(value : String) -> Action { Emit(value) // bare constructor } ``` -------------------------------- ### Install cc-sdd for Agent Workflows Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Install the cc-sdd tool for your chosen agent (Codex or Claude) in skills mode. Ensure the `--lang` parameter matches the implementation language of your code, not the specification language, to avoid vocabulary matching issues. ```bash npx cc-sdd@latest --codex-skills --lang en --yes # codex (skills mode) npx cc-sdd@latest --claude-skills --lang en --yes # claude (skills mode) ``` -------------------------------- ### Verify indexion Installation and KGF Detection Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Check if indexion is installed and correctly detecting languages by running version and KGF edge detection commands. This is crucial for drift gate and validation loop functionality. ```bash indexion --version # must be installed indexion kgf edges # must detect language and show edges ``` -------------------------------- ### Explore files with format list Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Use `indexion explore --format=list` to get a list of files that are similar to each other, providing a high-level overview of potential duplication. ```bash indexion explore --format=list ``` -------------------------------- ### Instruction Block for Codex Prompt Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Example instruction block to include in a Codex prompt, guiding the agent to run spec alignment commands after each task and fix flagged items. ```bash After completing each task (commit), run: indexion spec align diff ... --threshold 0.3 indexion spec align status ... --threshold 0.3 --fail-on any If DRIFTED, SPEC_ONLY, or SHALLOW items remain for the requirement your task addresses, fix them before moving to the next task. - DRIFTED: add spec vocabulary to public declaration doc comments - SPEC_ONLY: implement the missing requirement - SHALLOW: add non-trivial function implementations (>4 lines) to the SAME FILE where the matched type is defined. Do not add logic in a separate file — SHALLOW checks per-file. When all tasks are done, spec align status --fail-on any must exit 0 with Shallow: 0. ``` -------------------------------- ### Generate Pre-Edit Agent Orientation Brief Source: https://context7.com/trkbt10/indexion-skills/llms.txt Use `indexion agent orient` to generate a structured brief for agents before they start coding. This brief includes implementation owners, consumer surfaces, and required preflight reads. ```bash indexion agent orient --task-file task.md --output=.indexion/cache/agent/orient.md . ``` ```bash indexion agent orient --task "add a name/content drift audit" . ``` ```bash indexion agent orient --no-update --task "name/content drift scoring and remediation planning" . ``` -------------------------------- ### Create Vocabulary Fix Prompt File Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Construct a prompt file for the agent by concatenating predefined instructions with generated alignment and gap reports. This file guides the agent in identifying and fixing vocabulary or implementation gaps. ```bash cat > .indexion/sdd-reports/vocab-fix-prompt.md << 'EOF' The spec alignment tool reports that several requirements are DRIFTED, SPEC_ONLY, or SHALLOW. For each item, determine whether it is: 1. **Implementation gap** (SPEC_ONLY) — the spec requirement is not implemented at all. Add the missing implementation and tests. 2. **Vocabulary gap** (DRIFTED) — the implementation exists but spec vocabulary is missing from public doc comments. Add spec terms to public declarations. 3. **Depth gap** (SHALLOW) — the requirement matched to type definitions only, with no function implementations in the same file. Add the actual processing/parsing/conversion logic that the requirement demands. Your task: - Read the alignment report below. - For each DRIFTED or SPEC_ONLY requirement, search the codebase for related keywords from that requirement. If related code exists, it is a vocabulary gap — add doc comments. If no related code exists, it is an implementation gap — implement it. - The alignment tool only extracts vocabulary from public declarations. Doc comments on private functions are invisible to the tool. - Run the project's formatter and test suite after editing. - Commit your changes. Do not leave changes uncommitted. ## Spec Align Diff Report EOF ``` ```bash cat .indexion/sdd-reports/align-diff.md >> .indexion/sdd-reports/vocab-fix-prompt.md ``` ```bash echo -e "\n## Vocabulary Gap Report" >> .indexion/sdd-reports/vocab-fix-prompt.md ``` ```bash head -40 .indexion/sdd-reports/verify-gaps.md >> .indexion/sdd-reports/vocab-fix-prompt.md ``` -------------------------------- ### Verify indexion agent orient command Source: https://github.com/trkbt10/indexion-skills/blob/main/README.md Verify the availability and help information for the 'indexion agent orient' command to ensure proper agent orientation setup. ```bash indexion agent orient --help ``` -------------------------------- ### Debugging Grep Patterns with KGF Tokens Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-kgf/SKILL.md When a grep pattern doesn't match as expected, use `indexion kgf tokens` to inspect the actual token kinds in a file and adjust your grep pattern accordingly. This example shows how to view the first 20 tokens and then use them in a grep command. ```bash # 1. See the actual tokens for a file indexion kgf tokens src/config/paths.mbt # 2. Check which token kinds exist indexion kgf tokens src/config/paths.mbt | head -20 # 3. Then adjust your grep pattern to match the actual token kinds indexion grep "KW_pub KW_fn Ident" src/config/paths.mbt ``` -------------------------------- ### Initialize indexion readme for a new project Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Use this command for a greenfield project to create the initial template and configuration files. Skip if doc.json or .indexion.toml already exists. ```bash indexion doc init ``` -------------------------------- ### Initialize Greenfield Project for README Source: https://context7.com/trkbt10/indexion-skills/llms.txt Initializes a new project directory for README generation. ```bash # Initialize greenfield project indexion doc init ``` -------------------------------- ### Assemble README with Configuration Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Assemble the README file using a configuration file for layout and package lists. This is the preferred method. ```bash indexion doc readme --config=doc.json ``` -------------------------------- ### Quick Documentation Coverage Overview Source: https://context7.com/trkbt10/indexion-skills/llms.txt Provides a quick overview of documentation coverage percentages for the project. ```bash # Quick coverage overview indexion plan documentation --style=coverage . ``` -------------------------------- ### Preview Wiki Index Build Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Run this command to preview the index build process without actually writing the index files. Useful for testing changes. ```bash indexion wiki index build --dry-run --wiki-dir=.indexion/wiki ``` -------------------------------- ### Run `plan unwrap` for quick check Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Perform a quick semantic check for proxy functions using `indexion grep` before detailed analysis. ```bash indexion grep --semantic=proxy src/ ``` -------------------------------- ### Generate Full Documentation Plan with Priorities Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-documentation/SKILL.md Generate a detailed documentation plan including priorities and a package inventory. This is useful for understanding what needs to be documented and in what order. ```bash indexion plan documentation . ``` ```bash indexion plan documentation --format=github-issue . ``` ```bash indexion plan documentation --format=json . ``` -------------------------------- ### Parallel Feature Execution with Codex Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md This script demonstrates how to run multiple features in parallel Codex sessions. Each session is started in the background, and their PIDs are printed. ```bash for FEATURE in feature-a feature-b feature-c; do codex exec --full-auto --json -C . \ "$(cat $REPORT_DIR/$FEATURE/impl-phase-b.md)" \ > $REPORT_DIR/$FEATURE/impl-phase-b.jsonl 2>&1 & echo "$FEATURE: $!" done ``` -------------------------------- ### Assemble README with Template Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Assemble the README file using a template file with placeholders like {{include:…}} and {{packages}}. ```bash indexion doc readme --template=docs/templates/readme.md -o=README.md cmd/ ``` -------------------------------- ### Assemble Root README from doc.json Source: https://context7.com/trkbt10/indexion-skills/llms.txt Assembles the root README file using configuration from a `doc.json` file. ```bash # Assemble root README from doc.json indexion doc readme --config=doc.json ``` -------------------------------- ### KGF Token Priority Conflicts Pitfall Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-kgf/SKILL.md Highlights a common problem where token definitions earlier in the KGF spec take priority. This example shows how a generic `Operator` token can consume characters intended for a more specific token like `EQ` if not ordered correctly. ```peg # BAD: Operator matches = before EQ can TOKEN Operator /[!$%&*+\-.\/:<=>?@^|~]+/ TOKEN EQ /=\/ # GOOD: EQ defined first, takes priority TOKEN EQ /=\/ TOKEN Operator /[!$%&*+\-.\/:<=>?@^|~]+/ ``` -------------------------------- ### Preview changes with `plan unwrap --dry-run` Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Safely preview proposed changes for unnecessary wrappers without modifying files by using the `--dry-run` flag. ```bash indexion plan unwrap --dry-run --include='*.mbt' --exclude='*_wbtest.mbt' \ --exclude='*moon.pkg*' --exclude='*pkg.generated*' src/ ``` -------------------------------- ### Indexion Analysis Workflow Steps Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-documentation/SKILL.md A step-by-step workflow for analyzing documentation using indexion. It covers checking current state, identifying undocumented items, reconciling code drift, and visualizing dependencies. ```bash # 1. What's the current state? indexion plan documentation --style=coverage . ``` ```bash # 2. What specific items lack docs? indexion grep --undocumented src/ ``` ```bash # 3. Has code drifted from existing docs? indexion plan reconcile --format=md . ``` ```bash # 4. What does the dependency structure look like? indexion doc graph --output=deps.mmd src/ ``` ```bash # 5. Fix flagged docs, re-verify indexion plan reconcile --format=md . ``` -------------------------------- ### Build Full Wiki Index Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Use this command to build the complete vector search index for your wiki. This is necessary for efficient searching with `--full`. ```bash indexion wiki index build --full --wiki-dir=.indexion/wiki ``` -------------------------------- ### Verify README Changes with Plan Drift Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Compare the generated README against a previous version to ensure changes are purely additive. Snapshot the previous version first. ```bash git show HEAD:README.md > /tmp/README.before.md indexion plan drift --top=20 /tmp/README.before.md README.md ``` -------------------------------- ### Generate Project Brief Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-agent-orient/SKILL.md Generate a brief for a given task file. The first run writes a cache file, and later runs refresh only changed files. Use --no-update to query the saved map without refreshing. ```bash indexion agent orient --task-file task.md --output=.indexion/cache/agent/orient.md . ``` -------------------------------- ### Add New Wiki Page Source: https://context7.com/trkbt10/indexion-skills/llms.txt Adds a new page to the project wiki, specifying its content, ID, title, and other metadata. ```bash # Write a new page cat > /tmp/my-page.md << 'EOF' # My Page Title ...content... EOF indexion wiki pages add \ --id=my-page \ --title="My Page Title" \ --content=/tmp/my-page.md \ --sources="src/my-module/" \ --provenance=synthesized \ --actor="agent:claude" \ --wiki-dir=.indexion/wiki ``` -------------------------------- ### Full Prioritized Documentation Plan Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a full, prioritized plan for documentation analysis. ```bash # Full prioritized plan indexion plan documentation . ``` -------------------------------- ### Documentation Plan for Scripting Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a documentation plan in JSON format for use in scripting. ```bash indexion plan documentation --format=json . ``` -------------------------------- ### Post-Change Verification and Formatting Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-identity/SKILL.md After making code modifications, use `moon info` and `moon fmt` to check project status and format code, followed by `moon test` to ensure changes haven't introduced regressions. Finally, re-run the identity audit to confirm drift resolution. ```bash moon info && moon fmt ``` ```bash moon test ``` ```bash indexion identity audit . ``` -------------------------------- ### Check alignment of requirements with implementation code Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Use this command to verify that the implementation code aligns with the specified requirements. It helps identify discrepancies between what is documented and what is implemented. ```bash indexion spec align status .kiro/specs//requirements.md src/ --threshold 0.3 --fail-on any ``` -------------------------------- ### Documentation Plan as GitHub Issue Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a documentation plan formatted as a GitHub Issue. ```bash indexion plan documentation --format=github-issue . ``` -------------------------------- ### Explore File Similarities with Indexion Explore Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-search/SKILL.md Use `indexion explore` to understand overlap and relationships across files. Options include listing similar pairs, clustering files, generating a full similarity matrix, or outputting JSON for scripting. You can also specify inclusion/exclusion patterns and similarity thresholds. ```bash # Quick similarity scan — sorted pairs above threshold indexion explore --format=list --threshold=0.7 \ --include='*.mbt' --exclude='*moon.pkg*' src/ ``` ```bash # Cluster similar files together indexion explore --format=cluster --threshold=0.6 src/ ``` ```bash # Full similarity matrix (small file sets only) indexion explore --format=matrix src/module_a/ src/module_b/ ``` ```bash # JSON for scripting indexion explore --format=json --threshold=0.5 src/ ``` ```bash # Compare specific files indexion explore file_a.mbt file_b.mbt --threshold=0 ``` ```bash # Function-level structural comparison (slower, more precise) indexion explore --strategy=apted --format=list src/ ``` ```bash indexion explore --strategy=tsed --format=list src/ ``` ```bash # Statistical correction for large codebases indexion explore --fdr=0.05 --format=list --threshold=0.5 src/ ``` -------------------------------- ### CI Integration for Plan Drift Verification Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Use this command for CI integration to guard against accidental large rewrites by checking for vocabulary drift. ```bash indexion plan drift --vocab-threshold=0.05 /tmp/README.before.md README.md ``` -------------------------------- ### Build Wiki Search Index Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Generate or regenerate the `index.md` file, which serves as the entry point for wiki navigation. This command is essential for organizing and accessing wiki content efficiently. ```bash # Generate or regenerate index.md — the entry point for navigation indexion wiki index build --wiki-dir=.indexion/wiki # Then read it cat .indexion/wiki/index.md ``` -------------------------------- ### Detect implementation vs. documentation drift Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Run this command after implementation to detect any drift between the code and its associated documentation, such as README files or doc comments. It ensures documentation remains up-to-date. ```bash # Detect impl ↔ documentation drift indexion plan reconcile --format md src/lib/ ``` ```bash # Restrict to specific docs indexion plan reconcile --format md --doc 'README.md' src/lib/ ``` -------------------------------- ### Indexion Search Tool Comparison Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-search/SKILL.md This table outlines various Indexion tools and their primary use cases, from finding by name with `grep` to broad scope searching with `search` and structural analysis with `grep --semantic`. ```bash grep "Ident:X" ``` ```bash grep "pub fn *" ``` ```bash grep --semantic="similar:..." ``` ```bash digest query ``` ```bash search ``` ```bash grep --semantic=long:50 ``` ```bash explore --format=list ``` ```bash sim ``` ```bash grep "TypeIdent:X" ``` -------------------------------- ### Template-Driven README Assembly Source: https://context7.com/trkbt10/indexion-skills/llms.txt Assembles a README file using a specified template and output file. ```bash # Template-driven assembly indexion doc readme --template=docs/templates/readme.md -o=README.md cmd/ ``` -------------------------------- ### Generate README Writing Plans Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates writing plans for README sections, potentially using LLM assistance. ```bash # Generate per-section writing plans (LLM-assisted authoring) indexion plan readme --template=docs/templates/readme.md --plans-dir=.indexion/plans src/ ``` -------------------------------- ### Add New Wiki Page Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Register a new wiki page by providing its content, title, and associated sources. This command creates the `.md` file, updates `wiki.json`, rebuilds the search index, and appends to the audit log. ```bash # 1. Write content to a temp file cat > /tmp/my-page.md << 'EOF' # My Page Title ...content... EOF # 2. Register it — this writes .md, updates wiki.json, updates search index, appends log indexion wiki pages add \ --id=my-page \ --title="My Page Title" \ --content=/tmp/my-page.md \ --sources="src/my-module/" \ --provenance=synthesized \ --actor="agent:claude" \ --wiki-dir=.indexion/wiki ``` -------------------------------- ### Use tree edit distance for precise function matching Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Employ the `apted` strategy with `indexion plan solid` for more precise, function-level matching of code structures between packages, going beyond simple textual similarity. ```bash # Use tree edit distance for precise function-level matching indexion plan solid --from=src/a,src/b --strategy=apted ``` -------------------------------- ### Generate Dependency Graph with Title and Output File Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a project dependency graph with a specified title and outputs it to a file. ```bash indexion doc graph --title="KGF Deps" --output=deps.mmd src/kgf/ ``` -------------------------------- ### Plan New Wiki Structure Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Generate a proposed page structure for a new wiki or a structural overhaul using `wiki pages plan`. This command analyzes the project and outputs a markdown-formatted plan. The first `wiki pages add` command will automatically initialize the `.indexion/wiki/` directory and `wiki.json` manifest. ```bash # Analyze the project and generate a page structure proposal indexion wiki pages plan --format=md ``` ```bash # Then execute the plan: add each proposed page indexion wiki pages add --id= --title="..." --content=/tmp/page.md \ --sources="..." --provenance=synthesized --actor="agent:" ``` -------------------------------- ### Run tests with MoonBit Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Execute the test suite using the `moon test` command. Ensure all tests pass to verify the correctness of the refactored code. ```bash moon test --target native ``` -------------------------------- ### Apply fixes with `plan unwrap --fix` Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Apply the detected fixes for unnecessary wrappers to the files using the `--fix` flag. ```bash indexion plan unwrap --fix --include='*.mbt' --exclude='*_wbtest.mbt' \ --exclude='*moon.pkg*' --exclude='*pkg.generated*' src/ ``` -------------------------------- ### Detailed report with `plan unwrap` Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Generate a detailed report of unnecessary wrappers found in specified files, using include and exclude patterns. ```bash indexion plan unwrap --include='*.mbt' --exclude='*_wbtest.mbt' \ --exclude='*moon.pkg*' --exclude='*pkg.generated*' src/ ``` -------------------------------- ### Align SDD Requirements with Implementation (Diff) Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Use 'indexion spec align diff' to report requirement-level drift between specifications and implementation. Specify the spec document, source directory, output format, and a threshold for alignment. ```bash indexion spec align diff requirements.md src/lib/ --format markdown --threshold 0.3 ``` -------------------------------- ### Generate Single Package README to File Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a README file for a single package and saves it to a specified file. ```bash indexion doc readme -o=README.md src/kgf/lexer/ ``` -------------------------------- ### Generate Writing Plans Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Use this command to generate per-section writing tasks for manual or LLM-assisted authoring. ```bash indexion plan readme --template=docs/templates/readme.md --plans-dir=.indexion/plans src/ ``` -------------------------------- ### File Similarity Analysis Source: https://context7.com/trkbt10/indexion-skills/llms.txt Analyze file similarity using `indexion explore`. Options include output format, similarity threshold, file inclusion patterns, and different comparison strategies like APTED or FDR. ```bash indexion explore --format=list --threshold=0.7 --include='*.mbt' src/ ``` ```bash indexion explore --format=cluster --threshold=0.6 src/ ``` ```bash indexion explore --strategy=apted --format=list src/ # function-level tree edit distance ``` ```bash indexion explore --fdr=0.05 --format=list --threshold=0.5 src/ # FDR noise correction ``` -------------------------------- ### Indexion Segment: Text Segmentation Strategies Source: https://context7.com/trkbt10/indexion-skills/llms.txt Demonstrates various strategies for splitting text into contextual chunks using the indexion CLI. Useful for preparing documents for RAG or embedding pipelines. ```bash indexion segment document.txt output/ ``` ```bash indexion segment --strategy=tfidf document.txt output/ ``` ```bash indexion segment --strategy=punctuation document.txt output/ ``` ```bash indexion segment --min-size=200 --max-size=3000 --target-size=800 document.txt output/ ``` ```bash indexion segment --hybrid --ncd-weight=0.6 --tfidf-weight=0.4 document.txt output/ ``` ```bash indexion segment --threshold=0.5 --window-size=5 document.txt output/ ``` ```bash indexion segment --prefix=chunk document.txt output/ ``` -------------------------------- ### Build Index Incrementally or Rebuild Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-search/SKILL.md Use `indexion digest build src/` for manual incremental builds when many files have changed. A full rebuild is necessary if the KGF spec changes or the index is corrupted. ```bash indexion digest build src/ ``` -------------------------------- ### KGF Bottom-Up Event Order with Bind/Scope Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-kgf/SKILL.md Explains how events fire bottom-up in KGF parsing and demonstrates the use of `bind` and `$scope` to pass data from child rules to parent rules, such as associating a function declaration's ID with its parent scope. ```peg on FunctionDecl { bind ns "value" name "child_decl_id" to $id edge declares from $file to sym_id attrs obj(...) } on ExportDecl when $doc { let id = $scope("value", "child_decl_id") edge declares from $file to sym_id attrs obj("doc", $doc, ...) } ``` -------------------------------- ### Build Navigation Index Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Generate only the navigation index (`index.md`) for the wiki using `wiki index build`. This command is part of the broader maintenance cycle but can be run independently to update the navigation structure. ```bash # Build navigation index only (index.md) indexion wiki index build --wiki-dir=.indexion/wiki ``` -------------------------------- ### Generate Dependency Graph (ASCII Text) Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a project dependency graph in ASCII text format. ```bash indexion doc graph --format=text src/ ``` -------------------------------- ### Find concept-level duplication with `indexion explore` Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Use `indexion explore` with similarity thresholds and include/exclude patterns to find files that share vocabulary and concepts. ```bash indexion explore --threshold=0.4 \ --include='*.mbt' --exclude='*_wbtest.mbt' \ --exclude='*moon.pkg*' --exclude='*pkg.generated*' \ src/ cmd/ ``` -------------------------------- ### Generate Dependency Graph (Graphviz DOT) Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a project dependency graph in Graphviz DOT format. ```bash indexion doc graph --format=dot src/ ``` -------------------------------- ### Run indexion segment with default window divergence strategy Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-segment/SKILL.md Use this command to perform text segmentation with the default sliding window divergence detection strategy. It requires an input file and an output directory. ```bash indexion segment ``` -------------------------------- ### Generate Dependency Graph (Mermaid) Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a project dependency graph in Mermaid format (default). ```bash # Dependency graphs indexion doc graph src/config/ ``` -------------------------------- ### Execute Phase A Implementation Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Executes the `codex` tool using the content of the generated Phase A implementation scope file. It captures the output in JSON Lines format. After execution, it runs a drift gate check to ensure alignment between requirements and the source code. ```bash codex exec --full-auto --json -C . \ "$(cat $REPORT_DIR/impl-phase-a.md)" > $REPORT_DIR/impl-phase-a.jsonl # Wait for Phase A to complete before running the gate indexion spec align status $SPEC_DIR/requirements.md src/$PKG/ \ --threshold 0.3 --fail-on drifted git add . && git commit -m "impl: Phase A types for $FEATURE" ``` -------------------------------- ### Generate Single Package README to Stdout Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates a README file for a single package and outputs it to standard output. ```bash indexion doc readme src/kgf/lexer/ ``` -------------------------------- ### Generate Brief with Task Gloss Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-agent-orient/SKILL.md Generate a brief using a gloss for the task objective when the original wording is not in the repository's vocabulary. Do not include infrastructure constraints in the gloss. ```bash indexion agent orient --no-update --task "name/content drift scoring and remediation planning" . ``` -------------------------------- ### Explore shared concepts between files Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Use `indexion explore file_a file_b --threshold=0 --strategy=apted` to understand the shared concepts between two specific files. This is useful when textual similarity is high but the underlying concepts might differ. ```bash indexion explore file_a file_b --threshold=0 --strategy=apted ``` -------------------------------- ### Indexion Spec Verification and Alignment Commands Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Commands for verifying specification compliance and aligning implementation with specifications. Use `--format md` for markdown output and `--threshold` to set alignment sensitivity. ```bash indexion spec verify --spec='.kiro/specs//requirements.md' src/lib/ --format md ``` ```bash indexion spec align diff .kiro/specs//requirements.md src/lib/ --format markdown --threshold 0.3 ``` ```bash indexion spec align status .kiro/specs//requirements.md src/lib/ --threshold 0.3 --fail-on any ``` -------------------------------- ### Plugin Structure Overview Source: https://github.com/trkbt10/indexion-skills/blob/main/README.md This tree structure shows the organization of the indexion-skills plugin, including manifest files and skill directories. ```text indexion-skills/ ├── .claude-plugin/ │ ├── plugin.json # Plugin manifest │ └── marketplace.json # Marketplace registry ├── skills/ │ ├── indexion-agent-orient/ # Agent preflight orientation │ ├── indexion-search/ # Structural, lexical, semantic, and similarity search │ ├── indexion-identity/ # Name/content drift audit │ ├── indexion-segment/ # Text segmentation │ ├── indexion-kgf/ # KGF spec inspection │ ├── indexion-documentation/ # Documentation analysis (coverage, reconcile, graph) │ ├── indexion-readme/ # README construction (init, generate, assemble) │ ├── indexion-wiki/ # Wiki lifecycle │ ├── indexion-sdd/ # Spec-Driven Development loop │ ├── indexion-refactor/ # Refactor planning and validation └── LICENSE ``` -------------------------------- ### Configure doc.json for root README assembly Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md This JSON configuration defines the structure and content for the root README. It specifies output format, package inclusion, and the order of sections like static content, tables of contents, and package lists. ```json { "$schema": "./schemas/doc-config.schema.json", "version": "1.0", "spec": "moonbit", "output": { "format": "markdown", "filename": "README.md" }, "packages": [ { "path": "cmd/", "title": "", "include_in_root": true, "sections": ["overview", "usage"] } // …one entry per package that should appear in the assembled root README ], "root": { "output": "README.md", "sections": [ { "type": "static", "file": "docs/intro.md" }, { "type": "toc", "title": "Commands" }, { "type": "packages", "filter": "cmd/**" }, { "type": "static", "file": "docs/installation.md" }, { "type": "static", "file": "docs/license.md" } ] } } ``` -------------------------------- ### Execute Agent for Vocabulary Fixes Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Run the agent with the generated prompt file to automatically fix vocabulary and implementation gaps. Output is captured in JSON Lines format. ```bash codex exec --full-auto --json -C . \ "$(cat .indexion/sdd-reports/vocab-fix-prompt.md)" \ > .indexion/sdd-reports/vocab-fix.jsonl & ``` -------------------------------- ### Filter files for `plan solid` Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Use `--include` and `--exclude` patterns to filter files when planning solid code extractions. ```bash indexion plan solid --from=src/a,src/b --include='*.mbt' --exclude='*_test.mbt' ``` -------------------------------- ### Run indexion segment with custom segment sizes Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-segment/SKILL.md Customize the minimum, maximum, and target character sizes for the generated text segments. This allows for finer control over segment granularity. ```bash indexion segment --min-size=200 --max-size=3000 --target-size=800 document.txt output/ ``` -------------------------------- ### Align Requirements with Source Specification Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Compares requirements against source specification files to check for vocabulary overlap. Use a threshold to ignore minor differences. This command helps identify potential gaps or misalignments early in the process. ```bash indexion spec align diff requirements.md src/ --threshold 0.3 ``` -------------------------------- ### Generate Brief for Short Tasks Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-agent-orient/SKILL.md Generate a brief for a short task directly. If the task is in a language or wording not present in the repository's identifiers, provide a short codebase-vocabulary gloss to --task. ```bash indexion agent orient --task "add a name/content drift audit" . ``` -------------------------------- ### Verify Code Graph and Semantic Search Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-identity/SKILL.md Use `indexion doc graph` to inspect the code's structure and `indexion grep` for semantic searching of symbols. These commands aid in verifying code ownership and references before making changes. ```bash indexion doc graph --format=text ``` ```bash indexion grep --semantic=name: . ``` -------------------------------- ### Convert Spec Document to SDD Requirements Source: https://context7.com/trkbt10/indexion-skills/llms.txt Converts RFC or specification documents into Spec-Driven Development (SDD) requirements format. Specify output file and input document. ```bash indexion spec draft --output .kiro/specs/myfeature/requirements.md rfc.md ``` ```bash indexion spec draft --output requirements.md spec.spec.txt # ISO/IEC format ``` -------------------------------- ### Explore shared vocabulary with tree structure comparison Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Use the `indexion explore` command to compare two files and identify shared vocabulary, useful for understanding concept leakage. Set threshold to 0 for a comprehensive comparison. ```bash indexion explore file_a.mbt file_b.mbt --threshold=0 --strategy=apted ``` -------------------------------- ### Combine Indexion Grep for Code Review Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-search/SKILL.md Combine multiple `indexion grep` commands for a comprehensive post-commit quality check, identifying potential issues like O(n^2) hotspots, missing documentation, unnecessary wrappers, long functions, and complex signatures. ```bash # Post-commit quality check indexion grep "for ... for" src/ # O(n^2) hotspots indexion grep --undocumented src/ # Missing docs indexion grep --semantic=proxy src/ # Unnecessary wrappers indexion grep --semantic=long:50 src/ # Overly long functions indexion grep --semantic=params-gte:4 src/ # Complex signatures ``` -------------------------------- ### Generate Indexion Reports After Stall Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md After confirming a stall and killing the process, use these commands to generate alignment and verification reports if uncommitted work exists and tests pass. ```bash indexion spec align diff $SPEC_DIR/requirements.md src/ \ --format markdown --threshold 0.3 -o $REPORT_DIR/align-current.md ``` ```bash indexion spec verify --spec="$SPEC_DIR/requirements.md" src/ \ --format md -o $REPORT_DIR/verify-current.md ``` -------------------------------- ### Draft SDD Requirements from ISO/IEC Standards Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Extract text from ISO/IEC standard PDFs, clean it, and then draft SDD requirements. Ensure the extracted text is saved to a `.spec.txt` file before processing. ```bash python3 scripts/extract_iso_text.py spec.pdf spec.spec.txt indexion spec draft --output .kiro/specs//requirements.md spec.spec.txt ``` -------------------------------- ### Optimize Search with Digest Index and Scope Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-search/SKILL.md For slow `search` performance on large codebases, first build a digest index using `indexion digest build src/`. Then, narrow the scope with `--include` for faster queries. ```bash indexion digest build src/ ``` ```bash indexion search --include='*.mbt' "query" src/ ``` -------------------------------- ### Traceability Chain for Spec Alignment Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Establish a full traceability chain by checking alignment between adjacent abstraction levels: source spec to requirements, and requirements to design. This ensures comprehensive coverage and consistency. ```bash # 1. Source spec ↔ requirements (fidelity) indexion spec align diff requirements.md source-spec.spec.txt --threshold 0.3 # 2. Requirements ↔ design (design coverage) indexion spec align diff requirements.md design.md --threshold 0.3 ``` -------------------------------- ### Reconcile Code and Documentation for Drift Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-documentation/SKILL.md Detect drift between implementation code and documentation. This command compares code symbols against documentation and reports vocabulary divergence, stale docs, and missing documentation. ```bash indexion plan reconcile --format=md . ``` -------------------------------- ### Specify extraction target for shared code Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md When using `indexion plan solid`, you can specify a target directory (`--to`) where the extracted shared code should be placed, facilitating the creation of common modules. ```bash # Specify extraction target indexion plan solid --from=src/a,src/b --to=src/common ``` -------------------------------- ### Trace references before consolidation Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Before fixing duplicates, use `indexion grep` to trace references of specific types or names. This helps understand the scope and impact of the duplication. ```bash # Step 2: Use grep to trace references before consolidating indexion grep "TypeIdent:TfidfEmbeddingProvider" src/ indexion grep --semantic=name:is_whitespace src/ ``` -------------------------------- ### Update Wiki Page Artifacts Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-wiki/SKILL.md Use this command to update a wiki page's content, manifest entry, search index, and audit log simultaneously. Ensure all required parameters like page ID, content path, sources, provenance, actor, and wiki directory are provided. ```bash indexion wiki pages update \ --id= \ --content=.indexion/wiki/.md \ --sources="" \ --provenance=synthesized \ --actor="agent:claude" \ --wiki-dir=.indexion/wiki ``` -------------------------------- ### Ingest and Detect Stale Wiki Pages Source: https://context7.com/trkbt10/indexion-skills/llms.txt Ingests wiki pages into the index. Use --dry-run to preview changes without modifying the index. ```bash indexion wiki pages ingest --wiki-dir=.indexion/wiki ``` ```bash indexion wiki pages ingest --dry-run --wiki-dir=.indexion/wiki # preview only ``` -------------------------------- ### Run indexion segment with custom output prefix Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-segment/SKILL.md Define a custom prefix for the output segment files. This helps in organizing and identifying the generated chunks. ```bash indexion segment --prefix=chunk document.txt output/ ``` -------------------------------- ### Verify Refactoring Cleanup Source: https://context7.com/trkbt10/indexion-skills/llms.txt Re-runs the refactoring plan with specific thresholds and include patterns to verify that duplication has been eliminated. Requires threshold, include patterns, and source directory. ```bash indexion plan refactor --threshold=0.9 --include='*.mbt' src/ ``` -------------------------------- ### Run indexion segment with adaptive threshold mode Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-segment/SKILL.md Enable adaptive threshold mode, which is the default behavior, for dynamic adjustment of the divergence threshold during segmentation. Use the --adaptive flag to explicitly enable it. ```bash indexion segment --adaptive document.txt output/ ``` -------------------------------- ### Generate Per-Package READMEs Source: https://context7.com/trkbt10/indexion-skills/llms.txt Generates README files for individual packages from doc comments, without overwriting existing files. ```bash # Generate per-package READMEs from doc comments (non-overwriting) indexion doc readme --per-package src/ cmd/ ``` -------------------------------- ### Verify Requirements vs. Design Alignment Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Compares the generated design specification against the requirements document to ensure alignment. The output is formatted as Markdown and saved to a report file. The changes are then staged and committed. ```bash indexion spec align diff $SPEC_DIR/requirements.md $SPEC_DIR/design.md \ --format markdown --threshold 0.3 | tee $REPORT_DIR/req-design-align.md git add $SPEC_DIR && git commit -m "spec: design for $FEATURE" ``` -------------------------------- ### Confirm Owner with Focused Tools Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-agent-orient/SKILL.md Use distinguishing terms from the brief and user task to confirm the owner with focused tools like doc graph, grep, or search. Refine queries if results drift toward supporting systems. ```bash indexion doc graph --format=text ``` ```bash indexion grep --semantic=name: . ``` ```bash indexion search "" . ``` -------------------------------- ### Find trivial wrapper functions Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-refactor/SKILL.md Use `indexion plan unwrap` or `grep --semantic=proxy` to identify functions that are simple wrappers around other functions. Removing these can simplify the codebase and reduce indirection. ```bash indexion plan unwrap ``` ```bash grep --semantic=proxy ``` -------------------------------- ### Indexion TOML Configuration Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-readme/SKILL.md Configure indexion's behavior using a .indexion.toml file. The `config_path` setting allows auto-loading of `doc.json`. ```toml [doc] config_path = "doc.json" # auto-loads doc.json without --config per_package = true # makes `doc readme ` default to --per-package ``` -------------------------------- ### Full Spec Verification Loop Source: https://context7.com/trkbt10/indexion-skills/llms.txt Executes a full validation loop, verifying the implementation against the specification. Requires the spec file and the source code directory. Supports different output formats. ```bash indexion spec verify --spec='.kiro/specs/myfeature/requirements.md' src/lib/ --format md ``` -------------------------------- ### Align Specs with Source Code Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Aligns specification files with source code, checking for differences and shallow implementations. Use `--fail-on any` to include shallow detection. ```bash indexion spec align diff .kiro/specs//requirements.md src// --format markdown --threshold 0.3 ``` ```bash indexion spec align status .kiro/specs//requirements.md src// --threshold 0.3 --fail-on any ``` -------------------------------- ### Generate Dependency Diagram with Custom Title and Output Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-documentation/SKILL.md Generate a dependency diagram with a custom title and specify an output file. This is useful for organizing and naming the generated diagrams. ```bash indexion doc graph --title="KGF Dependencies" --output=deps.mmd src/kgf/ ``` -------------------------------- ### Verify README Additiveness Source: https://context7.com/trkbt10/indexion-skills/llms.txt Verifies that the assembled README is purely additive, preventing silent deletions. ```bash # Verify the assembled README is purely additive (no silent deletions) git show HEAD:README.md > /tmp/README.before.md indexion plan drift --top=20 /tmp/README.before.md README.md ``` -------------------------------- ### Monitor Codex Implementation Progress Source: https://github.com/trkbt10/indexion-skills/blob/main/skills/indexion-sdd/SKILL.md Provides commands to monitor the progress of codex implementation, including real-time event streaming, stall detection via CPU and network usage, and resuming interrupted processes. ```bash # Real-time event stream tail -f $REPORT_DIR/impl.jsonl | jq -r \ 'if .type == "item.completed" and .item.type == "agent_message" then "MSG: " + (.item.text[:120]) elif .type == "item.completed" and .item.type == "command_execution" then "CMD: " + (.item.command[:60]) + " -> " + (.item.exit_code|tostring) else empty end' # Stall detection ps -p $CODEX_PID -o cputime,%cpu lsof -p $CODEX_PID 2>/dev/null | grep tcp # Resume after interruption codex exec resume --last ```