HagiCode MonoSpecs Operations provides three structured commands: initialize creates a missing .hagicode/monospecs.yaml, add-repository accepts one or more absolute URLs and infers repository metadata, and reorder-repositories builds a proposed order from observable activity signals.
What it does
Initializes a usable configuration
initialize creates the missing MonoSpecs configuration without overwriting an existing file. The task keeps the repository inventory in the expected structure so later operations can validate it consistently.
Adds repositories from canonical URLs
add-repository accepts absolute GitHub URLs, infers the repository name and local path, and rejects malformed URLs, duplicate entries, and unsafe path collisions before proposing a change.
Reorders without changing repository data
reorder-repositories derives a proposed order from observable activity signals, shows the preview, and requires explicit confirmation. It changes only the repositories array order.
Before you start
- Select the MonoSpecs project as the
write target.
- Keep attached repositories as
read-only references; they are used for context, not as write destinations.
- Provide canonical absolute repository URLs and review the inferred local paths before accepting an addition.
Safety boundaries
Every candidate configuration is fully revalidated before writing. A failed validation, rejected duplicate, or missing confirmation leaves the configuration unchanged.
Best fit
- Best for: initializing MonoSpecs, onboarding repositories, and making a reviewed activity-based ordering change.
- Not for: editing application source, changing repository metadata, or silently rewriting unrelated configuration.
HagiCode MonoSpecs 操作提供三个结构化命令:initialize 创建缺失的 .hagicode/monospecs.yaml,add-repository 接收一个或多个绝对 URL 并自动推断仓库元数据,reorder-repositories 根据可观察的活跃信号生成排序预览。
它做什么
初始化可用配置
initialize 会创建缺失的 MonoSpecs 配置,但不会覆盖已有文件,确保后续操作可以在预期结构上持续校验。
根据规范 URL 添加仓库
add-repository 接收绝对 GitHub URL,推断仓库名称和本地路径,并在提出变更前拒绝格式错误的 URL、重复项和不安全的路径冲突。
只调整顺序不改仓库数据
reorder-repositories 根据可观察的活跃信号生成排序建议,展示预览并要求明确确认,最终只改变 repositories 数组顺序。
使用前注意
- 将 MonoSpecs 项目选择为
write 目标。
- 将附加仓库保持为
read 只读参考;它们用于提供上下文,不是写入目标。
- 提供规范的绝对仓库 URL,并在确认添加前检查推断出的本地路径。
安全边界
每个候选配置都会在写入前完整复核。校验失败、发现重复项或未获得确认时,配置不会改变。
适用场景
- 最适合:初始化 MonoSpecs、纳入仓库,以及经过审阅的基于活跃度排序调整。
- 不适合:编辑应用源码、修改仓库元数据,或静默重写无关配置。