### Development Installation Command Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/packages/ara-skills/README.md Commands to set up the development environment for ara-skills, including installing dependencies and performing a local installation. ```bash cd packages/ara-skills npm install node bin/cli.js install --skill compiler --local --force ``` -------------------------------- ### Install ARA Skills Locally Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/README.md Install all ARA skills into the current project directory instead of the user's home directory. ```bash npx @orchestra-research/ara-skills install --all --local ``` -------------------------------- ### ARA Skills Install Flags Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Options for the `ara-skills install` command to specify which skills and agents to install, and installation scope. ```bash --all Install all three skills (default if no --skill given) ``` ```bash --skill Specify a skill (repeatable); ids: compiler, research-manager, rigor-reviewer ``` ```bash --agent Specify an agent (repeatable); ids: claude-code, cursor, gemini-cli, opencode, codex, hermes, generic ``` ```bash --local Install into .//skills (project scope) instead of $HOME ``` ```bash --force Overwrite existing installations ``` ```bash --quiet Suppress per-skill log output ``` -------------------------------- ### Clone Repository and Install CLI Dependencies Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Steps to clone the project repository and install the necessary npm dependencies for the `ara-skills` CLI package. ```bash # Clone the repository git clone https://github.com/Orchestra-Research/Agent-Native-Research-Artifact-Init.git cd Agent-Native-Research-Artifact-Init # Install dependencies for the CLI package cd packages/ara-skills npm install ``` -------------------------------- ### Debug ARA Skills Installation Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Example of enabling debug mode for `ara-skills install` by setting the ARA_SKILLS_DEBUG environment variable. ```bash ARA_SKILLS_DEBUG=1 npx @orchestra-research/ara-skills install --all ``` -------------------------------- ### Install All ARA Skills Globally Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/packages/ara-skills/README.md Installs all available ARA skills to every detected agent on your system. ```bash npx @orchestra-research/ara-skills install --all ``` -------------------------------- ### Install ARA Skills Globally Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/README.md Install all ARA skills globally using npx. This command auto-detects compatible agents and prompts for installation scope. ```bash npx @orchestra-research/ara-skills ``` -------------------------------- ### Install ARA Skills with npm CLI Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Use the npx command to install ARA skills. The CLI auto-detects compatible agents and installs skills accordingly. Options include interactive install, installing all skills globally or locally, and specifying skills or agents. ```bash npx @orchestra-research/ara-skills ``` ```bash npx @orchestra-research/ara-skills install --all ``` ```bash npx @orchestra-research/ara-skills install --skill compiler --agent claude-code ``` ```bash npx @orchestra-research/ara-skills install --all --local ``` ```bash npx @orchestra-research/ara-skills install \ --skill compiler \ --skill rigor-reviewer \ --agent claude-code \ --agent cursor \ --force ``` ```bash npx @orchestra-research/ara-skills list ``` ```bash npx @orchestra-research/ara-skills update ``` ```bash npx @orchestra-research/ara-skills uninstall --skill rigor-reviewer --agent cursor ``` ```bash npx @orchestra-research/ara-skills skills ``` ```bash npx @orchestra-research/ara-skills agents ``` -------------------------------- ### SKILL.md Frontmatter Example Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/CONTRIBUTING.md YAML frontmatter for SKILL.md, including name, description, argument hint, allowed tools, and metadata. Ensure the description is concise and in the third person. ```yaml --- name: my-skill description: > What it does AND when to use it. Include trigger keywords. Max 1024 chars. Third person. argument-hint: "[optional args description]" allowed-tools: Read, Write, Edit, Glob, Grep metadata: author: your-name version: "1.0.0" tags: [keyword1, keyword2] --- ``` -------------------------------- ### Install ARA Skills Programmatically Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Use the installer module to manage skills for agents. Import functions like `install`, `installMany`, `update`, `uninstall`, and `listInstalled` from '@orchestra-research/ara-skills/src/installer.js'. ```javascript import { install, installMany, uninstall, update, listInstalled } from '@orchestra-research/ara-skills/src/installer.js'; // Install all skills to claude-code (global) const result = install({ agentId: 'claude-code', skillIds: [], local: false, force: false }); // result: { // agent: 'claude-code', // targetDir: '/Users/alice/.claude/skills', // results: [ // { skill: 'compiler', status: 'installed', dest: '…/compiler' }, // { skill: 'research-manager', status: 'installed', dest: '…/research-manager' }, // { skill: 'rigor-reviewer', status: 'installed', dest: '…/rigor-reviewer' } // ] // } // Install a single skill to a local project (into ./.cursor/skills/) install({ agentId: 'cursor', skillIds: ['compiler'], local: true, force: true, quiet: true }); // Install to multiple agents in one call installMany({ agentIds: ['claude-code', 'cursor', 'gemini-cli'], skillIds: ['compiler', 'rigor-reviewer'], local: false, force: false, }); // Update all tracked skills (re-install with force) for an agent update({ agentId: 'claude-code', local: false }); // Uninstall all skills from claude-code uninstall({ agentId: 'claude-code', skillIds: [], local: false }); // Uninstall one skill uninstall({ agentId: 'claude-code', skillIds: ['research-manager'] }); // List what is installed, across all agents and scopes const rows = listInstalled(); // rows: [ // { agent: 'claude-code', scope: 'global', dir: '…', skills: ['compiler', 'rigor-reviewer'], tracked: true } // ] ``` -------------------------------- ### Generate Full Artifact with Compiler Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/examples/README.md To generate a full artifact, install the compiler skill and run this command, providing the path to your PDF. ```bash /compiler path/to/paper.pdf ``` -------------------------------- ### Exploration Tree Node Example Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt An example of an exploration tree node being written directly, indicating that decisions are directly routed rather than staged. ```yaml # Example: exploration tree node written directly (decisions are direct-routed) ``` -------------------------------- ### Run ARA Skills CLI in Development Mode Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Instructions for running the `ara-skills` CLI locally during development, pointing to monorepo skills and installing to a project-local directory. ```bash # Run the CLI in dev mode (reads skills from ../../skills/ in the monorepo) node bin/cli.js install --skill compiler --local --force # Installs from: skills/compiler/ (monorepo root) # Into: .claude/skills/compiler (project-local) ``` -------------------------------- ### Installer Module Functions Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Functions for managing ARA skills programmatically within Node.js tooling. ```APIDOC ## Installer Module API ### Description The installer module exports functions for embedding skill management in Node.js tooling. ### Functions - **`install(options)`**: Installs skills for a specified agent. - `options` (object): Configuration for installation. - `agentId` (string): The ID of the agent to install skills for. - `skillIds` (array): An array of skill IDs to install. An empty array installs all skills. - `local` (boolean): If true, installs to a local project directory (`./.cursor/skills/`). - `force` (boolean): If true, forces re-installation of existing skills. - `quiet` (boolean, optional): If true, suppresses output. - Returns: An object detailing the installation results. - **`installMany(options)`**: Installs skills to multiple agents simultaneously. - `options` (object): Configuration for bulk installation. - `agentIds` (array): An array of agent IDs. - `skillIds` (array): An array of skill IDs to install. - `local` (boolean): If true, installs to local project directories. - `force` (boolean): If true, forces re-installation. - Returns: An object detailing the installation results. - **`update(options)`**: Updates all tracked skills for an agent (re-installs with force). - `options` (object): Configuration for updating skills. - `agentId` (string): The ID of the agent. - `local` (boolean): If true, updates local installations. - Returns: An object detailing the update results. - **`uninstall(options)`**: Uninstalls skills from an agent. - `options` (object): Configuration for uninstallation. - `agentId` (string): The ID of the agent. - `skillIds` (array): An array of skill IDs to uninstall. An empty array uninstalls all skills. - `local` (boolean): If true, uninstalls from local project directories. - Returns: An object detailing the uninstallation results. - **`listInstalled()`**: Lists all installed skills across all agents and scopes. - Returns: An array of objects, each describing an installed agent scope and its skills. ### Example Usage ```javascript import { install, installMany, uninstall, update, listInstalled } from '@orchestra-research/ara-skills/src/installer.js'; // Install all skills to claude-code (global) const result = install({ agentId: 'claude-code', skillIds: [], local: false, force: false }); // Install a single skill to a local project install({ agentId: 'cursor', skillIds: ['compiler'], local: true, force: true, quiet: true }); // Install to multiple agents installMany({ agentIds: ['claude-code', 'cursor', 'gemini-cli'], skillIds: ['compiler', 'rigor-reviewer'], local: false, force: false, }); // Update all tracked skills for an agent update({ agentId: 'claude-code', local: false }); // Uninstall all skills from claude-code uninstall({ agentId: 'claude-code', skillIds: [], local: false }); // Uninstall one skill uninstall({ agentId: 'claude-code', skillIds: ['research-manager'] }); // List installed skills const rows = listInstalled(); ``` ``` -------------------------------- ### Install Specific ARA Skill and Agent Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/README.md Install a particular skill (e.g., compiler) for a specific agent (e.g., claude-code). ```bash npx @orchestra-research/ara-skills install --skill compiler --agent claude-code ``` -------------------------------- ### ARA Evidence Naming Convention Example Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/skills/compiler/references/ara-schema.md Examples illustrating the naming conventions for evidence files, distinguishing between raw source evidence and derived subset evidence. Raw evidence must preserve original identifiers, while derived evidence must indicate its origin. ```text evidence/tables/table3_imagenet_validation.md evidence/tables/derived_from_table3_residual_depth_slice.md ``` -------------------------------- ### Crystallized Heuristic Example Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt An example of a crystallized heuristic, promoted from a staged observation after user affirmation. It includes rationale, provenance, and references to staging and code. ```yaml # Example: crystallized heuristic (after user says "yes, let's document that") # ara/logic/solution/heuristics.md ## H04: Weight decay sensitivity for deep ResNets - **Rationale**: wd=1e-3 causes gradient explosion at depth ≥50; wd=1e-4 is the stable boundary. - **Provenance**: user-revised - **Crystallized via**: verbal-affirmation - **Sensitivity**: high - **Code ref**: [src/execution/training_recipe.py] - **From staging**: O07 ``` -------------------------------- ### Manual Installation of ARA Skills for Claude Code Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Skills can be manually copied into the agent's skills directory if the npm CLI is not used. This allows for project-level or user-level installation of all or specific skills. ```bash cp -r skills/* .claude/skills/ ``` ```bash cp -r skills/* ~/.claude/skills/ ``` ```bash cp -r skills/compiler ~/.claude/skills/compiler ``` ```bash # Verify the structure Claude Code expects: # ~/.claude/skills/ # compiler/ # SKILL.md # references/ # ara-schema.md # exploration-tree-spec.md # validation-checklist.md # research-manager/ # SKILL.md # references/ # event-taxonomy.md # rigor-reviewer/ # SKILL.md # references/ # review-dimensions.md ``` -------------------------------- ### Staged Observation Example Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt An example of a staged observation created during an agent's turn, which is not yet crystallized. It includes details like provenance, content, and context. ```yaml # Example: staged observation created during a turn # ara/staging/observations.yaml observations: - id: O07 timestamp: "2025-06-10T14:32" provenance: ai-suggested content: "Weight decay 1e-4 is critical; 1e-3 causes divergence after epoch 5." context: "Training run log showed NaN loss with wd=1e-3 at step 2000." potential_type: heuristic bound_to: [N03] promoted: false promoted_to: null crystallized_via: null stale: false ``` -------------------------------- ### ARA Skills CLI Commands Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/packages/ara-skills/README.md Overview of available commands for managing ARA skills, including installation, updates, and listing. ```bash ara-skills # interactive ara-skills install [--all] [--skill ] [--agent ] [--local] [--force] ara-skills update [--agent ] [--local] ara-skills uninstall [--skill ] [--agent ] [--local] ara-skills list # what is installed, where ara-skills skills # what's available to install ara-skills agents # which agents are supported / detected ``` -------------------------------- ### Manual Install ARA Skills for Claude Code Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/README.md Manually copy ARA skills into the Claude Code configuration directory for project-level or user-level access. ```bash cp -r skills/* .claude/skills/ ``` ```bash cp -r skills/* ~/.claude/skills/ ``` ```bash cp -r skills/compiler ~/.claude/skills/compiler ``` -------------------------------- ### Bundle Skills for npm Publish Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Commands related to the `prepack` and `postpack` scripts, which bundle skills into the npm tarball for publishing. ```bash # The prepack / postpack scripts bundle skills for npm publish: # prepack: copies skills/ into packages/ara-skills/skills/ (makes tarball self-contained) # postpack: removes the copy npm pack # produces @orchestra-research-ara-skills-0.2.0.tgz with bundled skills ``` -------------------------------- ### Initialize Research Artifact Directory Structure Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/skills/research-manager/SKILL.md Command to create the necessary directory structure for a new research artifact when the 'ara/' directory does not yet exist. This should be run on the first turn with research-significant activity. ```bash mkdir -p ara/{logic/solution,src/{configs,kernel},trace/sessions,evidence/{tables,figures},staging} ``` -------------------------------- ### Skill Directory Structure Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/CONTRIBUTING.md Standard directory layout for a new skill. SKILL.md is required, while references/ and templates/ are optional. ```bash skills/my-skill/ ├── SKILL.md # Required — main instructions ├── references/ # Optional — detailed docs loaded on demand └── templates/ # Optional — starter templates ``` -------------------------------- ### Rigor Reviewer Skill Invocation Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Example of invoking the rigor-reviewer skill on an ARA artifact directory for semantic review. ```text # Invoked on an ARA artifact directory: /rigor-reviewer examples/resnet-ara-example/ # Produces: examples/resnet-ara-example/level2_report.json ``` -------------------------------- ### Run ARA Compiler with Input Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/README.md Use the compiler skill to convert various research inputs like PDFs or GitHub repositories into ARA artifacts. Specify an output directory if needed. ```bash /compiler path/to/paper.pdf ``` ```bash /compiler https://github.com/org/repo ``` ```bash /compiler path/to/paper.pdf path/to/code/ --output ./my-artifact/ ``` -------------------------------- ### ARA Artifact Output Structure Source: https://context7.com/orchestra-research/agent-native-research-artifact/llms.txt Example structure of the output produced by the /compiler skill, detailing the organization of research components like paper content, logic, source code, and trace information. ```text ara-output/ PAPER.md # YAML frontmatter + Layer Index (~200 tokens) logic/ problem.md # O1/O2 observations → G1/G2 gaps → key insight → assumptions claims.md # C01–C{N} falsifiable claims with proof refs to E-IDs concepts.md # ≥5 formal definitions with notation + boundary conditions experiments.md # E01–E{N} declarative plans (directional outcomes only) solution/ architecture.md # Component graph with inputs/outputs algorithm.md # Math formulation + pseudocode + complexity constraints.md # Boundary conditions and known limitations heuristics.md # H01–H{N} implementation tricks with sensitivity + code refs related_work.md # RW01–RW{N} typed dependency graph src/ configs/ training.md # Hyperparameters with exact values, rationale, sensitivity model.md # Architecture configs execution/ {module}.py # Typed Python stubs for the novel contribution environment.md # Python version, framework, hardware, seeds trace/ exploration_tree.yaml # Research DAG ≥8 nodes with dead_end and decision types evidence/ README.md # Index mapping every evidence file to claim IDs tables/ table2_imagenet_plain_vs_residual.md # Raw source table (exact cell values) derived_from_table3_shortcut_options.md # Derived subset (labeled as such) figures/ figure1_cifar_plain_curves.md # Extracted data points with axes ``` -------------------------------- ### ResNet Training Recipe in Python Source: https://github.com/orchestra-research/agent-native-research-artifact/blob/main/examples/resnet-ara-example/PAPER.md Implements a standard training recipe for ImageNet ResNets using SGD with a step learning rate schedule and Batch Normalization after convolution. This is suitable for training deep ResNet models on large datasets. ```python class TrainingRecipe(nn.Module): def __init__(self, block, num_blocks, num_classes=10, num_channels=64): super(TrainingRecipe, self).__init__() self.in_planes = num_channels self.conv1 = nn.Conv2d(3, num_channels, kernel_size=3, stride=1, padding=1, bias=False) self.bn1 = nn.BatchNorm2d(num_channels) self.layer1 = self._make_layer(block, num_channels, num_blocks[0], stride=1) self.layer2 = self._make_layer(block, num_channels*2, num_blocks[1], stride=2) self.layer3 = self._make_layer(block, num_channels*4, num_blocks[2], stride=2) self.layer4 = self._make_layer(block, num_channels*8, num_blocks[3], stride=2) self.linear = nn.Linear(num_channels*8*block.expansion, num_classes) def _make_layer(self, block, planes, num_blocks, stride): strides = [stride] + [1]*(num_blocks-1) for stride in strides: layers = [] if stride != 1 or self.in_planes != planes * block.expansion: layers.append(block(self.in_planes, planes, stride)) else: layers.append(block(self.in_planes, planes, stride)) self.in_planes = planes * block.expansion return nn.Sequential(*layers) def forward(self, x): out = F.relu(self.bn1(self.conv1(x))) out = self.layer1(out) out = self.layer2(out) out = self.layer3(out) out = self.layer4(out) out = F.avg_pool2d(out, 10) out = out.view(out.size(0), -1) out = self.linear(out) return out def ResNet18(num_classes=10, num_channels=64): return TrainingRecipe(BasicBlock, [2,2,2,2], num_classes=num_classes, num_channels=num_channels) def ResNet34(num_classes=10, num_channels=64): return TrainingRecipe(BasicBlock, [3,4,6,3], num_classes=num_classes, num_channels=num_channels) def ResNet50(num_classes=10, num_channels=64): return TrainingRecipe(Bottleneck, [3,4,6,3], num_classes=num_classes, num_channels=num_channels) def ResNet101(num_classes=10, num_channels=64): return TrainingRecipe(Bottleneck, [3,4,23,3], num_classes=num_classes, num_channels=num_channels) def ResNet152(num_classes=10, num_channels=64): return TrainingRecipe(Bottleneck, [3,8,36,3], num_classes=num_classes, num_channels=num_channels) def آموزش_شبکه_عمیق(model, device, train_loader, optimizer, criterion, epochs=100): model.train() for epoch in range(epoch, epochs + 1): running_loss = 0.0 for i, data in enumerate(train_loader, 0): inputs, labels = data inputs, labels = inputs.to(device), labels.to(device) optimizer.zero_grad() outputs = model(inputs) loss = criterion(outputs, labels) loss.backward() optimizer.step() running_loss += loss.item() if i % 2000 == 1999: print(f'[{epoch + 1}, {i + 1:5d}] loss: {running_loss / 2000:.3f}') running_loss = 0.0 print(f'Finished Epoch {epoch + 1}') print('Finished Training') def ارزیابی_مدل(model, device, test_loader, criterion): model.eval() correct = 0 total = 0 with torch.no_grad(): for data in test_loader: images, labels = data images, labels = images.to(device), labels.to(device) outputs = model(images) loss = criterion(outputs, labels) _, predicted = torch.max(outputs.data, 1) total += labels.size(0) correct += (predicted == labels).sum().item() print(f'Accuracy of the network on the 10000 test images: {100 * correct // total} %') print(f'Test Loss: {loss.item():.3f}') ```