Compare commits

..
Author SHA1 Message Date
Richard Zink 84ee68d4da Release v202611-00057 2026-11-17 14:43:39 +01:00
Richard ZinkandClaude Sonnet 5.5 43b07aca48 Factory: skills per phase
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 14:43:38 +01:00
7 changed files with 65 additions and 4 deletions

No files matched your search

+7
View File
@@ -3,6 +3,13 @@
All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/);
until 1.0, minor versions may contain breaking changes.
## [v202611-00057] – 2026-11-17
### Added
- **Factory: skills per phase.** In the repository settings, each phase (review, build, acceptance) can have
skills switched on; the chat of that phase follows them in every turn.
## [v202611-00056] – 2026-11-17
### Added
+1 -1
View File
@@ -11,7 +11,7 @@
</p>
<p align="center">
<img alt="Version v202611-00056" src="https://img.shields.io/badge/version-v202611--00056-d69e2e?style=flat-square">
<img alt="Version v202611-00057" src="https://img.shields.io/badge/version-v202611--00057-d69e2e?style=flat-square">
<img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-689d6a?style=flat-square">
<img alt="Rust backend" src="https://img.shields.io/badge/backend-Rust-b7410e?style=flat-square&logo=rust">
<img alt="React PWA" src="https://img.shields.io/badge/frontend-React%20PWA-2d81ff?style=flat-square&logo=react">
+7 -2
View File
@@ -49,6 +49,9 @@ pub struct PhaseCfg {
/// Extra instructions appended to the phase prompt.
#[serde(default)]
pub extra_prompt: String,
/// Skills (names) switched on for the chat of this phase; only the CodeCraft agent uses them.
#[serde(default)]
pub skills: Vec<String>,
}
fn default_agent() -> String {
@@ -69,7 +72,7 @@ fn default_rework() -> i64 {
impl Default for PhaseCfg {
fn default() -> Self {
Self { model: String::new(), agent: default_agent(), permission_mode: default_mode(), timeout_minutes: default_timeout(), max_attempts: default_attempts(), extra_prompt: String::new() }
Self { model: String::new(), agent: default_agent(), permission_mode: default_mode(), timeout_minutes: default_timeout(), max_attempts: default_attempts(), extra_prompt: String::new(), skills: Vec::new() }
}
}
@@ -171,6 +174,7 @@ impl RepoCfg {
}
p.timeout_minutes = p.timeout_minutes.clamp(1, 24 * 60);
p.max_attempts = p.max_attempts.clamp(1, 10);
p.skills = p.skills.iter().map(|n| n.trim().to_string()).filter(|n| !n.is_empty() && n.len() <= 64).take(10).collect();
}
Ok(())
}
@@ -881,7 +885,8 @@ fn start_phase(app: &Arc<App>, user: &User, cfg: &RepoCfg, issue: i64, phase: &s
telegram_quiet: true,
summary: String::new(),
color: None,
icon: None, skills: Vec::new(),
icon: None,
skills: pc.skills.clone(),
};
let session = app.save_session(session)?;
let run_id = crate::types::new_id();
+38 -1
View File
@@ -30,6 +30,7 @@ interface PhaseCfg {
timeout_minutes: number;
max_attempts: number;
extra_prompt: string;
skills: string[];
}
interface RepoCfg {
url: string;
@@ -575,11 +576,46 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
);
}
const blankPhase = (): PhaseCfg => ({ model: "", agent: "codecraft", permission_mode: "auto", timeout_minutes: 60, max_attempts: 2, extra_prompt: "" });
const blankPhase = (): PhaseCfg => ({ model: "", agent: "codecraft", permission_mode: "auto", timeout_minutes: 60, max_attempts: 2, extra_prompt: "", skills: [] });
const blankRepo = (connection = "", kind = "gitea"): RepoCfg => ({ url: "", kind, connection, token: "", label: "factory", max_parallel: 1, max_rework: 2, allowed_users: [], enabled: true, review: blankPhase(), build: blankPhase(), qa: blankPhase() });
const blankConn = (): Connection => ({ id: "", name: "", kind: "gitea", url: "", token: "", owner: "" });
const MODES = ["default", "auto", "accept_edits", "bypass"];
/** Skills switched on for the chat of one phase (the agent follows them in every turn). */
function PhaseSkills({ value, onChange }: { value: string[]; onChange: (v: string[]) => void }) {
const t = useT();
const [all, setAll] = useState<{ name: string; description: string }[]>([]);
useEffect(() => {
get<{ skills: { name: string; description: string }[] }>("/commands")
.then((d) => setAll(d.skills))
.catch(() => {});
}, []);
const rest = all.filter((s) => !value.includes(s.name));
return (
<div className="factory-skills">
<span>{t("factory.skills")}</span>
<div className="row" style={{ gap: 4, flexWrap: "wrap" }}>
{value.map((n) => (
<button key={n} type="button" className="chip" style={{ border: "none" }} title={t("factory.skillRemove")} onClick={() => onChange(value.filter((x) => x !== n))}>
{n} ×
</button>
))}
{rest.length > 0 && value.length < 10 && (
<select value="" onChange={(e) => e.target.value && onChange([...value, e.target.value])}>
<option value="">{t("factory.skillAdd")}</option>
{rest.map((s) => (
<option key={s.name} value={s.name} title={s.description}>
{s.name}
</option>
))}
</select>
)}
</div>
<div className="hint">{t("factory.skillsHint")}</div>
</div>
);
}
function PhaseForm({ phase, value, onChange }: { phase: Phase; value: PhaseCfg; onChange: (patch: Partial<PhaseCfg>) => void }) {
const t = useT();
return (
@@ -614,6 +650,7 @@ function PhaseForm({ phase, value, onChange }: { phase: Phase; value: PhaseCfg;
<span>{t("factory.attempts")}</span>
<input type="number" min={1} max={10} value={value.max_attempts} title={t("factory.attemptsHint")} onChange={(e) => onChange({ max_attempts: Math.max(1, Number(e.target.value) || 1) })} />
</label>
<PhaseSkills value={value.skills ?? []} onChange={(skills) => onChange({ skills })} />
<label>
<span>{t("factory.extraPrompt")}</span>
<textarea rows={3} value={value.extra_prompt} onChange={(e) => onChange({ extra_prompt: e.target.value })} />
+4
View File
@@ -1292,6 +1292,10 @@ export const de: Messages = {
"factory.closeMsg": "Kommentar zum Schließen von Issue #{n}. Er wird im Issue veröffentlicht, danach wird das Issue geschlossen.",
"factory.closeDefault": "Erledigt und abgenommen.",
"factory.closed": "Issue geschlossen",
"factory.skills": "Skills",
"factory.skillAdd": "Skill hinzufügen…",
"factory.skillRemove": "Entfernen",
"factory.skillsHint": "Für jeden Chat dieser Phase eingeschaltet (CodeCraft-Agent). Jeder belegt Kontext – wenige wählen.",
"factory.pr": "Pull Request",
"factory.round": "Runde {n}",
"factory.openChat": "Chat öffnen",
+4
View File
@@ -1291,6 +1291,10 @@ export const en = {
"factory.closeMsg": "Comment for closing issue #{n}. It is posted on the issue, then the issue is closed.",
"factory.closeDefault": "Done and accepted.",
"factory.closed": "Issue closed",
"factory.skills": "Skills",
"factory.skillAdd": "Add skill…",
"factory.skillRemove": "Remove",
"factory.skillsHint": "Switched on for every chat of this phase (CodeCraft agent). Each one uses context – choose few.",
"factory.pr": "Pull request",
"factory.round": "round {n}",
"factory.openChat": "Open chat",
+4
View File
@@ -3,6 +3,10 @@
* under "unreleased"; scripts/release.sh renames the key to the release version.
*/
export const WHATS_NEW: Record<string, { en: string[]; de: string[] }> = {
"202611-00057": {
en: ["Factory: choose skills for each phase (review, build, acceptance)"],
de: ["Factory: Skills für jede Phase wählbar (Review, Build, Abnahme)"],
},
"202611-00056": {
en: ["Skills: create or import them from GitHub (Settings → Skills) and switch them on per chat; large libraries do not fill the context"],
de: ["Skills: selbst anlegen oder von GitHub importieren (Einstellungen → Skills) und pro Chat einschalten; große Bibliotheken füllen den Kontext nicht"],