You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(construct-cli): Phase 3 — general sources (git URLs) + find/use/init
Adds a sources layer: resolve a source spec (local path, git URL, or owner/repo — shallow-cloned into the XDG cache and reused), and discover skills across the common container dirs (skills/, skills/.curated/). SKILL.md frontmatter parsing powers new commands: `skill find` (browse name+description), `skill use` (print prompts without installing), `skill init` (scaffold a SKILL.md). `skill add`/`update` now accept git URLs (--refresh re-clones). Verified end-to-end cloning Spacecraft-Software/Construct. 27 tests, clippy -D warnings, reuse lint, nix build all pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
let data = serde_json::to_value(report).unwrap_or(Value::Null);
98
179
CommandOutput::new(data, human)
99
180
}
181
+
182
+
/// Truncate to `n` characters, appending an ellipsis when shortened.
183
+
fntruncate(s:&str,n:usize) -> String{
184
+
if s.chars().count() <= n {
185
+
s.to_owned()
186
+
}else{
187
+
let head:String = s.chars().take(n).collect();
188
+
format!("{head}…")
189
+
}
190
+
}
191
+
192
+
/// The house-style `SKILL.md` scaffold.
193
+
fntemplate(name:&str) -> String{
194
+
format!(
195
+
"---\nname: {name}\ndescription: >\n TODO: one paragraph (<= 1000 chars) describing what this skill does and\n when an agent should use it.\nlicense: GPL-3.0-or-later\n---\n\n# {name}\n\nTODO: skill body.\n"
196
+
)
197
+
}
198
+
199
+
/// Map a filesystem error to a structured `AppError`.
0 commit comments