Adviser
by pnocera
Protocol-driven analysis executor. The consuming agent discovers relevant protocols, composes a prompt, and calls this tool.
Skill Details
Repository Files
13 files in this skill directory
name: adviser description: Protocol-driven analysis executor. The consuming agent discovers relevant protocols, composes a prompt, and calls this tool.
Adviser Skill
A protocol-driven analysis executor. The consuming agent discovers relevant AISP protocols from protocols/, composes a prompt, and calls this tool to execute analysis.
How to Use
Step 1: Discover Protocols
Scan protocols/*.aisp and read headers to find relevant protocols:
𝔸<version>.<name>@<date>
γ≔<domain.path> ;; Domain (e.g., software.architecture)
ρ≔⟨tag1,tag2,...⟩ ;; Tags for matching
⊢<claims> ;; Formal claims
Match protocols to your activity context using semantic reasoning:
- Domain matching: Activity "code architecture review" →
γ≔software.architecture.* - Tag intersection: Activity mentions "dependencies" → protocols with
DIPordepstags - Claim compatibility: Activity requires validation → protocols claiming
∧verification
Step 2: Compose Prompt
Write a prompt file to ./tmp/adviser-prompt-<activity>-<timestamp>.md containing:
- Role & Objective - Prime the LLM for the analysis task
- Activity Context - Describe what you're analyzing and why
- Protocols - Full content of selected protocols wrapped in
<protocol>tags - Output Requirements - AISP 5.1 format requirements
Example structure:
# Dynamic Adviser Prompt
## Role & Objective
You are an expert adviser analyzing the provided input. Apply the protocols
below rigorously to identify issues, gaps, and recommendations.
## Activity Context
- Activity: Design review for authentication system refactor
- Focus areas: Security, extensibility, error handling
- Expected output: AISP verdict with categorized issues
## Protocols to Apply
### Protocol: SOLID Principles
<protocol>
[Full content of solid.aisp]
</protocol>
### Protocol: Adviser Flow
<protocol>
[Full content of flow.aisp]
</protocol>
## Output Requirements
Respond in AISP 5.1 format. Your response MUST:
1. Start with header: 𝔸1.0.adviser@YYYY-MM-DD
2. Include required blocks: ⟦Ω⟧, ⟦Σ⟧, ⟦Γ⟧, ⟦Λ⟧, ⟦Ε⟧
3. Categorize issues by severity: ⊘ (critical), ◊⁻ (high), ◊ (medium), ◊⁺ (low)
4. Conclude with verdict: ⊢Verdict(approve|revise|reject)
Return a JSON object with:
- summary: Brief overview of findings
- issues: Array of {severity, description, location?, recommendation?}
- suggestions: Array of improvement recommendations
Important: Keep generated prompts in ./tmp/ for analysis and SKILL.md improvement.
Step 3: Execute
adviser --prompt-file ./tmp/adviser-prompt-<activity>-<timestamp>.md \
--input <file-to-analyze> \
--mode aisp
Step 4: Parse Output
Read the manifest from stdout to find the .aisp output file:
[Adviser] Output manifest: /path/to/review.aisp.manifest.json
Parse the AISP file for:
⊢Verdict(approve|revise|reject)— Final verdict- Issue counts in
⟦Σ:Types⟧block - Individual issues in
⟦Λ:Analysis⟧block
Command Reference
adviser --prompt-file <path> --input <file> [options]
| Argument | Required | Description |
|---|---|---|
--prompt-file, -p |
Yes | Path to composed system prompt |
--input, -i |
Yes | Path to content to analyze |
--mode, -m |
No | Output: aisp (default), human, workflow |
--output, -o |
No | Explicit output path |
--output-dir |
No | Output directory (default: docs/reviews/) |
--timeout, -t |
No | Timeout in ms (default: 1,800,000) |
Protocol Selection Examples
| Activity | Recommended Protocols | Rationale |
|---|---|---|
| Architecture review | solid.aisp, flow.aisp |
SOLID principles + workflow structure |
| Implementation planning | flow.aisp, yagni.aisp |
Task flow + necessity validation |
| Code verification | solid.aisp, triangulation.aisp |
Code quality + multi-pass verification |
| Cost analysis | yagni.aisp |
Focus on necessity and efficiency |
AISP Output Reference
See motifs/aisp-quick-ref.md for interpreting AISP output:
| Symbol | Meaning |
|---|---|
⊢Verdict(approve) |
Pass - proceed with work |
⊢Verdict(revise) |
Needs changes - address high issues |
⊢Verdict(reject) |
Critical issues - significant rework needed |
⊘ |
Critical severity |
◊⁻ |
High severity |
◊ |
Medium severity |
◊⁺ |
Low severity |
Error Handling
| Error | Cause | Resolution |
|---|---|---|
| "Missing required --prompt-file" | No prompt provided | Create prompt file per Step 2 |
| "Prompt file not found" | Invalid path | Check path exists |
| "Prompt file is empty" | Empty file | Add content per Step 2 template |
| "Input file not found" | Invalid input path | Verify input file exists |
Prompt Preservation
Generated prompts should be preserved for analysis:
- Helps improve SKILL.md instructions
- Reveals agent reasoning patterns
- Identifies protocol selection heuristics that work well
- Use naming:
adviser-prompt-<activity>-<timestamp>.md
Related Skills
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Anndata
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.
Xlsx
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
Tensorboard
Visualize training metrics, debug models with histograms, compare experiments, visualize model graphs, and profile performance with TensorBoard - Google's ML visualization toolkit
Deeptools
NGS analysis toolkit. BAM to bigWig conversion, QC (correlation, PCA, fingerprints), heatmaps/profiles (TSS, peaks), for ChIP-seq, RNA-seq, ATAC-seq visualization.
Scvi Tools
This skill should be used when working with single-cell omics data analysis using scvi-tools, including scRNA-seq, scATAC-seq, CITE-seq, spatial transcriptomics, and other single-cell modalities. Use this skill for probabilistic modeling, batch correction, dimensionality reduction, differential expression, cell type annotation, multimodal integration, and spatial analysis tasks.
Statsmodels
Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.
Scikit Survival
Comprehensive toolkit for survival analysis and time-to-event modeling in Python using scikit-survival. Use this skill when working with censored survival data, performing time-to-event analysis, fitting Cox models, Random Survival Forests, Gradient Boosting models, or Survival SVMs, evaluating survival predictions with concordance index or Brier score, handling competing risks, or implementing any survival analysis workflow with the scikit-survival library.
Neurokit2
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
Statistical Analysis
Statistical analysis toolkit. Hypothesis tests (t-test, ANOVA, chi-square), regression, correlation, Bayesian stats, power analysis, assumption checks, APA reporting, for academic research.
