File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " opencode-plugin-openspec" ,
3- "version" : " 0.1.1 " ,
3+ "version" : " 0.1.2 " ,
44 "description" : " An OpenCode plugin that integrates OpenSpec, providing a dedicated agent for planning and specifying software architecture." ,
55 "type" : " module" ,
66 "main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ import { join } from "node:path";
44
55/**
66 * Checks if the current workspace is an OpenSpec project.
7- *
7+ *
88 * Detection logic:
9- * 1. Checks for `openspec/AGENTS.md ` (Primary indicator)
10- * 2. Checks for `AGENTS.md` in root (Secondary indicator )
9+ * 1. Checks for `openspec/config.yaml ` (Primary indicator - new OPSX format )
10+ * 2. Checks for `openspec/ AGENTS.md` (Fallback - legacy format )
1111 */
1212export async function isOpenSpecProject ( ctx : PluginInput ) : Promise < boolean > {
13- const openspecAgentsPath = join ( ctx . directory , "openspec" , "AGENTS.md" ) ;
13+ const openspecDir = join ( ctx . directory , "openspec" ) ;
14+ const configYamlPath = join ( openspecDir , "config.yaml" ) ;
15+ const agentsMdPath = join ( openspecDir , "AGENTS.md" ) ;
1416
15- return existsSync ( openspecAgentsPath ) ;
17+ return existsSync ( configYamlPath ) || existsSync ( agentsMdPath ) ;
1618}
You can’t perform that action at this time.
0 commit comments