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
{{ message }}
Repository navigation
[feat] Make all distributed resources pushable with project and role namespaces #1101
The resource should be written to its matching namespace:
skills/<ns>/
rules/<ns>/ and claudemd/<ns>/
agents/<ns>/
docs/<ns>/
env/<ns>/env.yaml
hooks/<ns>/hooks.yaml
mcp/<ns>/mcp.yaml
models/<ns>/models.yaml
namespaced learnings and wiki sources
Push must update the team-repo source, not reverse-engineer merged Agent settings. Personal configuration and generated machine-local files must never be included.
Acceptance Criteria
Every pull-distributed resource has a push path.
--project resolves the resource’s namespace from manifest/projects.yaml.
--role targets a namespace allowed by manifest/roles.yaml.
Missing or ambiguous mappings fail instead of falling back to the shared root.
Existing PR update and direct-push behavior works for every resource type.
3. Could workflows/, prompts/ and scorers/ be part of this? Pull distributes them (#818, #1076), and today teamai push doesn't stage them.
Yes. Include workflows/, prompts/, and scorers/ in this issue. Pull distributes them (#818, #1076), and teamai push should stage them the same way as the other resources, including --project and --role:
On the pull side, syncWorkflowDefinitions reads only workflows/*.yaml at the root, so a workflow pushed to workflows/<ns>/ would never become runnable. One of this issue's acceptance criteria is that pull and push use the same namespace rules, so pull could read workflows/<ns>/, prompts/<ns>/ and scorers/<ns>/ here too, with the rule in namespace-resolver.ts.
Notes from #1078 (#1129) for workflows under namespaces:
References resolve only by name against the validated cache. This covers workflow: review-and-fix in a step, and the cache keeps one definition per name (workflows/cache/<name>.json). Once the sync applies the namespace rule (a namespace item replaces the root item of its name; one name in two active namespaces is a conflict) before writing the cache, references follow it with no engine change.
A namespace conflict should leave that name with no runnable version. Do not keep an older winner. Pull diagnostics that carry a code already drop the cached copy that way.
prompt_file is resolved and cached into the definition at sync, including inside inline workflows. prompts/<ns>/ resolution belongs in that same place.
A cross-file pull check validates references, recursion, with keys, and reads of child outputs and ends per file. It has to run against the resolved set (after namespace resolution), not the raw directory listing.
Hello! I would like to claim this issue and implement support for pushing all distributed resources with project and role namespaces:
Extend PlaceableType and NAMESPACE_AXIS (src/push-namespaces.ts):
Support all pull-distributed resource types: \skills,
ules, \�gents, \docs, \env, \hooks, \mcp, \models, \claudemd, \learnings, plus \workflows, \prompts, and \scorers\ per the accepted discussion.
Resolve matching namespace axes from \manifest/projects.yaml\ and \manifest/roles.yaml.
Namespace Placement on Push (\src/push.ts, \src/team-push.ts):
Support --project \ and --role \ across all resource types, placing files into their matching <resource>//\ directory (e.g., \env//env.yaml, \hooks//hooks.yaml, \mcp//mcp.yaml, \models//models.yaml, \workflows//, \prompts//, \scorers//).
Fail fast on missing or ambiguous mappings without falling back to the shared root.
Ensure pull reads and validates namespaced workflows/prompts/scorers, enforcing the rule that a namespace item overrides a root item with identical name and conflicts drop invalid versions.
Test Coverage:
Comprehensive unit and E2E regression tests for all resource types with --project\ and --role.
Thanks for picking this up, @legend91019! The plan looks great.
A couple of quick notes before you jump in:
Entry points: Pull coordination lives in src/pull.ts, and workflow sync/validation is in src/workflow/cache.ts (syncWorkflowDefinitions — there isn't a src/sync.ts).
Scope boundaries: Ensure teamai push respects scope isolation (workspace, user, self) so user-global or machine-local configs are never staged to team namespaces.
Workflow cache: A namespace conflict should drop that workflow from the runnable cache rather than keeping a stale version.
Looking forward to the PR! Let us know if you hit any questions along the way.
@legend91019 If you saw my earlier unedited comment mentioning learnings, ignore that part. Learnings should support --project and --role namespaces just like the other resources.
Activity
SaulMoro commentedon Oct 13, 2026
Could
workflows/,prompts/andscorers/be part of this? Pull distributes them (#818, #1076), and todayteamai pushdoesn't stage them.jeff-r2026 commentedon Oct 14, 2026
Yes. Include
workflows/,prompts/, andscorers/in this issue. Pull distributes them (#818, #1076), andteamai pushshould stage them the same way as the other resources, including--projectand--role:workflows/<ns>/prompts/<ns>/scorers/<ns>/SaulMoro commentedon Oct 14, 2026
On the pull side,
syncWorkflowDefinitionsreads onlyworkflows/*.yamlat the root, so a workflow pushed toworkflows/<ns>/would never become runnable. One of this issue's acceptance criteria is that pull and push use the same namespace rules, so pull could readworkflows/<ns>/,prompts/<ns>/andscorers/<ns>/here too, with the rule innamespace-resolver.ts.SaulMoro commentedon Oct 14, 2026
Notes from #1078 (#1129) for workflows under namespaces:
workflow: review-and-fixin a step, and the cache keeps one definition per name (workflows/cache/<name>.json). Once the sync applies the namespace rule (a namespace item replaces the root item of its name; one name in two active namespaces is a conflict) before writing the cache, references follow it with no engine change.codealready drop the cached copy that way.prompt_fileis resolved and cached into the definition at sync, including inside inline workflows.prompts/<ns>/resolution belongs in that same place.withkeys, and reads of child outputs and ends per file. It has to run against the resolved set (after namespace resolution), not the raw directory listing.The engine rules that span files are in
docs/dev/workflow-engine.md, added by #1129.legend91019 commentedon Oct 19, 2026
Hello! I would like to claim this issue and implement support for pushing all distributed resources with project and role namespaces:
ules, \�gents, \docs, \env, \hooks, \mcp, \models, \claudemd, \learnings, plus \workflows, \prompts, and \scorers\ per the accepted discussion.
SaulMoro commentedon Oct 19, 2026
Thanks for picking this up, @legend91019! The plan looks great.
A couple of quick notes before you jump in:
src/pull.ts, and workflow sync/validation is insrc/workflow/cache.ts(syncWorkflowDefinitions— there isn't asrc/sync.ts).teamai pushrespects scope isolation (workspace,user,self) so user-global or machine-local configs are never staged to team namespaces.Looking forward to the PR! Let us know if you hit any questions along the way.
legend91019 commentedon Oct 19, 2026
OK, thank you
SaulMoro commentedon Oct 19, 2026
@legend91019 If you saw my earlier unedited comment mentioning learnings, ignore that part. Learnings should support
--projectand--rolenamespaces just like the other resources.fix: address review findings — binary copy, prompt namespaces, env pl…
feat(push): support all namespaced resource types (#1234)