# Write the Initiatives Plugin

**URL:** <https://discourse.sourcecred.io/t/write-the-initiatives-plugin/269>\
**Category:** Initiatives\
**Tags:** 🏗️in-progress\
**Created:** [October 6, 2019, 2:41am UTC](https://discourse.sourcecred.io/t/write-the-initiatives-plugin/269 "2019-10-06T02:41:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![decentralion](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/decentralion/32/7_2.png) [@decentralion](https://discourse.sourcecred.io/u/decentralion)\
**Post date:** [October 17, 2019, 11:15pm UTC](https://discourse.sourcecred.io/t/write-the-initiatives-plugin/269/3 "2019-10-17T23:15:45Z")

</div>

Super excited to have you championing this, @Beanow!

Here are some implementation thoughts:

- We’ll want to add a new, lightweight plugin. I the [Discourse plugin](https://github.com/sourcecred/sourcecred/tree/e043347526be83ab1d696387dab7db18ae172018/src/plugins/discourse) is a good reference case.

- A plugin consists of a few vital pieces:

- Our existing plugins get data from an external source (e.g. Discourse, GitHub, etc). This plugin will get data from another plugin–from the Discourse plugin. We currently don’t have any mechanism for cross plugin data dependencies. Eventually we should build clean APIs to handle this, for now I’m fine with something relatively hacky that gets the job done.

- Once we’ve figured out how to expose the Discourse mirror:

- The steps above should leave us with a working initiatives plugin, so we’ll just need to configure it. We have a fair bit of technical debt in how we configure plugin information, which you can see in the fact that [plugin configurations accumulate in a single hardcoded project config](https://github.com/sourcecred/sourcecred/blob/e043347526be83ab1d696387dab7db18ae172018/src/core/project.js#L26-L34). Since we’re going [Deep then Wide](https://discourse.sourcecred.io/t/deep-then-wide/102), I think it’s not yet time to pay off this debt. So we can just update the Project config to store information about whether initiatives are getting used, what their CategoryId is, etc.

- Then we can update [api/load](https://github.com/sourcecred/sourcecred/blob/e043347526be83ab1d696387dab7db18ae172018/src/api/load.js#L43) to use the new plugin information.

- Once we do this, we can start leveraging the initiatives system, by starting in on [cred bounties](https://discourse.sourcecred.io/t/enable-cred-bounties/257). Until then, as a hack we can give initiatives a high node weight, although this won’t be quite right–we want to unlock the cred when the initiative is completed, not when it is proposed.

If you think this post is a valuable contribution towards achieving the initiative, I suggest explicitly linking to this post as “Contribution” in the overall initiative wiki. A good way to reward the work of clearly documenting the context around achieving our goals. 🙂

---

_[View the full topic](https://discourse.sourcecred.io/t/write-the-initiatives-plugin/269)._
