### Quick Start: Full API Usage
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/INDEX.md
Demonstrates accessing the full API of the AI Interaction Atlas, including getting specific task patterns.
```typescript
// Full API
import * as Atlas from '@quietloudlab/ai-interaction-atlas';
const task = Atlas.getPattern('classify');
console.log(task);
```
--------------------------------
### Example Usage of SYSTEM_TASKS
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to import and use the SYSTEM_TASKS collection, including getting the total count, filtering by layer, and finding specific tasks by name.
```typescript
import { SYSTEM_TASKS, getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
// Get all system tasks
console.log(`${SYSTEM_TASKS.length} system patterns available`);
// Get system tasks by layer
const interactive = getTasksByLayer('layer_interactive');
interactive.system.forEach(task => {
console.log(`Interactive system task: ${task.name}`);
});
// Find logging tasks
const logging = SYSTEM_TASKS.filter(
task => task.name.toLowerCase().includes('log')
);
```
--------------------------------
### Start Dev Server with npm
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/DARK_MODE_GUIDE.md
Use this command to start the development server for building components.
```bash
# Start dev server
npm run dev
```
--------------------------------
### Install Dependencies and Build Package
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/NPM_SETUP.md
Install project dependencies and build the package before publishing. Ensure you are in the correct directory.
```bash
cd atlas-package
# Make sure dependencies are installed
npm install
# Build the package
npm run build
```
--------------------------------
### Start Development Server
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/CONTRIBUTING.md
Run this command to start the local development server. Visit http://localhost:5173 to view your changes in real-time.
```bash
npm run dev
```
--------------------------------
### Clone Repository and Install Dependencies
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/CONTRIBUTING.md
Clone your fork of the repository, navigate into the project directory, and install the necessary dependencies using npm.
```bash
git clone https://github.com/YOUR-USERNAME/ai-interaction-atlas.git
cd ai-interaction-atlas
npm install
```
--------------------------------
### Quick Start with TypeScript
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/README.md
Demonstrates basic usage of the AI Interaction Atlas library in TypeScript, including inspecting tasks, searching patterns, retrieving a pattern, validating a workflow, and getting statistics.
```typescript
import {
AI_TASKS,
searchPatterns,
getPattern,
validateWorkflow,
getAtlasStats
} from '@quietloudlab/ai-interaction-atlas';
// Inspect available AI capabilities
console.log(`${AI_TASKS.length} AI task patterns available`);
// Search patterns by keyword
const reviewPatterns = searchPatterns('review', { dimensions: ['human'] });
// Retrieve a specific pattern
const classifyIntent = getPattern('classify-intent');
console.log(classifyIntent?.description);
// Validate a proposed system workflow
const validation = validateWorkflow([
'ai_classify_intent',
'human_review_output',
'system_log_event'
]);
if (!validation.valid) {
console.error('Invalid pattern IDs:', validation.invalidIds);
}
// Get Atlas statistics
console.log(getAtlasStats());
```
--------------------------------
### Install with Yarn
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/README.md
Install the AI Interaction Atlas package using Yarn.
```bash
yarn add @quietloudlab/ai-interaction-atlas
```
--------------------------------
### Install with pnpm
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/README.md
Install the AI Interaction Atlas package using pnpm.
```bash
pnpm add @quietloudlab/ai-interaction-atlas
```
--------------------------------
### Example Usage of Touchpoints
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to import and use touchpoint definitions, including filtering by category and accessing examples.
```typescript
import { TOUCHPOINTS, filterTouchpointsByCategory } from '@quietloudlab/ai-interaction-atlas';
// Get screen-based touchpoints
const screens = filterTouchpointsByCategory('screen_interface');
screens.forEach(tp => {
console.log(`${tp.name}: ${tp.examples.join(', ')}`);
});
// Find conversational touchpoints
const chat = filterTouchpointsByCategory('conversational');
chat.forEach(tp => {
console.log(`${tp.name} - ${tp.description}`);
});
```
--------------------------------
### Exporting EXAMPLES Array
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Exports the constant array named EXAMPLES, which holds all documented AI interaction examples.
```typescript
export const EXAMPLES: Example[]
```
--------------------------------
### Search Patterns in Vue
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Define a Vue component with a `search` method to find patterns. This example assumes a basic Vue setup.
```typescript
import { defineComponent } from 'vue';
import { searchPatterns } from '@quietloudlab/ai-interaction-atlas';
export default defineComponent({
data() {
return {
results: []
};
},
methods: {
search(query) {
this.results = searchPatterns(query);
}
}
});
```
--------------------------------
### Example Usage of Constraints
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to import and use constraint definitions, including filtering by category and finding specific constraints.
```typescript
import { CONSTRAINTS, filterConstraintsByCategory } from '@quietloudlab/ai-interaction-atlas';
// Get quality & safety constraints
const safety = filterConstraintsByCategory('quality_safety');
safety.forEach(c => {
console.log(`${c.name}: ${c.description}`);
});
// Find latency constraints
const latency = CONSTRAINTS.find(c => c.name.includes('Latency'));
console.log(`${latency?.name} - ${latency?.ux_note}`);
// Get all constraint IDs
const ids = CONSTRAINTS.map(c => c.id);
```
--------------------------------
### Example Usage of searchPatterns
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/README.md
Demonstrates a basic call to the searchPatterns function. Ensure the function is imported before use.
```typescript
// Real example usage
const result = searchPatterns('detect');
```
--------------------------------
### Example Usage of WORKFLOW_TEMPLATES
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to filter workflow templates by their primary use case and log their names and descriptions.
```typescript
import { WORKFLOW_TEMPLATES } from '@quietloudlab/ai-interaction-atlas';
// Find templates by use case
const templates = WORKFLOW_TEMPLATES.filter(t =>
t.primary_use_case.includes('classification')
);
templates.forEach(template => {
console.log(`${template.name}: ${template.description}`);
console.log(`Nodes: ${template.nodes.length}, Edges: ${template.edges.length}`);
});
```
--------------------------------
### Clone Repository and Install Dependencies
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/README.md
Clone the AI Interaction Atlas repository and install project dependencies. This is necessary for local development and contributing to the project.
```bash
# Clone the repository
git clone https://github.com/quietloudlab/ai-interaction-atlas.git
cd ai-interaction-atlas
# Install dependencies
npm install
# Start development server
npm run dev
```
--------------------------------
### Filtering EXAMPLES Data
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to filter the EXAMPLES array to find specific types of examples, such as those in healthcare, for a particular task, or of high complexity.
```typescript
import { EXAMPLES } from '@quietloudlab/ai-interaction-atlas';
// Find examples in healthcare
const healthcare = EXAMPLES.filter(e =>
e.industry.includes('Healthcare')
);
// Get examples for a specific task
const taskExamples = EXAMPLES.filter(e =>
e.primary_task_id === 'task_classify'
);
// Find high-complexity examples
const advanced = EXAMPLES.filter(e => e.complexity === 'High');
```
--------------------------------
### Example Usage of LAYERS
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to iterate through system layers, access their properties, and retrieve associated tasks. Ensure 'getTasksByLayer' is imported if used.
```typescript
import { LAYERS, getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
// Iterate all layers
LAYERS.forEach(layer => {
console.log(`${layer.name} (${layer.role})`);
console.log(`Color: ${layer.color}`);
if (layer.guidance) {
console.log(`When to use: ${layer.guidance.when_to_use}`);
}
});
// Get tasks in each layer
LAYERS.forEach(layer => {
const tasks = getTasksByLayer(layer.id);
console.log(`${layer.name}: ${tasks.ai.length} AI, ${tasks.human.length} human, ${tasks.system.length} system`);
});
```
--------------------------------
### Example Interface Definition
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Defines the structure for an individual documented example, including its ID, task, title, description, industry, complexity, tags, image URL, and associated nodes.
```typescript
interface Example {
id: string;
primary_task_id: string;
title: string;
description: string;
industry: string;
complexity: 'Low' | 'Medium' | 'High';
tags: string[];
image_url: string;
nodes: Node[];
}
```
--------------------------------
### Install AI Interaction Atlas NPM Package
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/README.md
Install the AI Interaction Atlas package using npm. This is the first step to using the Atlas data programmatically in your projects.
```bash
npm install @quietloudlab/ai-interaction-atlas
```
--------------------------------
### Quick Start: Basic Search and Stats
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/INDEX.md
Perform a basic search for patterns and retrieve atlas statistics. Imports necessary functions from the library.
```typescript
// Basic search
import { searchPatterns, getAtlasStats } from '@quietloudlab/ai-interaction-atlas';
const results = searchPatterns('classify');
const stats = getAtlasStats();
console.log(`Found: ${results.length}, Total: ${stats.total}`);
```
--------------------------------
### Example Usage of HUMAN_TASKS
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to import and use the HUMAN_TASKS collection, including checking the total count, searching for specific tasks, and iterating through all tasks.
```typescript
import { HUMAN_TASKS, searchPatterns } from '@quietloudlab/ai-interaction-atlas';
// Find all human tasks
console.log(`${HUMAN_TASKS.length} human patterns available`);
// Search for review tasks
const reviews = searchPatterns('review', { dimensions: ['human'] });
reviews.forEach(task => {
if (task.task_type === 'human') {
console.log(`Variants: ${task.common_variants.join(', ')}`);
}
});
// Iterate all human tasks
HUMAN_TASKS.forEach(task => {
console.log(`${task.name}: ${task.elevator_pitch}`);
});
```
--------------------------------
### Example Usage of DATA_ARTIFACTS
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Shows how to import and utilize the DATA_ARTIFACTS collection, including filtering by category, finding compatible artifacts, and retrieving artifacts by ID.
```typescript
import { DATA_ARTIFACTS, filterArtifactsByCategory } from '@quietloudlab/ai-interaction-atlas';
// Get all text artifacts
const text = filterArtifactsByCategory('text');
console.log(`Text types: ${text.map(a => a.name).join(', ')}`);
// Find compatible artifacts
const imageArtifact = DATA_ARTIFACTS.find(a => a.id === 'data_image');
if (imageArtifact?.compatible_with) {
console.log(`Compatible with: ${imageArtifact.compatible_with.join(', ')}`);
}
// Get artifact by ID
const embedding = DATA_ARTIFACTS.find(a => a.id === 'data_embedding');
console.log(`${embedding?.name}: ${embedding?.description}`);
```
--------------------------------
### Tree-Shaking Examples
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Demonstrates how different import strategies affect bundle size due to tree-shaking. Importing specific functions results in smaller bundles compared to importing the entire API.
```typescript
// Small: ~2KB
import { getPattern } from '@quietloudlab/ai-interaction-atlas';
```
```typescript
// Medium: ~50KB
import { AI_TASKS, searchPatterns } from '@quietloudlab/ai-interaction-atlas';
```
```typescript
// Large: ~220KB
import * as Atlas from '@quietloudlab/ai-interaction-atlas';
```
--------------------------------
### Example Usage of AI_TASKS
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Demonstrates how to import and use the AI_TASKS collection, including iteration, filtering by layer, accessing elements by index, and filtering by maturity.
```typescript
import { AI_TASKS, filterByLayer } from '@quietloudlab/ai-interaction-atlas';
// Iterate all AI tasks
AI_TASKS.forEach(task => {
console.log(`${task.name} (${task.slug})`);
});
// Find inbound AI tasks
const inbound = filterByLayer(AI_TASKS, 'layer_inbound');
inbound.forEach(task => {
console.log(`Inbound: ${task.name} - ${task.elevator_pitch}`);
});
// Get task by index
const firstTask = AI_TASKS[0];
console.log(`First task: ${firstTask.name}`);
// Filter by maturity
const established = AI_TASKS.filter(
task => task.implementation_notes.maturity === 'established'
);
```
--------------------------------
### Task Relation Example
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/task-types-detailed.md
Demonstrates how to define a 'commonly_followed_by' relation for a task, specifying the target task, relation type, strength, and a reason.
```typescript
// classify task has:
relations: [
{
target_id: "task_review",
type: "commonly_followed_by",
strength: "strong",
reason: "Classifications are often reviewed by humans before acting on them."
}
]
```
--------------------------------
### Build UI Component Library from Task Definitions
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
This example shows how to create a mapping of UI components for different task types (AI, Human, System) by reducing imported task arrays. It assumes the existence of `createAiTaskComponent`, `createHumanTaskComponent`, and `createSystemTaskComponent` functions.
```typescript
import { AI_TASKS, HUMAN_TASKS, SYSTEM_TASKS } from '@quietloudlab/ai-interaction-atlas';
const taskComponents = {
ai: AI_TASKS.reduce((acc, task) => {
acc[task.id] = createAiTaskComponent(task);
return acc;
}, {}),
human: HUMAN_TASKS.reduce((acc, task) => {
acc[task.id] = createHumanTaskComponent(task);
return acc;
}, {}),
system: SYSTEM_TASKS.reduce((acc, task) => {
acc[task.id] = createSystemTaskComponent(task);
return acc;
}, {})
};
```
--------------------------------
### Export Workflow Templates Definition
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Defines the collection of all workflow template examples. This is an array of WorkflowTemplate objects.
```typescript
export const WORKFLOW_TEMPLATES: WorkflowTemplate[]
```
--------------------------------
### Validate and Use Task Patterns
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
This example shows how to safely retrieve a task pattern using `getPattern` and then check if a valid task was returned before accessing its properties.
```typescript
const userInput = 'classify';
// Safe: returns undefined or object
const task = getPattern(userInput);
// Check result
if (task) {
console.log(`Found: ${task.name}`);
} else {
console.log('Pattern not found');
}
```
--------------------------------
### Generate Markdown Documentation for Patterns
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Create markdown documentation for a given pattern by extracting its name, type, description, and example usage. It also includes sections for capabilities and related tasks if they exist on the pattern.
```typescript
import { ATLAS_DATA } from '@quietloudlab/ai-interaction-atlas';
// Create markdown documentation
function generateDocs(pattern) {
let md = `# ${pattern.name}\n\n`;
md += `**Type:** ${pattern.task_type}\n`;
md += `**Layer:** ${pattern.layer_id}\n\n`;
md += `## Description\n${pattern.elevator_pitch}\n\n`;
md += `## Example\n${pattern.example_usage}\n\n`;
if ('capabilities' in pattern) {
md += `## Capabilities\n`;
pattern.capabilities.forEach(cap => {
md += `- **${cap.name}** (${cap.tag}): ${cap.example}\n`;
});
}
if ('relations' in pattern) {
md += `## Related Tasks\n`;
pattern.relations.forEach(rel => {
md += `- ${rel.target_id} (${rel.type}): ${rel.reason}\n`;
});
}
return md;
}
// Generate for all AI tasks
ATLAS_DATA.ai_tasks.forEach(task => {
const doc = generateDocs(task);
console.log(doc);
});
```
--------------------------------
### Minimal Import for Search Functionality
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Import only the necessary functions for searching patterns. This is useful for reducing bundle size when only search capabilities are needed. Example demonstrates searching for 'detect'.
```typescript
import { searchPatterns, getPattern } from '@quietloudlab/ai-interaction-atlas';
const result = searchPatterns('detect');
```
--------------------------------
### Explore Task Relations
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Examine relationships between tasks using the `relations` property. This example shows how to find tasks that are commonly followed by a given task and tasks that a given task enables.
```typescript
import { getPattern, AI_TASKS } from '@quietloudlab/ai-interaction-atlas';
const task = getPattern('classify');
if (task && 'relations' in task) {
// Get commonly followed tasks
const next = task.relations
.filter(r => r.type === 'commonly_followed_by')
.map(r => getPattern(r.target_id));
console.log('After classify, typically do:');
next.forEach(t => {
if (t) console.log(` - ${t.name}`);
});
}
// Find task prerequisites
const extract = getPattern('extract');
if (extract && 'relations' in extract) {
const enables = extract.relations.filter(r => r.type === 'enables');
console.log(`Extract enables: ${enables.map(e => e.target_id).join(', ')}`);
}
```
--------------------------------
### Fetch Patterns in React
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Use `useEffect` to fetch patterns by dimension and update component state. Ensure the `ai-interaction-atlas` library is installed.
```typescript
import { useEffect, useState } from 'react';
import { getPatternsByDimension } from '@quietloudlab/ai-interaction-atlas';
function PatternList() {
const [patterns, setPatterns] = useState([]);
useEffect(() => {
const ai = getPatternsByDimension('ai');
setPatterns(ai);
}, []);
return (
{patterns.map(p => (
- {p.name}
))}
);
}
```
--------------------------------
### Define Touchpoint Structure
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/types.md
Use this interface to define the structure of a touchpoint, specifying its ID, name, category, icon, description, and examples.
```typescript
interface TouchpointDefinition {
id: string;
name: string;
category: TouchpointCategory;
icon: string;
description: string;
examples: string[];
}
```
--------------------------------
### Browse Tasks by Layer
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Use `getTasksByLayer` to retrieve all tasks within a specified layer. The example also demonstrates iterating through all defined layers to navigate tasks.
```typescript
import { getTasksByLayer, LAYERS } from '@quietloudlab/ai-interaction-atlas';
// Get all tasks in a layer
const inbound = getTasksByLayer('layer_inbound');
console.log(`Inbound layer:`);
console.log(` AI: ${inbound.ai.length}, Human: ${inbound.human.length}, System: ${inbound.system.length}`);
// Build a layer navigator
LAYERS.forEach(layer => {
const tasks = getTasksByLayer(layer.id);
console.log(`${layer.name} (${layer.role})`);
tasks.ai.forEach(t => console.log(` - ${t.name}`));
});
```
--------------------------------
### Cache Search Results
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Implement a caching mechanism for search results to avoid redundant computations and improve performance. This example uses a Map to store results keyed by query and options.
```typescript
const searchCache = new Map();
function cachedSearch(query, options) {
const key = JSON.stringify({ query, options });
if (searchCache.has(key)) {
return searchCache.get(key);
}
const result = searchPatterns(query, options);
searchCache.set(key, result);
return result;
}
```
--------------------------------
### Get Specific Pattern by Slug or ID
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Retrieve a specific AI interaction pattern using its unique slug or ID with the `getPattern` function. Includes an example of type-safe access to pattern details.
```typescript
import { getPattern } from '@quietloudlab/ai-interaction-atlas';
// By slug
const task = getPattern('classify');
// By ID
const artifact = getPattern('data_text');
const constraint = getPattern('const_latency');
// Type-safe access
if (task && task.task_type === 'ai') {
console.log(`AI task: ${task.name}`);
console.log(`Maturity: ${task.implementation_notes.maturity}`);
console.log(`Capabilities: ${task.capabilities.map(c => c.name).join(', ')}`);
}
```
--------------------------------
### Build Project for Production
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/CONTRIBUTING.md
Execute this command to build the project for production. This is a crucial step to test if your changes result in a working production build.
```bash
npm run build
```
--------------------------------
### Build and Preview for Production
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/README.md
Build the project for production and preview the application. These commands are used after making changes or before deploying the Atlas.
```bash
npm run build
npm run preview
```
--------------------------------
### Retrieve All Patterns from a Specific Dimension
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/README.md
Get all AI patterns belonging to a particular dimension, such as 'constraints'.
```typescript
getPatternsByDimension('constraints');
```
--------------------------------
### Manual npm Publish
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/NPM_SETUP.md
Perform the first publish manually to register the package. Do not use the --provenance flag during local publishing as it's intended for GitHub Actions.
```bash
cd atlas-package
# Login to npm (you'll need your 2FA code)
npm login
# Publish without provenance (local publishing doesn't support it)
npm publish --access public
```
--------------------------------
### Get Pattern by ID
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
Retrieves a specific pattern directly by its unique identifier. This is efficient for direct lookups.
```typescript
import { getPattern } from '@quietloudlab/ai-interaction-atlas';
const task = getPattern('classify-intent');
```
--------------------------------
### Get All Touchpoint IDs
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/validation.md
Retrieves an array of all valid touchpoint IDs. This function requires importing from '@quietloudlab/ai-interaction-atlas'.
```typescript
import { getAllTouchpointIds } from '@quietloudlab/ai-interaction-atlas';
const touchpoints = getAllTouchpointIds();
console.log(`Total touchpoints: ${touchpoints.length}`);
```
--------------------------------
### Local Package Testing Commands
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/NPM_SETUP.md
Commands to sync data, build, and pack the npm package for local testing before pushing to GitHub.
```bash
cd atlas-package
./sync-data.sh
npm run build
npm pack
git add .
git commit -m "feat: update atlas data"
git push origin main
```
--------------------------------
### Capability Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/types.md
Represents a concrete capability of an AI task, defined by a name, a machine-readable tag, and a usage example.
```typescript
interface Capability {
name: string;
tag: string;
example: string;
}
```
--------------------------------
### Get All Constraint IDs
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/validation.md
Retrieves an array of all valid constraint IDs. This function is helpful for validating constraint identifiers.
```typescript
import { getAllConstraintIds } from '@quietloudlab/ai-interaction-atlas';
const constraints = getAllConstraintIds();
console.log(`Total constraints: ${constraints.length}`);
```
--------------------------------
### Build UI with Categories
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
This integration pattern illustrates how to build UI components by filtering artifacts and constraints based on categories. It fetches and renders items for specified categories.
```typescript
import {
getCategories,
filterArtifactsByCategory,
filterConstraintsByCategory
} from '@quietloudlab/ai-interaction-atlas';
const dataCategories = getCategories('data');
const constraintCategories = getCategories('constraints');
dataCategories.forEach(cat => {
const items = filterArtifactsByCategory(cat);
renderCategory(cat, items);
});
```
--------------------------------
### Get All Task IDs
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/validation.md
Retrieves an array of all valid task IDs. Useful for validating user-provided task identifiers.
```typescript
import { getAllTaskIds } from '@quietloudlab/ai-interaction-atlas';
const allIds = getAllTaskIds();
console.log(`Total tasks in Atlas: ${allIds.length}`);
// Use for validation
const userIds = ['task_classify', 'bad_id', 'task_extract'];
const valid = userIds.filter(id => allIds.includes(id));
console.log(`Valid user tasks: ${valid.join(', ')}`);
```
--------------------------------
### Testing Contrast in Browser Console
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/DARK_MODE_GUIDE.md
Use the browser's developer console for quick contrast checks. Inspect elements to find computed color values and verify them using an external contrast checker.
```bash
# Quick test in browser console
# 1. Inspect element
# 2. Check computed color values
# 3. Verify in contrast checker
```
--------------------------------
### Main Entry Point Exports
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
Imports all available data collections, types, and utilities from the main entry point of the package. Ensure these imports are correctly configured for your project.
```typescript
import {
// Data collections
AI_TASKS,
HUMAN_TASKS,
SYSTEM_TASKS,
DATA_ARTIFACTS,
CONSTRAINTS,
TOUCHPOINTS,
LAYERS,
WORKFLOW_TEMPLATES,
EXAMPLES,
ATLAS_DATA,
// Types
AiTask,
HumanTask,
SystemTask,
Task,
DataArtifactDefinition,
ConstraintDefinition,
TouchpointDefinition,
Layer,
WorkflowTemplate,
Example,
BuilderNode,
BuilderEdge,
Persona,
AtlasData,
// Utilities
searchPatterns,
getPattern,
getPatternsByDimension,
filterByLayer,
getTasksByLayer,
getLayer,
filterArtifactsByCategory,
filterConstraintsByCategory,
filterTouchpointsByCategory,
getCategories,
getAtlasStats,
isAiTask,
isHumanTask,
isSystemTask,
isValidTaskId,
isValidArtifactId,
isValidConstraintId,
isValidTouchpointId,
validateWorkflow,
getAllTaskIds,
getAllArtifactIds,
getAllConstraintIds,
getAllTouchpointIds,
} from '@quietloudlab/ai-interaction-atlas';
```
--------------------------------
### Get Tasks by Layer
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
Retrieves tasks associated with a specific system layer, like 'layer_inbound'. Helps in understanding system architecture.
```typescript
import { getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
const inbound = getTasksByLayer('layer_inbound');
```
--------------------------------
### Package Structure
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/README.md
The package is organized into several directories representing different aspects of AI interaction patterns, data artifacts, constraints, and utilities.
```bash
@quietloudlab/ai-interaction-atlas/
├── AI_TASKS (~45 patterns)
├── HUMAN_TASKS (~28 patterns)
├── SYSTEM_TASKS (~31 patterns)
├── DATA_ARTIFACTS (~52 types)
├── CONSTRAINTS (~42 types)
├── TOUCHPOINTS (~18 types)
├── LAYERS (4 system layers)
├── WORKFLOW_TEMPLATES
├── EXAMPLES
└── Utilities (search, filter, validate)
```
--------------------------------
### Get All Artifact IDs
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/validation.md
Retrieves an array of all valid data artifact IDs. Use this to ensure artifact identifiers are recognized by the system.
```typescript
import { getAllArtifactIds } from '@quietloudlab/ai-interaction-atlas';
const artifacts = getAllArtifactIds();
console.log(`Total artifacts: ${artifacts.length}`);
```
--------------------------------
### Get Atlas Statistics
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/README.md
Fetch overall statistics for the AI Interaction Atlas. This provides a summary count of different task types.
```typescript
import { getAtlasStats } from '@quietloudlab/ai-interaction-atlas';
const stats = getAtlasStats();
// { ai: 45, human: 28, system: 31, data: 52, ... }
```
--------------------------------
### Get Tasks by Layer
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/task-types-detailed.md
Fetches all tasks belonging to a specific layer and logs their names. Useful for organizing and accessing tasks by their functional layer.
```typescript
import { getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
const inbound = getTasksByLayer('layer_inbound');
inbound.ai.forEach(task => console.log(task.name));
```
--------------------------------
### Get Task Pattern by ID
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/task-types-detailed.md
Retrieves a task pattern by its ID and logs its elevator pitch. This is useful for accessing specific task configurations.
```typescript
import { getPattern } from '@quietloudlab/ai-interaction-atlas';
const task = getPattern('classify');
console.log(task.elevator_pitch);
```
--------------------------------
### SearchOptions Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/search-and-retrieval.md
Defines the configuration object for search behavior. Use this to specify dimensions, case sensitivity, whether to search descriptions, and the result limit.
```typescript
interface SearchOptions {
dimensions?: Array<'ai' | 'human' | 'system' | 'data' | 'constraints' | 'touchpoints'>;
caseSensitive?: boolean;
searchDescription?: boolean;
limit?: number;
}
```
--------------------------------
### Correct Import Path
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Demonstrates the correct way to import modules from the AI Interaction Atlas package. Ensure imports are from the package root to avoid 'module not found' errors.
```typescript
// ✓ Correct
import { AI_TASKS } from '@quietloudlab/ai-interaction-atlas';
// ✗ Wrong
import { AI_TASKS } from '@quietloudlab/ai-interaction-atlas/dist';
```
--------------------------------
### Build a Pattern Browser
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
Use this pattern to dynamically build a browser interface for AI interaction patterns. It fetches patterns categorized by different dimensions.
```typescript
import {
getPatternsByDimension,
getCategories,
filterConstraintsByCategory
} from '@quietloudlab/ai-interaction-atlas';
const dimensions = ['ai', 'human', 'system', 'data', 'constraints', 'touchpoints'];
const browser = {};
dimensions.forEach(dim => {
browser[dim] = getPatternsByDimension(dim);
});
```
--------------------------------
### Get Tasks by Layer
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/README.md
Retrieve tasks categorized by their layer (e.g., inbound). This function returns a structured object containing AI, human, and system tasks.
```typescript
import { getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
const inbound = getTasksByLayer('layer_inbound');
// Returns { ai: [...], human: [...], system: [...] } for inbound layer
```
--------------------------------
### Define Layer Guidance
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/types.md
This interface provides guidance on using a specific layer, including when to use it, its typical position in a workflow, and common red flags.
```typescript
interface LayerGuidance {
when_to_use: string;
typical_position: string;
red_flags: string[];
}
```
--------------------------------
### AtlasData Type Definition
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/data-collections.md
Defines the structure for the complete aggregated dataset, ATLAS_DATA, which organizes all Atlas information by various dimensions like meta, layers, tasks, and examples.
```typescript
interface AtlasData {
meta: Meta;
layers: Layer[];
ai_tasks: AiTask[];
human_tasks: HumanTask[];
system_tasks: SystemTask[];
data_artifacts: DataArtifactDefinition[];
constraints: ConstraintDefinition[];
touchpoints: TouchpointDefinition[];
workflow_templates: WorkflowTemplate[];
examples: Example[];
}
```
--------------------------------
### SearchOptions Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/search-and-retrieval.md
Defines the configuration object for controlling search behavior, including dimensions, case sensitivity, description searching, and result limits.
```APIDOC
## Type: SearchOptions
Configuration object for search behavior.
```typescript
interface SearchOptions {
dimensions?: Array<'ai' | 'human' | 'system' | 'data' | 'constraints' | 'touchpoints'>;
caseSensitive?: boolean;
searchDescription?: boolean;
limit?: number;
}
```
### Fields
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| dimensions | Array | all | Which dimensions to include in search |
| caseSensitive | boolean | false | Case-sensitive matching when true |
| searchDescription | boolean | true | Include elevator_pitch and description fields in search |
| limit | number | undefined | Max results to return; undefined means no limit |
```
--------------------------------
### Document Workflow Layers and Tasks
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
This snippet demonstrates how to use `LAYERS` and `getTasksByLayer` to generate a documentation object for a workflow, detailing AI, human, and system tasks within each layer.
```typescript
import { LAYERS, getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
function documentWorkflow(workflowId) {
const doc = {
id: workflowId,
layers: []
};
LAYERS.forEach(layer => {
const tasks = getTasksByLayer(layer.id);
doc.layers.push({
layer: layer.name,
ai: tasks.ai.map(t => t.name),
human: tasks.human.map(t => t.name),
system: tasks.system.map(t => t.name)
});
});
return doc;
}
```
--------------------------------
### Define Touchpoint Definition Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/INDEX.md
Defines the structure for a touchpoint, including its ID, name, category, description, and examples. Used for defining interaction points within the atlas.
```typescript
interface TouchpointDefinition {
id: string;
name: string;
category: TouchpointCategory;
description: string;
examples: string[];
}
```
--------------------------------
### Import Core Data Collections
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/README.md
Import all available data collections for AI system dimensions.
```typescript
import {
AI_TASKS,
HUMAN_TASKS,
SYSTEM_TASKS,
DATA_ARTIFACTS,
CONSTRAINTS,
TOUCHPOINTS,
LAYERS,
WORKFLOW_TEMPLATES,
EXAMPLES,
ATLAS_DATA
} from '@quietloudlab/ai-interaction-atlas';
```
--------------------------------
### ImplementationNotes Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/types.md
Describes the technical implementation characteristics of an AI task, including its maturity, typical latency, data requirements, and need for human oversight.
```typescript
interface ImplementationNotes {
maturity: 'emerging' | 'established' | 'commoditized';
typical_latency: 'realtime' | 'interactive' | 'batch';
data_requirements: 'none' | 'small' | 'medium' | 'large' | 'continuous';
human_oversight: 'none' | 'optional' | 'recommended' | 'required';
}
```
--------------------------------
### Handle Nonexistent Patterns Safely
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/usage-guide.md
Demonstrates how the library safely handles requests for nonexistent patterns or invalid IDs without throwing exceptions. It returns undefined, empty arrays, or false as appropriate.
```typescript
const task = getPattern('nonexistent');
// task === undefined (no error thrown)
const results = searchPatterns('xyz');
// results === [] (no error thrown)
const valid = isValidTaskId('bad-id');
// valid === false (no error thrown)
```
--------------------------------
### Generate Documentation from Atlas Data
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
This pattern shows how to generate documentation by processing the ATLAS_DATA. It extracts layer information and associated AI, human, and system tasks.
```typescript
import { ATLAS_DATA } from '@quietloudlab/ai-interaction-atlas';
import { getLayer } from '@quietloudlab/ai-interaction-atlas';
const docs = ATLAS_DATA.layers.map(layer => ({
name: layer.name,
tasks: {
ai: ATLAS_DATA.ai_tasks.filter(t => t.layer_id === layer.id),
human: ATLAS_DATA.human_tasks.filter(t => t.layer_id === layer.id),
system: ATLAS_DATA.system_tasks.filter(t => t.layer_id === layer.id),
}
}));
```
--------------------------------
### Define Constraint Structure
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/types.md
Defines the structure for a system constraint, including its ID, name, category, icon, and optional fields for description, type, applicability, UX notes, and example values.
```typescript
interface ConstraintDefinition {
id: string;
name: string;
category: ConstraintCategory;
icon: string;
description?: string;
type?: string;
applies_to?: string[];
ux_note?: string;
example_values?: string;
}
```
--------------------------------
### UxNotes Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/types.md
Outlines user experience considerations for AI tasks, including primary risks, implementation tips, and common anti-patterns to avoid.
```typescript
interface UxNotes {
risk: string;
tip: string;
anti_patterns: string[];
}
```
--------------------------------
### Get Unique Categories for a Dimension
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/filtering-and-categories.md
Use this function to retrieve all unique category names for a specified dimension ('data', 'constraints', or 'touchpoints'). Ensure the dimension parameter is one of the allowed string literals.
```typescript
import { getCategories } from '@quietloudlab/ai-interaction-atlas';
// Get all data artifact categories
const dataCategories = getCategories('data');
console.log('Data categories:', dataCategories);
// Output: ['text', 'visual', 'audio', 'structured', 'compound', 'user_input', 'system', 'generic']
// Get all constraint categories
const constraintCats = getCategories('constraints');
constraintCats.forEach(cat => {
console.log(`Constraint category: ${cat}`);
});
// Get all touchpoint categories
const touchpointCats = getCategories('touchpoints');
```
--------------------------------
### Publish NPM Package Locally
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/NPM_SETUP.md
Publish the package to NPM locally without provenance. The `--provenance` flag is not supported for local publishing and should be omitted.
```bash
npm publish --access public
```
--------------------------------
### Get All Tasks by Layer ID
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/filtering-and-categories.md
Use `getTasksByLayer` to retrieve all tasks (AI, Human, System) from a specified layer in a single call. It returns an object containing separate arrays for each task type.
```typescript
import { getTasksByLayer } from '@quietloudlab/ai-interaction-atlas';
// Get all tasks in the inbound layer
const inbound = getTasksByLayer('layer_inbound');
console.log(`AI: ${inbound.ai.length}, Human: ${inbound.human.length}, System: ${inbound.system.length}`);
// Process all internal tasks
const internal = getTasksByLayer('layer_internal');
[...internal.ai, ...internal.human, ...internal.system].forEach(task => {
console.log(`${task.name} (${task.task_type})`);
});
```
--------------------------------
### Find and Replace Dark Mode Classes
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/DARK_MODE_GUIDE.md
Use grep to locate components that use outdated color classes and apply the suggested replacements for dark mode compatibility. This is a common workflow for migrating existing codebases.
```bash
# Find components that need updating
grep -r "bg-white" src/
grep -r "text-black" src/
grep -r "text-gray-" src/
# Common replacements
bg-white → bg-[var(--surface)]
text-black → text-[var(--text-main)]
text-gray-600 → text-[var(--text-muted)]
border-gray → border-[var(--border)]
```
--------------------------------
### Import Minimal Exports
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/module-overview.md
Import only the specific functions or data you need to keep your bundle size small. This is the recommended approach for most use cases.
```typescript
import { searchPatterns } from '@quietloudlab/ai-interaction-atlas';
```
```typescript
import type { AiTask } from '@quietloudlab/ai-interaction-atlas';
```
```typescript
import { ATLAS_DATA } from '@quietloudlab/ai-interaction-atlas';
```
```typescript
import {
filterByLayer,
getAtlasStats
} from '@quietloudlab/ai-interaction-atlas';
```
--------------------------------
### Get Layer Metadata by ID
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/api-reference/filtering-and-categories.md
Retrieve detailed metadata for a specific layer using its unique identifier. This function returns layer details such as name, description, color, and guidance, or undefined if the layer is not found.
```typescript
import { getLayer } from '@quietloudlab/ai-interaction-atlas';
// Get layer details
const layer = getLayer('layer_inbound');
if (layer) {
console.log(`${layer.name}: ${layer.description}`);
console.log(`Role: ${layer.role}`);
console.log(`Color: ${layer.color}`);
if (layer.guidance) {
console.log(`When to use: ${layer.guidance.when_to_use}`);
console.log(`Red flags: ${layer.guidance.red_flags.join(', ')}`);
}
}
```
--------------------------------
### Create a New Feature Branch
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/CONTRIBUTING.md
Before making changes, create a new branch for your feature or bug fix. Replace 'your-feature-name' with a descriptive name.
```bash
git checkout -b feature/your-feature-name
```
--------------------------------
### Define Data Artifact Definition Interface
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/_autodocs/INDEX.md
Defines the structure for a data artifact, including its ID, name, category, and optional description, examples, or compatibility information. Used for defining data types within the atlas.
```typescript
interface DataArtifactDefinition {
id: string;
name: string;
category: DataCategory;
description?: string;
examples?: string[];
compatible_with?: string[];
}
```
--------------------------------
### Import Core Types
Source: https://github.com/quietloudlab/ai-interaction-atlas/blob/main/atlas-package/README.md
Import type definitions for various AI system components.
```typescript
import type {
AiTask,
HumanTask,
SystemTask,
DataArtifactDefinition,
ConstraintDefinition,
TouchpointDefinition,
Layer,
WorkflowTemplate,
AtlasData
} from '@quietloudlab/ai-interaction-atlas';
```