@toolbaux/guardian 0.1.6 → 0.1.8

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.
@@ -131,9 +131,28 @@ export function renderContextBlock(architecture, ux, options) {
131
131
  lines.push("");
132
132
  }
133
133
  }
134
+ // Deep intelligence — directive instructions for AI agents
135
+ lines.push("### How to Use This Context");
136
+ lines.push("");
137
+ lines.push("> **Before reading source files**, run `guardian search --query \"<keyword>\"` to find relevant endpoints, models, components, and modules. This is faster than file exploration.");
138
+ lines.push("");
139
+ lines.push("**Deeper analysis files** (read when you need specifics):");
140
+ lines.push("- `.specs/machine/architecture.snapshot.yaml` — every file, export symbol, and import edge per module");
141
+ lines.push("- `.specs/machine/codebase-intelligence.json` — API registry: handlers, service calls, request/response schemas");
142
+ lines.push("- `.specs/machine/structural-intelligence.json` — depth and complexity classification per module");
143
+ if (architecture.dependencies.file_graph.length > 0) {
144
+ lines.push("- File-level dependency graph available in `architecture.snapshot.yaml → dependencies.file_graph`");
145
+ }
146
+ if (architecture.analysis?.circular_dependencies?.length > 0) {
147
+ lines.push(`- ⚠ ${architecture.analysis.circular_dependencies.length} circular dependency cycle(s) detected — check snapshot before refactoring`);
148
+ }
149
+ lines.push("");
150
+ lines.push("**Commands:**");
151
+ lines.push("- `guardian search --query \"auth\"` — find everything related to a feature");
152
+ lines.push("- `guardian context --focus \"auth\"` — generate AI context focused on one area");
153
+ lines.push("- `guardian drift` — check if architecture has shifted since last baseline");
154
+ lines.push("");
134
155
  lines.push("<!-- /guardian:context -->");
135
- // No global truncation — each section self-limits via .slice().
136
- // Every section is guaranteed to appear with at least a few entries.
137
156
  return lines.join("\n");
138
157
  }
139
158
  function tokenize(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolbaux/guardian",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "Architectural intelligence for codebases. Verify that AI-generated code matches your architectural intent.",
6
6
  "keywords": [