diff --git a/docs/trail-snippet.md b/docs/trail-snippet.md index 7bd0e1f..73509b3 100644 --- a/docs/trail-snippet.md +++ b/docs/trail-snippet.md @@ -2,6 +2,18 @@ Record your work as a trajectory for future agents and humans to follow. +## Usage + +If `trail` is installed globally, run commands directly: +```bash +trail start "Task description" +``` + +If not globally installed, use npx to run from local installation: +```bash +npx trail start "Task description" +``` + ## When Starting Work Start a trajectory when beginning a task: diff --git a/package.json b/package.json index de62dab..400715b 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,7 @@ ], "author": "", "license": "MIT", - "files": [ - "dist" - ], + "files": ["dist"], "engines": { "node": ">=20.0.0" }, diff --git a/src/core/trajectory.ts b/src/core/trajectory.ts index f516df9..bc8494b 100644 --- a/src/core/trajectory.ts +++ b/src/core/trajectory.ts @@ -113,9 +113,7 @@ export function addChapter( // Add agent to trajectory.agents if not already present let updatedAgents: AgentParticipation[] = trajectory.agents; - const agentExists = trajectory.agents.some( - (a) => a.name === input.agentName, - ); + const agentExists = trajectory.agents.some((a) => a.name === input.agentName); if (!agentExists) { const isFirstAgent = trajectory.agents.length === 0; updatedAgents = [