Problem It Solves
Closes gap: #172
Every agent receives identical Project Knowledge after setup-teamwork runs. Irrelevant facts waste context tokens and dilute the signal of genuinely role-relevant knowledge.
Proposed Behavior
1. Role-specific knowledge schema in agent templates
Each .github/agents/*.agent.md file defines its knowledge schema via structured placeholder comments in the Project Knowledge section:
## Project Knowledge
<!-- KNOWLEDGE: test_framework, test_command, coverage_tool, test_dir -->
- Test framework: `[e.g., Jest]` <!-- CUSTOMIZE -->
- Test command: `[e.g., npm test]` <!-- CUSTOMIZE -->
- Coverage tool: `[e.g., Istanbul]` <!-- CUSTOMIZE -->
- Test directory: `[e.g., src/__tests__]` <!-- CUSTOMIZE -->
Each schema key maps to a fact category that setup-teamwork knows how to detect.
2. Schema registry
A new internal config package (internal/config/knowledge.go) defines the canonical mapping from schema key to detection logic and role assignments:
var KnowledgeSchemas = map[string][]string{
"tester": {"test_framework", "test_command", "coverage_tool", "test_dir"},
"coder": {"languages", "build_command", "lint_command", "package_manager"},
"security-auditor": {"auth_mechanism", "sensitive_paths", "dependency_audit_command"},
"architect": {"orm", "migration_tool", "api_framework", "database_engine"},
"documenter": {"docs_dir", "doc_format", "api_spec_path"},
}
3. setup-teamwork skill update
The /setup-teamwork SKILL.md Step 4 is updated to: parse each agent file's KNOWLEDGE schema comment, detect or prompt for only the schema-specified facts, and populate only those placeholders. Facts not in the schema are not written.
4. teamwork init integration
teamwork init passes detected stack facts through the schema registry to produce role-specific knowledge sections during initial installation.
Dependencies
Complexity Estimate
Medium — 5 files: knowledge schema registry, detect.go extensions, setup-teamwork SKILL.md update, agent template updates (all 17 files), init command integration, tests
Problem It Solves
Closes gap: #172
Every agent receives identical Project Knowledge after
setup-teamworkruns. Irrelevant facts waste context tokens and dilute the signal of genuinely role-relevant knowledge.Proposed Behavior
1. Role-specific knowledge schema in agent templates
Each
.github/agents/*.agent.mdfile defines its knowledge schema via structured placeholder comments in the Project Knowledge section:Each schema key maps to a fact category that
setup-teamworkknows how to detect.2. Schema registry
A new internal config package (
internal/config/knowledge.go) defines the canonical mapping from schema key to detection logic and role assignments:3. setup-teamwork skill update
The
/setup-teamworkSKILL.md Step 4 is updated to: parse each agent file's KNOWLEDGE schema comment, detect or prompt for only the schema-specified facts, and populate only those placeholders. Facts not in the schema are not written.4. teamwork init integration
teamwork initpasses detected stack facts through the schema registry to produce role-specific knowledge sections during initial installation.Dependencies
Complexity Estimate
Medium — 5 files: knowledge schema registry, detect.go extensions, setup-teamwork SKILL.md update, agent template updates (all 17 files), init command integration, tests