-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinit_command.hpp
More file actions
31 lines (23 loc) · 1.28 KB
/
Copy pathinit_command.hpp
File metadata and controls
31 lines (23 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include "command_registry.hpp"
#include <filesystem>
#include <string>
namespace acecode {
// Generate the AGENT.md skeleton text for a directory. The hint block at the
// top is included only when a legacy `CLAUDE.md` already lives in the same
// directory. Pure function — unit tested directly. Used by the no-provider
// fallback path of `/init`.
std::string build_agent_md_skeleton(const std::filesystem::path& cwd);
// Build the LLM prompt that `/init` submits when a provider is configured. The
// returned string is the full user-role message sent to the agent loop; the
// LLM uses its read tools to survey the codebase and writes / edits AGENT.md
// via file_write_tool / file_edit_tool. Pure function — unit tested directly.
// The prompt body is stable; only the suffix varies based on whether
// AGENT.md / CLAUDE.md already exist in `cwd`.
std::string build_init_prompt(const std::filesystem::path& cwd);
bool has_usable_init_provider(const AppConfig& cfg);
// Register `/init` — generate or improve AGENT.md in cwd. With a configured
// provider `/init` delegates the analysis to the LLM. With no provider it falls
// back to writing the static skeleton produced by `build_agent_md_skeleton`.
void register_init_command(CommandRegistry& registry);
} // namespace acecode