Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/bastndev/f1/llms.txt

Use this file to discover all available pages before exploring further.

Smart + Skills is F1’s highest-context launch mode. With a single toggle flip before picking an agent, F1 builds a compact code graph of your project, writes built-in working rules into .f1/, syncs your instruction files, and then types a priming prompt directly into the agent’s terminal — so the agent reads everything before it ever sees your first task. The agent’s first reply is a readiness confirmation, not a question about your project structure.

How to enable Smart + Skills

Open the CLI Hub launcher (press F1), flip the Smart + Skills toggle switch, then select any agent as usual. No further configuration is required.

The full launch sequence

When you launch an agent with Smart + Skills enabled, SmartService runs the following steps in order:
1

Prepare project context

SmartService.prepareContext(root, agentSlug) calls MemoryService.onLaunch(root, agentSlug) internally. This scans the workspace, writes .f1/project-map.md, and upserts the managed block at the top of AGENTS.md (and prepends @AGENTS.md to CLAUDE.md if the Claude agent is selected).
public prepareContext(root: string | undefined, agentSlug: string | undefined): void {
  this.memory.onLaunch(root, agentSlug);
}
2

Load the built-in rules

SmartService.loadRules(extensionFsPath) reads assets/skills/default/SKILL.md from the extension’s install directory, strips the YAML frontmatter, and returns the rules body. The method validates that all load-bearing invariant phrases are present and logs a warning if any are missing.
public loadRules(extensionFsPath: string | undefined): string | undefined
// Reads: src/my-plus/my-smart/assets/skills/default/SKILL.md
// Strips YAML frontmatter, returns the Markdown body
3

Write rules into .f1/

SmartService.writeRules(root, rulesContent) delegates to MemoryService.writeRules(), which writes the rules body atomically to .f1/smart-rules.md. The write is skipped if the content hasn’t changed.
public writeRules(root: string | undefined, rulesContent: string | undefined): void
4

Build the code graph

SmartService.buildGraph(root, signal?) spawns graphify update . in the workspace root. If graphify runs successfully within 30 seconds, it produces graphify-out/GRAPH_REPORT.md — a compact, AI-readable map of the code’s structure. The method resolves true if the report file exists after the process exits with code 0, and false otherwise (graphify not installed, timeout, non-zero exit).
public buildGraph(root: string | undefined, signal?: AbortSignal): Promise<boolean>
// Spawns: graphify update .
// Timeout: 30 000 ms
// Output: graphify-out/GRAPH_REPORT.md
5

Compose the priming prompt

SmartService.composePrompt(hasGraph) builds the single-line prompt F1 will type into the terminal. If the graph was built successfully, the prompt includes a reference to ./graphify-out/GRAPH_REPORT.md. If the graph was skipped or failed, the prompt asks the agent to review the project structure without the graph reference — the rules and project map are always included either way.
public composePrompt(hasGraph: boolean): string
The resulting prompt follows this pattern (graph present):
Before we start, read `./.f1/smart-rules.md` for how I want you to work in this
project, and follow those rules from now on. Also read
`./graphify-out/GRAPH_REPORT.md` — a compact code-graph of this project — so you
grasp the structure without scanning every file. Your first reply must be ONLY
this line, nothing else: I am ready for work ✅
6

F1 types the prompt into the terminal

F1 sends the priming prompt as a keystrokes sequence into the active CLI terminal. The agent receives and processes the prompt, reads the referenced files, and replies with exactly:
I am ready for work ✅
7

Cleanup after priming

Once the agent has replied, SmartService.cleanup(root) removes .f1/ (via MemoryService.cleanup()), strips the managed block from AGENTS.md, and deletes graphify-out/. The workspace is left exactly as it was before the launch.
public cleanup(root: string | undefined): void
// Removes: .f1/ directory
// Removes: graphify-out/ directory
// Strips: managed block from AGENTS.md

SmartService API reference

SmartService is exported from src/my-plus/my-smart/my-smart.ts and is the only public surface for Smart + Skills.
MethodParametersReturnsDescription
prepareContextroot, agentSlugvoidBuilds .f1/project-map.md and syncs instruction files via My Memory.
loadRulesextensionFsPathstring | undefinedReads assets/skills/default/SKILL.md, strips frontmatter, validates invariants.
writeRulesroot, rulesContentvoidWrites rules body to .f1/smart-rules.md atomically.
buildGraphroot, signal?Promise<boolean>Runs graphify update . with a 30s timeout; resolves true if GRAPH_REPORT.md is produced.
composePrompthasGraphstringReturns the single-line priming prompt, with or without the graph reference.
cleanuprootvoidRemoves .f1/ and graphify-out/; strips the managed block from AGENTS.md.

The built-in rules (SKILL.md)

The rules written to .f1/smart-rules.md come from assets/skills/default/SKILL.md. They cover six categories that apply for the entire session:
The agent is instructed to use the code graph to orient before opening files, treating it as a starting point to verify against the live code rather than gospel.
The agent must not create, modify, or delete files without explicit authorization. For broad or ambiguous work, it must propose a plan and wait for a go-ahead. Destructive operations (deletes, overwrites, force operations) require explicit confirmation.
The agent must match existing conventions, naming, and patterns. It must make the smallest change that fully solves the task, run the closest available check or build after editing, and report the real result — never claiming success it didn’t verify.
Comments should explain the why, a runtime dependency, or a warning — never what the code already makes obvious. Names and structure should carry meaning before reaching for a comment.
Saying “te leo” or “I read to you” switches the agent into conversational mode where it only answers questions and makes no file edits. It stays in that mode until given a new task.
Responses default to short and direct. Longer explanations are triggered only by explicit words like “explain”, “elaborate”, “step by step”, or “walk me through”. Code references use file:line format. Completion is signalled with a checklist (medium tasks) or a <details> summary (complex tasks).

graphify dependency

buildGraph() depends on the graphify CLI being available on PATH. graphify is a free, local code-graph tool — it makes no LLM calls and requires no API keys.
# graphify update . produces graphify-out/GRAPH_REPORT.md
graphify update .
The buildGraph() call has a hard 30-second timeout. If graphify is not installed, takes longer than 30 seconds, or exits with a non-zero code, SmartService falls back gracefully: composePrompt(false) is called instead of composePrompt(true), so the priming prompt asks the agent to review the project structure directly rather than reading the graph report. The rules and project map from My Memory are always included — the graph is additive, not required.
All generated files — .f1/ and graphify-out/ — are removed automatically after the agent confirms it is ready. SmartService.cleanup() runs once the priming exchange is complete, so your workspace is never left with stale context files between sessions.

Build docs developers (and LLMs) love